diff --git a/.hgeol b/.hgeol index c7a59fec5..a9766f577 100644 --- a/.hgeol +++ b/.hgeol @@ -14,6 +14,8 @@ **.font = native **.scheme = native +**.tpl = native + **.xsd = native **.dox = native diff --git a/.hgtags b/.hgtags index ac1525929..f13a14cd9 100644 --- a/.hgtags +++ b/.hgtags @@ -5,3 +5,6 @@ fedf2aa443d09707beed814b0f499c6a5519cc84 ryzomcore/v0.10.0 edaa3624a56420b02ccc64c26059801a389927ee ryzomcore/v0.11.0 e3fe4855f22c3e75722e015dc33c091c340b3ad7 ryzomcore/v0.11.1 +9e583b717fd63be0be9fd60b99087abf1691ea49 ryzomcore/v0.11.2 +bfe5628e14a024ba7ea32e4b326ae433a07856b9 ryzomcore/v0.11.3 +9a6120735daa97c96ac5d85ca35c7f21f607bd87 ryzomcore/v0.12.0 diff --git a/code/CMakeLists.txt b/code/CMakeLists.txt index a6b7e2727..fe64ae6a7 100644 --- a/code/CMakeLists.txt +++ b/code/CMakeLists.txt @@ -1,8 +1,8 @@ #----------------------------------------------------------------------------- # -# NeL -# Authors: Nevrax and the NeL Community -# Version: 0.11.1 +# Ryzom Core +# Authors: Nevrax and the Ryzom Core Community +# Version: 0.12.0 # # Notes: # * Changing install location: add -DCMAKE_INSTALL_PREFIX:PATH=/my/new/path @@ -47,8 +47,8 @@ CHECK_OUT_OF_SOURCE() CMAKE_MINIMUM_REQUIRED(VERSION 2.6) PROJECT(RyzomCore CXX C) SET(NL_VERSION_MAJOR 0) -SET(NL_VERSION_MINOR 11) -SET(NL_VERSION_PATCH 1) +SET(NL_VERSION_MINOR 12) +SET(NL_VERSION_PATCH 0) SET(NL_VERSION "${NL_VERSION_MAJOR}.${NL_VERSION_MINOR}.${NL_VERSION_PATCH}") #----------------------------------------------------------------------------- @@ -112,16 +112,20 @@ IF(WITH_STATIC_LIBXML2) SET(LIBXML2_DEFINITIONS ${LIBXML2_DEFINITIONS} -DLIBXML_STATIC) ENDIF(WITH_STATIC_LIBXML2) +IF(WITH_LIBXML2_ICONV) + FIND_PACKAGE(Iconv REQUIRED) + INCLUDE_DIRECTORIES(${ICONV_INCLUDE_DIR}) + SET(LIBXML2_LIBRARIES ${LIBXML2_LIBRARIES} ${ICONV_LIBRARIES}) +ENDIF(WITH_LIBXML2_ICONV) + IF(WITH_STATIC) # libxml2 could need winsock2 library SET(LIBXML2_LIBRARIES ${LIBXML2_LIBRARIES} ${WINSOCK2_LIB}) # on Mac OS X libxml2 requires iconv and liblzma IF(APPLE) - FIND_PACKAGE(Iconv REQUIRED) FIND_PACKAGE(LibLZMA REQUIRED) - SET(LIBXML2_LIBRARIES ${LIBXML2_LIBRARIES} ${ICONV_LIBRARIES} ${LIBLZMA_LIBRARIES}) - INCLUDE_DIRECTORIES(${ICONV_INCLUDE_DIR}) + SET(LIBXML2_LIBRARIES ${LIBXML2_LIBRARIES} ${LIBLZMA_LIBRARIES}) ENDIF(APPLE) ENDIF(WITH_STATIC) @@ -153,9 +157,11 @@ IF(WITH_NEL) ENDIF(WITH_GUI) FIND_PACKAGE(CURL REQUIRED) - IF(WIN32 OR CURL_LIBRARIES MATCHES "\\.a") + IF((WIN32 OR CURL_LIBRARIES MATCHES "\\.a") AND WITH_STATIC_CURL) SET(CURL_STATIC ON) - ENDIF(WIN32 OR CURL_LIBRARIES MATCHES "\\.a") + ELSE((WIN32 OR CURL_LIBRARIES MATCHES "\\.a") AND WITH_STATIC_CURL) + SET(CURL_STATIC OFF) + ENDIF((WIN32 OR CURL_LIBRARIES MATCHES "\\.a") AND WITH_STATIC_CURL) IF(CURL_STATIC) SET(CURL_DEFINITIONS -DCURL_STATICLIB) @@ -229,30 +235,31 @@ IF(WITH_NEL_TESTS) ENDIF(WITH_NEL_TESTS) # packaging information -SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "NeL MMORPG Framework") -SET(CPACK_PACKAGE_VENDOR "NeL") +SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Ryzom Core MMORPG Framework") +SET(CPACK_PACKAGE_VENDOR "Ryzom Core") SET(CPACK_PACKAGE_DESCRIPTION_FILE ${CMAKE_SOURCE_DIR}/README) SET(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_SOURCE_DIR}/COPYING) SET(CPACK_PACKAGE_VERSION_MAJOR "${NL_VERSION_MAJOR}") SET(CPACK_PACKAGE_VERSION_MINOR "${NL_VERSION_MINOR}") SET(CPACK_PACKAGE_VERSION_PATCH "${NL_VERSION_PATCH}") SET(CPACK_INSTALL_CMAKE_PROJECTS "${CMAKE_BINARY_DIR};NeL;ALL;/") -SET(CPACK_PACKAGE_EXECUTABLES "nel${NL_VERSION}" "nel") +SET(CPACK_PACKAGE_EXECUTABLES "ryzomcore${NL_VERSION}" "ryzomcore") +SET(CPACK_SET_DESTDIR TRUE) # NSIS Specific Packing Setup -SET(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "NeL") +SET(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "RyzomCore") SET(CPACK_NSIS_MODIFY_PATH "ON") SET(CPACK_NSIS_MUI_ICON ${CMAKE_SOURCE_DIR}/resources/nevraxpill.ico) SET(CPACK_NSIS_MUI_UNIICON ${CMAKE_SOURCE_DIR}/resources/nevraxpill.ico) SET(CPACK_PACKAGE_ICON ${CMAKE_SOURCE_DIR}/resources\\\\nel.bmp) -SET(CPACK_NSIS_DISPLAY_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY} NeL") +SET(CPACK_NSIS_DISPLAY_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY} RyzomCore") SET(CPACK_NSIS_HELP_LINK "http:\\\\\\\\dev.ryzom.com") SET(CPACK_NSIS_URL_INFO_ABOUT "http:\\\\\\\\dev.ryzom.com\\\\projects\\\\nel\\\\wiki") SET(CPACK_NSIS_CONTACT "matt.raykowski@gmail.com") ## Source Packages -SET(CPACK_PACKAGE_FILE_NAME "nel-${NL_VERSION}") -SET(CPACK_SOURCE_PACKAGE_FILE_NAME "nel-${NL_VERSION}") +SET(CPACK_PACKAGE_FILE_NAME "ryzomcore-${NL_VERSION}") +SET(CPACK_SOURCE_PACKAGE_FILE_NAME "ryzomcore-${NL_VERSION}") IF(WIN32) #SET(CPACK_GENERATOR "NSIS") SET(CPACK_GENERATOR "NSIS;ZIP") diff --git a/code/CMakeModules/AndroidToolChain.cmake b/code/CMakeModules/AndroidToolChain.cmake index 049c39adf..6690497d4 100644 --- a/code/CMakeModules/AndroidToolChain.cmake +++ b/code/CMakeModules/AndroidToolChain.cmake @@ -26,63 +26,46 @@ IF(TARGET_CPU STREQUAL "armv7") SET(LIBRARY_ARCHITECTURE "armeabi-v7a") SET(CMAKE_SYSTEM_PROCESSOR "armv7") SET(TOOLCHAIN_ARCH "arm") - SET(TOOLCHAIN_PREFIX "arm-linux-androideabi") + SET(GCC_TOOLCHAIN_PREFIX "arm-linux-androideabi") SET(TOOLCHAIN_BIN_PREFIX "arm") SET(MINIMUM_NDK_TARGET 4) ELSEIF(TARGET_CPU STREQUAL "armv5") SET(LIBRARY_ARCHITECTURE "armeabi") SET(CMAKE_SYSTEM_PROCESSOR "armv5") SET(TOOLCHAIN_ARCH "arm") - SET(TOOLCHAIN_PREFIX "arm-linux-androideabi") + SET(GCC_TOOLCHAIN_PREFIX "arm-linux-androideabi") SET(TOOLCHAIN_BIN_PREFIX "arm") SET(MINIMUM_NDK_TARGET 4) ELSEIF(TARGET_CPU STREQUAL "x86") SET(LIBRARY_ARCHITECTURE "x86") SET(CMAKE_SYSTEM_PROCESSOR "x86") SET(TOOLCHAIN_ARCH "x86") - SET(TOOLCHAIN_PREFIX "x86") + SET(GCC_TOOLCHAIN_PREFIX "x86") SET(TOOLCHAIN_BIN_PREFIX "i686") SET(MINIMUM_NDK_TARGET 9) ELSEIF(TARGET_CPU STREQUAL "mips") SET(LIBRARY_ARCHITECTURE "mips") SET(CMAKE_SYSTEM_PROCESSOR "mips") SET(TOOLCHAIN_ARCH "mips") - SET(TOOLCHAIN_PREFIX "mipsel-linux-android") + SET(GCC_TOOLCHAIN_PREFIX "mipsel-linux-android") SET(TOOLCHAIN_BIN_PREFIX "mipsel") SET(MINIMUM_NDK_TARGET 9) ENDIF(TARGET_CPU STREQUAL "armv7") +SET(ANDROID_COMPILER "GCC") + +IF(NDK_TOOLCHAIN_VERSION STREQUAL "clang") + SET(ANDROID_COMPILER "clang") + SET(CLANG_TOOLCHAIN_PREFIX "llvm") + SET(CLANG ON) +ELSE() + SET(GCC_TOOLCHAIN_VERSION ${NDK_TOOLCHAIN_VERSION}) +ENDIF() + IF(NOT NDK_TARGET) SET(NDK_TARGET ${MINIMUM_NDK_TARGET}) ENDIF(NOT NDK_TARGET) -FILE(GLOB _TOOLCHAIN_VERSIONS "${NDK_ROOT}/toolchains/${TOOLCHAIN_PREFIX}-*") -IF(_TOOLCHAIN_VERSIONS) - LIST(SORT _TOOLCHAIN_VERSIONS) - LIST(REVERSE _TOOLCHAIN_VERSIONS) - FOREACH(_TOOLCHAIN_VERSION ${_TOOLCHAIN_VERSIONS}) - STRING(REGEX REPLACE ".+${TOOLCHAIN_PREFIX}-([0-9.]+)" "\\1" _TOOLCHAIN_VERSION "${_TOOLCHAIN_VERSION}") - IF(_TOOLCHAIN_VERSION MATCHES "^([0-9.]+)$") - LIST(APPEND NDK_TOOLCHAIN_VERSIONS ${_TOOLCHAIN_VERSION}) - ENDIF(_TOOLCHAIN_VERSION MATCHES "^([0-9.]+)$") - ENDFOREACH(_TOOLCHAIN_VERSION) -ENDIF(_TOOLCHAIN_VERSIONS) - -IF(NOT NDK_TOOLCHAIN_VERSIONS) - MESSAGE(FATAL_ERROR "No Android toolchain found in default search path ${NDK_ROOT}/toolchains") -ENDIF(NOT NDK_TOOLCHAIN_VERSIONS) - -IF(NDK_TOOLCHAIN_VERSION) - LIST(FIND NDK_TOOLCHAIN_VERSIONS "${NDK_TOOLCHAIN_VERSION}" _INDEX) - IF(_INDEX EQUAL -1) - LIST(GET NDK_TOOLCHAIN_VERSIONS 0 NDK_TOOLCHAIN_VERSION) - ENDIF(_INDEX EQUAL -1) -ELSE(NDK_TOOLCHAIN_VERSION) - LIST(GET NDK_TOOLCHAIN_VERSIONS 0 NDK_TOOLCHAIN_VERSION) -ENDIF(NDK_TOOLCHAIN_VERSION) - -MESSAGE(STATUS "Target Android NDK ${NDK_TARGET} and use GCC ${NDK_TOOLCHAIN_VERSION}") - IF(CMAKE_HOST_WIN32) SET(TOOLCHAIN_HOST "windows") SET(TOOLCHAIN_BIN_SUFFIX ".exe") @@ -94,33 +77,73 @@ ELSEIF(CMAKE_HOST_UNIX) SET(TOOLCHAIN_BIN_SUFFIX "") ENDIF(CMAKE_HOST_WIN32) -SET(TOOLCHAIN_ROOT "${NDK_ROOT}/toolchains/${TOOLCHAIN_PREFIX}-${NDK_TOOLCHAIN_VERSION}/prebuilt/${TOOLCHAIN_HOST}") -SET(PLATFORM_ROOT "${NDK_ROOT}/platforms/android-${NDK_TARGET}/arch-${TOOLCHAIN_ARCH}") +MACRO(SEARCH_TOOLCHAIN _COMPILER) + SET(${_COMPILER}_TOOLCHAIN_VERSIONS) + FILE(GLOB _TOOLCHAIN_VERSIONS "${NDK_ROOT}/toolchains/${${_COMPILER}_TOOLCHAIN_PREFIX}-*") + IF(_TOOLCHAIN_VERSIONS) + LIST(SORT _TOOLCHAIN_VERSIONS) + LIST(REVERSE _TOOLCHAIN_VERSIONS) + FOREACH(_TOOLCHAIN_VERSION ${_TOOLCHAIN_VERSIONS}) + STRING(REGEX REPLACE ".+${_PREFIX}-([0-9.]+)" "\\1" _TOOLCHAIN_VERSION "${_TOOLCHAIN_VERSION}") + IF(_TOOLCHAIN_VERSION MATCHES "^([0-9.]+)$") + LIST(APPEND ${_COMPILER}_TOOLCHAIN_VERSIONS ${_TOOLCHAIN_VERSION}) + ENDIF() + ENDFOREACH() + ENDIF() + + IF(NOT ${_COMPILER}_TOOLCHAIN_VERSIONS) + MESSAGE(FATAL_ERROR "No Android ${_COMPILER} toolchain found in default search path ${NDK_ROOT}/toolchains") + ENDIF() + + IF(${_COMPILER}_TOOLCHAIN_VERSIONS) + LIST(FIND ${_COMPILER}_TOOLCHAIN_VERSIONS "${${_COMPILER}_TOOLCHAIN_VERSION}" _INDEX) + IF(_INDEX EQUAL -1) + LIST(GET ${_COMPILER}_TOOLCHAIN_VERSIONS 0 ${_COMPILER}_TOOLCHAIN_VERSION) + ENDIF() + ELSE() + LIST(GET ${_COMPILER}_TOOLCHAIN_VERSIONS 0 ${_COMPILER}_TOOLCHAIN_VERSION) + ENDIF() + + SET(${_COMPILER}_TOOLCHAIN_ROOT "${NDK_ROOT}/toolchains/${${_COMPILER}_TOOLCHAIN_PREFIX}-${${_COMPILER}_TOOLCHAIN_VERSION}/prebuilt/${TOOLCHAIN_HOST}") + + IF(NOT EXISTS "${${_COMPILER}_TOOLCHAIN_ROOT}") + FILE(GLOB _TOOLCHAIN_PREFIXES "${${_COMPILER}_TOOLCHAIN_ROOT}*") + IF(_TOOLCHAIN_PREFIXES) + LIST(GET _TOOLCHAIN_PREFIXES 0 ${_COMPILER}_TOOLCHAIN_ROOT) + ENDIF(_TOOLCHAIN_PREFIXES) + ENDIF() +ENDMACRO() + +IF(CLANG) + SEARCH_TOOLCHAIN(CLANG) + + MESSAGE(STATUS "Target Android NDK ${NDK_TARGET} and use clang ${CLANG_TOOLCHAIN_VERSION}") +ENDIF() + +SEARCH_TOOLCHAIN(GCC) -IF(NOT EXISTS "${TOOLCHAIN_ROOT}") - FILE(GLOB _TOOLCHAIN_PREFIXES "${TOOLCHAIN_ROOT}*") - IF(_TOOLCHAIN_PREFIXES) - LIST(GET _TOOLCHAIN_PREFIXES 0 TOOLCHAIN_ROOT) - ENDIF(_TOOLCHAIN_PREFIXES) -ENDIF(NOT EXISTS "${TOOLCHAIN_ROOT}") +MESSAGE(STATUS "Target Android NDK ${NDK_TARGET} and use GCC ${GCC_TOOLCHAIN_VERSION}") +MESSAGE(STATUS "Found Android LLVM toolchain in ${CLANG_TOOLCHAIN_ROOT}") +MESSAGE(STATUS "Found Android GCC toolchain in ${GCC_TOOLCHAIN_ROOT}") + +SET(PLATFORM_ROOT "${NDK_ROOT}/platforms/android-${NDK_TARGET}/arch-${TOOLCHAIN_ARCH}") -MESSAGE(STATUS "Found Android toolchain in ${TOOLCHAIN_ROOT}") MESSAGE(STATUS "Found Android platform in ${PLATFORM_ROOT}") # include dirs SET(PLATFORM_INCLUDE_DIR "${PLATFORM_ROOT}/usr/include") SET(STL_DIR "${NDK_ROOT}/sources/cxx-stl/gnu-libstdc++") -IF(EXISTS "${STL_DIR}/${NDK_TOOLCHAIN_VERSION}") +IF(EXISTS "${STL_DIR}/${GCC_TOOLCHAIN_VERSION}") # NDK version >= 8b - SET(STL_DIR "${STL_DIR}/${NDK_TOOLCHAIN_VERSION}") -ENDIF(EXISTS "${STL_DIR}/${NDK_TOOLCHAIN_VERSION}") + SET(STL_DIR "${STL_DIR}/${GCC_TOOLCHAIN_VERSION}") +ENDIF(EXISTS "${STL_DIR}/${GCC_TOOLCHAIN_VERSION}") # Determine bin prefix for toolchain -FILE(GLOB _TOOLCHAIN_BIN_PREFIXES "${TOOLCHAIN_ROOT}/bin/${TOOLCHAIN_BIN_PREFIX}-*-gcc${TOOLCHAIN_BIN_SUFFIX}") +FILE(GLOB _TOOLCHAIN_BIN_PREFIXES "${GCC_TOOLCHAIN_ROOT}/bin/${TOOLCHAIN_BIN_PREFIX}-*-gcc${TOOLCHAIN_BIN_SUFFIX}") IF(_TOOLCHAIN_BIN_PREFIXES) LIST(GET _TOOLCHAIN_BIN_PREFIXES 0 _TOOLCHAIN_BIN_PREFIX) - STRING(REGEX REPLACE "${TOOLCHAIN_ROOT}/bin/([a-z0-9-]+)-gcc${TOOLCHAIN_BIN_SUFFIX}" "\\1" TOOLCHAIN_BIN_PREFIX "${_TOOLCHAIN_BIN_PREFIX}") + STRING(REGEX REPLACE "${GCC_TOOLCHAIN_ROOT}/bin/([a-z0-9-]+)-gcc${TOOLCHAIN_BIN_SUFFIX}" "\\1" TOOLCHAIN_BIN_PREFIX "${_TOOLCHAIN_BIN_PREFIX}") ENDIF(_TOOLCHAIN_BIN_PREFIXES) SET(STL_INCLUDE_DIR "${STL_DIR}/include") @@ -128,22 +151,48 @@ SET(STL_LIBRARY_DIR "${STL_DIR}/libs/${LIBRARY_ARCHITECTURE}") SET(STL_INCLUDE_CPU_DIR "${STL_LIBRARY_DIR}/include") SET(STL_LIBRARY "${STL_LIBRARY_DIR}/libgnustl_static.a") -SET(CMAKE_FIND_ROOT_PATH ${TOOLCHAIN_ROOT} ${PLATFORM_ROOT}/usr ${CMAKE_PREFIX_PATH} ${CMAKE_INSTALL_PREFIX} $ENV{EXTERNAL_ANDROID_PATH} CACHE string "Android find search path root") +MESSAGE(STATUS "STL include dir: ${STL_INCLUDE_DIR}") +MESSAGE(STATUS "STL library dir: ${STL_LIBRARY_DIR}") + +SET(CMAKE_FIND_ROOT_PATH ${CLANG_TOOLCHAIN_ROOT} ${GCC_TOOLCHAIN_ROOT} ${PLATFORM_ROOT}/usr ${CMAKE_PREFIX_PATH} ${CMAKE_INSTALL_PREFIX} $ENV{EXTERNAL_ANDROID_PATH} CACHE string "Android find search path root") SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY) SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) -INCLUDE_DIRECTORIES(${STL_INCLUDE_DIR} ${STL_INCLUDE_CPU_DIR}) - MACRO(SET_TOOLCHAIN_BINARY _NAME _BINARY) - SET(${_NAME} ${TOOLCHAIN_ROOT}/bin/${TOOLCHAIN_BIN_PREFIX}-${_BINARY}${TOOLCHAIN_BIN_SUFFIX}) + IF("${_BINARY}" MATCHES "clang") + SET(${_NAME} ${CLANG_TOOLCHAIN_ROOT}/bin/${_BINARY}${TOOLCHAIN_BIN_SUFFIX} CACHE PATH "" FORCE ) + ELSE() + SET(${_NAME} ${GCC_TOOLCHAIN_ROOT}/bin/${TOOLCHAIN_BIN_PREFIX}-${_BINARY}${TOOLCHAIN_BIN_SUFFIX} CACHE PATH "" FORCE) + ENDIF() ENDMACRO(SET_TOOLCHAIN_BINARY) -SET_TOOLCHAIN_BINARY(CMAKE_C_COMPILER gcc) -SET_TOOLCHAIN_BINARY(CMAKE_CXX_COMPILER g++) - # Force the compilers to GCC for Android include (CMakeForceCompiler) -CMAKE_FORCE_C_COMPILER(${CMAKE_C_COMPILER} GNU) -CMAKE_FORCE_CXX_COMPILER(${CMAKE_CXX_COMPILER} GNU) + +IF(CLANG) + SET_TOOLCHAIN_BINARY(CMAKE_C_COMPILER clang) + SET_TOOLCHAIN_BINARY(CMAKE_CXX_COMPILER clang++) + + CMAKE_FORCE_C_COMPILER(${CMAKE_C_COMPILER} clang) + CMAKE_FORCE_CXX_COMPILER(${CMAKE_CXX_COMPILER} clang) + + MESSAGE(STATUS "Using clang compiler") +ELSE() + SET_TOOLCHAIN_BINARY(CMAKE_C_COMPILER gcc) + SET_TOOLCHAIN_BINARY(CMAKE_CXX_COMPILER g++) + + CMAKE_FORCE_C_COMPILER(${CMAKE_C_COMPILER} GNU) + CMAKE_FORCE_CXX_COMPILER(${CMAKE_CXX_COMPILER} GNU) + + MESSAGE(STATUS "Using GCC compiler") +ENDIF() + +SET_TOOLCHAIN_BINARY(CMAKE_STRIP strip) +SET_TOOLCHAIN_BINARY(CMAKE_AR ar) +SET_TOOLCHAIN_BINARY(CMAKE_LINKER ld) +SET_TOOLCHAIN_BINARY(CMAKE_NM nm) +SET_TOOLCHAIN_BINARY(CMAKE_OBJCOPY objcopy) +SET_TOOLCHAIN_BINARY(CMAKE_OBJDUMP objdump) +SET_TOOLCHAIN_BINARY(CMAKE_RANLIB ranlib) diff --git a/code/CMakeModules/FindIconv.cmake b/code/CMakeModules/FindIconv.cmake index 5e9e48250..092b35702 100644 --- a/code/CMakeModules/FindIconv.cmake +++ b/code/CMakeModules/FindIconv.cmake @@ -1,4 +1,4 @@ -# - Try to find Iconv on Mac OS X +# - Try to find Iconv # Once done this will define # # ICONV_FOUND - system has Iconv @@ -6,78 +6,59 @@ # ICONV_LIBRARIES - Link these to use Iconv # ICONV_SECOND_ARGUMENT_IS_CONST - the second argument for iconv() is const # +include(CheckCCompilerFlag) +include(CheckCSourceCompiles) -IF(APPLE) - include(CheckCCompilerFlag) - include(CheckCSourceCompiles) - - IF (ICONV_INCLUDE_DIR AND ICONV_LIBRARIES) - # Already in cache, be silent - SET(ICONV_FIND_QUIETLY TRUE) - ENDIF (ICONV_INCLUDE_DIR AND ICONV_LIBRARIES) - - IF(APPLE) - FIND_PATH(ICONV_INCLUDE_DIR iconv.h - PATHS - /opt/local/include/ - NO_CMAKE_SYSTEM_PATH - ) - - FIND_LIBRARY(ICONV_LIBRARIES NAMES iconv libiconv c - PATHS - /opt/local/lib/ - NO_CMAKE_SYSTEM_PATH - ) - ENDIF(APPLE) - - FIND_PATH(ICONV_INCLUDE_DIR iconv.h PATHS /opt/local/include /sw/include) - - string(REGEX REPLACE "(.*)/include/?" "\\1" ICONV_INCLUDE_BASE_DIR "${ICONV_INCLUDE_DIR}") - - FIND_LIBRARY(ICONV_LIBRARIES NAMES iconv libiconv c HINTS "${ICONV_INCLUDE_BASE_DIR}/lib" PATHS /opt/local/lib) - - IF(ICONV_INCLUDE_DIR AND ICONV_LIBRARIES) - SET(ICONV_FOUND TRUE) - ENDIF(ICONV_INCLUDE_DIR AND ICONV_LIBRARIES) - - set(CMAKE_REQUIRED_INCLUDES ${ICONV_INCLUDE_DIR}) - set(CMAKE_REQUIRED_LIBRARIES ${ICONV_LIBRARIES}) - IF(ICONV_FOUND) - check_c_compiler_flag("-Werror" ICONV_HAVE_WERROR) - set (CMAKE_C_FLAGS_BACKUP "${CMAKE_C_FLAGS}") - if(ICONV_HAVE_WERROR) - set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror") - endif(ICONV_HAVE_WERROR) - check_c_source_compiles(" - #include - int main(){ - iconv_t conv = 0; - const char* in = 0; - size_t ilen = 0; - char* out = 0; - size_t olen = 0; - iconv(conv, &in, &ilen, &out, &olen); - return 0; - } - " ICONV_SECOND_ARGUMENT_IS_CONST ) - set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS_BACKUP}") - ENDIF(ICONV_FOUND) - set(CMAKE_REQUIRED_INCLUDES) - set(CMAKE_REQUIRED_LIBRARIES) - - IF(ICONV_FOUND) - IF(NOT ICONV_FIND_QUIETLY) - MESSAGE(STATUS "Found Iconv: ${ICONV_LIBRARIES}") - ENDIF(NOT ICONV_FIND_QUIETLY) - ELSE(ICONV_FOUND) - IF(Iconv_FIND_REQUIRED) - MESSAGE(FATAL_ERROR "Could not find Iconv") - ENDIF(Iconv_FIND_REQUIRED) - ENDIF(ICONV_FOUND) - - MARK_AS_ADVANCED( - ICONV_INCLUDE_DIR - ICONV_LIBRARIES - ICONV_SECOND_ARGUMENT_IS_CONST - ) -ENDIF(APPLE) +IF (ICONV_INCLUDE_DIR AND ICONV_LIBRARIES) + # Already in cache, be silent + SET(ICONV_FIND_QUIETLY TRUE) +ENDIF (ICONV_INCLUDE_DIR AND ICONV_LIBRARIES) + +FIND_PATH(ICONV_INCLUDE_DIR iconv.h HINTS /sw/include/ PATHS /opt/local) + +FIND_LIBRARY(ICONV_LIBRARIES NAMES iconv libiconv c PATHS /opt/local) + +IF(ICONV_INCLUDE_DIR AND ICONV_LIBRARIES) + SET(ICONV_FOUND TRUE) +ENDIF(ICONV_INCLUDE_DIR AND ICONV_LIBRARIES) + +set(CMAKE_REQUIRED_INCLUDES ${ICONV_INCLUDE_DIR}) +set(CMAKE_REQUIRED_LIBRARIES ${ICONV_LIBRARIES}) +IF(ICONV_FOUND) + check_c_compiler_flag("-Werror" ICONV_HAVE_WERROR) + set (CMAKE_C_FLAGS_BACKUP "${CMAKE_C_FLAGS}") + if(ICONV_HAVE_WERROR) + set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror") + endif(ICONV_HAVE_WERROR) + check_c_source_compiles(" + #include + int main(){ + iconv_t conv = 0; + const char* in = 0; + size_t ilen = 0; + char* out = 0; + size_t olen = 0; + iconv(conv, &in, &ilen, &out, &olen); + return 0; + } +" ICONV_SECOND_ARGUMENT_IS_CONST ) + set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS_BACKUP}") +ENDIF(ICONV_FOUND) +set(CMAKE_REQUIRED_INCLUDES) +set(CMAKE_REQUIRED_LIBRARIES) + +IF(ICONV_FOUND) + IF(NOT ICONV_FIND_QUIETLY) + MESSAGE(STATUS "Found Iconv: ${ICONV_LIBRARIES}") + ENDIF(NOT ICONV_FIND_QUIETLY) +ELSE(ICONV_FOUND) + IF(Iconv_FIND_REQUIRED) + MESSAGE(FATAL_ERROR "Could not find Iconv") + ENDIF(Iconv_FIND_REQUIRED) +ENDIF(ICONV_FOUND) + +MARK_AS_ADVANCED( + ICONV_INCLUDE_DIR + ICONV_LIBRARIES + ICONV_SECOND_ARGUMENT_IS_CONST +) diff --git a/code/CMakeModules/FindLibOVR.cmake b/code/CMakeModules/FindLibOVR.cmake index 1403a4b2c..707949613 100644 --- a/code/CMakeModules/FindLibOVR.cmake +++ b/code/CMakeModules/FindLibOVR.cmake @@ -38,7 +38,7 @@ ELSEIF(WIN32) ENDIF(UNIX) FIND_LIBRARY(LIBOVR_LIBRARY - NAMES ovr + NAMES ovr libovr PATHS $ENV{LIBOVR_DIR}/${LIBOVR_LIBRARY_BUILD_PATH} /usr/local/lib diff --git a/code/CMakeModules/FindLuabind.cmake b/code/CMakeModules/FindLuabind.cmake index 14f67ce44..73255077a 100644 --- a/code/CMakeModules/FindLuabind.cmake +++ b/code/CMakeModules/FindLuabind.cmake @@ -69,14 +69,48 @@ FIND_PATH(LUABIND_INCLUDE_DIR /opt/include ) -SET(LIBRARY_NAME_RELEASE luabind libluabind) -SET(LIBRARY_NAME_DEBUG luabind_d luabindd libluabind_d libluabindd) +SET(LIBRARY_NAME_RELEASE) +SET(LIBRARY_NAME_DEBUG) + +IF(WITH_LUA52) + IF(WITH_STLPORT) + LIST(APPEND LIBRARY_NAME_RELEASE luabind_stlport_lua52) + LIST(APPEND LIBRARY_NAME_DEBUG luabind_stlport_lua52d) + ENDIF(WITH_STLPORT) + + LIST(APPEND LIBRARY_NAME_RELEASE luabind_lua52) + LIST(APPEND LIBRARY_NAME_DEBUG luabind_lua52d) +ENDIF() + +IF(WITH_LUA51) + IF(WITH_STLPORT) + LIST(APPEND LIBRARY_NAME_RELEASE luabind_stlport_lua51) + LIST(APPEND LIBRARY_NAME_DEBUG luabind_stlport_lua51d) + ENDIF(WITH_STLPORT) + + LIST(APPEND LIBRARY_NAME_RELEASE luabind_lua51) + LIST(APPEND LIBRARY_NAME_DEBUG luabind_lua51d) +ENDIF() + +IF(WITH_LUA50) + IF(WITH_STLPORT) + LIST(APPEND LIBRARY_NAME_RELEASE luabind_stlport_lua50) + LIST(APPEND LIBRARY_NAME_DEBUG luabind_stlport_lua50d) + ENDIF(WITH_STLPORT) + + LIST(APPEND LIBRARY_NAME_RELEASE luabind_lua50) + LIST(APPEND LIBRARY_NAME_DEBUG luabind_lua50d) +ENDIF() IF(WITH_STLPORT) - SET(LIBRARY_NAME_RELEASE luabind_stlport ${LIBRARY_NAME_RELEASE}) - SET(LIBRARY_NAME_DEBUG luabind_stlportd ${LIBRARY_NAME_DEBUG}) + LIST(APPEND LIBRARY_NAME_RELEASE luabind_stlport) + LIST(APPEND LIBRARY_NAME_DEBUG luabind_stlportd) ENDIF(WITH_STLPORT) +# generic libraries names +LIST(APPEND LIBRARY_NAME_RELEASE luabind libluabind) +LIST(APPEND LIBRARY_NAME_DEBUG luabind_d luabindd libluabind_d libluabindd) + FIND_LIBRARY(LUABIND_LIBRARY_RELEASE NAMES ${LIBRARY_NAME_RELEASE} PATHS diff --git a/code/CMakeModules/FindMSVC.cmake b/code/CMakeModules/FindMSVC.cmake index 16455b02d..94146775d 100644 --- a/code/CMakeModules/FindMSVC.cmake +++ b/code/CMakeModules/FindMSVC.cmake @@ -57,13 +57,15 @@ ENDMACRO(DETECT_EXPRESS_VERSION) IF(MSVC12) DETECT_VC_VERSION("12.0") + SET(MSVC_TOOLSET "120") 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) + ENDIF(NOT MSVC12_REDIST_DIR) ELSEIF(MSVC11) DETECT_VC_VERSION("11.0") + SET(MSVC_TOOLSET "110") IF(NOT MSVC11_REDIST_DIR) # If you have VC++ 2012 Express, put x64/Microsoft.VC110.CRT/*.dll in ${EXTERNAL_PATH}/redist @@ -71,6 +73,7 @@ ELSEIF(MSVC11) ENDIF(NOT MSVC11_REDIST_DIR) ELSEIF(MSVC10) DETECT_VC_VERSION("10.0") + SET(MSVC_TOOLSET "100") IF(NOT MSVC10_REDIST_DIR) # If you have VC++ 2010 Express, put x64/Microsoft.VC100.CRT/*.dll in ${EXTERNAL_PATH}/redist @@ -78,8 +81,10 @@ ELSEIF(MSVC10) ENDIF(NOT MSVC10_REDIST_DIR) ELSEIF(MSVC90) DETECT_VC_VERSION("9.0") + SET(MSVC_TOOLSET "90") ELSEIF(MSVC80) DETECT_VC_VERSION("8.0") + SET(MSVC_TOOLSET "80") ENDIF(MSVC12) # If you plan to use VC++ compilers with WINE, set VC_DIR environment variable diff --git a/code/CMakeModules/FindMySQL.cmake b/code/CMakeModules/FindMySQL.cmake index eb2102c8d..0e0ebfd48 100644 --- a/code/CMakeModules/FindMySQL.cmake +++ b/code/CMakeModules/FindMySQL.cmake @@ -13,7 +13,7 @@ IF(MYSQL_INCLUDE_DIR AND MYSQL_LIBRARIES) SET(MYSQL_FOUND TRUE) -ELSE(MYSQL_INCLUDE_DIR AND MYSQL_LIBRARIES) +ELSE() FIND_PATH(MYSQL_INCLUDE_DIR mysql.h PATH_SUFFIXES mysql @@ -33,7 +33,7 @@ ELSE(MYSQL_INCLUDE_DIR AND MYSQL_LIBRARIES) PATHS $ENV{ProgramFiles}/MySQL/*/lib/opt $ENV{SystemDrive}/MySQL/*/lib/opt) - ELSE(WIN32 AND MSVC) + ELSE() FIND_LIBRARY(MYSQL_LIBRARY_RELEASE NAMES mysqlclient PATHS /usr/lib @@ -51,31 +51,30 @@ ELSE(MYSQL_INCLUDE_DIR AND MYSQL_LIBRARIES) /usr/local/lib/mysql /opt/local/lib/mysql5/mysql ) - ENDIF(WIN32 AND MSVC) + ENDIF() IF(MYSQL_INCLUDE_DIR) IF(MYSQL_LIBRARY_RELEASE) - SET(MYSQL_LIBRARIES optimized ${MYSQL_LIBRARY_RELEASE}) IF(MYSQL_LIBRARY_DEBUG) - SET(MYSQL_LIBRARIES ${MYSQL_LIBRARIES} debug ${MYSQL_LIBRARY_DEBUG}) - ELSE(MYSQL_LIBRARY_DEBUG) - SET(MYSQL_LIBRARIES ${MYSQL_LIBRARIES} debug ${MYSQL_LIBRARY_RELEASE}) - ENDIF(MYSQL_LIBRARY_DEBUG) + SET(MYSQL_LIBRARIES optimized ${MYSQL_LIBRARY_RELEASE} debug ${MYSQL_LIBRARY_DEBUG}) + ELSE() + SET(MYSQL_LIBRARIES ${MYSQL_LIBRARY_RELEASE}) + ENDIF() FIND_PACKAGE(OpenSSL) IF(OPENSSL_FOUND) SET(MYSQL_LIBRARIES ${MYSQL_LIBRARIES} ${OPENSSL_LIBRARIES}) - ENDIF(OPENSSL_FOUND) - ENDIF(MYSQL_LIBRARY_RELEASE) - ENDIF(MYSQL_INCLUDE_DIR) + ENDIF() + ENDIF() + ENDIF() IF(MYSQL_INCLUDE_DIR AND MYSQL_LIBRARIES) SET(MYSQL_FOUND TRUE) MESSAGE(STATUS "Found MySQL: ${MYSQL_INCLUDE_DIR}, ${MYSQL_LIBRARIES}") - ELSE(MYSQL_INCLUDE_DIR AND MYSQL_LIBRARIES) + ELSE() SET(MYSQL_FOUND FALSE) MESSAGE(STATUS "MySQL not found.") - ENDIF(MYSQL_INCLUDE_DIR AND MYSQL_LIBRARIES) + ENDIF() MARK_AS_ADVANCED(MYSQL_LIBRARY_RELEASE MYSQL_LIBRARY_DEBUG) -ENDIF(MYSQL_INCLUDE_DIR AND MYSQL_LIBRARIES) +ENDIF() diff --git a/code/CMakeModules/FindSquish.cmake b/code/CMakeModules/FindSquish.cmake index ad0f7ce80..61250fec1 100644 --- a/code/CMakeModules/FindSquish.cmake +++ b/code/CMakeModules/FindSquish.cmake @@ -55,10 +55,12 @@ FIND_LIBRARY(SQUISH_LIBRARY_DEBUG IF(SQUISH_INCLUDE_DIR) IF(SQUISH_LIBRARY_RELEASE) SET(SQUISH_FOUND "YES") - SET(SQUISH_LIBRARIES "optimized;${SQUISH_LIBRARY_RELEASE}") IF(SQUISH_LIBRARY_DEBUG) SET(SQUISH_LIBRARIES "${SQUISH_LIBRARIES};debug;${SQUISH_LIBRARY_DEBUG}") + ELSE(SQUISH_LIBRARY_DEBUG) + SET(SQUISH_LIBRARIES "${SQUISH_LIBRARIES};debug;${SQUISH_LIBRARY_RELEASE}") + MESSAGE("Debug Squish NOT found, using the release version!") ENDIF(SQUISH_LIBRARY_DEBUG) ENDIF(SQUISH_LIBRARY_RELEASE) ENDIF(SQUISH_INCLUDE_DIR) diff --git a/code/CMakeModules/FindWindowsSDK.cmake b/code/CMakeModules/FindWindowsSDK.cmake index 2e72af9e5..31288eb03 100644 --- a/code/CMakeModules/FindWindowsSDK.cmake +++ b/code/CMakeModules/FindWindowsSDK.cmake @@ -68,6 +68,10 @@ ENDIF(WINSDKCURRENT_VERSION_INCLUDE) SET(WINSDKENV_DIR $ENV{WINSDK_DIR}) +IF(NOT WINSDKENV_DIR) + SET(WINSDKENV_DIR $ENV{WindowsSDKDir}) +ENDIF(NOT WINSDKENV_DIR) + MACRO(FIND_WINSDK_VERSION_HEADERS) IF(WINSDK_DIR AND NOT WINSDK_VERSION) # Search version in headers @@ -78,7 +82,6 @@ MACRO(FIND_WINSDK_VERSION_HEADERS) ) IF(_MSI_FILE) - # Look for Windows SDK 8.0 FILE(STRINGS ${_MSI_FILE} _CONTENT REGEX "^#ifndef NTDDI_WIN8") @@ -181,7 +184,7 @@ MACRO(USE_CURRENT_WINSDK) # 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 from include environment variable in ${WINSDK_DIR}") + MESSAGE(STATUS "Found Windows SDK in INCLUDE environment variable: ${WINSDK_DIR}") BREAK() ENDIF(EXISTS ${_INCLUDE}/Windows.h) ENDFOREACH(_INCLUDE) @@ -280,6 +283,13 @@ FIND_PATH(WINSDK_SHARED_INCLUDE_DIR d3d9.h ${WINSDK_DIR}/Include ) +# directory where OpenGL headers are found +FIND_PATH(WINSDK_OPENGL_INCLUDE_DIR GL.h + HINTS + ${WINSDK_DIR}/Include/gl + ${WINSDK_DIR}/Include +) + # directory where all libraries are found FIND_PATH(WINSDK_LIBRARY_DIR ComCtl32.lib HINTS @@ -303,7 +313,7 @@ FIND_PROGRAM(WINSDK_MIDL midl IF(WINSDK_INCLUDE_DIR) SET(WINSDK_FOUND ON) - SET(WINSDK_INCLUDE_DIRS ${WINSDK_INCLUDE_DIR} ${WINSDK_SHARED_INCLUDE_DIR}) + SET(WINSDK_INCLUDE_DIRS ${WINSDK_INCLUDE_DIR} ${WINSDK_SHARED_INCLUDE_DIR} ${WINSDK_OPENGL_INCLUDE_DIR}) SET(CMAKE_LIBRARY_PATH ${WINSDK_LIBRARY_DIR} ${CMAKE_LIBRARY_PATH}) INCLUDE_DIRECTORIES(${WINSDK_INCLUDE_DIRS}) diff --git a/code/CMakeModules/GetRevision.cmake b/code/CMakeModules/GetRevision.cmake index 21b234f74..7f0a4e5f1 100644 --- a/code/CMakeModules/GetRevision.cmake +++ b/code/CMakeModules/GetRevision.cmake @@ -13,38 +13,44 @@ IF(SOURCE_DIR) IF(NOT ROOT_DIR AND SOURCE_DIR) SET(ROOT_DIR ${SOURCE_DIR}) - ENDIF(NOT ROOT_DIR AND SOURCE_DIR) + ENDIF() IF(NOT SOURCE_DIR AND ROOT_DIR) SET(SOURCE_DIR ${ROOT_DIR}) - ENDIF(NOT SOURCE_DIR AND ROOT_DIR) -ELSE(SOURCE_DIR) + ENDIF() +ELSE() SET(SOURCE_DIR ${CMAKE_SOURCE_DIR}) SET(ROOT_DIR ${CMAKE_SOURCE_DIR}) -ENDIF(SOURCE_DIR) +ENDIF() MACRO(NOW RESULT) IF (WIN32) EXECUTE_PROCESS(COMMAND "wmic" "os" "get" "localdatetime" OUTPUT_VARIABLE DATETIME) IF(NOT DATETIME MATCHES "ERROR") STRING(REGEX REPLACE ".*\n([0-9][0-9][0-9][0-9])([0-9][0-9])([0-9][0-9])([0-9][0-9])([0-9][0-9])([0-9][0-9]).*" "\\1-\\2-\\3 \\4:\\5:\\6" ${RESULT} "${DATETIME}") - ENDIF(NOT DATETIME MATCHES "ERROR") + ENDIF() ELSEIF(UNIX) EXECUTE_PROCESS(COMMAND "date" "+%Y-%m-%d %H:%M:%S" OUTPUT_VARIABLE DATETIME) STRING(REGEX REPLACE "([0-9: -]+).*" "\\1" ${RESULT} "${DATETIME}") - ELSE (WIN32) + ELSE() MESSAGE(SEND_ERROR "date not implemented") SET(${RESULT} "0000-00-00 00:00:00") - ENDIF (WIN32) + ENDIF() ENDMACRO(NOW) IF(EXISTS "${ROOT_DIR}/.svn/") - FIND_PACKAGE(Subversion) + FIND_PACKAGE(Subversion QUIET) IF(SUBVERSION_FOUND) Subversion_WC_INFO(${ROOT_DIR} ER) SET(REVISION ${ER_WC_REVISION}) ENDIF(SUBVERSION_FOUND) + + FIND_PACKAGE(TortoiseSVN QUIET) + + IF(TORTOISESVN_FOUND) + TORTOISESVN_GET_REVISION(${ROOT_DIR} REVISION) + ENDIF(TORTOISESVN_FOUND) ENDIF(EXISTS "${ROOT_DIR}/.svn/") IF(EXISTS "${ROOT_DIR}/.hg/") @@ -55,8 +61,8 @@ IF(EXISTS "${ROOT_DIR}/.hg/") SET(REVISION ${ER_WC_REVISION}) SET(CHANGESET ${ER_WC_CHANGESET}) SET(BRANCH ${ER_WC_BRANCH}) - ENDIF(MERCURIAL_FOUND) -ENDIF(EXISTS "${ROOT_DIR}/.hg/") + ENDIF() +ENDIF() # if processing exported sources, use "revision" file if exists IF(SOURCE_DIR AND NOT DEFINED REVISION) @@ -64,8 +70,8 @@ IF(SOURCE_DIR AND NOT DEFINED REVISION) IF(EXISTS ${REVISION_FILE}) FILE(STRINGS ${REVISION_FILE} REVISION LIMIT_COUNT 1) MESSAGE(STATUS "Read revision ${REVISION} from file") - ENDIF(EXISTS ${REVISION_FILE}) -ENDIF(SOURCE_DIR AND NOT DEFINED REVISION) + ENDIF() +ENDIF() IF(SOURCE_DIR AND DEFINED REVISION) IF(EXISTS ${SOURCE_DIR}/revision.h.in) @@ -73,5 +79,5 @@ IF(SOURCE_DIR AND DEFINED REVISION) NOW(BUILD_DATE) CONFIGURE_FILE(${SOURCE_DIR}/revision.h.in revision.h.txt) EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E copy revision.h.txt revision.h) # copy_if_different - ENDIF(EXISTS ${SOURCE_DIR}/revision.h.in) -ENDIF(SOURCE_DIR AND DEFINED REVISION) + ENDIF() +ENDIF() diff --git a/code/CMakeModules/nel.cmake b/code/CMakeModules/nel.cmake index 0474c7d7b..70113e11b 100644 --- a/code/CMakeModules/nel.cmake +++ b/code/CMakeModules/nel.cmake @@ -6,6 +6,9 @@ IF(NOT CMAKE_BUILD_TYPE) SET(CMAKE_BUILD_TYPE "Release" CACHE STRING "" FORCE) ENDIF(NOT CMAKE_BUILD_TYPE) +# Declare CMAKE_CONFIGURATION_TYPES before PROJECT +SET(CMAKE_CONFIGURATION_TYPES "Debug;Release" CACHE STRING "" FORCE) + ### # Helper macro that generates .pc and installs it. # Argument: name - the name of the .pc package, e.g. "nel-pacs.pc" @@ -252,6 +255,16 @@ MACRO(NL_SETUP_DEFAULT_OPTIONS) ELSE(WITH_STATIC) OPTION(WITH_STATIC_LIBXML2 "With static libxml2" OFF) ENDIF(WITH_STATIC) + IF (WITH_STATIC) + OPTION(WITH_STATIC_CURL "With static curl" ON ) + ELSE(WITH_STATIC) + OPTION(WITH_STATIC_CURL "With static curl" OFF) + ENDIF(WITH_STATIC) + IF(APPLE) + OPTION(WITH_LIBXML2_ICONV "With libxml2 using iconv" ON ) + ELSE(APPLE) + OPTION(WITH_LIBXML2_ICONV "With libxml2 using iconv" OFF) + ENDIF(APPLE) OPTION(WITH_STATIC_DRIVERS "With static drivers." OFF) IF(WIN32) OPTION(WITH_EXTERNAL "With provided external." ON ) @@ -360,6 +373,7 @@ MACRO(NL_SETUP_RYZOM_DEFAULT_OPTIONS) ### OPTION(WITH_LUA51 "Build Ryzom Core using Lua 5.1" ON ) OPTION(WITH_LUA52 "Build Ryzom Core using Lua 5.2" OFF) + OPTION(WITH_RYZOM_CLIENT_UAC "Ask to run as Administrator" OFF) ENDMACRO(NL_SETUP_RYZOM_DEFAULT_OPTIONS) MACRO(NL_SETUP_SNOWBALLS_DEFAULT_OPTIONS) @@ -384,8 +398,6 @@ MACRO(NL_SETUP_BUILD) # Debug = NL_DEBUG # Release = NL_RELEASE - SET(CMAKE_CONFIGURATION_TYPES "Debug;Release" CACHE STRING "" FORCE) - IF(CMAKE_BUILD_TYPE MATCHES "Debug") SET(NL_BUILD_MODE "NL_DEBUG") ELSE(CMAKE_BUILD_TYPE MATCHES "Debug") @@ -556,9 +568,15 @@ MACRO(NL_SETUP_BUILD) # Ignore default include paths ADD_PLATFORM_FLAGS("/X") - IF(MSVC11) + IF(MSVC12) ADD_PLATFORM_FLAGS("/Gy- /MP") - # /Ox is working with VC++ 2010, but custom optimizations don't exist + # /Ox is working with VC++ 2013, but custom optimizations don't exist + SET(RELEASE_CFLAGS "/Ox /GF /GS- ${RELEASE_CFLAGS}") + # without inlining it's unusable, use custom optimizations again + SET(DEBUG_CFLAGS "/Od /Ob1 /GF- ${DEBUG_CFLAGS}") + ELSEIF(MSVC11) + ADD_PLATFORM_FLAGS("/Gy- /MP") + # /Ox is working with VC++ 2012, but custom optimizations don't exist SET(RELEASE_CFLAGS "/Ox /GF /GS- ${RELEASE_CFLAGS}") # without inlining it's unusable, use custom optimizations again SET(DEBUG_CFLAGS "/Od /Ob1 /GF- ${DEBUG_CFLAGS}") @@ -580,9 +598,9 @@ MACRO(NL_SETUP_BUILD) SET(RELEASE_CFLAGS "/Ox /GF /GS- ${RELEASE_CFLAGS}") # without inlining it's unusable, use custom optimizations again SET(DEBUG_CFLAGS "/Od /Ob1 ${DEBUG_CFLAGS}") - ELSE(MSVC11) + ELSE(MSVC12) MESSAGE(FATAL_ERROR "Can't determine compiler version ${MSVC_VERSION}") - ENDIF(MSVC11) + ENDIF(MSVC12) ADD_PLATFORM_FLAGS("/D_CRT_SECURE_NO_DEPRECATE /D_CRT_SECURE_NO_WARNINGS /D_CRT_NONSTDC_NO_WARNINGS /DWIN32 /D_WINDOWS /Zm1000 /wd4250") diff --git a/code/nel/CMakeLists.txt b/code/nel/CMakeLists.txt index d3f0a3e5c..465aaaf43 100644 --- a/code/nel/CMakeLists.txt +++ b/code/nel/CMakeLists.txt @@ -84,4 +84,3 @@ IF(WITH_NEL_TOOLS OR WITH_NEL_MAXPLUGIN) ENDIF(WITH_NEL_TOOLS) ADD_SUBDIRECTORY(tools) ENDIF(WITH_NEL_TOOLS OR WITH_NEL_MAXPLUGIN) - diff --git a/code/nel/include/nel/3d/driver.h b/code/nel/include/nel/3d/driver.h index 8738a7dda..39cafc2de 100644 --- a/code/nel/include/nel/3d/driver.h +++ b/code/nel/include/nel/3d/driver.h @@ -493,7 +493,7 @@ public: * * NB: you must setupViewMatrix() BEFORE setupModelMatrix(), or else undefined results. */ - virtual void setupViewMatrix(const CMatrix &mtx)=0; + virtual void setupViewMatrix(const CMatrix &mtx) = 0; /** setup the view matrix (inverse of camera matrix). * Extended: give a cameraPos (mtx.Pos() is not taken into account but for getViewMatrix()), @@ -1422,7 +1422,6 @@ protected: private: bool _StaticMemoryToVRAM; - }; // -------------------------------------------------- diff --git a/code/nel/include/nel/3d/font_generator.h b/code/nel/include/nel/3d/font_generator.h index 36dbf309a..5a07733a0 100644 --- a/code/nel/include/nel/3d/font_generator.h +++ b/code/nel/include/nel/3d/font_generator.h @@ -54,11 +54,13 @@ public: /** generate and return a bitmap * \param c the unicode char * \param size size of the generated font in ??? format + * \param embolden set embolden style (bold) + * \param oblique set oblique style (slanted, italic) * \param width width of the generated bitmap, this value is set by this function * \param height height of the generated bitmap, this value is set by this function * \param pitch pitch of the generated bitmap (+ or - the number of bytes per row), this value is set by this function */ - uint8 *getBitmap (ucchar c, uint32 size, uint32 &width, uint32 &height, uint32 &pitch, sint32 &left, sint32 &top, sint32 &advx, uint32 &glyphIndex); + uint8 *getBitmap (ucchar c, uint32 size, bool embolden, bool oblique, uint32 &width, uint32 &height, uint32 &pitch, sint32 &left, sint32 &top, sint32 &advx, uint32 &glyphIndex); /** returns the width and height of a character using a specific size and * diff --git a/code/nel/include/nel/3d/font_manager.h b/code/nel/include/nel/3d/font_manager.h index 41bb935e5..26ea02ce0 100644 --- a/code/nel/include/nel/3d/font_manager.h +++ b/code/nel/include/nel/3d/font_manager.h @@ -102,6 +102,8 @@ public: * \param fontGen font generator * \param color primitive blocks color * \param fontSize font size + * \param embolden font style bold + * \param oblique font style slanted (italic) * \param desc display descriptor (screen size, font ratio) * \param output computed string * \param keep800x600Ratio true if you want that CFontManager look at Driver window size, and resize fontSize so it keeps same size... @@ -110,6 +112,8 @@ public: CFontGenerator *fontGen, const NLMISC::CRGBA &color, uint32 fontSize, + bool embolden, + bool oblique, IDriver *driver, CComputedString& output, bool keep800x600Ratio= true); @@ -121,6 +125,8 @@ public: CFontGenerator *fontGen, const NLMISC::CRGBA &color, uint32 fontSize, + bool embolden, + bool oblique, IDriver *driver, CComputedString &output, bool keep800x600Ratio= true); @@ -132,6 +138,8 @@ public: CFontGenerator *fontGen, const NLMISC::CRGBA &color, uint32 fontSize, + bool embolden, + bool oblique, IDriver *driver, CComputedString &output, bool keep800x600Ratio= true); diff --git a/code/nel/include/nel/3d/text_context.h b/code/nel/include/nel/3d/text_context.h index 8cf7ad7f0..156ea9f79 100644 --- a/code/nel/include/nel/3d/text_context.h +++ b/code/nel/include/nel/3d/text_context.h @@ -74,6 +74,10 @@ public: void setFontSize (uint32 fontSize) { _FontSize = fontSize; } + void setEmbolden (bool b) { _Embolden = b; } + + void setOblique (bool b) { _Oblique = b; } + void setHotSpot (CComputedString::THotSpot hotSpot) { _HotSpot = hotSpot; } void setScaleX (float scaleX) { _ScaleX = scaleX; } @@ -101,6 +105,10 @@ public: uint32 getFontSize () const { return _FontSize; } + bool getEmbolden () const { return _Embolden; } + + bool getOblique () const { return _Oblique; } + CComputedString::THotSpot getHotSpot() const { return _HotSpot; } float getScaleX() const { return _ScaleX; } @@ -240,7 +248,7 @@ public: nlassert(_FontGen); // compute the string just one time - _FontManager->computeString (ucstr, _FontGen, _Color, _FontSize, _Driver, _TempString, _Keep800x600Ratio); + _FontManager->computeString (ucstr, _FontGen, _Color, _FontSize, _Embolden, _Oblique, _Driver, _TempString, _Keep800x600Ratio); // draw shaded if (_Shaded) @@ -279,7 +287,7 @@ public: // compute the string just one time char *str; NLMISC_CONVERT_VARGS (str, format, NLMISC::MaxCStringSize); - _FontManager->computeString (str, _FontGen, _Color, _FontSize, _Driver, _TempString, _Keep800x600Ratio); + _FontManager->computeString (str, _FontGen, _Color, _FontSize, _Embolden, _Oblique, _Driver, _TempString, _Keep800x600Ratio); // draw shaded if (_Shaded) @@ -334,7 +342,7 @@ public: */ void computeString (const std::string& s, CComputedString& output) { - _FontManager->computeString (s, _FontGen, _Color, _FontSize, _Driver, output, _Keep800x600Ratio); + _FontManager->computeString (s, _FontGen, _Color, _FontSize, _Embolden, _Oblique, _Driver, output, _Keep800x600Ratio); } /** @@ -345,12 +353,12 @@ public: */ void computeString (const ucstring& s, CComputedString& output) { - _FontManager->computeString (s, _FontGen, _Color, _FontSize, _Driver, output, _Keep800x600Ratio); + _FontManager->computeString (s, _FontGen, _Color, _FontSize, _Embolden, _Oblique, _Driver, output, _Keep800x600Ratio); } void computeStringInfo (const ucstring& s, CComputedString& output) { - _FontManager->computeStringInfo (s, _FontGen, _Color, _FontSize, _Driver, output, _Keep800x600Ratio); + _FontManager->computeStringInfo (s, _FontGen, _Color, _FontSize, _Embolden, _Oblique, _Driver, output, _Keep800x600Ratio); } /// Debug : write to the disk the texture cache @@ -381,6 +389,10 @@ private: /// Font size; uint32 _FontSize; + bool _Embolden; + + bool _Oblique; + /// Current text color NLMISC::CRGBA _Color; diff --git a/code/nel/include/nel/3d/text_context_user.h b/code/nel/include/nel/3d/text_context_user.h index 8e14dc878..b05238dbf 100644 --- a/code/nel/include/nel/3d/text_context_user.h +++ b/code/nel/include/nel/3d/text_context_user.h @@ -66,6 +66,10 @@ public: void setColor(NLMISC::CRGBA color); void setFontSize(uint32 fontSize); uint32 getFontSize() const; + void setEmbolden(bool b); + bool getEmbolden() const; + void setOblique(bool b); + bool getOblique() const; void setHotSpot(THotSpot hotSpot); THotSpot getHotSpot() const; void setScaleX(float scaleX); diff --git a/code/nel/include/nel/3d/texture_font.h b/code/nel/include/nel/3d/texture_font.h index 98e94c82f..3aeb77b65 100644 --- a/code/nel/include/nel/3d/texture_font.h +++ b/code/nel/include/nel/3d/texture_font.h @@ -43,6 +43,8 @@ public: ucchar Char; CFontGenerator *FontGenerator; sint Size; + bool Embolden; + bool Oblique; // The less recently used infos @@ -66,6 +68,8 @@ public: ucchar Char; CFontGenerator *FontGenerator; sint Size; + bool Embolden; + bool Oblique; uint32 getVal(); //bool operator < (const SLetterKey&k) const; diff --git a/code/nel/include/nel/3d/track_tcb.h b/code/nel/include/nel/3d/track_tcb.h index e91cfb397..153dcbc54 100644 --- a/code/nel/include/nel/3d/track_tcb.h +++ b/code/nel/include/nel/3d/track_tcb.h @@ -218,7 +218,7 @@ protected: date*= previous->OODeltaTime; NLMISC::clamp(date, 0,1); - date = this->ease(previous, date); + date = this->ease(previous, (float)date); float hb[4]; this->computeHermiteBasis(date, hb); diff --git a/code/nel/include/nel/3d/u_text_context.h b/code/nel/include/nel/3d/u_text_context.h index 1056d3839..0aa9ea2f9 100644 --- a/code/nel/include/nel/3d/u_text_context.h +++ b/code/nel/include/nel/3d/u_text_context.h @@ -137,6 +137,24 @@ public: * \return the font size */ virtual uint32 getFontSize () const = 0; + /** + * set embolden (bold) state + * \param embolden the embbolden state + */ + virtual void setEmbolden (bool b) = 0; + /** + * \return the embolden state + */ + virtual bool getEmbolden () const = 0; + /** + * set oblique (italic) state + * \param oblique the oblique state + */ + virtual void setOblique (bool b) = 0; + /** + * \return the oblique state + */ + virtual bool getOblique () const = 0; /** * set the hot spot * \param fonSize the font size diff --git a/code/nel/include/nel/gui/ctrl_base.h b/code/nel/include/nel/gui/ctrl_base.h index 71e6cad56..3b522e114 100644 --- a/code/nel/include/nel/gui/ctrl_base.h +++ b/code/nel/include/nel/gui/ctrl_base.h @@ -50,6 +50,8 @@ namespace NLGUI // see interface.txt for meaning of auto _ToolTipParentPosRef= Hotspot_TTAuto; _ToolTipPosRef= Hotspot_TTAuto; + _EventX = 0; + _EventY = 0; resizer = false; } @@ -70,6 +72,9 @@ namespace NLGUI bool handleEvent (const NLGUI::CEventDescriptor &event); + sint32 getEventX() { return _EventX; } + sint32 getEventY() { return _EventY; } + virtual CCtrlBase *getSubCtrl (sint32 /* x */, sint32 /* y */) { return this; } /// Debug @@ -181,6 +186,9 @@ namespace NLGUI static std::map< std::string, std::map< std::string, std::string > > AHCache; bool resizer; + + sint32 _EventX; + sint32 _EventY; }; } diff --git a/code/nel/include/nel/gui/ctrl_text_button.h b/code/nel/include/nel/gui/ctrl_text_button.h index d2b49ffa9..4f5251a8b 100644 --- a/code/nel/include/nel/gui/ctrl_text_button.h +++ b/code/nel/include/nel/gui/ctrl_text_button.h @@ -51,6 +51,7 @@ namespace NLGUI // Init part virtual bool parse (xmlNodePtr cur,CInterfaceGroup * parentGroup); + virtual void checkCoords(); virtual void updateCoords(); virtual uint32 getMemory() { return (uint32)(sizeof(*this)+_Id.size()); } diff --git a/code/nel/include/nel/gui/dbgroup_combo_box.h b/code/nel/include/nel/gui/dbgroup_combo_box.h index 75208b1e3..e7be1de4b 100644 --- a/code/nel/include/nel/gui/dbgroup_combo_box.h +++ b/code/nel/include/nel/gui/dbgroup_combo_box.h @@ -60,7 +60,7 @@ namespace NLGUI void setText(uint i, const ucstring &text); void insertText(uint i, const ucstring &text); const ucstring &getText(uint i) const; - const uint &getTextId(uint i) const; + uint getTextId(uint i) const; uint getTextPos(uint nId) const; const ucstring &getTexture(uint i) const; void removeText(uint nPos); diff --git a/code/nel/include/nel/gui/dbview_number.h b/code/nel/include/nel/gui/dbview_number.h index 2c76a255d..bfa963fb6 100644 --- a/code/nel/include/nel/gui/dbview_number.h +++ b/code/nel/include/nel/gui/dbview_number.h @@ -55,9 +55,7 @@ namespace NLGUI static void forceLink(); protected: - - sint64 getVal() { if (_Modulo == 0) return (_Number.getSInt64() / _Divisor); - else return (_Number.getSInt64() / _Divisor)%_Modulo; } + sint64 getVal(); protected: diff --git a/code/nel/include/nel/gui/group_editbox.h b/code/nel/include/nel/gui/group_editbox.h index 7ea2ab529..771bdc482 100644 --- a/code/nel/include/nel/gui/group_editbox.h +++ b/code/nel/include/nel/gui/group_editbox.h @@ -283,6 +283,10 @@ namespace NLGUI sint32 _ViewTextDeltaX; + CViewText* getVT() const{ return _ViewText; } + + void createViewText(); + private: void setupDisplayText(); void makeTopWindow(); diff --git a/code/nel/include/nel/gui/group_editbox_decor.h b/code/nel/include/nel/gui/group_editbox_decor.h new file mode 100644 index 000000000..975177612 --- /dev/null +++ b/code/nel/include/nel/gui/group_editbox_decor.h @@ -0,0 +1,53 @@ +// Ryzom - MMORPG Framework +// Copyright (C) 2014 Laszlo Kis-Adam +// 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 . + +#ifndef GROUP_EDITBOX_DECOR +#define GROUP_EDITBOX_DECOR + +#include "nel/gui/group_editbox.h" + +namespace NLGUI +{ + /// Decorated CGroupEditBox + class CGroupEditBoxDecor : public CGroupEditBox + { + public: + DECLARE_UI_CLASS( CGroupEditBoxDecor ) + + CGroupEditBoxDecor( const TCtorParam ¶m ); + ~CGroupEditBoxDecor(); + + void moveBy( sint32 x, sint32 y ); + + void setIdRecurse( const std::string &newID ); + + std::string getProperty( const std::string &name ) const; + void setProperty( const std::string &name, const std::string &value ); + xmlNodePtr serialize( xmlNodePtr parentNode, const char *type ) const; + bool parse( xmlNodePtr cur, CInterfaceGroup *parent ); + void draw(); + void updateCoords(); + + static void forceLink(); + + private: + class EBDPrivate *_Pvt; + }; +} + +#endif + diff --git a/code/nel/include/nel/gui/group_html.h b/code/nel/include/nel/gui/group_html.h index 21d609af3..34105028c 100644 --- a/code/nel/include/nel/gui/group_html.h +++ b/code/nel/include/nel/gui/group_html.h @@ -17,7 +17,6 @@ #ifndef CL_GROUP_HTML_H #define CL_GROUP_HTML_H -#define CURL_STATICLIB 1 #include #include "nel/misc/types_nl.h" @@ -103,11 +102,14 @@ namespace NLGUI // Browse virtual void browse (const char *url); + // parse html string using libxml2 parser + virtual bool parseHtml(std::string htmlString); + // Refresh void refresh(); // submit form - void submitForm (uint formId, const char *submitButtonName); + void submitForm (uint formId, const char *submitButtonType, const char *submitButtonName, const char *submitButtonValue, sint32 x, sint32 y); // Browse error void browseError (const char *msg); @@ -200,6 +202,7 @@ namespace NLGUI int luaBeginElement(CLuaState &ls); int luaEndElement(CLuaState &ls); int luaShowDiv(CLuaState &ls); + int luaParseHtml(CLuaState &ls); REFLECT_EXPORT_START(CGroupHTML, CGroupScrollText) REFLECT_LUA_METHOD("browse", luaBrowse) @@ -211,6 +214,7 @@ namespace NLGUI REFLECT_LUA_METHOD("beginElement", luaBeginElement) REFLECT_LUA_METHOD("endElement", luaEndElement) REFLECT_LUA_METHOD("showDiv", luaShowDiv) + REFLECT_LUA_METHOD("parseHtml", luaParseHtml) REFLECT_STRING("url", getURL, setURL) REFLECT_FLOAT("timeout", getTimeout, setTimeout) REFLECT_EXPORT_END @@ -229,7 +233,7 @@ namespace NLGUI virtual void addText (const char * buf, int len); // A link has been parsed - virtual void addLink (uint element_number, uint attribute_number, HTChildAnchor *anchor, const BOOL *present, const char **value); + virtual void addLink (uint element_number, const BOOL *present, const char **value); // A new begin HTML element has been parsed ( for exemple) virtual void beginElement (uint element_number, const BOOL *present, const char **value); @@ -252,6 +256,10 @@ namespace NLGUI // the current request is terminated virtual void requestTerminated(HTRequest *request); + // libxml2 html parser functions + void htmlElement(xmlNode *node, int element_number); + void htmlWalkDOM(xmlNode *a_node); + // Get Home URL virtual std::string home(); @@ -328,7 +336,11 @@ namespace NLGUI bool _BrowseNextTime; bool _PostNextTime; uint _PostFormId; + std::string _PostFormSubmitType; std::string _PostFormSubmitButton; + std::string _PostFormSubmitValue; + sint32 _PostFormSubmitX; + sint32 _PostFormSubmitY; // Browsing.. bool _Browsing; @@ -422,6 +434,38 @@ namespace NLGUI return _FontSize.back(); } + std::vector _FontWeight; + inline uint getFontWeight() const + { + if (_FontWeight.empty()) + return 400; + return _FontWeight.back(); + } + + std::vector _FontOblique; + inline uint getFontOblique() const + { + if (_FontOblique.empty()) + return false; + return _FontOblique.back(); + } + + std::vector _FontUnderlined; + inline uint getFontUnderlined() const + { + if (_FontUnderlined.empty()) + return false; + return _FontUnderlined.back(); + } + + std::vector _FontStrikeThrough; + inline uint getFontStrikeThrough() const + { + if (_FontStrikeThrough.empty()) + return false; + return _FontStrikeThrough.back(); + } + // Current link std::vector _Link; inline const char *getLink() const @@ -541,6 +585,26 @@ namespace NLGUI }; std::vector _CellParams; + class CStyleParams + { + public: + CStyleParams () : TextColor(255,255,255,255) + { + FontSize=10; + FontWeight=400; + FontOblique=false; + Underlined=false; + StrikeThrough=false; + } + uint FontSize; + uint FontWeight; + bool FontOblique; + NLMISC::CRGBA TextColor; + bool Underlined; + bool StrikeThrough; + + }; + // Indentation uint _Indent; @@ -610,8 +674,16 @@ namespace NLGUI typedef std::map > TGroupHtmlByUIDMap; static TGroupHtmlByUIDMap _GroupHtmlByUID; - private: + // read style attribute + void getStyleParams(const std::string &styleString, CStyleParams &style, bool inherit = true); + // load and render local html file (from bnp for example) + void doBrowseLocalFile(const std::string &filename); + + // render html string as new browser page + bool renderHtmlString(const std::string &html); + + private: // decode all HTML entities static ucstring decodeHTMLEntities(const ucstring &str); @@ -642,6 +714,7 @@ namespace NLGUI void checkImageDownload(); void addImageDownload(const std::string &url, CViewBase *img); std::string localImageName(const std::string &url); + std::string getAbsoluteUrl(const std::string &url); bool isTrustedDomain(const std::string &domain); void setImage(CViewBase *view, const std::string &file); diff --git a/code/nel/include/nel/gui/interface_element.h b/code/nel/include/nel/gui/interface_element.h index c1f6d20e7..e2f9ffc87 100644 --- a/code/nel/include/nel/gui/interface_element.h +++ b/code/nel/include/nel/gui/interface_element.h @@ -117,6 +117,7 @@ namespace NLGUI editorSelected = false; serializable = true; + _EditorSelectable = true; } // dtor @@ -531,9 +532,16 @@ namespace NLGUI /// Aligns the element to the other element specified void alignTo( CInterfaceElement *other ); + /// Specifies if the widget can be selected in the editor + void setEditorSelectable( bool b ){ _EditorSelectable = b; } + + /// Tells if the widget can be selected in the editor + bool isEditorSelectable() const{ return _EditorSelectable; } + protected: bool editorSelected; + bool _EditorSelectable; static bool editorMode; diff --git a/code/nel/include/nel/gui/interface_property.h b/code/nel/include/nel/gui/interface_property.h index 63a62ef0e..4ed6e701e 100644 --- a/code/nel/include/nel/gui/interface_property.h +++ b/code/nel/include/nel/gui/interface_property.h @@ -47,6 +47,15 @@ namespace NLGUI _VolatileValue = NULL; } + /// Tells if this property has a value + bool hasValue() const + { + if( _VolatileValue != NULL ) + return true; + else + return false; + } + NLMISC::CCDBNodeLeaf* getNodePtr() const { return _VolatileValue; diff --git a/code/nel/include/nel/gui/libwww.h b/code/nel/include/nel/gui/libwww.h index 6a744b8c0..b1f070ddd 100644 --- a/code/nel/include/nel/gui/libwww.h +++ b/code/nel/include/nel/gui/libwww.h @@ -25,6 +25,8 @@ extern "C" #include "WWWInit.h" } +#include "nel/misc/rgba.h" + namespace NLGUI { class CCtrlBaseButton; @@ -216,6 +218,13 @@ namespace NLGUI HTML_ATTR(DIV,STYLE), }; + enum + { + HTML_ATTR(SPAN,CLASS) = 0, + HTML_ATTR(SPAN,ID), + HTML_ATTR(SPAN,STYLE), + }; + #undef HTML_ATTR diff --git a/code/nel/include/nel/gui/lua_object.h b/code/nel/include/nel/gui/lua_object.h index 1564df080..2360f1609 100644 --- a/code/nel/include/nel/gui/lua_object.h +++ b/code/nel/include/nel/gui/lua_object.h @@ -285,8 +285,7 @@ namespace NLGUI class CLuaHashMapTraits { public: - static const size_t bucket_size = 4; - static const size_t min_buckets = 8; + enum { bucket_size = 4, min_buckets = 8, }; CLuaHashMapTraits() {} diff --git a/code/nel/include/nel/gui/view_text.h b/code/nel/include/nel/gui/view_text.h index d4377f38e..35069a9ea 100644 --- a/code/nel/include/nel/gui/view_text.h +++ b/code/nel/include/nel/gui/view_text.h @@ -81,6 +81,8 @@ namespace NLGUI void setText (const ucstring &text); void setFontSize (sint nFontSize); + void setEmbolden (bool nEmbolden); + void setOblique (bool nOblique); void setColor (const NLMISC::CRGBA &color); void setShadow (bool bShadow); void setShadowOutline (bool bShadowOutline); @@ -101,6 +103,8 @@ namespace NLGUI ucstring getText() const { return _Text; } sint getFontSize() const; + bool getEmbolden() { return _Embolden; } + bool getOblique() { return _Oblique; } NLMISC::CRGBA getColor() { return _Color; } bool getShadow() { return _Shadow; } bool getShadowOutline() { return _ShadowOutline; } @@ -125,6 +129,8 @@ namespace NLGUI uint getLastLineW () const; void setUnderlined (bool underlined) { _Underlined = underlined; } bool getUnderlined () const { return _Underlined; } + void setStrikeThrough (bool linethrough) { _StrikeThrough = linethrough; } + bool getStrikeThrough () const { return _StrikeThrough; } // true if the viewText is a single line clamped. bool isSingleLineTextClamped() const {return _SingleLineTextClamped;} @@ -220,6 +226,8 @@ namespace NLGUI NL3D::UTextContext::CStringInfo _Info; /// the font size sint _FontSize; + bool _Embolden; + bool _Oblique; // width of the font in pixel. Just a Hint for tabing format (computed with '_') uint _FontWidth; // height of the font in pixel. @@ -374,6 +382,7 @@ namespace NLGUI bool _TextSelection : 1; bool _InvalidTextContext : 1; bool _Underlined : 1; + bool _StrikeThrough : 1; bool _ContinuousUpdate : 1; bool _Setuped : 1; diff --git a/code/nel/include/nel/misc/app_context.h b/code/nel/include/nel/misc/app_context.h index e30642646..53c5c86f4 100644 --- a/code/nel/include/nel/misc/app_context.h +++ b/code/nel/include/nel/misc/app_context.h @@ -88,6 +88,8 @@ namespace NLMISC virtual void setNoAssert(bool noAssert) =0; virtual bool getAlreadyCreateSharedAmongThreads() =0; virtual void setAlreadyCreateSharedAmongThreads(bool b) =0; + virtual bool isWindowedApplication() = 0; + virtual void setWindowedApplication(bool b = true) = 0; //@} protected: /// Called by derived class to finalize initialisation of context @@ -131,6 +133,8 @@ namespace NLMISC virtual void setNoAssert(bool noAssert); virtual bool getAlreadyCreateSharedAmongThreads(); virtual void setAlreadyCreateSharedAmongThreads(bool b); + virtual bool isWindowedApplication(); + virtual void setWindowedApplication(bool b); private: /// Singleton registry @@ -147,6 +151,7 @@ namespace NLMISC bool DebugNeedAssert; bool NoAssert; bool AlreadyCreateSharedAmongThreads; + bool WindowedApplication; }; /** This class implements the context interface for the a library module. @@ -183,6 +188,8 @@ namespace NLMISC virtual void setNoAssert(bool noAssert); virtual bool getAlreadyCreateSharedAmongThreads(); virtual void setAlreadyCreateSharedAmongThreads(bool b); + virtual bool isWindowedApplication(); + virtual void setWindowedApplication(bool b); private: /// Pointer to the application context. diff --git a/code/nel/include/nel/misc/class_id.h b/code/nel/include/nel/misc/class_id.h index 0628e8030..d02fc5646 100644 --- a/code/nel/include/nel/misc/class_id.h +++ b/code/nel/include/nel/misc/class_id.h @@ -61,8 +61,7 @@ public: class CClassIdHashMapTraits { public: - static const size_t bucket_size = 4; - static const size_t min_buckets = 8; + enum { bucket_size = 4, min_buckets = 8, }; inline size_t operator() ( const CClassId& classId ) const { return ((((uint64)classId >> 32)|0xFFFFFFFF) ^ (((uint64)classId|0xFFFFFFFF) & 0xFFFFFFFF)); diff --git a/code/nel/include/nel/misc/common.h b/code/nel/include/nel/misc/common.h index 26458a540..c2a40cc0f 100644 --- a/code/nel/include/nel/misc/common.h +++ b/code/nel/include/nel/misc/common.h @@ -347,7 +347,7 @@ std::string formatThousands(const std::string& s); /// This function executes a program in the background and returns instantly (used for example to launch services in AES). /// The program will be launched in the current directory -bool launchProgram (const std::string &programName, const std::string &arguments); +bool launchProgram (const std::string &programName, const std::string &arguments, bool log = true); /// This function kills a program using his pid (on unix, it uses the kill() POSIX function) bool killProgram(uint32 pid); diff --git a/code/nel/include/nel/misc/debug.h b/code/nel/include/nel/misc/debug.h index 690d340a3..8d2483e4e 100644 --- a/code/nel/include/nel/misc/debug.h +++ b/code/nel/include/nel/misc/debug.h @@ -350,8 +350,10 @@ void setCrashAlreadyReported(bool state); */ // removed because we always check assert (even in release mode) #if defined (NL_OS_WINDOWS) && defined (NL_DEBUG) -#if defined (NL_OS_WINDOWS) -#define NLMISC_BREAKPOINT __debugbreak(); +#if defined(NL_OS_WINDOWS) +#define NLMISC_BREAKPOINT __debugbreak() +#elif defined(NL_OS_UNIX) && defined(NL_COMP_GCC) +#define NLMISC_BREAKPOINT __builtin_trap() #else #define NLMISC_BREAKPOINT abort() #endif diff --git a/code/nel/include/nel/misc/dummy_window.h b/code/nel/include/nel/misc/dummy_window.h index bd205f0a0..81ef078f9 100644 --- a/code/nel/include/nel/misc/dummy_window.h +++ b/code/nel/include/nel/misc/dummy_window.h @@ -22,6 +22,21 @@ #ifdef NL_OS_WINDOWS // for win32 os only +#ifndef WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +#endif +#ifndef _WIN32_WINDOWS +# define _WIN32_WINDOWS 0x0410 +#endif +#ifndef _WIN32_WINNT +# define _WIN32_WINNT 0x0400 +#endif +#ifndef WINVER +# define WINVER 0x0400 +#endif +#ifndef NOMINMAX +# define NOMINMAX +#endif #include diff --git a/code/nel/include/nel/misc/entity_id.h b/code/nel/include/nel/misc/entity_id.h index 027fe28c7..8c80daaba 100644 --- a/code/nel/include/nel/misc/entity_id.h +++ b/code/nel/include/nel/misc/entity_id.h @@ -575,13 +575,16 @@ public: // Traits for hash_map using CEntityId struct CEntityIdHashMapTraits { - static const size_t bucket_size = 4; - static const size_t min_buckets = 8; + enum { bucket_size = 4, min_buckets = 8, }; CEntityIdHashMapTraits() { } size_t operator() (const NLMISC::CEntityId &id ) const { uint64 hash64 = id.getUniqueId(); - return size_t(hash64) ^ size_t( hash64 >> 32 ); +#if (HAVE_X86_64) + return (size_t)hash64; +#else + return (size_t)hash64 ^ (size_t)(hash64 >> 32); +#endif //return size_t(id.getShortId()); } bool operator() (const NLMISC::CEntityId &id1, const NLMISC::CEntityId &id2) const diff --git a/code/nel/include/nel/misc/gtk_displayer.h b/code/nel/include/nel/misc/gtk_displayer.h index 88dd3acc8..e2d35c83c 100644 --- a/code/nel/include/nel/misc/gtk_displayer.h +++ b/code/nel/include/nel/misc/gtk_displayer.h @@ -42,11 +42,7 @@ class CGtkDisplayer : public NLMISC::CWindowDisplayer { public: - CGtkDisplayer (const char *displayerName = "") : CWindowDisplayer(displayerName) - { - needSlashR = false; - createLabel ("@Clear|CLEAR"); - } + CGtkDisplayer (const char *displayerName = ""); virtual ~CGtkDisplayer (); diff --git a/code/nel/include/nel/misc/inter_window_msg_queue.h b/code/nel/include/nel/misc/inter_window_msg_queue.h index 02867f8b4..c23a52412 100644 --- a/code/nel/include/nel/misc/inter_window_msg_queue.h +++ b/code/nel/include/nel/misc/inter_window_msg_queue.h @@ -27,6 +27,21 @@ #include "nel/misc/mem_stream.h" #include "nel/misc/dummy_window.h" +#ifndef WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +#endif +#ifndef _WIN32_WINDOWS +# define _WIN32_WINDOWS 0x0410 +#endif +#ifndef _WIN32_WINNT +# define _WIN32_WINNT 0x0400 +#endif +#ifndef WINVER +# define WINVER 0x0400 +#endif +#ifndef NOMINMAX +# define NOMINMAX +#endif #include namespace NLMISC diff --git a/code/nel/include/nel/misc/mutex.h b/code/nel/include/nel/misc/mutex.h index adbc7e7e5..cb7e9a188 100644 --- a/code/nel/include/nel/misc/mutex.h +++ b/code/nel/include/nel/misc/mutex.h @@ -28,7 +28,11 @@ # endif #elif defined(NL_OS_UNIX) # include // PThread -# include // PThread POSIX semaphores +# ifdef NL_OS_MAC +# include +# else +# include // PThread POSIX semaphores +# endif # include # define __forceinline # ifdef NL_OS_MAC @@ -532,8 +536,10 @@ private: #ifdef NL_OS_WINDOWS TNelRtlCriticalSection _Cs; -#elif defined NL_OS_UNIX - sem_t _Sem; +#elif defined(NL_OS_MAC) + dispatch_semaphore_t _Sem; +#elif defined(NL_OS_UNIX) + sem_t _Sem; #else # error "No fair mutex implementation for this OS" #endif diff --git a/code/nel/include/nel/misc/p_thread.h b/code/nel/include/nel/misc/p_thread.h index 4f0a9aa63..01f476d7b 100644 --- a/code/nel/include/nel/misc/p_thread.h +++ b/code/nel/include/nel/misc/p_thread.h @@ -39,9 +39,9 @@ class CPThread : public IThread public: enum TThreadState { - ThreadStateNone, - ThreadStateRunning, - ThreadStateFinished, + ThreadStateNone, + ThreadStateRunning, + ThreadStateFinished, }; /// Constructor diff --git a/code/nel/include/nel/misc/path.h b/code/nel/include/nel/misc/path.h index b6694c7a1..ed4cba1a2 100644 --- a/code/nel/include/nel/misc/path.h +++ b/code/nel/include/nel/misc/path.h @@ -346,7 +346,7 @@ public: /** Adds a search path. * The path is a directory "c:/temp" all files in the directory will be included (and recursively if asked) * - * Alternative directories are not pre-cached (instead of non Alternative files) and will used when a file is not found in the standard directories. + * Alternative directories are not pre-cached (instead of non Alternative files) and will be used when a file is not found in the standard directories. * For example, local data will be in the cached directories and server repository files will be in the Alternative files. If a new file is not * found in the local data, we'll try to find it on the repository. * @@ -513,6 +513,13 @@ public: */ static bool makePathRelative (const char *basePath, std::string &relativePath); + /** Make path absolute + * \param relativePath - The relative path + * \param directory - the directory to which the path is relative to + * returns the absolute path, or empty if something went wrong. + */ + static std::string makePathAbsolute (const std::string &relativePath, const std::string &directory ); + /** If File in this list is added more than one in an addSearchPath, it doesn't launch a warning. */ static void addIgnoredDoubleFile(const std::string &ignoredFile); diff --git a/code/nel/include/nel/misc/report.h b/code/nel/include/nel/misc/report.h index 11745b6e3..55a1c2dbf 100644 --- a/code/nel/include/nel/misc/report.h +++ b/code/nel/include/nel/misc/report.h @@ -21,25 +21,38 @@ namespace NLMISC { -/** Display a custom message box. +#if FINAL_VERSION +#define NL_REPORT_SYNCHRONOUS false +#define NL_REPORT_DEFAULT NLMISC::ReportAbort +#else +#define NL_REPORT_SYNCHRONOUS true +#define NL_REPORT_DEFAULT NLMISC::ReportBreak +#endif + +enum TReportResult +{ + // See also crash_report_widget.h EReturnValue + ReportAlwaysIgnore = 21, + ReportIgnore = 22, + ReportAbort = 23, + ReportBreak = 24 +}; + +/** Display a crash report * - * \param title set the title of the report. If empty, it'll display "NeL report". - * \param header message displayed before the edit text box. If empty, it displays the default message. - * \param body message displayed in the edit text box. This string will be sent by email. - * \param debugButton 0 for disabling it, 1 for enable with default behaviors (generate a breakpoint), 2 for enable with no behavior + * \param title set the title of the report. If empty, it'll display "NeL report" + * \param subject extended title of the report + * \param body message displayed in the edit text box. This string will be sent to the crash report tool + * \param attachment binary file to attach. This is a filename + * \param synchronous use system() and wait for the crash tool exit code, passes -dev flag; otherwise return defaultResult immediately + * \param sendReport hide 'dont send' button, or auto enable 'send report' checkbox * - * - * - * \return the button clicked or error + * \return the button clicked or defaultResult */ +TReportResult report(const std::string &title, const std::string &subject, const std::string &body, const std::string &attachment, bool synchronous, bool sendReport, TReportResult defaultResult); -enum TReportResult { ReportDebug, ReportIgnore, ReportQuit, ReportError }; - -TReportResult report (const std::string &title, const std::string &header, const std::string &subject, const std::string &body, bool enableCheckIgnore, uint debugButton, bool ignoreButton, sint quitButton, bool sendReportButton, bool &ignoreNextTime, const std::string &attachedFile = ""); - -/** call this in the main of your appli to enable email: setReportEmailFunction (sendEmail); - */ -void setReportEmailFunction (void *emailFunction); +/// Set the Url of the web service used to post crash reports to. String is copied +void setReportPostUrl(const char *postUrl); } // NLMISC diff --git a/code/nel/include/nel/misc/sheet_id.h b/code/nel/include/nel/misc/sheet_id.h index 869a61af6..b11e97188 100644 --- a/code/nel/include/nel/misc/sheet_id.h +++ b/code/nel/include/nel/misc/sheet_id.h @@ -248,8 +248,7 @@ private : class CSheetIdHashMapTraits { public: - static const size_t bucket_size = 4; - static const size_t min_buckets = 8; + enum { bucket_size = 4, min_buckets = 8, }; inline size_t operator() ( const CSheetId& sheetId ) const { return sheetId.asInt() >> 5; diff --git a/code/nel/include/nel/misc/sstring.h b/code/nel/include/nel/misc/sstring.h index fdeebcfc8..c9ebff721 100644 --- a/code/nel/include/nel/misc/sstring.h +++ b/code/nel/include/nel/misc/sstring.h @@ -937,21 +937,21 @@ inline CSString operator+(const CSString& s0,const CSString& s1) */ inline CSString operator+(char s0,const CSString& s1) { - return CSString(s0)+s1; + return CSString(s0) + s1.c_str(); } inline CSString operator+(const char* s0,const CSString& s1) { - return CSString(s0)+s1; + return CSString(s0) + s1.c_str(); } -#ifndef NL_COMP_VC10 +#if !defined(NL_COMP_VC) || (NL_COMP_VC_VERSION <= 100) // TODO: check if it can be disabled for other compilers too inline CSString operator+(const std::string& s0,const CSString& s1) { return s0+static_cast(s1); } -#endif // NL_COMP_VC10 +#endif } // NLMISC diff --git a/code/nel/include/nel/misc/string_common.h b/code/nel/include/nel/misc/string_common.h index 4a455247d..fac53be66 100644 --- a/code/nel/include/nel/misc/string_common.h +++ b/code/nel/include/nel/misc/string_common.h @@ -20,6 +20,7 @@ #include "types_nl.h" #include +#include #include #include @@ -264,6 +265,40 @@ inline bool fromString(const std::string &str, bool &val) return true; } +inline bool fromString(const char *str, uint32 &val) { if (strstr(str, "-") != NULL) { val = 0; return false; } char *end; unsigned long v; errno = 0; v = strtoul(str, &end, 10); if (errno || v > UINT_MAX || end == str) { val = 0; return false; } else { val = (uint32)v; return true; } } +inline bool fromString(const char *str, sint32 &val) { char *end; long v; errno = 0; v = strtol(str, &end, 10); if (errno || v > INT_MAX || v < INT_MIN || end == str) { val = 0; return false; } else { val = (sint32)v; return true; } } +inline bool fromString(const char *str, uint8 &val) { char *end; long v; errno = 0; v = strtol(str, &end, 10); if (errno || v > UCHAR_MAX || v < 0 || end == str) { val = 0; return false; } else { val = (uint8)v; return true; } } +inline bool fromString(const char *str, sint8 &val) { char *end; long v; errno = 0; v = strtol(str, &end, 10); if (errno || v > SCHAR_MAX || v < SCHAR_MIN || end == str) { val = 0; return false; } else { val = (sint8)v; return true; } } +inline bool fromString(const char *str, uint16 &val) { char *end; long v; errno = 0; v = strtol(str, &end, 10); if (errno || v > USHRT_MAX || v < 0 || end == str) { val = 0; return false; } else { val = (uint16)v; return true; } } +inline bool fromString(const char *str, sint16 &val) { char *end; long v; errno = 0; v = strtol(str, &end, 10); if (errno || v > SHRT_MAX || v < SHRT_MIN || end == str) { val = 0; return false; } else { val = (sint16)v; return true; } } +inline bool fromString(const char *str, uint64 &val) { bool ret = sscanf(str, "%"NL_I64"u", &val) == 1; if (!ret) val = 0; return ret; } +inline bool fromString(const char *str, sint64 &val) { bool ret = sscanf(str, "%"NL_I64"d", &val) == 1; if (!ret) val = 0; return ret; } +inline bool fromString(const char *str, float &val) { bool ret = sscanf(str, "%f", &val) == 1; if (!ret) val = 0.0f; return ret; } +inline bool fromString(const char *str, double &val) { bool ret = sscanf(str, "%lf", &val) == 1; if (!ret) val = 0.0; return ret; } + +inline bool fromString(const char *str, bool &val) +{ + switch (str[0]) + { + case '1': + case 't': + case 'y': + case 'T': + case 'Y': + val = true; + return true; + case '0': + case 'f': + case 'n': + case 'F': + case 'N': + val = false; + return true; + } + + return false; +} + inline bool fromString(const std::string &str, std::string &val) { val = str; return true; } // stl vectors of bool use bit reference and not real bools, so define the operator for bit reference diff --git a/code/nel/include/nel/misc/string_mapper.h b/code/nel/include/nel/misc/string_mapper.h index 36a73ed4d..1f62dd123 100644 --- a/code/nel/include/nel/misc/string_mapper.h +++ b/code/nel/include/nel/misc/string_mapper.h @@ -39,8 +39,7 @@ typedef const std::string *TStringId; // Traits for hash_map using CStringId struct CStringIdHashMapTraits { - static const size_t bucket_size = 4; - static const size_t min_buckets = 8; + enum { bucket_size = 4, min_buckets = 8, }; CStringIdHashMapTraits() { } size_t operator() (const NLMISC::TStringId &stringId) const { diff --git a/code/nel/include/nel/misc/system_utils.h b/code/nel/include/nel/misc/system_utils.h index 9b3c5a971..78fd011c6 100644 --- a/code/nel/include/nel/misc/system_utils.h +++ b/code/nel/include/nel/misc/system_utils.h @@ -77,6 +77,10 @@ public: /// Get desktop current color depth without using UDriver. static uint getCurrentColorDepth(); + + /// Detect whether the current process is a windowed application. Return true if definitely yes, false if unknown + static bool detectWindowedApplication(); + }; } // NLMISC diff --git a/code/nel/include/nel/misc/types_nl.h b/code/nel/include/nel/misc/types_nl.h index f1ed871fc..3102238bd 100644 --- a/code/nel/include/nel/misc/types_nl.h +++ b/code/nel/include/nel/misc/types_nl.h @@ -53,7 +53,10 @@ # endif # ifdef _MSC_VER # define NL_COMP_VC -# if _MSC_VER >= 1700 +# if _MSC_VER >= 1800 +# define NL_COMP_VC12 +# define NL_COMP_VC_VERSION 120 +# elif _MSC_VER >= 1700 # define NL_COMP_VC11 # define NL_COMP_VC_VERSION 110 # elif _MSC_VER >= 1600 @@ -414,6 +417,12 @@ extern void operator delete[](void *p) throw(); # define CHashMap stdext::hash_map # define CHashSet stdext::hash_set # define CHashMultiMap stdext::hash_multimap +#elif defined(NL_COMP_VC) && (NL_COMP_VC_VERSION >= 100) +# include +# include +# define CHashMap ::std::unordered_map +# define CHashSet ::std::unordered_set +# define CHashMultiMap ::std::unordered_multimap #elif defined(NL_COMP_GCC) // GCC4 # include # include @@ -454,7 +463,11 @@ typedef uint16 ucchar; // To define a 64bits constant; ie: UINT64_CONSTANT(0x123456781234) #ifdef NL_COMP_VC -# if (NL_COMP_VC_VERSION >= 80) +# if (NL_COMP_VC_VERSION >= 120) +# define INT64_CONSTANT(c) (c##LL) +# define SINT64_CONSTANT(c) (c##LL) +# define UINT64_CONSTANT(c) (c##ULL) +# elif (NL_COMP_VC_VERSION >= 80) # define INT64_CONSTANT(c) (c##LL) # define SINT64_CONSTANT(c) (c##LL) # define UINT64_CONSTANT(c) (c##LL) diff --git a/code/nel/include/nel/misc/ucstring.h b/code/nel/include/nel/misc/ucstring.h index e6d7544b1..2f921f9ae 100644 --- a/code/nel/include/nel/misc/ucstring.h +++ b/code/nel/include/nel/misc/ucstring.h @@ -355,8 +355,7 @@ namespace NLMISC // Traits for hash_map using CEntityId struct CUCStringHashMapTraits { - static const size_t bucket_size = 4; - static const size_t min_buckets = 8; + enum { bucket_size = 4, min_buckets = 8, }; CUCStringHashMapTraits() { } size_t operator() (const ucstring &id ) const { @@ -364,7 +363,7 @@ struct CUCStringHashMapTraits } bool operator() (const ucstring &id1, const ucstring &id2) const { - return id1.size() < id2.size(); + return id1 < id2; } }; diff --git a/code/nel/include/nel/misc/wang_hash.h b/code/nel/include/nel/misc/wang_hash.h new file mode 100644 index 000000000..b3069b92f --- /dev/null +++ b/code/nel/include/nel/misc/wang_hash.h @@ -0,0 +1,74 @@ +// Public domain hash functions + +#ifndef NLMISC_WANG_HASH_H +#define NLMISC_WANG_HASH_H + +#include "types_nl.h" + +namespace NLMISC { + +// http://burtleburtle.net/bob/hash/integer.html +inline uint32 wangHash(uint32 a) +{ + a = (a ^ 61) ^ (a >> 16); + a = a + (a << 3); + a = a ^ (a >> 4); + a = a * 0x27d4eb2d; + a = a ^ (a >> 15); + return a; +} + +// http://naml.us/blog/2012/03 +inline uint64 wangHash64(uint64 key) +{ + key = (~key) + (key << 21); // key = (key << 21) - key - 1; + key = key ^ (key >> 24); + key = (key + (key << 3)) + (key << 8); // key * 265 + key = key ^ (key >> 14); + key = (key + (key << 2)) + (key << 4); // key * 21 + key = key ^ (key >> 28); + key = key + (key << 31); + return key; +} + +// http://naml.us/blog/2012/03 Inverse 64-bit wang hash +inline uint64 wangHash64Inv(uint64 key) +{ + uint64 tmp; + + // Invert key = key + (key << 31) + tmp = key - (key << 31); + key = key - (tmp << 31); + + // Invert key = key ^ (key >> 28) + tmp = key^key >> 28; + key = key^tmp >> 28; + + // Invert key *= 21 + key *= 14933078535860113213u; + + // Invert key = key ^ (key >> 14) + tmp = key^key >> 14; + tmp = key^tmp >> 14; + tmp = key^tmp >> 14; + key = key^tmp >> 14; + + // Invert key *= 265 + key *= 15244667743933553977u; + + // Invert key = key ^ (key >> 24) + tmp = key^key >> 24; + key = key^tmp >> 24; + + // Invert key = (~key) + (key << 21) + tmp = ~key; + tmp = ~(key - (tmp << 21)); + tmp = ~(key - (tmp << 21)); + key = ~(key - (tmp << 21)); + + return key; +} + +} /* namespace NLMISC */ + +#endif // NLMISC_WANG_HASH_H diff --git a/code/nel/include/nel/misc/win_displayer.h b/code/nel/include/nel/misc/win_displayer.h index 934a6e990..f450055a9 100644 --- a/code/nel/include/nel/misc/win_displayer.h +++ b/code/nel/include/nel/misc/win_displayer.h @@ -21,8 +21,19 @@ #ifdef NL_OS_WINDOWS -#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers -#ifndef NL_COMP_MINGW +#ifndef WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +#endif +#ifndef _WIN32_WINDOWS +# define _WIN32_WINDOWS 0x0410 +#endif +#ifndef _WIN32_WINNT +# define _WIN32_WINNT 0x0400 +#endif +#ifndef WINVER +# define WINVER 0x0400 +#endif +#ifndef NOMINMAX # define NOMINMAX #endif #include @@ -46,11 +57,7 @@ class CWinDisplayer : public NLMISC::CWindowDisplayer { public: - CWinDisplayer (const char *displayerName = "") : CWindowDisplayer(displayerName), Exit(false) - { - needSlashR = true; - createLabel ("@Clear|CLEAR"); - } + CWinDisplayer(const char *displayerName = ""); virtual ~CWinDisplayer (); diff --git a/code/nel/include/nel/misc/xml_auto_ptr.h b/code/nel/include/nel/misc/xml_auto_ptr.h index eacde74da..8e0c3adb7 100644 --- a/code/nel/include/nel/misc/xml_auto_ptr.h +++ b/code/nel/include/nel/misc/xml_auto_ptr.h @@ -31,7 +31,7 @@ public: ~CXMLAutoPtr() { destroy(); } operator const char *() const { return _Value; } operator bool() const { return _Value != NULL; } - operator std::string() const { return std::string(_Value); } + inline std::string str() const { return _Value; } bool operator ! () const { return _Value == NULL; } operator const unsigned char *() const { return (const unsigned char *) _Value; } char operator * () const { nlassert(_Value); return *_Value; } diff --git a/code/nel/include/nel/net/service.h b/code/nel/include/nel/net/service.h index c74688799..8c7a52c63 100644 --- a/code/nel/include/nel/net/service.h +++ b/code/nel/include/nel/net/service.h @@ -218,13 +218,13 @@ public: static bool isServiceInitialized() { return _Instance != NULL; } /// Returns the current service short name (ie: TS) - const std::string &getServiceShortName () const { return _ShortName; }; + const std::string &getServiceShortName () const { return _ShortName; } /// Returns the current service long name (ie: test_serivce) - const std::string &getServiceLongName () const { return _LongName; }; + const std::string &getServiceLongName () const { return _LongName; } /// Returns the current service alias name setted by AES - const std::string &getServiceAliasName () const { return _AliasName; }; + const std::string &getServiceAliasName () const { return _AliasName; } /// Returns the current service unified name that is alias/short-id or short-id if alias is empty std::string getServiceUnifiedName () const; @@ -242,10 +242,10 @@ public: uint32 getLaunchingDate () const; /// Return true if this service don't use the NS (naming service) - bool getDontUseNS() const { return _DontUseNS; }; + bool getDontUseNS() const { return _DontUseNS; } /// Return true if this service don't use the AES (admin executor service) - bool getDontUseAES() const { return _DontUseAES; }; + bool getDontUseAES() const { return _DontUseAES; } /// Returns arguments of the program pass from the user to the program using parameters (ie: "myprog param1 param2") const NLMISC::CVectorSString &getArgs () const { return _Args; } diff --git a/code/nel/include/nel/sound/containers.h b/code/nel/include/nel/sound/containers.h index 63e134077..57387e91e 100644 --- a/code/nel/include/nel/sound/containers.h +++ b/code/nel/include/nel/sound/containers.h @@ -42,8 +42,7 @@ namespace NLSOUND { template struct THashPtr : public std::unary_function { - static const size_t bucket_size = 4; - static const size_t min_buckets = 8; + enum { bucket_size = 4, min_buckets = 8, }; size_t operator () (const Pointer &ptr) const { //CHashSet::hasher h; diff --git a/code/nel/include/nel/sound/context_sound.h b/code/nel/include/nel/sound/context_sound.h index 13683ac56..eeb29b433 100644 --- a/code/nel/include/nel/sound/context_sound.h +++ b/code/nel/include/nel/sound/context_sound.h @@ -71,6 +71,19 @@ struct CContextMatcher return memcmp(JokersValues, other.JokersValues, sizeof(uint32)*NbJoker) == 0; } + bool operator<(const CContextMatcher &other) const + { + if (UseRandom) + if (RandomValue != other.RandomValue) + return RandomValue < other.RandomValue; + + int cmp = memcmp(JokersValues, other.JokersValues, sizeof(uint32) * NbJoker); + if (cmp != 0) + return cmp < 0; + + return false; + } + size_t getHashValue() const { return size_t(HashValue); @@ -82,18 +95,16 @@ struct CContextMatcher struct CHash : public std::unary_function { - static const size_t bucket_size = 4; - static const size_t min_buckets = 8; + enum { bucket_size = 4, min_buckets = 8, }; size_t operator () (const CContextMatcher &patternMatcher) const { return patternMatcher.getHashValue(); } bool operator() (const CContextMatcher &patternMatcher1, const CContextMatcher &patternMatcher2) const { - return patternMatcher1.getHashValue() < patternMatcher2.getHashValue(); + return patternMatcher1 < patternMatcher2; } }; - }; diff --git a/code/nel/samples/3d/font/main.cpp b/code/nel/samples/3d/font/main.cpp index b4b5cc3c9..bd1a91a09 100644 --- a/code/nel/samples/3d/font/main.cpp +++ b/code/nel/samples/3d/font/main.cpp @@ -79,16 +79,16 @@ int main(int argc, char **argv) // 4th is the size of the font. 5th is a pointer to the video driver. // 6th is the resulting computed string. CComputedString csRotation; - fontManager.computeString ("cs Rotation", tc.getFontGenerator(), CRGBA(255,255,255), 70, CNELU::Driver, csRotation); + fontManager.computeString ("cs Rotation", tc.getFontGenerator(), CRGBA(255,255,255), 70, false, false, CNELU::Driver, csRotation); CComputedString cs3d; - fontManager.computeString ("cs 3d", tc.getFontGenerator(), CRGBA(255,127,0), 75, CNELU::Driver, cs3d); + fontManager.computeString ("cs 3d", tc.getFontGenerator(), CRGBA(255,127,0), 75, false, false, CNELU::Driver, cs3d); // generate an Unicode string. ucstring ucs("cs Unicode String"); CComputedString csUnicode; - fontManager.computeString (ucs, tc.getFontGenerator(), CRGBA(32,64,127), 75, CNELU::Driver, csUnicode); + fontManager.computeString (ucs, tc.getFontGenerator(), CRGBA(32,64,127), 75, false, false, CNELU::Driver, csUnicode); // look at event example CNELU::EventServer.addEmitter(CNELU::Driver->getEventEmitter()); diff --git a/code/nel/samples/3d/nel_qt/qtcolorpicker_cpp.h b/code/nel/samples/3d/nel_qt/qtcolorpicker_cpp.h index 0701a803f..2386ff939 100644 --- a/code/nel/samples/3d/nel_qt/qtcolorpicker_cpp.h +++ b/code/nel/samples/3d/nel_qt/qtcolorpicker_cpp.h @@ -543,14 +543,14 @@ ColorPickerPopup::ColorPickerPopup(int width, bool withColorDialog, setMouseTracking(true); cols = width; - if (withColorDialog) + if (withColorDialog) { moreButton = new ColorPickerButton(this); moreButton->setFixedWidth(24); moreButton->setFixedHeight(21); moreButton->setFrameRect(QRect(2, 2, 20, 17)); connect(moreButton, SIGNAL(clicked()), SLOT(getColorFromDialog())); - } + } else { moreButton = 0; diff --git a/code/nel/samples/misc/debug/main.cpp b/code/nel/samples/misc/debug/main.cpp index 6ee31754f..5850cb2b3 100644 --- a/code/nel/samples/misc/debug/main.cpp +++ b/code/nel/samples/misc/debug/main.cpp @@ -18,11 +18,16 @@ #include // contains all debug features -#include "nel/misc/debug.h" +#include +#include -using namespace NLMISC; +void repeatederror() +{ + // hit always ignore to surpress this error for the duration of the program + nlassert(false && "hit always ignore"); +} -int main (int /* argc */, char ** /* argv */) +int main(int /* argc */, char ** /* argv */) { // all debug functions have different behaviors in debug and in release mode. // in general, in debug mode, all debug functions are active, they display @@ -36,20 +41,24 @@ int main (int /* argc */, char ** /* argv */) // in release mode, this function does nothing by default. you have to add a displayer // manually, or put true in the parameter to say to the function that you want it to // add the default displayers - createDebug (); + NLMISC::createDebug(); + + // enable the crash report tool + NLMISC::INelContext::getInstance().setWindowedApplication(true); + NLMISC::setReportPostUrl("http://ryzomcore.org/crash_report/"); // display debug information, that will be skipped in release mode. - nldebug ("nldebug() %d", 1); + nldebug("nldebug() %d", 1); // display the string - nlinfo ("nlinfo() %d", 2); + nlinfo("nlinfo() %d", 2); // when something not normal, but that the program can manage, occurs, call nlwarning() - nlwarning ("nlwarning() %d", 3); + nlwarning("nlwarning() %d", 3); // nlassert() is like assert but do more powerful things. in release mode, the test is // not executed and nothing will happen. (Press F5 in Visual C++ to continue the execution) - nlassert (true == false); + nlassert(true == false); // in a switch case or when you want that the program never executes a part of code, use stop. // in release, nlstop does nothing. in debug mode, @@ -61,16 +70,20 @@ int main (int /* argc */, char ** /* argv */) // occurs. (In Visual C++ press F5 to continue) try { - nlerror ("nlerror() %d", 4); + nlerror("nlerror() %d", 4); } - catch(const EFatalError &) + catch (const NLMISC::EFatalError &) { // just continue... - nlinfo ("nlerror() generated an EFatalError exception, just ignore it"); + nlinfo("nlerror() generated an EFatalError exception, just ignore it"); } + // keep repeating the same error + for (int i = 0; i < 32; ++i) + repeatederror(); + printf("\nPress to exit\n"); - getchar (); + getchar(); return EXIT_SUCCESS; } diff --git a/code/nel/samples/net/udp/bench_service.cpp b/code/nel/samples/net/udp/bench_service.cpp index 981a0dd0a..190347d4b 100644 --- a/code/nel/samples/net/udp/bench_service.cpp +++ b/code/nel/samples/net/udp/bench_service.cpp @@ -98,8 +98,7 @@ struct CClient struct TInetAddressHash { - static const size_t bucket_size = 4; - static const size_t min_buckets = 8; + enum { bucket_size = 4, min_buckets = 8, }; inline bool operator() (const NLNET::CInetAddress &x1, const NLNET::CInetAddress &x2) const { diff --git a/code/nel/src/3d/driver/direct3d/driver_direct3d.cpp b/code/nel/src/3d/driver/direct3d/driver_direct3d.cpp index 916cafe49..8a7be80d2 100644 --- a/code/nel/src/3d/driver/direct3d/driver_direct3d.cpp +++ b/code/nel/src/3d/driver/direct3d/driver_direct3d.cpp @@ -1327,6 +1327,10 @@ const D3DFORMAT FinalPixelFormat[ITexture::UploadFormatCount][CDriverD3D::FinalP bool CDriverD3D::setDisplay(nlWindow wnd, const GfxMode& mode, bool show, bool resizeable) throw(EBadDisplay) { H_AUTO_D3D(CDriver3D_setDisplay); + + if (!mode.OffScreen) + NLMISC::INelContext::getInstance().setWindowedApplication(true); + if (!_D3D) return false; #ifndef NL_NO_ASM @@ -1509,9 +1513,6 @@ bool CDriverD3D::setDisplay(nlWindow wnd, const GfxMode& mode, bool show, bool r } } - -// _D3D->CreateDevice (adapter, _Rasterizer, _HWnd, D3DCREATE_SOFTWARE_VERTEXPROCESSING, ¶meters, &_DeviceInterface); - // Check some caps D3DCAPS9 caps; if (_DeviceInterface->GetDeviceCaps(&caps) == D3D_OK) diff --git a/code/nel/src/3d/driver/opengl/CMakeLists.txt b/code/nel/src/3d/driver/opengl/CMakeLists.txt index 9e9e05918..12e20fbb3 100644 --- a/code/nel/src/3d/driver/opengl/CMakeLists.txt +++ b/code/nel/src/3d/driver/opengl/CMakeLists.txt @@ -67,6 +67,16 @@ IF(UNIX AND NOT APPLE) ADD_DEFINITIONS(-DHAVE_XCURSOR) TARGET_LINK_LIBRARIES(${NLDRV_OGL_LIB} ${X11_Xcursor_LIB}) ENDIF(X11_Xcursor_FOUND) + IF(X11_Xext_FOUND) + TARGET_LINK_LIBRARIES(${NLDRV_OGL_LIB} ${X11_Xext_LIB}) + ENDIF(X11_Xext_FOUND) + # libraries needed to be linked while linking to static X11 libraries + FIND_LIBRARY(XCB_LIBRARY + NAMES xcb + HINTS ${X11_LIB_SEARCH_PATH}) + IF(XCB_LIBRARY) + TARGET_LINK_LIBRARIES(${NLDRV_OGL_LIB} ${XCB_LIBRARY}) + ENDIF(XCB_LIBRARY) ENDIF(UNIX AND NOT APPLE) IF(WITH_PCH) diff --git a/code/nel/src/3d/driver/opengl/driver_opengl.cpp b/code/nel/src/3d/driver/opengl/driver_opengl.cpp index ce60d7f42..35cf9c094 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl.cpp +++ b/code/nel/src/3d/driver/opengl/driver_opengl.cpp @@ -435,11 +435,7 @@ bool CDriverGL::setupDisplay() glViewport(0,0,_CurrentMode.Width,_CurrentMode.Height); glMatrixMode(GL_PROJECTION); glLoadIdentity(); -#ifdef USE_OPENGLES - glOrthof(0.f,_CurrentMode.Width,_CurrentMode.Height,0.f,-1.0f,1.0f); -#else glOrtho(0,_CurrentMode.Width,_CurrentMode.Height,0,-1.0f,1.0f); -#endif glMatrixMode(GL_MODELVIEW); glLoadIdentity(); #ifndef USE_OPENGLES @@ -725,11 +721,7 @@ bool CDriverGL::activeFrameBufferObject(ITexture * tex) } else { -#ifdef USE_OPENGLES - nglBindFramebufferOES(GL_FRAMEBUFFER_OES, 0); -#else nglBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0); -#endif return true; } } @@ -2178,7 +2170,7 @@ void CDriverGL::flush() // *************************************************************************** void CDriverGL::setSwapVBLInterval(uint interval) { - H_AUTO_OGL(CDriverGL_setSwapVBLInterval) + H_AUTO_OGL(CDriverGL_setSwapVBLInterval); if (!_Initialized) return; diff --git a/code/nel/src/3d/driver/opengl/driver_opengl_extension_def.h b/code/nel/src/3d/driver/opengl/driver_opengl_extension_def.h index 41d2c1366..31ca00961 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl_extension_def.h +++ b/code/nel/src/3d/driver/opengl/driver_opengl_extension_def.h @@ -40,6 +40,24 @@ extern "C" { #define GL_ADD_SIGNED_EXT GL_ADD_SIGNED #define GL_INTERPOLATE_EXT GL_INTERPOLATE #define GL_BUMP_ENVMAP_ATI GL_INTERPOLATE +#define GL_FRAMEBUFFER_EXT GL_FRAMEBUFFER_OES +#define GL_RENDERBUFFER_EXT GL_RENDERBUFFER_OES +#define GL_DEPTH24_STENCIL8_EXT GL_DEPTH24_STENCIL8_OES +#define GL_DEPTH_COMPONENT24 GL_DEPTH_COMPONENT24_OES +#define GL_COLOR_ATTACHMENT0_EXT GL_COLOR_ATTACHMENT0_OES +#define GL_DEPTH_ATTACHMENT_EXT GL_DEPTH_ATTACHMENT_OES +#define GL_STENCIL_ATTACHMENT_EXT GL_STENCIL_ATTACHMENT_OES +#define GL_ARRAY_BUFFER_ARB GL_ARRAY_BUFFER +#define GL_TEXTURE0_ARB GL_TEXTURE0 + +#define GL_ALPHA8 GL_ALPHA +#define GL_LUMINANCE8_ALPHA8 GL_LUMINANCE_ALPHA +#define GL_LUMINANCE8 GL_LUMINANCE +#define GL_RGBA8 GL_RGBA +#define GL_RGB8 GL_RGB + +#define GL_STATIC_DRAW_ARB GL_STATIC_DRAW +#define GL_DYNAMIC_DRAW_ARB GL_DYNAMIC_DRAW #define GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB GL_TEXTURE_CUBE_MAP_POSITIVE_X_OES #define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB GL_TEXTURE_CUBE_MAP_NEGATIVE_X_OES @@ -48,6 +66,31 @@ extern "C" { #define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB GL_TEXTURE_CUBE_MAP_POSITIVE_Y_OES #define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_OES +#define nglGenRenderbuffersEXT nglGenRenderbuffersOES +#define nglBindRenderbufferEXT nglBindRenderbufferOES +#define nglDeleteRenderbuffersEXT nglDeleteRenderbuffersOES +#define nglRenderbufferStorageEXT nglRenderbufferStorageOES +#define nglGenFramebuffersEXT nglGenFramebuffersOES +#define nglBindFramebufferEXT nglBindFramebufferOES +#define nglFramebufferTexture2DEXT nglFramebufferTexture2DOES +#define nglFramebufferRenderbufferEXT nglFramebufferRenderbufferOES +#define nglCheckFramebufferStatusEXT nglCheckFramebufferStatusOES +#define nglDeleteBuffersARB glDeleteBuffers +#define nglIsBufferARB glIsBuffer +#define nglDeleteRenderbuffersEXT nglDeleteRenderbuffersOES +#define nglBindFramebufferEXT nglBindFramebufferOES +#define nglDeleteFramebuffersEXT nglDeleteFramebuffersOES +#define nglUnmapBufferARB nglUnmapBufferOES +#define nglActiveTextureARB glActiveTexture +#define nglClientActiveTextureARB glClientActiveTexture +#define nglBindBufferARB glBindBuffer +#define nglGenBuffersARB glGenBuffers +#define nglBufferDataARB glBufferData + +#define glFrustum glFrustumf +#define glOrtho glOrthof +#define glDepthRange glDepthRangef + #else #if defined(NL_OS_MAC) diff --git a/code/nel/src/3d/driver/opengl/driver_opengl_material.cpp b/code/nel/src/3d/driver/opengl/driver_opengl_material.cpp index 986dd6303..95c8e61f2 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl_material.cpp +++ b/code/nel/src/3d/driver/opengl/driver_opengl_material.cpp @@ -403,7 +403,7 @@ bool CDriverGL::setupMaterial(CMaterial& mat) // Must setup textures each frame. (need to test if touched). // Must separate texture setup and texture activation in 2 "for"... // because setupTexture() may disable all stage. - if (matShader != CMaterial::Water + if (matShader != CMaterial::Water && ((matShader != CMaterial::Program) || (_LastSetuppedPP->features().MaterialFlags & CProgramFeatures::TextureStages)) ) { diff --git a/code/nel/src/3d/driver/opengl/driver_opengl_matrix.cpp b/code/nel/src/3d/driver/opengl/driver_opengl_matrix.cpp index 855c10c21..41575024c 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl_matrix.cpp +++ b/code/nel/src/3d/driver/opengl/driver_opengl_matrix.cpp @@ -37,19 +37,11 @@ void CDriverGL::setFrustum(float left, float right, float bottom, float top, flo if (perspective) { -#ifdef USE_OPENGLES - glFrustumf(left,right,bottom,top,znear,zfar); -#else glFrustum(left,right,bottom,top,znear,zfar); -#endif } else { -#ifdef USE_OPENGLES - glOrthof(left,right,bottom,top,znear,zfar); -#else glOrtho(left,right,bottom,top,znear,zfar); -#endif } _ProjMatDirty = true; diff --git a/code/nel/src/3d/driver/opengl/driver_opengl_states.cpp b/code/nel/src/3d/driver/opengl/driver_opengl_states.cpp index 60a0609dc..8ec7a6bc8 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl_states.cpp +++ b/code/nel/src/3d/driver/opengl/driver_opengl_states.cpp @@ -155,11 +155,7 @@ void CDriverGLStates::forceDefaults(uint nbStages) for(stage=0;stage_TextureUsed[TextureUsedIdx] = NULL; } - -#ifdef USE_OPENGLES - if (InitFBO) - { - nglDeleteFramebuffersOES(1, &FBOId); - if(AttachDepthStencil) - { - nglDeleteRenderbuffersOES(1, &DepthFBOId); - if(!UsePackedDepthStencil) - nglDeleteRenderbuffersOES(1, &StencilFBOId); - } - } -#endif } CDepthStencilFBO::CDepthStencilFBO(CDriverGL *driver, uint width, uint height) @@ -175,56 +162,9 @@ bool CTextureDrvInfosGL::initFrameBufferObject(ITexture * tex) AttachDepthStencil = !((CTextureBloom*)tex)->isMode2D(); } -#ifdef USE_OPENGLES - // generate IDs - nglGenFramebuffersOES(1, &FBOId); - if(AttachDepthStencil) - { - nglGenRenderbuffersOES(1, &DepthFBOId); - if(UsePackedDepthStencil) - StencilFBOId = DepthFBOId; - else - nglGenRenderbuffersOES(1, &StencilFBOId); - } - - //nldebug("3D: using depth %d and stencil %d", DepthFBOId, StencilFBOId); - - // initialize FBO - nglBindFramebufferOES(GL_FRAMEBUFFER_OES, FBOId); - nglFramebufferTexture2DOES(GL_FRAMEBUFFER_OES, GL_COLOR_ATTACHMENT0_OES, TextureMode, ID, 0); - - // attach depth/stencil render to FBO - // note: for some still unkown reason it's impossible to add - // a stencil buffer as shown in the respective docs (see - // opengl.org extension registry). Until a safe approach to add - // them is found, there will be no attached stencil for the time - // being, aside of using packed depth+stencil buffers. - if(AttachDepthStencil) - { - if(UsePackedDepthStencil) - { - //nldebug("3D: using packed depth stencil"); - nglBindRenderbufferOES(GL_RENDERBUFFER_OES, StencilFBOId); - nglRenderbufferStorageOES(GL_RENDERBUFFER_OES, GL_DEPTH24_STENCIL8_OES, tex->getWidth(), tex->getHeight()); - } - else - { - nglBindRenderbufferOES(GL_RENDERBUFFER_OES, DepthFBOId); - nglRenderbufferStorageOES(GL_RENDERBUFFER_OES, GL_DEPTH_COMPONENT24_OES, tex->getWidth(), tex->getHeight()); - /* - nglBindRenderbufferEXT(GL_RENDERBUFFER_OES, StencilFBOId); - nglRenderbufferStorageEXT(GL_RENDERBUFFER_OES, GL_STENCIL_INDEX8_EXT, tex->getWidth(), tex->getHeight()); - */ - } - nglFramebufferRenderbufferOES(GL_FRAMEBUFFER_OES, GL_DEPTH_ATTACHMENT_OES, GL_RENDERBUFFER_OES, DepthFBOId); - nldebug("3D: glFramebufferRenderbufferExt(depth:24) = %X", nglCheckFramebufferStatusOES(GL_FRAMEBUFFER_OES)); - nglFramebufferRenderbufferOES(GL_FRAMEBUFFER_OES, GL_STENCIL_ATTACHMENT_OES, GL_RENDERBUFFER_OES, StencilFBOId); - nldebug("3D: glFramebufferRenderbufferExt(stencil:8) = %X", nglCheckFramebufferStatusOES(GL_FRAMEBUFFER_OES)); - } -#else // generate IDs nglGenFramebuffersEXT(1, &FBOId); - + //nldebug("3D: using depth %d and stencil %d", DepthFBOId, StencilFBOId); // initialize FBO @@ -253,15 +193,10 @@ bool CTextureDrvInfosGL::initFrameBufferObject(ITexture * tex) GL_RENDERBUFFER_EXT, DepthStencilFBO->StencilFBOId); nldebug("3D: glFramebufferRenderbufferExt(stencil:8) = %X", nglCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT)); } -#endif // check status - GLenum status; -#ifdef USE_OPENGLES - status = (GLenum) nglCheckFramebufferStatusOES(GL_FRAMEBUFFER_OES); -#else - status = (GLenum) nglCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT); -#endif + GLenum status = (GLenum) nglCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT); + switch(status) { #ifdef GL_FRAMEBUFFER_COMPLETE_EXT case GL_FRAMEBUFFER_COMPLETE_EXT: @@ -361,11 +296,8 @@ bool CTextureDrvInfosGL::initFrameBufferObject(ITexture * tex) // clean up resources if allocation failed if (!InitFBO) { -#ifdef USE_OPENGLES - nglDeleteFramebuffersOES(1, &FBOId); -#else nglDeleteFramebuffersEXT(1, &FBOId); -#endif + if (AttachDepthStencil) { DepthStencilFBO = NULL; @@ -385,22 +317,14 @@ bool CTextureDrvInfosGL::activeFrameBufferObject(ITexture * tex) if(initFrameBufferObject(tex)) { glBindTexture(TextureMode, 0); -#ifdef USE_OPENGLES - nglBindFramebufferOES(GL_FRAMEBUFFER_OES, FBOId); -#else nglBindFramebufferEXT(GL_FRAMEBUFFER_EXT, FBOId); -#endif } else return false; } else { -#ifdef USE_OPENGLES - nglBindFramebufferOES(GL_FRAMEBUFFER_OES, 0); -#else nglBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0); -#endif } return true; @@ -508,11 +432,7 @@ GLint CDriverGL::getGlTextureFormat(ITexture& tex, bool &compressed) break; } -#ifdef USE_OPENGLES - return GL_RGBA; -#else return GL_RGBA8; -#endif } // *************************************************************************** @@ -521,11 +441,7 @@ static GLint getGlSrcTextureFormat(ITexture &tex, GLint glfmt) H_AUTO_OGL(getGlSrcTextureFormat) // Is destination format is alpha or lumiance ? -#ifdef USE_OPENGLES - if ((glfmt==GL_ALPHA)||(glfmt==GL_LUMINANCE_ALPHA)||(glfmt==GL_LUMINANCE)) -#else if ((glfmt==GL_ALPHA8)||(glfmt==GL_LUMINANCE8_ALPHA8)||(glfmt==GL_LUMINANCE8)) -#endif { switch(tex.getPixelFormat()) { @@ -578,19 +494,9 @@ uint CDriverGL::computeMipMapMemoryUsage(uint w, uint h, GLint glfmt) const H_AUTO_OGL(CDriverGL_computeMipMapMemoryUsage) switch(glfmt) { -#ifdef GL_RGBA8 case GL_RGBA8: return w*h* 4; -#endif -#ifdef GL_RGBA - case GL_RGBA: return w*h* 4; -#endif // Well this is ugly, but simple :). GeForce 888 is stored as 32 bits. -#ifdef GL_RGB8 case GL_RGB8: return w*h* 4; -#endif -#ifdef GL_RGB - case GL_RGB: return w*h* 4; -#endif #ifdef GL_RGBA4 case GL_RGBA4: return w*h* 2; #endif @@ -600,24 +506,9 @@ uint CDriverGL::computeMipMapMemoryUsage(uint w, uint h, GLint glfmt) const #ifdef GL_RGB5 case GL_RGB5: return w*h* 2; #endif -#ifdef GL_LUMINANCE8 case GL_LUMINANCE8: return w*h* 1; -#endif -#ifdef GL_LUMINANCE - case GL_LUMINANCE: return w*h* 1; -#endif -#ifdef GL_ALPHA8 case GL_ALPHA8: return w*h* 1; -#endif -#ifdef GL_ALPHA - case GL_ALPHA: return w*h* 1; -#endif -#ifdef GL_LUMINANCE8_ALPHA8 case GL_LUMINANCE8_ALPHA8: return w*h* 2; -#endif -#ifdef GL_LUMINANCE_ALPHA - case GL_LUMINANCE_ALPHA: return w*h* 2; -#endif #ifdef GL_COMPRESSED_RGB_S3TC_DXT1_EXT case GL_COMPRESSED_RGB_S3TC_DXT1_EXT: return w*h /2; #endif diff --git a/code/nel/src/3d/driver/opengl/driver_opengl_vertex_buffer_hard.cpp b/code/nel/src/3d/driver/opengl/driver_opengl_vertex_buffer_hard.cpp index 0556fad3e..25c7da614 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl_vertex_buffer_hard.cpp +++ b/code/nel/src/3d/driver/opengl/driver_opengl_vertex_buffer_hard.cpp @@ -1216,11 +1216,7 @@ IVertexBufferHardGL *CVertexArrayRangeARB::createVBHardGL(uint size, CVertexBuff GLuint vertexBufferID; glGetError(); -#ifdef USE_OPENGLES - glGenBuffers(1, &vertexBufferID); -#else nglGenBuffersARB(1, &vertexBufferID); -#endif if (glGetError() != GL_NO_ERROR) return NULL; _Driver->_DriverGLStates.forceBindARBVertexBuffer(vertexBufferID); @@ -1229,7 +1225,8 @@ IVertexBufferHardGL *CVertexArrayRangeARB::createVBHardGL(uint size, CVertexBuff { case CVertexBuffer::AGPVolatile: #ifdef USE_OPENGLES - glBufferData(GL_ARRAY_BUFFER, size, NULL, GL_STREAM_DRAW); + // TODO: GL_STREAM_DRAW doesn't exist in OpenGL ES 1.x + glBufferData(GL_ARRAY_BUFFER, size, NULL, GL_DYNAMIC_DRAW); #else nglBufferDataARB(GL_ARRAY_BUFFER_ARB, size, NULL, GL_STREAM_DRAW_ARB); #endif @@ -1259,11 +1256,7 @@ IVertexBufferHardGL *CVertexArrayRangeARB::createVBHardGL(uint size, CVertexBuff } if (glGetError() != GL_NO_ERROR) { -#ifdef USE_OPENGLES - glDeleteBuffers(1, &vertexBufferID); -#else nglDeleteBuffersARB(1, &vertexBufferID); -#endif return NULL; } @@ -1306,13 +1299,10 @@ void CVertexArrayRangeARB::updateLostBuffers() { nlassert((*it)->_VertexObjectId); GLuint id = (GLuint) (*it)->_VertexObjectId; -#ifdef USE_OPENGLES - nlassert(glIsBuffer(id)); - glDeleteBuffers(1, &id); -#else + nlassert(nglIsBufferARB(id)); nglDeleteBuffersARB(1, &id); -#endif + (*it)->_VertexObjectId = 0; (*it)->VB->setLocation(CVertexBuffer::NotResident); } @@ -1361,13 +1351,8 @@ CVertexBufferHardARB::~CVertexBufferHardARB() if (_VertexObjectId) { GLuint id = (GLuint) _VertexObjectId; -#ifdef USE_OPENGLES - nlassert(glIsBuffer(id)); - glDeleteBuffers(1, &id); -#else nlassert(nglIsBufferARB(id)); nglDeleteBuffersARB(1, &id); -#endif } if (_VertexArrayRange) { @@ -1412,12 +1397,7 @@ void *CVertexBufferHardARB::lock() } // recreate a vb GLuint vertexBufferID; - -#ifdef USE_OPENGLES - glGenBuffers(1, &vertexBufferID); -#else nglGenBuffersARB(1, &vertexBufferID); -#endif if (glGetError() != GL_NO_ERROR) { @@ -1429,42 +1409,30 @@ void *CVertexBufferHardARB::lock() { case CVertexBuffer::AGPVolatile: #ifdef USE_OPENGLES - glBufferData(GL_ARRAY_BUFFER, size, NULL, GL_STREAM_DRAW); + // TODO: GL_STREAM_DRAW doesn't exist in OpenGL ES 1.x + glBufferData(GL_ARRAY_BUFFER, size, NULL, GL_DYNAMIC_DRAW); #else nglBufferDataARB(GL_ARRAY_BUFFER_ARB, size, NULL, GL_STREAM_DRAW_ARB); #endif break; case CVertexBuffer::StaticPreferred: if (_Driver->getStaticMemoryToVRAM()) -#ifdef USE_OPENGLES - glBufferData(GL_ARRAY_BUFFER, size, NULL, GL_STATIC_DRAW); -#else nglBufferDataARB(GL_ARRAY_BUFFER_ARB, size, NULL, GL_STATIC_DRAW_ARB); -#endif else -#ifdef USE_OPENGLES - glBufferData(GL_ARRAY_BUFFER, size, NULL, GL_DYNAMIC_DRAW); -#else nglBufferDataARB(GL_ARRAY_BUFFER_ARB, size, NULL, GL_DYNAMIC_DRAW_ARB); -#endif break; // case CVertexBuffer::AGPPreferred: default: -#ifdef USE_OPENGLES - glBufferData(GL_ARRAY_BUFFER, size, NULL, GL_DYNAMIC_DRAW); -#else nglBufferDataARB(GL_ARRAY_BUFFER_ARB, size, NULL, GL_DYNAMIC_DRAW_ARB); -#endif + break; } if (glGetError() != GL_NO_ERROR) { _Driver->incrementResetCounter(); -#ifdef USE_OPENGLES - glDeleteBuffers(1, &vertexBufferID); -#else + nglDeleteBuffersARB(1, &vertexBufferID); -#endif + return &_DummyVB[0];; } _VertexObjectId = vertexBufferID; @@ -1567,12 +1535,10 @@ void CVertexBufferHardARB::unlock() #ifdef USE_OPENGLES if (_Driver->_Extensions.OESMapBuffer) +#endif { - unmapOk = nglUnmapBufferOES(GL_ARRAY_BUFFER); + unmapOk = nglUnmapBufferARB(GL_ARRAY_BUFFER_ARB); } -#else - unmapOk = nglUnmapBufferARB(GL_ARRAY_BUFFER_ARB); -#endif #ifdef NL_DEBUG _Unmapping = false; diff --git a/code/nel/src/3d/driver/opengl/driver_opengl_vertex_program.cpp b/code/nel/src/3d/driver/opengl/driver_opengl_vertex_program.cpp index 5470ec5c5..22bc5ff5a 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl_vertex_program.cpp +++ b/code/nel/src/3d/driver/opengl/driver_opengl_vertex_program.cpp @@ -453,7 +453,6 @@ bool CDriverGL::setupEXTVertexShader(const CVPParser::TProgram &program, GLuint // clear last error GLenum glError = glGetError(); - //variants[EVSSecondaryColorVariant] = nglGenSymbolsEXT(GL_VECTOR_EXT, GL_VARIANT_EXT, GL_NORMALIZED_RANGE_EXT, 1); //variants[EVSSecondaryColorVariant] = nglGenSymbolsEXT(GL_VECTOR_EXT, GL_VARIANT_EXT, GL_NORMALIZED_RANGE_EXT, 1); // allocate the symbols diff --git a/code/nel/src/3d/driver/opengl/driver_opengl_window.cpp b/code/nel/src/3d/driver/opengl/driver_opengl_window.cpp index 8307f885e..943371fd9 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl_window.cpp +++ b/code/nel/src/3d/driver/opengl/driver_opengl_window.cpp @@ -603,6 +603,9 @@ bool CDriverGL::setDisplay(nlWindow wnd, const GfxMode &mode, bool show, bool re { H_AUTO_OGL(CDriverGL_setDisplay) + if (!mode.OffScreen) + NLMISC::INelContext::getInstance().setWindowedApplication(true); + _win = EmptyWindow; _CurrentMode = mode; @@ -627,12 +630,15 @@ bool CDriverGL::setDisplay(nlWindow wnd, const GfxMode &mode, bool show, bool re // Offscreen mode ? if (_CurrentMode.OffScreen) { - if (!createWindow(mode)) - return false; + if (!createWindow(mode)) return false; + HWND tmpHWND = _win; int width = mode.Width; int height = mode.Height; +#ifdef USE_OPENGLES + // TODO: implement for OpenGL ES 1.x +#else // resize the window RECT rc; SetRect (&rc, 0, 0, width, height); @@ -910,6 +916,7 @@ bool CDriverGL::setDisplay(nlWindow wnd, const GfxMode &mode, bool show, bool re _hDC = NULL; return false; } +#endif } else { @@ -1479,7 +1486,7 @@ bool CDriverGL::createWindow(const GfxMode &mode) [[CocoaApplicationDelegate alloc] initWithDriver:this]; // set the application delegate, this will handle window/app close events - [NSApp setDelegate:appDelegate]; + [NSApp setDelegate:(id)appDelegate]; // bind the close button of the window to applicationShouldTerminate id closeButton = [cocoa_window standardWindowButton:NSWindowCloseButton]; diff --git a/code/nel/src/3d/driver/opengl/mac/cocoa_event_emitter.cpp b/code/nel/src/3d/driver/opengl/mac/cocoa_event_emitter.cpp index d290e0cee..6206d94c3 100644 --- a/code/nel/src/3d/driver/opengl/mac/cocoa_event_emitter.cpp +++ b/code/nel/src/3d/driver/opengl/mac/cocoa_event_emitter.cpp @@ -270,28 +270,14 @@ bool CCocoaEventEmitter::processMessage(NSEvent* event, CEventServer* server) return false; } - // first event about mouse movement after setting to emulateRawMode - if(_setToEmulateRawMode && - (event.type == NSMouseMoved || - event.type == NSLeftMouseDragged || - event.type == NSRightMouseDragged)) - { - // do not report because it reflects wrapping pointer to 0.5/0.5 - _setToEmulateRawMode = false; - return false; - } - // convert the modifiers for nel to pass them with the events - NLMISC::TKeyButton modifiers = - modifierFlagsToNelKeyButton([event modifierFlags]); + NLMISC::TKeyButton modifiers = modifierFlagsToNelKeyButton([event modifierFlags]); switch(event.type) { case NSLeftMouseDown: { - server->postEvent(new NLMISC::CEventMouseDown( - mousePos.x, mousePos.y, - (NLMISC::TMouseButton)(NLMISC::leftButton | modifiers), this)); + server->postEvent(new NLMISC::CEventMouseDown(mousePos.x, mousePos.y, (NLMISC::TMouseButton)(NLMISC::leftButton | modifiers), this)); } break; case NSLeftMouseUp: @@ -319,15 +305,7 @@ bool CCocoaEventEmitter::processMessage(NSEvent* event, CEventServer* server) { NLMISC::CEvent* nelEvent; - // when emulating raw mode, send the delta in a CGDMouseMove event - if(_emulateRawMode) - nelEvent = new NLMISC::CGDMouseMove( - this, NULL /* no mouse device */, event.deltaX, -event.deltaY); - - // normally send position in a CEventMouseMove - else - nelEvent = new NLMISC::CEventMouseMove( - mousePos.x, mousePos.y, (NLMISC::TMouseButton)modifiers, this); + nelEvent = new NLMISC::CEventMouseMove(mousePos.x, mousePos.y, (NLMISC::TMouseButton)modifiers, this); server->postEvent(nelEvent); break; @@ -336,15 +314,7 @@ bool CCocoaEventEmitter::processMessage(NSEvent* event, CEventServer* server) { NLMISC::CEvent* nelEvent; - // when emulating raw mode, send the delta in a CGDMouseMove event - if(_emulateRawMode) - nelEvent = new NLMISC::CGDMouseMove( - this, NULL /* no mouse device */, event.deltaX, -event.deltaY); - - // normally send position in a CEventMouseMove - else - nelEvent = new NLMISC::CEventMouseMove(mousePos.x, mousePos.y, - (NLMISC::TMouseButton)(NLMISC::leftButton | modifiers), this); + nelEvent = new NLMISC::CEventMouseMove(mousePos.x, mousePos.y, (NLMISC::TMouseButton)(NLMISC::leftButton | modifiers), this); server->postEvent(nelEvent); break; @@ -353,15 +323,7 @@ bool CCocoaEventEmitter::processMessage(NSEvent* event, CEventServer* server) { NLMISC::CEvent* nelEvent; - // when emulating raw mode, send the delta in a CGDMouseMove event - if(_emulateRawMode) - nelEvent = new NLMISC::CGDMouseMove( - this, NULL /* no mouse device */, event.deltaX, -event.deltaY); - - // normally send position in a CEventMouseMove - else - nelEvent = new NLMISC::CEventMouseMove(mousePos.x, mousePos.y, - (NLMISC::TMouseButton)(NLMISC::rightButton | modifiers), this); + nelEvent = new NLMISC::CEventMouseMove(mousePos.x, mousePos.y, (NLMISC::TMouseButton)(NLMISC::rightButton | modifiers), this); server->postEvent(nelEvent); break; @@ -434,12 +396,6 @@ bool CCocoaEventEmitter::processMessage(NSEvent* event, CEventServer* server) } } - if(_emulateRawMode && _driver && (event.type == NSMouseMoved || - event.type == NSLeftMouseDragged || event.type == NSRightMouseDragged)) - { - _driver->setMousePos(0.5, 0.5); - } - return true; } @@ -492,17 +448,4 @@ void CCocoaEventEmitter::submitEvents(CEventServer& server, bool /* allWins */) _server = &server; } -void CCocoaEventEmitter::emulateMouseRawMode(bool enable) -{ - _emulateRawMode = enable; - - if(_emulateRawMode) - { - _setToEmulateRawMode = true; - - if(_driver) - _driver->setMousePos(0.5, 0.5); - } -} - } diff --git a/code/nel/src/3d/driver/opengl/mac/cocoa_event_emitter.h b/code/nel/src/3d/driver/opengl/mac/cocoa_event_emitter.h index aa7d591fd..960614ef4 100644 --- a/code/nel/src/3d/driver/opengl/mac/cocoa_event_emitter.h +++ b/code/nel/src/3d/driver/opengl/mac/cocoa_event_emitter.h @@ -31,8 +31,6 @@ namespace NLMISC class CCocoaEventEmitter : public IEventEmitter { - bool _emulateRawMode; - bool _setToEmulateRawMode; bool _eventLoop; NL3D::IDriver* _driver; CocoaOpenGLView* _glView; @@ -42,8 +40,6 @@ class CCocoaEventEmitter : public IEventEmitter public: CCocoaEventEmitter() : - _emulateRawMode(false), - _setToEmulateRawMode(false), _driver(NULL), _glView(nil), _server(NULL) { } diff --git a/code/nel/src/3d/driver/opengl/unix_event_emitter.h b/code/nel/src/3d/driver/opengl/unix_event_emitter.h index 7eeef970e..493c4ad35 100644 --- a/code/nel/src/3d/driver/opengl/unix_event_emitter.h +++ b/code/nel/src/3d/driver/opengl/unix_event_emitter.h @@ -100,7 +100,6 @@ private: std::map _PressedKeys; XIM _im; XIC _ic; - bool _emulateRawMode; NL3D::IDriver* _driver; CUnixEventServer _InternalServer; ucstring _CopiedString; diff --git a/code/nel/src/3d/driver_user.cpp b/code/nel/src/3d/driver_user.cpp index c4dc97655..017a2b6dc 100644 --- a/code/nel/src/3d/driver_user.cpp +++ b/code/nel/src/3d/driver_user.cpp @@ -109,10 +109,6 @@ void UDriver::purgeMemory() // *************************************************************************** -// *************************************************************************** -bool CDriverUser::_StaticInit= false; - - // *************************************************************************** CDriverUser::CDriverUser (uintptr_t windowIcon, TDriver driver, emptyProc exitFunc) { @@ -122,16 +118,7 @@ CDriverUser::CDriverUser (uintptr_t windowIcon, TDriver driver, emptyProc exitFu nlassert((uint)IDriver::iconCount == (uint)UDriver::iconCount); - // Static Initialisation. - if(!_StaticInit) - { - _StaticInit= true; - // Register basic serial. - NL3D::registerSerial3d(); - - // Register basic csene. - CScene::registerBasics(); - } + NL3D::init3d(); _Driver = NULL; diff --git a/code/nel/src/3d/font_generator.cpp b/code/nel/src/3d/font_generator.cpp index 0e268a0c2..3c73a0a20 100644 --- a/code/nel/src/3d/font_generator.cpp +++ b/code/nel/src/3d/font_generator.cpp @@ -31,6 +31,7 @@ using namespace std; #include #include FT_FREETYPE_H +#include FT_SYNTHESIS_H // for freetype 2.0 #ifdef FTERRORS_H @@ -171,7 +172,7 @@ void CFontGenerator::getSizes (ucchar c, uint32 size, uint32 &width, uint32 &hei height = _Face->glyph->metrics.height >> 6; } -uint8 *CFontGenerator::getBitmap (ucchar c, uint32 size, uint32 &width, uint32 &height, uint32 &pitch, sint32 &left, sint32 &top, sint32 &advx, uint32 &glyphIndex) +uint8 *CFontGenerator::getBitmap (ucchar c, uint32 size, bool embolden, bool oblique, uint32 &width, uint32 &height, uint32 &pitch, sint32 &left, sint32 &top, sint32 &advx, uint32 &glyphIndex) { FT_Error error; @@ -209,6 +210,16 @@ uint8 *CFontGenerator::getBitmap (ucchar c, uint32 size, uint32 &width, uint32 & return NULL; } + if (embolden) + { + FT_GlyphSlot_Embolden(_Face->glyph); + } + + if (oblique) + { + FT_GlyphSlot_Oblique(_Face->glyph); + } + // convert to an anti-aliased bitmap error = FT_Render_Glyph (_Face->glyph, ft_render_mode_normal); if (error) @@ -389,7 +400,7 @@ void CFontGenerator::getSizes (ucchar c, uint32 size, uint32 &width, uint32 &hei HFONT hFont = NULL; uint32 CurrentFontSize = 0; -uint8 *CFontGenerator::getBitmap (ucchar c, uint32 size, uint32 &width, uint32 &height, uint32 &pitch, sint32 &left, sint32 &top, sint32 &advx, uint32 &glyphIndex) +uint8 *CFontGenerator::getBitmap (ucchar c, uint32 size, bool embolden, bool oblique, uint32 &width, uint32 &height, uint32 &pitch, sint32 &left, sint32 &top, sint32 &advx, uint32 &glyphIndex) { /* FT_Error error; diff --git a/code/nel/src/3d/font_manager.cpp b/code/nel/src/3d/font_manager.cpp index c589e934a..45a097b3b 100644 --- a/code/nel/src/3d/font_manager.cpp +++ b/code/nel/src/3d/font_manager.cpp @@ -64,6 +64,8 @@ void CFontManager::computeString (const std::string &s, CFontGenerator *fontGen, const NLMISC::CRGBA &color, uint32 fontSize, + bool embolden, + bool oblique, IDriver *driver, CComputedString &output, bool keep800x600Ratio) @@ -71,7 +73,7 @@ void CFontManager::computeString (const std::string &s, // static to avoid reallocation static ucstring ucs; ucs= s; - computeString(ucs, fontGen, color, fontSize, driver, output, keep800x600Ratio); + computeString(ucs, fontGen, color, fontSize, embolden, oblique, driver, output, keep800x600Ratio); } @@ -80,6 +82,8 @@ void CFontManager::computeString (const ucstring &s, CFontGenerator *fontGen, const NLMISC::CRGBA &color, uint32 fontSize, + bool embolden, + bool oblique, IDriver *driver, CComputedString &output, bool keep800x600Ratio) @@ -147,6 +151,8 @@ void CFontManager::computeString (const ucstring &s, k.Char = s[i]; k.FontGenerator = fontGen; k.Size = fontSize; + k.Embolden = embolden; + k.Oblique = oblique; CTextureFont::SLetterInfo *pLI = pTexFont->getLetterInfo (k); if(pLI != NULL) { @@ -227,6 +233,8 @@ void CFontManager::computeStringInfo ( const ucstring &s, CFontGenerator *fontGen, const NLMISC::CRGBA &color, uint32 fontSize, + bool embolden, + bool oblique, IDriver *driver, CComputedString &output, bool keep800x600Ratio ) @@ -259,6 +267,8 @@ void CFontManager::computeStringInfo ( const ucstring &s, k.Char = s[i]; k.FontGenerator = fontGen; k.Size = fontSize; + k.Embolden = embolden; + k.Oblique = oblique; pLI = pTexFont->getLetterInfo (k); if(pLI != NULL) { diff --git a/code/nel/src/3d/init_3d.cpp b/code/nel/src/3d/init_3d.cpp index bd8dffdfd..b2bf2c05e 100644 --- a/code/nel/src/3d/init_3d.cpp +++ b/code/nel/src/3d/init_3d.cpp @@ -19,19 +19,35 @@ #include "nel/3d/init_3d.h" #include +#include "nel/3d/scene.h" +#include "nel/3d/register_3d.h" + +namespace +{ +static bool _Initialized = false; +} namespace NL3D { void init3d () { + + if( _Initialized ) + return; + // Init for windows #ifdef NL_OS_WINDOWS // Enable FPU exceptions // Enable divid by zero and overflow exception - _control87 (_EM_INVALID|_EM_DENORMAL/*|_EM_ZERODIVIDE|_EM_OVERFLOW*/|_EM_UNDERFLOW|_EM_INEXACT, _MCW_EM); + //_control87 (_EM_INVALID|_EM_DENORMAL/*|_EM_ZERODIVIDE|_EM_OVERFLOW*/|_EM_UNDERFLOW|_EM_INEXACT, _MCW_EM); #endif // NL_OS_WINDOWS + + NL3D::registerSerial3d(); + CScene::registerBasics(); + + _Initialized = true; } } // NL3D diff --git a/code/nel/src/3d/landscape.cpp b/code/nel/src/3d/landscape.cpp index 154f6f847..ccdeabc34 100644 --- a/code/nel/src/3d/landscape.cpp +++ b/code/nel/src/3d/landscape.cpp @@ -583,7 +583,6 @@ void CLandscape::setDriver(IDriver *drv) // Does the driver has sufficient requirements for Vegetable??? // only if VP supported by GPU, and Only if max vertices allowed. _DriverOkForVegetable = _VertexShaderOk && (_Driver->getMaxVerticesByVertexBufferHard()>=(uint)NL3D_LANDSCAPE_VEGETABLE_MAX_AGP_VERTEX_MAX); - } } diff --git a/code/nel/src/3d/landscapevb_allocator.cpp b/code/nel/src/3d/landscapevb_allocator.cpp index 2c30cc19b..51714b88d 100644 --- a/code/nel/src/3d/landscapevb_allocator.cpp +++ b/code/nel/src/3d/landscapevb_allocator.cpp @@ -611,7 +611,6 @@ void CLandscapeVBAllocator::setupVBFormatAndVertexProgram(bool withVertexProgr nlverify(_Driver->compileVertexProgram(_VertexProgram[1])); } } - } diff --git a/code/nel/src/3d/meshvp_wind_tree.cpp b/code/nel/src/3d/meshvp_wind_tree.cpp index 0d2e91363..1e3d215a3 100644 --- a/code/nel/src/3d/meshvp_wind_tree.cpp +++ b/code/nel/src/3d/meshvp_wind_tree.cpp @@ -392,7 +392,6 @@ bool CMeshVPWindTree::begin(IDriver *driver, CScene *scene, CMeshBaseInstance *m sint numPls= renderTrav->getNumVPLights()-1; clamp(numPls, 0, CRenderTrav::MaxVPLight-1); - // Enable normalize only if requested by user. Because lighting don't manage correct "scale lighting" uint idVP= (SpecularLighting?2:0) + (driver->isForceNormalize()?1:0) ; // correct VP id for correct unmber of pls. @@ -523,7 +522,7 @@ void CMeshVPWindTree::beginMBRInstance(IDriver *driver, CScene *scene, CMeshBase idVP = numPls*4 + idVP; // re-activate VP if idVP different from last setup - if(idVP != _LastMBRIdVP) + if (idVP != _LastMBRIdVP) { _LastMBRIdVP= idVP; driver->activeVertexProgram(_VertexProgram[_LastMBRIdVP]); diff --git a/code/nel/src/3d/ps_util.cpp b/code/nel/src/3d/ps_util.cpp index 84e8c096a..a09108ed5 100644 --- a/code/nel/src/3d/ps_util.cpp +++ b/code/nel/src/3d/ps_util.cpp @@ -277,6 +277,8 @@ void CPSUtil::print(IDriver *driver, const std::string &text, CFontGenerator &fg &fg, col, 16, + false, + false, driver, cptedString); diff --git a/code/nel/src/3d/scene.cpp b/code/nel/src/3d/scene.cpp index 67465eb8c..7c552efd4 100644 --- a/code/nel/src/3d/scene.cpp +++ b/code/nel/src/3d/scene.cpp @@ -158,7 +158,7 @@ CScene::CScene(bool bSmallScene) : LightTrav(bSmallScene) _MaxSkeletonsInNotCLodForm= 20; - _FilterRenderFlags= std::numeric_limits::max(); + _FilterRenderFlags = std::numeric_limits::max(); _NextRenderProfile= false; @@ -592,11 +592,9 @@ void CScene::renderPart(UScene::TRenderPart rp, bool doHrcPass, bool doTrav, boo // nlassert(CurrentCamera); - // update models. updateModels(); - // Use the camera to setup Clip / Render pass. float left, right, bottom, top, znear, zfar; CurrentCamera->getFrustum(left, right, bottom, top, znear, zfar); diff --git a/code/nel/src/3d/shadow_map_manager.cpp b/code/nel/src/3d/shadow_map_manager.cpp index 383a28184..0c9f7ba8b 100644 --- a/code/nel/src/3d/shadow_map_manager.cpp +++ b/code/nel/src/3d/shadow_map_manager.cpp @@ -244,7 +244,7 @@ void CShadowMapManager::addShadowReceiver(CTransform *model) void CShadowMapManager::renderGenerate(CScene *scene) { H_AUTO( NL3D_ShadowManager_Generate ); - + // Each frame, do a small garbage collector for unused free textures. garbageShadowTextures(scene); diff --git a/code/nel/src/3d/text_context.cpp b/code/nel/src/3d/text_context.cpp index 456ab77a6..1cca5145a 100644 --- a/code/nel/src/3d/text_context.cpp +++ b/code/nel/src/3d/text_context.cpp @@ -31,6 +31,8 @@ CTextContext::CTextContext() _FontGen = NULL; _FontSize = 12; + _Embolden = false; + _Oblique = false; _Color = NLMISC::CRGBA(0,0,0); @@ -81,7 +83,7 @@ uint32 CTextContext::textPush (const char *format, ...) // compute the string. uint32 index = _CacheFreePlaces[_CacheNbFreePlaces-1]; CComputedString &strToFill = _CacheStrings[index]; - _FontManager->computeString (str, _FontGen, _Color, _FontSize, _Driver, strToFill, _Keep800x600Ratio); + _FontManager->computeString (str, _FontGen, _Color, _FontSize, _Embolden, _Oblique, _Driver, strToFill, _Keep800x600Ratio); _CacheNbFreePlaces--; @@ -109,7 +111,7 @@ uint32 CTextContext::textPush (const ucstring &str) nlassert (index < _CacheStrings.size()); CComputedString &strToFill = _CacheStrings[index]; _FontManager->computeString (str, _FontGen, _Color - , _FontSize, _Driver, strToFill, _Keep800x600Ratio); + , _FontSize, _Embolden, _Oblique, _Driver, strToFill, _Keep800x600Ratio); _CacheNbFreePlaces--; diff --git a/code/nel/src/3d/text_context_user.cpp b/code/nel/src/3d/text_context_user.cpp index 6ee880d91..441d463f5 100644 --- a/code/nel/src/3d/text_context_user.cpp +++ b/code/nel/src/3d/text_context_user.cpp @@ -100,6 +100,30 @@ uint32 CTextContextUser::getFontSize() const return _TextContext.getFontSize(); } +void CTextContextUser::setEmbolden(bool b) +{ + H_AUTO2; + + _TextContext.setEmbolden(b); +} +bool CTextContextUser::getEmbolden() const +{ + H_AUTO2; + + return _TextContext.getEmbolden(); +} +void CTextContextUser::setOblique(bool b) +{ + H_AUTO2; + + _TextContext.setOblique(b); +} +bool CTextContextUser::getOblique() const +{ + H_AUTO2; + + return _TextContext.getOblique(); +} void CTextContextUser::setHotSpot(THotSpot hotSpot) { H_AUTO2; diff --git a/code/nel/src/3d/texture_font.cpp b/code/nel/src/3d/texture_font.cpp index f27705494..4e9e3a0a4 100644 --- a/code/nel/src/3d/texture_font.cpp +++ b/code/nel/src/3d/texture_font.cpp @@ -47,11 +47,14 @@ const int NbLine[TEXTUREFONT_NBCATEGORY] = { 4, 6, 4, 1 }; // Based on textsize // --------------------------------------------------------------------------- inline uint32 CTextureFont::SLetterKey::getVal() { - + // this limits Size to 6bits + // Large sizes already render wrong when many + // different glyphs are used due to limited texture atlas + uint8 eb = ((uint)Embolden) + ((uint)Oblique << 1); if (FontGenerator == NULL) - return Char + ((Size&255)<<16); + return Char + ((Size&255)<<16) + (eb << 22); else - return Char + ((Size&255)<<16) + ((FontGenerator->getUID()&0xFF)<<24); + return Char + ((Size&255)<<16) + (eb << 22) + ((FontGenerator->getUID()&0xFF)<<24); } // --------------------------------------------------------------------------- @@ -86,6 +89,8 @@ CTextureFont::CTextureFont() rLetter.Char = 0xffff; rLetter.FontGenerator = NULL; rLetter.Size= 0; + rLetter.Embolden = false; + rLetter.Oblique = false; // The less recently used infos if (j < Letters[i].size()-1) @@ -164,7 +169,7 @@ void CTextureFont::rebuildLetter (sint cat, sint x, sint y) sint posy = catTopY + y * Categories[cat]; uint32 pitch = 0; - uint8 *bitmap = rLetter.FontGenerator->getBitmap ( rLetter.Char, rLetter.Size, + uint8 *bitmap = rLetter.FontGenerator->getBitmap ( rLetter.Char, rLetter.Size, rLetter.Embolden, rLetter.Oblique, rLetter.CharWidth, rLetter.CharHeight, pitch, rLetter.Left, rLetter.Top, rLetter.AdvX, rLetter.GlyphIndex ); @@ -303,7 +308,7 @@ CTextureFont::SLetterInfo* CTextureFont::getLetterInfo (SLetterKey& k) // \todo mat : Temp !!! Try to use freetype cache uint32 nPitch, nGlyphIndex; sint32 nLeft, nTop, nAdvX; - k.FontGenerator->getBitmap (k.Char, k.Size, width, height, nPitch, nLeft, nTop, + k.FontGenerator->getBitmap (k.Char, k.Size, k.Embolden, k.Oblique, width, height, nPitch, nLeft, nTop, nAdvX, nGlyphIndex ); // Add 1 pixel space for black border to get correct category @@ -323,6 +328,8 @@ CTextureFont::SLetterInfo* CTextureFont::getLetterInfo (SLetterKey& k) k2.Char = Back[cat]->Char; k2.FontGenerator = Back[cat]->FontGenerator; k2.Size = Back[cat]->Size; + k2.Embolden = Back[cat]->Embolden; + k2.Oblique = Back[cat]->Oblique; itAccel = Accel.find (k2.getVal()); if (itAccel != Accel.end()) @@ -336,6 +343,8 @@ CTextureFont::SLetterInfo* CTextureFont::getLetterInfo (SLetterKey& k) Back[cat]->Char = k.Char; Back[cat]->FontGenerator = k.FontGenerator; Back[cat]->Size = k.Size; + Back[cat]->Embolden = k.Embolden; + Back[cat]->Oblique = k.Oblique; Back[cat]->CharWidth = width; Back[cat]->CharHeight = height; Back[cat]->Top = nTop; diff --git a/code/nel/src/3d/transform.cpp b/code/nel/src/3d/transform.cpp index c12754c57..0ec65360d 100644 --- a/code/nel/src/3d/transform.cpp +++ b/code/nel/src/3d/transform.cpp @@ -113,7 +113,7 @@ CTransform::CTransform() _StateFlags= IsOpaque | IsUserLightable; // By default, always allow rendering of Transform Models. - _RenderFilterType= std::numeric_limits::max(); + _RenderFilterType = std::numeric_limits::max(); // By default, don't suport fast intersection detection _SupportFastIntersect= false; diff --git a/code/nel/src/3d/vertex_program_parse.cpp b/code/nel/src/3d/vertex_program_parse.cpp index 40ac2282e..0e144d54f 100644 --- a/code/nel/src/3d/vertex_program_parse.cpp +++ b/code/nel/src/3d/vertex_program_parse.cpp @@ -17,7 +17,86 @@ #include "std3d.h" #include "nel/3d/vertex_program_parse.h" - +enum TArguments +{ +#ifdef NL_LITTLE_ENDIAN + ADD = 1094992928, + ARL = 1095912480, + BFC0 = 1111900976, + BFC1 = 1111900977, + COL0 = 1129270320, + COL1 = 1129270321, + DP3 = 1146106656, + DP4 = 1146106912, + DST = 1146311712, + END = 1162757152, + EXP = 1163415584, + EXPP = 1163415632, + FOGC = 1179600707, + HPOS = 1213222739, + LIT = 1279874080, + LOG = 1280263968, + MAD = 1296122912, + MAX = 1296128032, + MIN = 1296649760, + MOV = 1297045024, + MUL = 1297435680, + NRML = 1314016588, + OPOS = 1330663251, + PSIZ = 1347635546, + RCP = 1380143136, + RSQ = 1381191968, + SGE = 1397179680, + SLT = 1397511200, + TEX0 = 1413830704, + TEX1 = 1413830705, + TEX2 = 1413830706, + TEX3 = 1413830707, + TEX4 = 1413830708, + TEX5 = 1413830709, + TEX6 = 1413830710, + TEX7 = 1413830711, + WGHT = 1464289364, +#else + ADD = 541344833, + ARL = 541872705, + BFC0 = 809715266, + BFC1 = 826492482, + COL0 = 810307395, + COL1 = 827084611, + DP3 = 540233796, + DP4 = 540299332, + DST = 542397252, + END = 541347397, + EXP = 542136389, + EXPP = 1347442757, + FOGC = 1128746822, + HPOS = 1397706824, + LIT = 542394700, + LOG = 541544268, + MAD = 541344077, + MAX = 542654797, + MIN = 542001485, + MOV = 542527309, + MUL = 541873485, + NRML = 1280135758, + OPOS = 1397706831, + PSIZ = 1514754896, + RCP = 542131026, + RSQ = 542200658, + SGE = 541411155, + SLT = 542395475, + TEX0 = 811091284, + TEX1 = 827868500, + TEX2 = 844645716, + TEX3 = 861422932, + TEX4 = 878200148, + TEX5 = 894977364, + TEX6 = 911754580, + TEX7 = 928531796, + WGHT = 1414022999, +#endif +}; //===================================== bool CVPParser::parseWriteMask(uint &mask, std::string &errorOutput) @@ -256,23 +335,23 @@ bool CVPParser::parseInputRegister(CVPOperand &operand, std::string &errorOutput strValue |= ((uint32) *_CurrChar) << (8 * (3 - k)); ++_CurrChar; } - switch (strValue) + switch ((TArguments)strValue) { - case 'OPOS': operand.Value.InputRegisterValue = CVPOperand::IPosition; break; - case 'WGHT': operand.Value.InputRegisterValue = CVPOperand::IWeight; break; - case 'NRML': operand.Value.InputRegisterValue = CVPOperand::INormal; break; - case 'COL0': operand.Value.InputRegisterValue = CVPOperand::IPrimaryColor; break; - case 'COL1': operand.Value.InputRegisterValue = CVPOperand::ISecondaryColor; break; - case 'FOGC': operand.Value.InputRegisterValue = CVPOperand::IFogCoord; break; + case OPOS: operand.Value.InputRegisterValue = CVPOperand::IPosition; break; + case WGHT: operand.Value.InputRegisterValue = CVPOperand::IWeight; break; + case NRML: operand.Value.InputRegisterValue = CVPOperand::INormal; break; + case COL0: operand.Value.InputRegisterValue = CVPOperand::IPrimaryColor; break; + case COL1: operand.Value.InputRegisterValue = CVPOperand::ISecondaryColor; break; + case FOGC: operand.Value.InputRegisterValue = CVPOperand::IFogCoord; break; // texture argument - case 'TEX0': - case 'TEX1': - case 'TEX2': - case 'TEX3': - case 'TEX4': - case 'TEX5': - case 'TEX6': - case 'TEX7': + case TEX0: + case TEX1: + case TEX2: + case TEX3: + case TEX4: + case TEX5: + case TEX6: + case TEX7: operand.Value.InputRegisterValue = (CVPOperand::EInputRegister) (((CVPOperand::ITex0 + strValue) & 0xff) - '0'); break; default: @@ -384,23 +463,23 @@ bool CVPParser::parseOutputRegister(CVPOperand &operand, std::string &errorOutpu ++_CurrChar; } // convert to enum - switch(strValue) + switch((TArguments)strValue) { - case 'HPOS': operand.Value.OutputRegisterValue = CVPOperand::OHPosition; break; - case 'COL0': operand.Value.OutputRegisterValue = CVPOperand::OPrimaryColor; break; - case 'COL1': operand.Value.OutputRegisterValue = CVPOperand::OSecondaryColor; break; - case 'BFC0': operand.Value.OutputRegisterValue = CVPOperand::OBackFacePrimaryColor; break; - case 'BFC1': operand.Value.OutputRegisterValue = CVPOperand::OBackFaceSecondaryColor; break; - case 'FOGC': operand.Value.OutputRegisterValue = CVPOperand::OFogCoord; break; - case 'PSIZ': operand.Value.OutputRegisterValue = CVPOperand::OPointSize; break; - case 'TEX0': operand.Value.OutputRegisterValue = CVPOperand::OTex0; break; - case 'TEX1': operand.Value.OutputRegisterValue = CVPOperand::OTex1; break; - case 'TEX2': operand.Value.OutputRegisterValue = CVPOperand::OTex2; break; - case 'TEX3': operand.Value.OutputRegisterValue = CVPOperand::OTex3; break; - case 'TEX4': operand.Value.OutputRegisterValue = CVPOperand::OTex4; break; - case 'TEX5': operand.Value.OutputRegisterValue = CVPOperand::OTex5; break; - case 'TEX6': operand.Value.OutputRegisterValue = CVPOperand::OTex6; break; - case 'TEX7': operand.Value.OutputRegisterValue = CVPOperand::OTex7; break; + case HPOS: operand.Value.OutputRegisterValue = CVPOperand::OHPosition; break; + case COL0: operand.Value.OutputRegisterValue = CVPOperand::OPrimaryColor; break; + case COL1: operand.Value.OutputRegisterValue = CVPOperand::OSecondaryColor; break; + case BFC0: operand.Value.OutputRegisterValue = CVPOperand::OBackFacePrimaryColor; break; + case BFC1: operand.Value.OutputRegisterValue = CVPOperand::OBackFaceSecondaryColor; break; + case FOGC: operand.Value.OutputRegisterValue = CVPOperand::OFogCoord; break; + case PSIZ: operand.Value.OutputRegisterValue = CVPOperand::OPointSize; break; + case TEX0: operand.Value.OutputRegisterValue = CVPOperand::OTex0; break; + case TEX1: operand.Value.OutputRegisterValue = CVPOperand::OTex1; break; + case TEX2: operand.Value.OutputRegisterValue = CVPOperand::OTex2; break; + case TEX3: operand.Value.OutputRegisterValue = CVPOperand::OTex3; break; + case TEX4: operand.Value.OutputRegisterValue = CVPOperand::OTex4; break; + case TEX5: operand.Value.OutputRegisterValue = CVPOperand::OTex5; break; + case TEX6: operand.Value.OutputRegisterValue = CVPOperand::OTex6; break; + case TEX7: operand.Value.OutputRegisterValue = CVPOperand::OTex7; break; default: errorOutput = "Can't read index for output register."; return false; @@ -753,9 +832,9 @@ bool CVPParser::parseInstruction(CVPInstruction &instr, std::string &errorOutput { instrStr |= (uint32) ' '; } - switch (instrStr) + switch ((TArguments)instrStr) { - case 'ARL ': + case ARL: instr.Opcode = CVPInstruction::ARL; if (!parseOp2(instr, errorOutput)) return false; if (!instr.Src1.Swizzle.isScalar()) @@ -764,7 +843,7 @@ bool CVPParser::parseInstruction(CVPInstruction &instr, std::string &errorOutput return false; } break; - case 'RSQ ': + case RSQ: instr.Opcode = CVPInstruction::RSQ; if (!parseOp2(instr, errorOutput)) return false; if (!instr.Src1.Swizzle.isScalar()) @@ -773,8 +852,8 @@ bool CVPParser::parseInstruction(CVPInstruction &instr, std::string &errorOutput return false; } break; - case 'EXP ': - case 'EXPP': + case EXP: + case EXPP: instr.Opcode = CVPInstruction::EXPP; if (!parseOp2(instr, errorOutput)) return false; if (!instr.Src1.Swizzle.isScalar()) @@ -789,7 +868,7 @@ bool CVPParser::parseInstruction(CVPInstruction &instr, std::string &errorOutput return false; }*/ break; - case 'LOG ': + case LOG: instr.Opcode = CVPInstruction::LOG; if (!parseOp2(instr, errorOutput)) return false; if (!instr.Src1.Swizzle.isScalar()) @@ -805,7 +884,7 @@ bool CVPParser::parseInstruction(CVPInstruction &instr, std::string &errorOutput } */ break; - case 'RCP ': + case RCP: instr.Opcode = CVPInstruction::RCP; if (!parseOp2(instr, errorOutput)) return false; if (!instr.Src1.Swizzle.isScalar()) @@ -815,60 +894,60 @@ bool CVPParser::parseInstruction(CVPInstruction &instr, std::string &errorOutput } break; ///////////////// - case 'MOV ': + case MOV: instr.Opcode = CVPInstruction::MOV; if (!parseOp2(instr, errorOutput)) return false; break; - case 'LIT ': + case LIT: instr.Opcode = CVPInstruction::LIT; if (!parseOp2(instr, errorOutput)) return false; break; ///////////////// - case 'MAD ': + case MAD: instr.Opcode = CVPInstruction::MAD; if (!parseOp4(instr, errorOutput)) return false; break; ///////////////// - case 'ADD ': + case ADD: instr.Opcode = CVPInstruction::ADD; if (!parseOp3(instr, errorOutput)) return false; break; ///////////////// - case 'MUL ': + case MUL: instr.Opcode = CVPInstruction::MUL; if (!parseOp3(instr, errorOutput)) return false; break; - case 'DP3 ': + case DP3: instr.Opcode = CVPInstruction::DP3; if (!parseOp3(instr, errorOutput)) return false; break; - case 'DP4 ': + case DP4: instr.Opcode = CVPInstruction::DP4; if (!parseOp3(instr, errorOutput)) return false; break; - case 'DST ': + case DST: instr.Opcode = CVPInstruction::DST; if (!parseOp3(instr, errorOutput)) return false; break; - case 'MIN ': + case MIN: instr.Opcode = CVPInstruction::MIN; if (!parseOp3(instr, errorOutput)) return false; break; - case 'MAX ': + case MAX: instr.Opcode = CVPInstruction::MAX; if (!parseOp3(instr, errorOutput)) return false; break; - case 'SLT ': + case SLT: instr.Opcode = CVPInstruction::SLT; if (!parseOp3(instr, errorOutput)) return false; break; - case 'SGE ': + case SGE: instr.Opcode = CVPInstruction::SGE; if (!parseOp3(instr, errorOutput)) return false; break; ///////////////// - case 'END ': + case END: endEncountered = true; return true; break; diff --git a/code/nel/src/3d/water_pool_manager.cpp b/code/nel/src/3d/water_pool_manager.cpp index b38068852..c377ff1f3 100644 --- a/code/nel/src/3d/water_pool_manager.cpp +++ b/code/nel/src/3d/water_pool_manager.cpp @@ -44,19 +44,19 @@ NLMISC_COMMAND(setWaterPool, "Setup a pool of water in the water pool manager", } if (numArgs == 3) { - whmb.FilterWeight = ::atof(args[2].c_str()); + NLMISC::fromString(args[2], whmb.FilterWeight); } if (numArgs == 4) { - whmb.UnitSize = ::atof(args[3].c_str()); + NLMISC::fromString(args[3], whmb.UnitSize); } if (numArgs == 5) { - whmb.WaveIntensity = ::atof(args[4].c_str()); + NLMISC::fromString(args[4], whmb.WaveIntensity); } if (numArgs == 4) { - whmb.WavePeriod = ::atof(args[5].c_str()); + NLMISC::fromString(args[5], whmb.WavePeriod); } // create the water pool GetWaterPoolManager().createWaterPool(whmb); diff --git a/code/nel/src/3d/zone_search.cpp b/code/nel/src/3d/zone_search.cpp index cbadc8c39..f850d4377 100644 --- a/code/nel/src/3d/zone_search.cpp +++ b/code/nel/src/3d/zone_search.cpp @@ -73,7 +73,7 @@ pair CZoneSearch::getZoneName(uint x, uint y, uint cx, uint cy) sprintf(name, "%d_%c%c.zonel", zoneY, firstLetter, secondLetter); - return make_pair(string(name), distance); + return std::pair(string(name), distance); } diff --git a/code/nel/src/georges/form_dfn.cpp b/code/nel/src/georges/form_dfn.cpp index d4a16bb50..16ee74d5b 100644 --- a/code/nel/src/georges/form_dfn.cpp +++ b/code/nel/src/georges/form_dfn.cpp @@ -707,7 +707,7 @@ bool CFormDfn::getEntryIndexByName (uint &entry, const std::string &name) const } entryIndex++; } - entry=std::numeric_limits::max(); + entry = std::numeric_limits::max(); return false; } diff --git a/code/nel/src/georges/form_elm.cpp b/code/nel/src/georges/form_elm.cpp index 658d1d9f6..01e4010e2 100644 --- a/code/nel/src/georges/form_elm.cpp +++ b/code/nel/src/georges/form_elm.cpp @@ -231,7 +231,7 @@ bool CFormElm::isAtom () const const CType* CFormElm::getType () { warning (false, "getType", "This node is not an atom."); - return 0; + return NULL; } // *************************************************************************** diff --git a/code/nel/src/gui/CMakeLists.txt b/code/nel/src/gui/CMakeLists.txt index e3d501e23..32125791d 100644 --- a/code/nel/src/gui/CMakeLists.txt +++ b/code/nel/src/gui/CMakeLists.txt @@ -6,7 +6,7 @@ SOURCE_GROUP("src" FILES ${SRC}) NL_TARGET_LIB(nelgui ${SRC} ${HEADERS}) -INCLUDE_DIRECTORIES(${LUA_INCLUDE_DIR} ${LUABIND_INCLUDE_DIR} ${LIBWWW_INCLUDE_DIR}) +INCLUDE_DIRECTORIES(${LUA_INCLUDE_DIR} ${LUABIND_INCLUDE_DIR} ${LIBWWW_INCLUDE_DIR} ${CURL_INCLUDE_DIRS}) TARGET_LINK_LIBRARIES(nelgui nelmisc nel3d ${LUA_LIBRARIES} ${LUABIND_LIBRARIES} ${LIBXML2_LIBRARIES} ${LIBWWW_LIBRARIES} ${CURL_LIBRARIES}) SET_TARGET_PROPERTIES(nelgui PROPERTIES LINK_INTERFACE_LIBRARIES "") diff --git a/code/nel/src/gui/ctrl_base_button.cpp b/code/nel/src/gui/ctrl_base_button.cpp index 4f118cd51..673ea906d 100644 --- a/code/nel/src/gui/ctrl_base_button.cpp +++ b/code/nel/src/gui/ctrl_base_button.cpp @@ -701,6 +701,11 @@ namespace NLGUI //pIM->submitEvent ("button_click:"+getId()); } */ + + // top-right corner is EventX=0, EventY=0 + _EventX = eventDesc.getX() - _XReal; + _EventY = (_YReal + _HReal) - eventDesc.getY(); + runLeftClickAction(); if (CWidgetManager::getInstance()->getCapturePointerLeft() == NULL) return true; // event handler may release cpature from this object (if it is removed for example) diff --git a/code/nel/src/gui/ctrl_scroll.cpp b/code/nel/src/gui/ctrl_scroll.cpp index f534fc0a1..c29f73fea 100644 --- a/code/nel/src/gui/ctrl_scroll.cpp +++ b/code/nel/src/gui/ctrl_scroll.cpp @@ -519,17 +519,17 @@ namespace NLGUI // Read Action handlers prop = (char*) xmlGetProp( node, (xmlChar*)"onscroll" ); - if (prop) _AHOnScroll = NLMISC::strlwr(prop); + if (prop) _AHOnScroll = NLMISC::strlwr(prop.str()); prop = (char*) xmlGetProp( node, (xmlChar*)"params" ); if (prop) _AHOnScrollParams = string((const char*)prop); // prop = (char*) xmlGetProp( node, (xmlChar*)"onscrollend" ); - if (prop) _AHOnScrollEnd = NLMISC::strlwr(prop); + if (prop) _AHOnScrollEnd = NLMISC::strlwr(prop.str()); prop = (char*) xmlGetProp( node, (xmlChar*)"end_params" ); if (prop) _AHOnScrollEndParams = string((const char*)prop); // prop = (char*) xmlGetProp( node, (xmlChar*)"onscrollcancel" ); - if (prop) _AHOnScrollCancel = NLMISC::strlwr(prop); + if (prop) _AHOnScrollCancel = NLMISC::strlwr(prop.str()); prop = (char*) xmlGetProp( node, (xmlChar*)"cancel_params" ); if (prop) _AHOnScrollCancelParams = string((const char*)prop); @@ -538,9 +538,9 @@ namespace NLGUI prop = (char*) xmlGetProp( node, (xmlChar*)"target" ); if (prop) { - CInterfaceGroup *group = dynamic_cast(CWidgetManager::getInstance()->getElementFromId(prop)); + CInterfaceGroup *group = dynamic_cast(CWidgetManager::getInstance()->getElementFromId(prop.str())); if(group == NULL) - group = dynamic_cast(CWidgetManager::getInstance()->getElementFromId(this->getId(), prop)); + group = dynamic_cast(CWidgetManager::getInstance()->getElementFromId(this->getId(), prop.str())); if(group != NULL) setTarget (group); diff --git a/code/nel/src/gui/ctrl_text_button.cpp b/code/nel/src/gui/ctrl_text_button.cpp index cdf9ea0d2..2fb19a9fc 100644 --- a/code/nel/src/gui/ctrl_text_button.cpp +++ b/code/nel/src/gui/ctrl_text_button.cpp @@ -868,6 +868,15 @@ namespace NLGUI } } + // *************************************************************************** + void CCtrlTextButton::checkCoords() + { + if( _ViewText != NULL ) + _ViewText->checkCoords(); + + CCtrlBaseButton::checkCoords(); + } + // *************************************************************************** void CCtrlTextButton::updateCoords() diff --git a/code/nel/src/gui/dbgroup_combo_box.cpp b/code/nel/src/gui/dbgroup_combo_box.cpp index 61b8ec3e6..39ddd63c1 100644 --- a/code/nel/src/gui/dbgroup_combo_box.cpp +++ b/code/nel/src/gui/dbgroup_combo_box.cpp @@ -268,7 +268,7 @@ namespace NLGUI void CDBGroupComboBox::addText(const ucstring &text) { dirt(); - _Texts.push_back(make_pair(_Texts.size(), text)); + _Texts.push_back(make_pair((uint)_Texts.size(), text)); _Textures.push_back(std::string()); } @@ -330,7 +330,7 @@ namespace NLGUI } // *************************************************************************** - const uint &CDBGroupComboBox::getTextId(uint i) const + uint CDBGroupComboBox::getTextId(uint i) const { static uint null = 0; if(i<_Texts.size()) diff --git a/code/nel/src/gui/dbview_number.cpp b/code/nel/src/gui/dbview_number.cpp index a0b6dfb02..e844bf4c0 100644 --- a/code/nel/src/gui/dbview_number.cpp +++ b/code/nel/src/gui/dbview_number.cpp @@ -121,7 +121,7 @@ namespace NLGUI { sint64 i; if( fromString( value, i ) ) - _Divisor = i; + _Modulo = i; return; } else @@ -249,5 +249,16 @@ namespace NLGUI { } + sint64 CDBViewNumber::getVal() + { + if( !_Number.hasValue() ) + return 0; + + if( _Modulo == 0 ) + return _Number.getSInt64() / _Divisor; + else + return ( _Number.getSInt64() / _Divisor ) % _Modulo; + } + } diff --git a/code/nel/src/gui/dbview_quantity.cpp b/code/nel/src/gui/dbview_quantity.cpp index ad651f582..12dfce4b8 100644 --- a/code/nel/src/gui/dbview_quantity.cpp +++ b/code/nel/src/gui/dbview_quantity.cpp @@ -157,14 +157,17 @@ namespace NLGUI // *************************************************************************** void CDBViewQuantity::draw () { - // change text - sint32 val= _Number.getSInt32(); - sint32 valMax= _NumberMax.getSInt32(); - if(_Cache!=val || _CacheMax!=valMax) + if( _Number.hasValue() && _NumberMax.hasValue() ) { - _Cache= val; - _CacheMax=valMax; - buildTextFromCache(); + // change text + sint32 val= _Number.getSInt32(); + sint32 valMax= _NumberMax.getSInt32(); + if(_Cache!=val || _CacheMax!=valMax) + { + _Cache= val; + _CacheMax=valMax; + buildTextFromCache(); + } } // parent call diff --git a/code/nel/src/gui/group_editbox.cpp b/code/nel/src/gui/group_editbox.cpp index 92ae46703..f6d909119 100644 --- a/code/nel/src/gui/group_editbox.cpp +++ b/code/nel/src/gui/group_editbox.cpp @@ -999,7 +999,8 @@ namespace NLGUI break; // OTHER default: - if ((rEDK.getChar() == KeyRETURN) && !_WantReturn) + bool isKeyRETURN = !rEDK.getKeyCtrl() && rEDK.getChar() == KeyRETURN; + if (isKeyRETURN && !_WantReturn) { // update historic. if(_MaxHistoric) @@ -1030,9 +1031,9 @@ namespace NLGUI // If the char is not alphanumeric -> return. // if(!isalnum(ec.Char)) // return - if( (rEDK.getChar()>=32) || (rEDK.getChar() == KeyRETURN) ) + if( (rEDK.getChar()>=32) || isKeyRETURN ) { - if (rEDK.getChar() == KeyRETURN) + if (isKeyRETURN) { ucstring copyStr= _InputString; if ((uint) std::count(copyStr.begin(), copyStr.end(), '\n') >= _MaxNumReturn) @@ -1049,7 +1050,7 @@ namespace NLGUI cutSelection(); } - ucchar c = (rEDK.getChar() == KeyRETURN)?'\n':rEDK.getChar(); + ucchar c = isKeyRETURN ? '\n' : rEDK.getChar(); if (isFiltered(c)) return; switch(_EntryType) { @@ -1128,7 +1129,7 @@ namespace NLGUI ++ _CursorPos; triggerOnChangeAH(); } - if (rEDK.getChar() == KeyRETURN) + if (isKeyRETURN) { CAHManager::getInstance()->runActionHandler(_AHOnEnter, this, _AHOnEnterParams); } @@ -1336,6 +1337,11 @@ namespace NLGUI // if click, and not frozen, then get the focus if (eventDesc.getEventTypeExtended() == NLGUI::CEventDescriptorMouse::mouseleftdown && !_Frozen) { + if( getEditorMode() ) + { + return CViewBase::handleEvent( event ); + } + _SelectingText = true; stopParentBlink(); CWidgetManager::getInstance()->setCaptureKeyboard (this); @@ -1531,36 +1537,45 @@ namespace NLGUI CInterfaceGroup::clearViews(); } + // ---------------------------------------------------------------------------- + + void CGroupEditBox::createViewText() + { + nlwarning("Interface: CGroupEditBox: text 'edit_text' missing or bad type"); + nlwarning( "Trying to create a new 'edit_text' for %s", getId().c_str() ); + _ViewText = dynamic_cast< CViewText* >( CInterfaceFactory::createClass( "text" ) ); + if( _ViewText == NULL ) + { + nlwarning( "Failed to create new 'edit_text' for %s", getId().c_str() ); + return; + } + + _ViewText->setParent( this ); + _ViewText->setIdRecurse( "edit_text" ); + _ViewText->setHardText( "" ); + _ViewText->setPosRef( Hotspot_ML ); + _ViewText->setParentPosRef( Hotspot_ML ); + addView( _ViewText ); + + sint32 w,h; + w = std::max( sint32( _ViewText->getFontWidth() * _ViewText->getText().size() ), getW() ); + h = std::max( sint32( _ViewText->getFontHeight() ), getH() ); + + setH( h ); + setW( w ); + } + // ---------------------------------------------------------------------------- void CGroupEditBox::setup() { // bind to the controls - _ViewText = dynamic_cast(CInterfaceGroup::getView("edit_text")); + if( _ViewText == NULL ) + _ViewText = dynamic_cast(CInterfaceGroup::getView("edit_text")); if(_ViewText == NULL) - { - nlwarning("Interface: CGroupEditBox: text 'edit_text' missing or bad type"); - if( editorMode ) - { - nlwarning( "Trying to create a new 'edit_text' for %s", getId().c_str() ); - _ViewText = dynamic_cast< CViewText* >( CInterfaceFactory::createClass( "text" ) ); - if( _ViewText != NULL ) - { - _ViewText->setParent( this ); - _ViewText->setIdRecurse( "edit_text" ); - _ViewText->setHardText( "sometext" ); - _ViewText->setPosRef( Hotspot_TL ); - _ViewText->setParentPosRef( Hotspot_TL ); - addView( _ViewText ); - - setH( _ViewText->getFontHeight() ); - setW( _ViewText->getFontWidth() * _ViewText->getText().size() ); - - } - else - nlwarning( "Failed to create new 'edit_text' for %s", getId().c_str() ); - } - } + createViewText(); + + _ViewText->setEditorSelectable( false ); // For MultiLine editbox, clip the end space, else weird when edit space at end of line (nothing happens) if(_ViewText) diff --git a/code/nel/src/gui/group_editbox_decor.cpp b/code/nel/src/gui/group_editbox_decor.cpp new file mode 100644 index 000000000..ae31513de --- /dev/null +++ b/code/nel/src/gui/group_editbox_decor.cpp @@ -0,0 +1,380 @@ +// Ryzom - MMORPG Framework +// Copyright (C) 2014 Laszlo Kis-Adam +// 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 . + +#include "stdpch.h" +#include "nel/gui/group_editbox_decor.h" +#include "nel/gui/view_bitmap.h" +#include "nel/gui/view_text.h" + +namespace NLGUI +{ + class EBDPrivate + { + public: + enum Textures + { + BG, + L, + R, + TM, + BM, + TL, + TR, + BL, + BR, + TCOUNT + }; + + EBDPrivate() + { + for( int i = 0; i < TCOUNT; i++ ) + { + _Textures.push_back( new CViewBitmap( CViewBase::TCtorParam() ) ); + } + } + + ~EBDPrivate() + { + for( int i = 0; i < _Textures.size(); i++ ) + delete _Textures[ i ]; + _Textures.clear(); + } + + void draw() + { + for( int i = 0; i < _Textures.size(); i++ ) + { + CViewBitmap *bm = _Textures[ i ]; + bm->draw(); + } + } + + void updateCoords() + { + for( int i = 0; i < _Textures.size(); i++ ) + { + CViewBitmap *bm = _Textures[ i ]; + bm->fitTexture(); + } + + // W and H parameters depend on the sizes of the other textures + // Negative sizes mean that the sizes are that much smaller than the parent + sint32 w,h; + h = _Textures[ TL ]->getHReal() + _Textures[ BL ]->getHReal(); + h *= -1; + _Textures[ L ]->setH( h ); + + h = _Textures[ TR ]->getHReal() + _Textures[ BR ]->getHReal(); + h *= -1; + _Textures[ R ]->setH( h ); + + w = _Textures[ TL ]->getWReal() + _Textures[ TR ]->getWReal(); + w *= -1; + _Textures[ TM ]->setW( w ); + + w = _Textures[ BL ]->getWReal() + _Textures[ BR ]->getWReal(); + w *= -1; + _Textures[ BM ]->setW( w ); + + h = _Textures[ TM ]->getHReal() + _Textures[ BM ]->getHReal(); + h *= -1; + w = _Textures[ L ]->getWReal() + _Textures[ R ]->getWReal(); + w *= -1; + _Textures[ BG ]->setW( w ); + _Textures[ BG ]->setH( h ); + + for( int i = 0; i < _Textures.size(); i++ ) + { + CViewBitmap *bm = _Textures[ i ]; + bm->updateCoords(); + } + } + + void setup( CInterfaceGroup *parent ) + { + for( int i = 0; i < _Textures.size(); i++ ) + { + CViewBitmap *bm = _Textures[ i ]; + bm->setParent( parent ); + bm->setParentPos( parent ); + bm->setParentSize( parent ); + bm->setEditorSelectable( false ); + } + + _Textures[ TL ]->setPosRef( Hotspot_TL ); + _Textures[ TL ]->setParentPosRef( Hotspot_TL ); + + _Textures[ TM ]->setPosRef( Hotspot_TM ); + _Textures[ TM ]->setParentPosRef( Hotspot_TM ); + _Textures[ TM ]->setScale( true ); + _Textures[ TM ]->setSizeRef( "w" ); + + _Textures[ TR ]->setPosRef( Hotspot_TR ); + _Textures[ TR ]->setParentPosRef( Hotspot_TR ); + + _Textures[ BL ]->setPosRef( Hotspot_BL ); + _Textures[ BL ]->setParentPosRef( Hotspot_BL ); + + _Textures[ BM ]->setPosRef( Hotspot_BM ); + _Textures[ BM ]->setParentPosRef( Hotspot_BM ); + _Textures[ BM ]->setScale( true ); + _Textures[ BM ]->setSizeRef( "w" ); + + _Textures[ BR ]->setPosRef( Hotspot_BR ); + _Textures[ BR ]->setParentPosRef( Hotspot_BR ); + + _Textures[ L ]->setPosRef( Hotspot_ML ); + _Textures[ L ]->setParentPosRef( Hotspot_ML ); + _Textures[ L ]->setScale( true ); + _Textures[ L ]->setSizeRef( "h" ); + + _Textures[ R ]->setPosRef( Hotspot_MR ); + _Textures[ R ]->setParentPosRef( Hotspot_MR ); + _Textures[ R ]->setScale( true ); + _Textures[ R ]->setSizeRef( "h" ); + + _Textures[ BG ]->setPosRef( Hotspot_MM ); + _Textures[ BG ]->setParentPosRef( Hotspot_MM ); + _Textures[ BG ]->setScale( true ); + _Textures[ BG ]->setSizeRef( "wh" ); + } + + std::vector< CViewBitmap* > _Textures; + }; + + NLMISC_REGISTER_OBJECT( CViewBase, CGroupEditBoxDecor, std::string, "edit_box_decor" ); + + CGroupEditBoxDecor::CGroupEditBoxDecor( const TCtorParam ¶m ) : + CGroupEditBox( param ) + { + _Pvt = new EBDPrivate(); + _Pvt->setup( this ); + + createViewText(); + getVT()->setSerializable( false ); + getVT()->setEditorSelectable( false ); + } + + CGroupEditBoxDecor::~CGroupEditBoxDecor() + { + delete _Pvt; + _Pvt = NULL; + } + + void CGroupEditBoxDecor::moveBy( sint32 x, sint32 y ) + { + CInterfaceElement::moveBy( x, y ); + + _Pvt->updateCoords(); + } + + void CGroupEditBoxDecor::setIdRecurse( const std::string &newID ) + { + CInterfaceElement::setIdRecurse( newID ); + _ViewText->setIdRecurse( _ViewText->getShortId() ); + } + + std::string CGroupEditBoxDecor::getProperty( const std::string &name ) const + { + if( name == "tx_tl" ) + { + return _Pvt->_Textures[ EBDPrivate::TL ]->getTexture(); + } + else + if( name == "tx_tm" ) + { + return _Pvt->_Textures[ EBDPrivate::TM ]->getTexture(); + } + else + if( name == "tx_tr" ) + { + return _Pvt->_Textures[ EBDPrivate::TR ]->getTexture(); + } + else + if( name == "tx_bl" ) + { + return _Pvt->_Textures[ EBDPrivate::BL ]->getTexture(); + } + else + if( name == "tx_bm" ) + { + return _Pvt->_Textures[ EBDPrivate::BM ]->getTexture(); + } + else + if( name == "tx_br" ) + { + return _Pvt->_Textures[ EBDPrivate::BR ]->getTexture(); + } + else + if( name == "tx_l" ) + { + return _Pvt->_Textures[ EBDPrivate::L ]->getTexture(); + } + else + if( name == "tx_r" ) + { + return _Pvt->_Textures[ EBDPrivate::R ]->getTexture(); + } + else + if( name == "tx_bg" ) + { + return _Pvt->_Textures[ EBDPrivate::BG ]->getTexture(); + } + else + return CGroupEditBox::getProperty( name ); + } + + void CGroupEditBoxDecor::setProperty( const std::string &name, const std::string &value ) + { + if( name == "tx_tl" ) + { + _Pvt->_Textures[ EBDPrivate::TL ]->setTexture( value ); + } + else + if( name == "tx_tm" ) + { + _Pvt->_Textures[ EBDPrivate::TM ]->setTexture( value ); + } + else + if( name == "tx_tr" ) + { + _Pvt->_Textures[ EBDPrivate::TR ]->setTexture( value ); + } + else + if( name == "tx_bl" ) + { + _Pvt->_Textures[ EBDPrivate::BL ]->setTexture( value ); + } + else + if( name == "tx_bm" ) + { + _Pvt->_Textures[ EBDPrivate::BM ]->setTexture( value ); + } + else + if( name == "tx_br" ) + { + _Pvt->_Textures[ EBDPrivate::BR ]->setTexture( value ); + } + else + if( name == "tx_l" ) + { + _Pvt->_Textures[ EBDPrivate::L ]->setTexture( value ); + } + else + if( name == "tx_r" ) + { + _Pvt->_Textures[ EBDPrivate::R ]->setTexture( value ); + } + else + if( name == "tx_bg" ) + { + _Pvt->_Textures[ EBDPrivate::BG ]->setTexture( value ); + } + else + CGroupEditBox::setProperty( name, value ); + } + + xmlNodePtr CGroupEditBoxDecor::serialize( xmlNodePtr parentNode, const char *type ) const + { + xmlNodePtr node = CGroupEditBox::serialize( parentNode, type ); + if( node == NULL ) + return NULL; + + xmlSetProp( node, BAD_CAST "type", BAD_CAST "edit_box_decor" ); + xmlSetProp( node, BAD_CAST "tx_tl", BAD_CAST _Pvt->_Textures[ EBDPrivate::TL ]->getTexture().c_str() ); + xmlSetProp( node, BAD_CAST "tx_tr", BAD_CAST _Pvt->_Textures[ EBDPrivate::TR ]->getTexture().c_str() ); + xmlSetProp( node, BAD_CAST "tx_tm", BAD_CAST _Pvt->_Textures[ EBDPrivate::TM ]->getTexture().c_str() ); + xmlSetProp( node, BAD_CAST "tx_bl", BAD_CAST _Pvt->_Textures[ EBDPrivate::BL ]->getTexture().c_str() ); + xmlSetProp( node, BAD_CAST "tx_bm", BAD_CAST _Pvt->_Textures[ EBDPrivate::BM ]->getTexture().c_str() ); + xmlSetProp( node, BAD_CAST "tx_br", BAD_CAST _Pvt->_Textures[ EBDPrivate::BR ]->getTexture().c_str() ); + xmlSetProp( node, BAD_CAST "tx_l", BAD_CAST _Pvt->_Textures[ EBDPrivate::L ]->getTexture().c_str() ); + xmlSetProp( node, BAD_CAST "tx_r", BAD_CAST _Pvt->_Textures[ EBDPrivate::R ]->getTexture().c_str() ); + xmlSetProp( node, BAD_CAST "tx_bg", BAD_CAST _Pvt->_Textures[ EBDPrivate::BG ]->getTexture().c_str() ); + + return node; + } + + bool CGroupEditBoxDecor::parse( xmlNodePtr cur, CInterfaceGroup *parent ) + { + if( !CGroupEditBox::parse( cur, parent ) ) + return false; + + CXMLAutoPtr prop; + + prop = ( char* ) xmlGetProp( cur, BAD_CAST "tx_tl" ); + if( prop ) + _Pvt->_Textures[ EBDPrivate::TL ]->setTexture( ( const char* )prop ); + + prop = ( char* ) xmlGetProp( cur, BAD_CAST "tx_tm" ); + if( prop ) + _Pvt->_Textures[ EBDPrivate::TM ]->setTexture( ( const char* )prop ); + + prop = ( char* ) xmlGetProp( cur, BAD_CAST "tx_tr" ); + if( prop ) + _Pvt->_Textures[ EBDPrivate::TR ]->setTexture( ( const char* )prop ); + + prop = ( char* ) xmlGetProp( cur, BAD_CAST "tx_bl" ); + if( prop ) + _Pvt->_Textures[ EBDPrivate::BL ]->setTexture( ( const char* )prop ); + + prop = ( char* ) xmlGetProp( cur, BAD_CAST "tx_bm" ); + if( prop ) + _Pvt->_Textures[ EBDPrivate::BM ]->setTexture( ( const char* )prop ); + + prop = ( char* ) xmlGetProp( cur, BAD_CAST "tx_br" ); + if( prop ) + _Pvt->_Textures[ EBDPrivate::BR ]->setTexture( ( const char* )prop ); + + prop = ( char* ) xmlGetProp( cur, BAD_CAST "tx_l" ); + if( prop ) + _Pvt->_Textures[ EBDPrivate::L ]->setTexture( ( const char* )prop ); + + prop = ( char* ) xmlGetProp( cur, BAD_CAST "tx_r" ); + if( prop ) + _Pvt->_Textures[ EBDPrivate::R ]->setTexture( ( const char* )prop ); + + prop = ( char* ) xmlGetProp( cur, BAD_CAST "tx_bg" ); + if( prop ) + _Pvt->_Textures[ EBDPrivate::BG ]->setTexture( ( const char* )prop ); + + getVT()->setIdRecurse( "edit_text" ); + + return true; + } + + void CGroupEditBoxDecor::draw() + { + CGroupEditBox::draw(); + + _Pvt->draw(); + } + + void CGroupEditBoxDecor::updateCoords() + { + sint32 tw = _Pvt->_Textures[ EBDPrivate::L ]->getWReal(); + getVT()->setX( tw + 1 ); + + CGroupEditBox::updateCoords(); + _Pvt->updateCoords(); + } + + void CGroupEditBoxDecor::forceLink() + { + } +} + + diff --git a/code/nel/src/gui/group_html.cpp b/code/nel/src/gui/group_html.cpp index dd7eebdef..8619ea878 100644 --- a/code/nel/src/gui/group_html.cpp +++ b/code/nel/src/gui/group_html.cpp @@ -485,7 +485,7 @@ namespace NLGUI string fullstyle = style[1]; for (uint j=2; j < style.size(); j++) fullstyle += ":"+style[j]; - styles[trim(style[0])] = fullstyle; + styles[trim(style[0])] = trim(fullstyle); } } @@ -570,7 +570,7 @@ namespace NLGUI // *************************************************************************** - void CGroupHTML::addLink (uint element_number, uint /* attribute_number */, HTChildAnchor *anchor, const BOOL *present, const char **value) + void CGroupHTML::addLink (uint element_number, const BOOL *present, const char **value) { if (_Browsing) { @@ -591,16 +591,8 @@ namespace NLGUI } else { - HTAnchor * dest = HTAnchor_followMainLink((HTAnchor *) anchor); - if (dest) - { - C3WSmartPtr uri = HTAnchor_address(dest); - _Link.push_back ((const char*)uri); - } - else - { - _Link.push_back(""); - } + // convert href from "?key=val" into "http://domain.com/?key=val" + _Link.push_back(getAbsoluteUrl(suri)); } for(uint8 i = MY_HTML_A_ACCESSKEY; i < MY_HTML_A_Z_ACTION_SHORTCUT; i++) @@ -894,7 +886,20 @@ namespace NLGUI switch(element_number) { case HTML_A: - _TextColor.push_back(LinkColor); + { + CStyleParams style; + style.FontSize = getFontSize(); + style.TextColor = LinkColor; + style.Underlined = true; + style.StrikeThrough = getFontStrikeThrough(); + + if (present[HTML_A_STYLE] && value[HTML_A_STYLE]) + getStyleParams(value[HTML_A_STYLE], style); + + _FontSize.push_back(style.FontSize); + _TextColor.push_back(style.TextColor); + _FontUnderlined.push_back(style.Underlined); + _FontStrikeThrough.push_back(style.StrikeThrough); _GlobalColor.push_back(LinkColorGlobalColor); _A.push_back(true); @@ -903,6 +908,7 @@ namespace NLGUI if (present[MY_HTML_A_CLASS] && value[MY_HTML_A_CLASS]) _LinkClass.push_back(value[MY_HTML_A_CLASS]); + } break; case HTML_DIV: @@ -1217,7 +1223,7 @@ namespace NLGUI normal = value[MY_HTML_INPUT_SRC]; // Action handler parameters : "name=group_html_id|form=id_of_the_form|submit_button=button_name" - string param = "name=" + getId() + "|form=" + toString (_Forms.size()-1) + "|submit_button=" + name; + string param = "name=" + getId() + "|form=" + toString (_Forms.size()-1) + "|submit_button=" + name + "|submit_button_type=image"; // Add the ctrl button addButton (CCtrlButton::PushButton, name, normal, pushed.empty()?normal:pushed, over, @@ -1241,7 +1247,15 @@ namespace NLGUI text = value[MY_HTML_INPUT_VALUE]; // Action handler parameters : "name=group_html_id|form=id_of_the_form|submit_button=button_name" - string param = "name=" + getId() + "|form=" + toString (_Forms.size()-1) + "|submit_button=" + name; + string param = "name=" + getId() + "|form=" + toString (_Forms.size()-1) + "|submit_button=" + name + "|submit_button_type=submit"; + if (text.size() > 0) + { + // escape AH param separator + string tmp = text; + while(NLMISC::strFindReplace(tmp, "|", "|")) + ; + param = param + "|submit_button_value=" + tmp; + } // Add the ctrl button if (!_Paragraph) @@ -1626,6 +1640,28 @@ namespace NLGUI _Object = true; break; + case HTML_SPAN: + { + CStyleParams style; + style.TextColor = getTextColor(); + style.FontSize = getFontSize(); + style.FontWeight = getFontWeight(); + style.FontOblique = getFontOblique(); + style.Underlined = getFontUnderlined(); + style.StrikeThrough = getFontStrikeThrough(); + + if (present[MY_HTML_SPAN_STYLE] && value[MY_HTML_SPAN_STYLE]) + getStyleParams(value[MY_HTML_SPAN_STYLE], style); + + _TextColor.push_back(style.TextColor); + _FontSize.push_back(style.FontSize); + _FontWeight.push_back(style.FontWeight); + _FontOblique.push_back(style.FontOblique); + _FontUnderlined.push_back(style.Underlined); + _FontStrikeThrough.push_back(style.StrikeThrough); + } + break; + case HTML_STYLE: _IgnoreText = true; break; @@ -1647,7 +1683,10 @@ namespace NLGUI popIfNotEmpty (_FontSize); break; case HTML_A: + popIfNotEmpty (_FontSize); popIfNotEmpty (_TextColor); + popIfNotEmpty (_FontUnderlined); + popIfNotEmpty (_FontStrikeThrough); popIfNotEmpty (_GlobalColor); popIfNotEmpty (_A); popIfNotEmpty (_Link); @@ -1755,6 +1794,14 @@ namespace NLGUI popIfNotEmpty (_UL); } break; + case HTML_SPAN: + popIfNotEmpty (_FontSize); + popIfNotEmpty (_FontWeight); + popIfNotEmpty (_FontOblique); + popIfNotEmpty (_TextColor); + popIfNotEmpty (_FontUnderlined); + popIfNotEmpty (_FontStrikeThrough); + break; case HTML_STYLE: _IgnoreText = false; break; @@ -3069,6 +3116,7 @@ namespace NLGUI // Text added ? bool added = false; + bool embolden = getFontWeight() >= 700; // Number of child in this paragraph if (_CurrentViewLink) @@ -3078,6 +3126,10 @@ namespace NLGUI if (!skipLine && (getTextColor() == _CurrentViewLink->getColor()) && (getFontSize() == (uint)_CurrentViewLink->getFontSize()) && + (getFontUnderlined() == _CurrentViewLink->getUnderlined()) && + (getFontStrikeThrough() == _CurrentViewLink->getStrikeThrough()) && + (embolden == _CurrentViewLink->getEmbolden()) && + (getFontOblique() == _CurrentViewLink->getOblique()) && (getLink() == _CurrentViewLink->Link) && (getGlobalColor() == _CurrentViewLink->getModulateGlobalColor())) { @@ -3133,12 +3185,15 @@ namespace NLGUI if (!newLink->Link.empty()) { newLink->setHTMLView (this); - newLink->setUnderlined (true); } } newLink->setText(tmpStr); newLink->setColor(getTextColor()); newLink->setFontSize(getFontSize()); + newLink->setEmbolden(embolden); + newLink->setOblique(getFontOblique()); + newLink->setUnderlined(getFontUnderlined()); + newLink->setStrikeThrough(getFontStrikeThrough()); newLink->setMultiLineSpace((uint)((float)getFontSize()*LineSpaceFontFactor)); newLink->setMultiLine(true); newLink->setModulateGlobalColor(getGlobalColor()); @@ -3414,6 +3469,10 @@ namespace NLGUI _TextColor.clear(); _GlobalColor.clear(); _FontSize.clear(); + _FontWeight.clear(); + _FontOblique.clear(); + _FontUnderlined.clear(); + _FontStrikeThrough.clear(); _Indent = 0; _LI = false; _UL.clear(); @@ -3638,14 +3697,18 @@ namespace NLGUI // *************************************************************************** - void CGroupHTML::submitForm (uint formId, const char *submitButtonName) + void CGroupHTML::submitForm (uint formId, const char *submitButtonType, const char *submitButtonName, const char *submitButtonValue, sint32 x, sint32 y) { // Form id valid ? if (formId < _Forms.size()) { _PostNextTime = true; _PostFormId = formId; + _PostFormSubmitType = submitButtonType; _PostFormSubmitButton = submitButtonName; + _PostFormSubmitValue = submitButtonValue; + _PostFormSubmitX = x; + _PostFormSubmitY = y; } } @@ -3761,6 +3824,10 @@ namespace NLGUI stopBrowse (); updateRefreshButton(); + // Browsing + _Browsing = true; + updateRefreshButton(); + // Home ? if (_URL == "home") _URL = home(); @@ -3780,17 +3847,24 @@ namespace NLGUI _Connecting = true; _ConnectingTimeout = ( times.thisFrameMs / 1000.0f ) + _TimeoutValue; + // Save new url + _URL = finalUrl; + + // file is probably from bnp (ingame help) + if (isLocal) + { + if (strlwr(finalUrl).find("file:/") == 0) + { + finalUrl = finalUrl.substr(6, finalUrl.size() - 6); + } + doBrowseLocalFile(finalUrl); + } + else + { CButtonFreezer freezer; this->visit(&freezer); - // Browsing - _Browsing = true; - updateRefreshButton(); - - // Save new url - _URL = finalUrl; - // display HTTP query //nlinfo("WEB: GET '%s'", finalUrl.c_str()); @@ -3806,12 +3880,7 @@ namespace NLGUI C3WSmartPtr uri = HTParse(finalUrl.c_str(), NULL, PARSE_ALL); // Create an anchor - #ifdef NL_OS_WINDOWS if ((_LibWWW->Anchor = HTAnchor_findAddress(uri)) == NULL) - #else - // temporarily disable local URL's until LibWWW can be replaced. - if (isLocal || ((_LibWWW->Anchor = HTAnchor_findAddress(uri)) == NULL)) - #endif { browseError((string("The page address is malformed : ")+(const char*)uri).c_str()); } @@ -3848,6 +3917,8 @@ namespace NLGUI } } + } // !isLocal + _BrowseNextTime = false; } @@ -3918,9 +3989,22 @@ namespace NLGUI } } - // Add the button coordinates - HTParseFormInput(formfields, (_PostFormSubmitButton + "_x=0").c_str()); - HTParseFormInput(formfields, (_PostFormSubmitButton + "_y=0").c_str()); + if (_PostFormSubmitType == "image") + { + // Add the button coordinates + if (_PostFormSubmitButton.find_first_of("[") == string::npos) + { + HTParseFormInput(formfields, (_PostFormSubmitButton + "_x=" + NLMISC::toString(_PostFormSubmitX)).c_str()); + HTParseFormInput(formfields, (_PostFormSubmitButton + "_y=" + NLMISC::toString(_PostFormSubmitY)).c_str()); + } + else + { + HTParseFormInput(formfields, (_PostFormSubmitButton + "=" + NLMISC::toString(_PostFormSubmitX)).c_str()); + HTParseFormInput(formfields, (_PostFormSubmitButton + "=" + NLMISC::toString(_PostFormSubmitY)).c_str()); + } + } + else + HTParseFormInput(formfields, (_PostFormSubmitButton + "=" + _PostFormSubmitValue).c_str()); // Add custom params addHTTPPostParams(formfields, _TrustedDomain); @@ -4023,6 +4107,57 @@ namespace NLGUI #endif } + // *************************************************************************** + void CGroupHTML::doBrowseLocalFile(const std::string &filename) + { + CIFile in; + if (in.open(filename)) + { + std::string html; + while(!in.eof()) + { + char buf[1024]; + in.getline(buf, 1024); + html += std::string(buf) + "\n"; + } + in.close(); + + if (!renderHtmlString(html)) + { + browseError((string("Failed to parse html from file : ")+filename).c_str()); + } + } + else + { + browseError((string("The page address is malformed : ")+filename).c_str()); + } + } + + // *************************************************************************** + + bool CGroupHTML::renderHtmlString(const std::string &html) + { + bool success; + + // clear content + beginBuild(); + + success = parseHtml(html); + + // invalidate coords + endBuild(); + + // libwww would call requestTerminated() here + _Browsing = false; + if (_TitleString.empty()) + { + setTitle(_TitlePrefix); + } + updateRefreshButton(); + + return success; + } + // *************************************************************************** void CGroupHTML::draw () @@ -4432,7 +4567,7 @@ namespace NLGUI beginElement(element_number, &present[0], &value[0]); if (element_number == HTML_A) - addLink(element_number, 0, NULL, &present[0], &value[0]); + addLink(element_number, &present[0], &value[0]); return 0; } @@ -4565,5 +4700,93 @@ namespace NLGUI return result; } + + // *************************************************************************** + std::string CGroupHTML::getAbsoluteUrl(const std::string &url) + { + if (HTURL_isAbsolute(url.c_str())) + return url; + + return std::string(HTParse(url.c_str(), _URL.c_str(), PARSE_ALL)); + } + + // *************************************************************************** + // CGroupHTML::CStyleParams style; + // style.FontSize; // font-size: 10px; + // style.TextColor; // color: #ABCDEF; + // style.Underlined; // text-decoration: underline; text-decoration-line: underline; + // style.StrikeThrough; // text-decoration: line-through; text-decoration-line: line-through; + void CGroupHTML::getStyleParams(const std::string &styleString, CStyleParams &style, bool inherit) + { + TStyle styles = parseStyle(styleString); + TStyle::iterator it; + for (it=styles.begin(); it != styles.end(); ++it) + { + if (it->first == "font-size") + { + float tmp; + sint size = 0; + getPercentage (size, tmp, it->second.c_str()); + if (size > 0) + style.FontSize = size; + } + else + if (it->first == "font-style") + { + if (it->second == "italic" || it->second == "oblique") + style.FontOblique = true; + } + else + if (it->first == "font-weight") + { + // https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight + uint weight = 400; + if (it->second == "normal") + weight = 400; + else + if (it->second == "bold") + weight = 700; + else + if (it->second == "lighter") + { + const uint lighter[] = {100, 100, 100, 100, 100, 400, 400, 700, 700}; + int index = getFontWeight() / 100 - 1; + clamp(index, 1, 9); + weight = lighter[index-1]; + } + else + if (it->second == "bolder") + { + const uint bolder[] = {400, 400, 400, 700, 700, 900, 900, 900, 900}; + uint index = getFontWeight() / 100 + 1; + clamp(index, 1, 9); + weight = bolder[index-1]; + } + else + if (fromString(it->second, weight)) + { + weight = (weight / 100); + clamp(weight, 1, 9); + weight *= 100; + } + style.FontWeight = weight; + } + else + if (it->first == "color") + scanHTMLColor(it->second.c_str(), style.TextColor); + else + if (it->first == "text-decoration" || it->first == "text-decoration-line") + { + std::string prop(strlwr(it->second)); + style.Underlined = (prop.find("underline") != std::string::npos); + style.StrikeThrough = (prop.find("line-through") != std::string::npos); + } + } + if (inherit) + { + style.Underlined = getFontUnderlined() || style.Underlined; + style.StrikeThrough = getFontStrikeThrough() || style.StrikeThrough; + } + } } diff --git a/code/nel/src/gui/group_html_parser.cpp b/code/nel/src/gui/group_html_parser.cpp new file mode 100644 index 000000000..fdb9a549f --- /dev/null +++ b/code/nel/src/gui/group_html_parser.cpp @@ -0,0 +1,178 @@ +// Ryzom - MMORPG Framework +// 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 . + + +#include "stdpch.h" + +#include +#include + +#include "nel/misc/types_nl.h" +#include "nel/gui/libwww.h" +#include "nel/gui/group_html.h" +#include "nel/gui/lua_ihm.h" + +using namespace std; +using namespace NLMISC; + +namespace NLGUI +{ + // *************************************************************************** + void CGroupHTML::htmlElement(xmlNode *node, int element_number) + { + SGML_dtd *HTML_DTD = HTML_dtd (); + + if (element_number < HTML_ELEMENTS) + { + CXMLAutoPtr ptr; + // load attributes into libwww structs + BOOL present[MAX_ATTRIBUTES]; + const char *value[MAX_ATTRIBUTES]; + std::string strvalues[MAX_ATTRIBUTES]; + + uint nbAttributes = std::min(MAX_ATTRIBUTES, HTML_DTD->tags[element_number].number_of_attributes); + for(uint i=0; itags[element_number].attributes[i].name)); + ptr = xmlGetProp(node, (const xmlChar *)name.c_str()); + if (ptr) + { + // copy xmlChar to string (xmlChar will be released) + strvalues[i] = (const char *)(ptr); + // now use string pointer in value[] array + value[i] = strvalues[i].c_str(); + present[i] = true; + } + else + { + value[i] = NULL; + present[i] = false; + } + } + + if (element_number == HTML_A) + { + addLink(element_number, present, value); + } + + beginElement(element_number, present, value); + } + else + { + beginUnparsedElement((const char *)(node->name), xmlStrlen(node->name)); + } + + // recursive - text content / child nodes + htmlWalkDOM(node->children); + + // closing tag + if (element_number < HTML_ELEMENTS) + { + endElement(element_number); + } + else + { + endUnparsedElement((const char *)(node->name), xmlStrlen(node->name)); + } + } + + // *************************************************************************** + // recursive function to walk html document + void CGroupHTML::htmlWalkDOM(xmlNode *a_node) + { + SGML_dtd *HTML_DTD = HTML_dtd (); + + uint element_number; + xmlNode *node = a_node; + while(node) + { + if (node->type == XML_TEXT_NODE) + { + addText((const char *)(node->content), xmlStrlen(node->content)); + } + else + if (node->type == XML_ELEMENT_NODE) + { + // find libwww tag + for(element_number = 0; element_numbername, (const xmlChar *)HTML_DTD->tags[element_number].name, xmlStrlen(node->name)) == 0) + break; + } + + htmlElement(node, element_number); + } + + // move into next sibling + node = node->next; + } + } + + // *************************************************************************** + bool CGroupHTML::parseHtml(std::string htmlString) + { + htmlParserCtxtPtr parser = htmlCreatePushParserCtxt(NULL, NULL, NULL, 0, NULL, XML_CHAR_ENCODING_NONE); + if (!parser) + { + nlwarning("Creating html parser context failed"); + return false; + } + + htmlCtxtUseOptions(parser, HTML_PARSE_NOBLANKS | HTML_PARSE_NOERROR | HTML_PARSE_NOWARNING | HTML_PARSE_NONET); + + htmlParseChunk(parser, htmlString.c_str(), htmlString.size(), 0); + htmlParseChunk(parser, "", 0, 1); + + bool success = true; + if (parser->myDoc) + { + xmlNode *root = xmlDocGetRootElement(parser->myDoc); + if (root) + { + htmlWalkDOM(root); + } + else + { + nlwarning("html root node failed"); + success = false; + } + } + else + { + nlwarning("htmlstring parsing failed"); + success = false; + } + + htmlFreeParserCtxt(parser); + return success; + } + + // *************************************************************************** + int CGroupHTML::luaParseHtml(CLuaState &ls) + { + const char *funcName = "parseHtml"; + CLuaIHM::checkArgCount(ls, funcName, 1); + CLuaIHM::checkArgType(ls, funcName, 1, LUA_TSTRING); + std::string html = ls.toString(1); + + parseHtml(html); + + return 0; + } + +} + diff --git a/code/nel/src/gui/group_menu.cpp b/code/nel/src/gui/group_menu.cpp index 08f887e9e..ddd022310 100644 --- a/code/nel/src/gui/group_menu.cpp +++ b/code/nel/src/gui/group_menu.cpp @@ -2200,7 +2200,7 @@ namespace NLGUI if( editorMode ) _Extends = std::string( (const char*)prop ); - CGroupMenu *gm = dynamic_cast(CWidgetManager::getInstance()->getElementFromId(prop)); + CGroupMenu *gm = dynamic_cast(CWidgetManager::getInstance()->getElementFromId(prop.str())); if (!gm) { gm = dynamic_cast(CWidgetManager::getInstance()->getElementFromId("ui:interface:" + std::string((const char*)prop))); diff --git a/code/nel/src/gui/interface_anim.cpp b/code/nel/src/gui/interface_anim.cpp index 627a93280..edd96e1cf 100644 --- a/code/nel/src/gui/interface_anim.cpp +++ b/code/nel/src/gui/interface_anim.cpp @@ -55,7 +55,7 @@ namespace NLGUI if (ptr) _Dynamic = CInterfaceElement::convertBool (ptr); ptr = xmlGetProp (cur, (xmlChar*)"type"); - string sTmp = ptr; + string sTmp = ptr.str(); sTmp = strlwr(sTmp); if (sTmp == "linear") _Type = Track_Linear; @@ -74,7 +74,7 @@ namespace NLGUI } // - if (!CInterfaceLink::splitLinkTargets (ptr, parentGroup, _Targets)) + if (!CInterfaceLink::splitLinkTargets (ptr.str(), parentGroup, _Targets)) { nlwarning ("no target for track"); return false; @@ -194,7 +194,7 @@ namespace NLGUI fromString((const char*)time, fAnimTime); TAnimationTime animTime = fAnimTime * CWidgetManager::getInstance()->getSystemOption(CWidgetManager::OptionMulCoefAnim).getValFloat(); double animValue; - fromString(value, animValue); + fromString(value.str(), animValue); // Depending on the type of the track add the key switch(_Type) diff --git a/code/nel/src/gui/interface_group.cpp b/code/nel/src/gui/interface_group.cpp index 29ad75f8c..b5027a87c 100644 --- a/code/nel/src/gui/interface_group.cpp +++ b/code/nel/src/gui/interface_group.cpp @@ -312,7 +312,7 @@ namespace NLGUI ptr = (char*) xmlGetProp( cur, (xmlChar*)"max_sizeparent" ); if (ptr) { - string idparent = ptr; + string idparent = ptr.str(); idparent = NLMISC::strlwr(idparent); if (idparent != "parent") { diff --git a/code/nel/src/gui/interface_parser.cpp b/code/nel/src/gui/interface_parser.cpp index 096c001ae..1dbf62d51 100644 --- a/code/nel/src/gui/interface_parser.cpp +++ b/code/nel/src/gui/interface_parser.cpp @@ -664,7 +664,7 @@ namespace NLGUI //if it begins with a #, it is a reference in the instance attribute if (strchr(ptr, '#') != NULL) { - string LastProp = ptr; + string LastProp = ptr.str(); string NewProp =""; string RepProp; @@ -796,7 +796,7 @@ namespace NLGUI return false; } sint32 size; - fromString(cSize, size); + fromString(cSize.str(), size); if (size <= 0) { // todo hulud interface syntax error @@ -929,7 +929,7 @@ namespace NLGUI nlwarning(" Can't read the expression for a link node"); return false; } - std::string expr = ptr; + std::string expr = ptr.str(); std::vector targets; @@ -1119,13 +1119,13 @@ namespace NLGUI nlinfo ("options has no name"); return false; } - string optionsName = ptr; + string optionsName = ptr.str(); // herit if possible ptr = (char*) xmlGetProp( cur, (xmlChar*)"herit" ); if (ptr) { - string optionsParentName = ptr; + string optionsParentName = ptr.str(); CInterfaceOptions *io = wm->getOptions( optionsParentName ); if( io != NULL ) options->copyBasicMap( *io ); @@ -1771,7 +1771,7 @@ namespace NLGUI { CInterfaceExprValue res; - if (CInterfaceExpr::eval(ptrVal2, res)) + if (CInterfaceExpr::eval(ptrVal2.str(), res)) { if (!res.toString()) { @@ -1807,7 +1807,7 @@ namespace NLGUI nlwarning ("no id in a procedure"); return false; } - string procId= ptr; + string procId= ptr.str(); if (_ProcedureMap.find(procId) != _ProcedureMap.end()) { @@ -2171,7 +2171,7 @@ namespace NLGUI //get the property value ptr = (char*)xmlGetProp( cur, props->name); nlassert(ptr); - string propVal= ptr; + string propVal= ptr.str(); string newPropVal; // solve define of this prop @@ -2328,7 +2328,7 @@ namespace NLGUI nlinfo ("anim has no id"); return false; } - string animId = ptr; + string animId = ptr.str(); pAnim = new CInterfaceAnim; if (pAnim->parse (cur, parentGroup)) diff --git a/code/nel/src/gui/libwww.cpp b/code/nel/src/gui/libwww.cpp index b17d1cccb..09f3a0cea 100644 --- a/code/nel/src/gui/libwww.cpp +++ b/code/nel/src/gui/libwww.cpp @@ -233,6 +233,14 @@ namespace NLGUI { 0 } }; + HTAttr span_attr[] = + { + HTML_ATTR(SPAN,CLASS), + HTML_ATTR(SPAN,ID), + HTML_ATTR(SPAN,STYLE), + { 0 } + }; + // *************************************************************************** void _VerifyLibWWW(const char *function, bool ok, const char *file, int line) @@ -314,7 +322,10 @@ namespace NLGUI const char ** value) { // Do the work in the class - me->Parent->addLink (element_number, attribute_number, anchor, present, value); + if (element_number == HTML_A) + { + me->Parent->addLink (element_number, present, value); + } } // *************************************************************************** @@ -699,6 +710,8 @@ namespace NLGUI HTML_DTD->tags[HTML_I].number_of_attributes = 0; HTML_DTD->tags[HTML_DIV].attributes = div_attr; HTML_DTD->tags[HTML_DIV].number_of_attributes = sizeof(div_attr) / sizeof(HTAttr) - 1; + HTML_DTD->tags[HTML_SPAN].attributes = span_attr; + HTML_DTD->tags[HTML_SPAN].number_of_attributes = sizeof(span_attr) / sizeof(HTAttr) - 1; // Set a request timeout // HTHost_setEventTimeout (30000); diff --git a/code/nel/src/gui/libwww_nel_stream.cpp b/code/nel/src/gui/libwww_nel_stream.cpp index f6a45cf06..b7e218b30 100644 --- a/code/nel/src/gui/libwww_nel_stream.cpp +++ b/code/nel/src/gui/libwww_nel_stream.cpp @@ -21,7 +21,7 @@ extern "C" { - /* Library Includes */ +/* Library Includes */ #include "wwwsys.h" #include "WWWUtil.h" #include "WWWCore.h" @@ -41,8 +41,9 @@ using namespace NLMISC; extern "C" { - /* Final states have negative value */ -typedef enum _FileState { +/* Final states have negative value */ +typedef enum _FileState +{ FS_RETRY = -4, FS_ERROR = -3, FS_NO_DATA = -2, @@ -57,26 +58,29 @@ typedef enum _FileState { } FileState; /* This is the context structure for the this module */ -typedef struct _file_info { - FileState state; /* Current state of the connection */ - char * local; /* Local representation of file name */ - struct stat stat_info; /* Contains actual file chosen */ +typedef struct _file_info +{ + FileState state; /* Current state of the connection */ + char * local; /* Local representation of file name */ + struct stat stat_info; /* Contains actual file chosen */ HTNet * net; HTTimer * timer; } file_info; -struct _HTStream { +struct _HTStream +{ const HTStreamClass * isa; }; -struct _HTInputStream { +struct _HTInputStream +{ const HTInputStreamClass * isa; HTChannel * ch; HTHost * host; - char * write; /* Last byte written */ - char * read; /* Last byte read */ + char * write; /* Last byte written */ + char * read; /* Last byte read */ int b_read; - char data [INPUT_BUFFER_SIZE]; /* buffer */ + char data [INPUT_BUFFER_SIZE]; /* buffer */ }; PRIVATE int FileCleanup (HTRequest *req, int status) @@ -96,7 +100,7 @@ PRIVATE int FileCleanup (HTRequest *req, int status) } /* - ** Remove if we have registered a timer function as a callback + ** Remove if we have registered a timer function as a callback */ if (file->timer) { @@ -123,10 +127,8 @@ PUBLIC int HTLoadNeLFile (SOCKET soc, HTRequest * request) HTNet * net = HTRequest_net(request); HTParentAnchor * anchor = HTRequest_anchor(request); - HTTRACE(PROT_TRACE, "HTLoadFile.. Looking for `%s\'\n" _ - HTAnchor_physical(anchor)); - if ((file = (file_info *) HT_CALLOC(1, sizeof(file_info))) == NULL) - HT_OUTOFMEM((char*)"HTLoadFILE"); + HTTRACE(PROT_TRACE, "HTLoadFile.. Looking for `%s\'\n" _ HTAnchor_physical(anchor)); + if ((file = (file_info *) HT_CALLOC(1, sizeof(file_info))) == NULL) HT_OUTOFMEM("HTLoadFILE"); file->state = FS_BEGIN; file->net = net; HTNet_setContext(net, file); @@ -139,8 +141,8 @@ PUBLIC int HTLoadNeLFile (SOCKET soc, HTRequest * request) PRIVATE int ReturnEvent (HTTimer * timer, void * param, HTEventType /* type */) { file_info * file = (file_info *) param; - if (timer != file->timer) - HTDEBUGBREAK((char*)"File timer %p not in sync\n" _ timer); + if (timer != file->timer) HTDEBUGBREAK("File timer %p not in sync\n" _ timer); + HTTRACE(PROT_TRACE, "HTLoadFile.. Continuing %p with timer %p\n" _ file _ timer); /* @@ -163,7 +165,7 @@ PUBLIC int HTNeLFileOpen (HTNet * net, char * local, HTLocalMode /* mode */) if (!fp->open (local)) { - HTRequest_addSystemError(request, ERR_FATAL, errno, NO, (char*)"CIFile::open"); + HTRequest_addSystemError(request, ERR_FATAL, errno, NO, "CIFile::open"); return HT_ERROR; } @@ -186,7 +188,7 @@ PRIVATE int FileEvent (SOCKET /* soc */, void * pVoid, HTEventType type) { /* Interrupted */ HTRequest_addError(request, ERR_FATAL, NO, HTERR_INTERRUPTED, - NULL, 0, (char*)"HTLoadFile"); + NULL, 0, "HTLoadFile"); FileCleanup(request, HT_INTERRUPTED); return HT_OK; } @@ -202,7 +204,7 @@ PRIVATE int FileEvent (SOCKET /* soc */, void * pVoid, HTEventType type) /* We only support safe (GET, HEAD, etc) methods for the moment */ if (!HTMethod_isSafe(HTRequest_method(request))) { HTRequest_addError(request, ERR_FATAL, NO, HTERR_NOT_ALLOWED, - NULL, 0, (char*)"HTLoadFile"); + NULL, 0, "HTLoadFile"); file->state = FS_ERROR; break; } @@ -234,166 +236,188 @@ PRIVATE int FileEvent (SOCKET /* soc */, void * pVoid, HTEventType type) /* Create a new host object and link it to the net object */ { - HTHost * host = NULL; - if ((host = HTHost_new((char*)"localhost", 0)) == NULL) return HT_ERROR; - HTNet_setHost(net, host); - if (HTHost_addNet(host, net) == HT_PENDING) { - HTTRACE(PROT_TRACE, "HTLoadFile.. Pending...\n"); - /* move to the hack state */ - file->state = FS_PENDING; - return HT_OK; - } + HTHost * host = NULL; + if ((host = HTHost_new("localhost", 0)) == NULL) return HT_ERROR; + HTNet_setHost(net, host); + if (HTHost_addNet(host, net) == HT_PENDING) + { + HTTRACE(PROT_TRACE, "HTLoadFile.. Pending...\n"); + /* move to the hack state */ + file->state = FS_PENDING; + return HT_OK; + } } file->state = FS_DO_CN; break; case FS_PENDING: { - HTHost * host = NULL; - if ((host = HTHost_new((char*)"localhost", 0)) == NULL) return HT_ERROR; - HTNet_setHost(net, host); - if (HTHost_addNet(host, net) == HT_PENDING) { - HTTRACE(PROT_TRACE, "HTLoadFile.. Pending...\n"); - file->state = FS_PENDING; - return HT_OK; - } + HTHost * host = NULL; + if ((host = HTHost_new((char*)"localhost", 0)) == NULL) return HT_ERROR; + HTNet_setHost(net, host); + if (HTHost_addNet(host, net) == HT_PENDING) + { + HTTRACE(PROT_TRACE, "HTLoadFile.. Pending...\n"); + file->state = FS_PENDING; + return HT_OK; + } } file->state = FS_DO_CN; break; case FS_DO_CN: if (HTRequest_negotiation(request) && - HTMethod_isSafe(HTRequest_method(request))) { - - HTAnchor_setPhysical(anchor, file->local); - HTTRACE(PROT_TRACE, "Load File... Found `%s\'\n" _ file->local); - - } else { - if (HT_STAT(file->local, &file->stat_info) == -1) { - HTTRACE(PROT_TRACE, "Load File... Not found `%s\'\n" _ file->local); - HTRequest_addError(request, ERR_FATAL, NO, HTERR_NOT_FOUND, - NULL, 0, (char*)"HTLoadFile"); - file->state = FS_ERROR; - break; + HTMethod_isSafe(HTRequest_method(request))) + { + HTAnchor_setPhysical(anchor, file->local); + HTTRACE(PROT_TRACE, "Load File... Found `%s\'\n" _ file->local); } + else + { + if (HT_STAT(file->local, &file->stat_info) == -1) + { + HTTRACE(PROT_TRACE, "Load File... Not found `%s\'\n" _ file->local); + HTRequest_addError(request, ERR_FATAL, NO, HTERR_NOT_FOUND, NULL, 0, "HTLoadFile"); + file->state = FS_ERROR; + break; + } } - if (((file->stat_info.st_mode) & S_IFMT) == S_IFDIR) { - if (HTRequest_method(request) == METHOD_GET) - file->state = FS_PARSE_DIR; - else { - HTRequest_addError(request, ERR_INFO, NO, HTERR_NO_CONTENT, - NULL, 0, (char*)"HTLoadFile"); - file->state = FS_NO_DATA; - } - break; + if (((file->stat_info.st_mode) & S_IFMT) == S_IFDIR) + { + if (HTRequest_method(request) == METHOD_GET) + { + file->state = FS_PARSE_DIR; + } + else + { + HTRequest_addError(request, ERR_INFO, NO, HTERR_NO_CONTENT, NULL, 0, "HTLoadFile"); + file->state = FS_NO_DATA; + } + break; } { - BOOL editable = FALSE; - HTBind_getAnchorBindings(anchor); - if (editable) HTAnchor_appendAllow(anchor, METHOD_PUT); + BOOL editable = FALSE; + HTBind_getAnchorBindings(anchor); + if (editable) HTAnchor_appendAllow(anchor, METHOD_PUT); - /* Set the file size */ - CIFile nelFile; - if (nelFile.open (file->local)) - { - file->stat_info.st_size = nelFile.getFileSize(); - } - nelFile.close(); - - if (file->stat_info.st_size) - HTAnchor_setLength(anchor, file->stat_info.st_size); - - /* Set the file last modified time stamp */ - if (file->stat_info.st_mtime > 0) - HTAnchor_setLastModified(anchor, file->stat_info.st_mtime); - - /* Check to see if we can edit it */ - if (!editable && !file->stat_info.st_size) { - HTRequest_addError(request, ERR_INFO, NO, HTERR_NO_CONTENT, - NULL, 0, (char*)"HTLoadFile"); - file->state = FS_NO_DATA; - } else { - file->state = (HTRequest_method(request)==METHOD_GET) ? - FS_NEED_OPEN_FILE : FS_GOT_DATA; - } + /* Set the file size */ + CIFile nelFile; + if (nelFile.open (file->local)) + { + file->stat_info.st_size = nelFile.getFileSize(); + } + nelFile.close(); + + if (file->stat_info.st_size) + HTAnchor_setLength(anchor, file->stat_info.st_size); + + /* Set the file last modified time stamp */ + if (file->stat_info.st_mtime > 0) + HTAnchor_setLastModified(anchor, file->stat_info.st_mtime); + + /* Check to see if we can edit it */ + if (!editable && !file->stat_info.st_size) + { + HTRequest_addError(request, ERR_INFO, NO, HTERR_NO_CONTENT, NULL, 0, "HTLoadFile"); + file->state = FS_NO_DATA; + } + else + { + file->state = (HTRequest_method(request)==METHOD_GET) ? FS_NEED_OPEN_FILE : FS_GOT_DATA; + } } break; case FS_NEED_OPEN_FILE: status = HTNeLFileOpen(net, file->local, HT_FB_RDONLY); - if (status == HT_OK) { + if (status == HT_OK) { - HTStream * rstream = HTStreamStack(HTAnchor_format(anchor), - HTRequest_outputFormat(request), - HTRequest_outputStream(request), - request, YES); - HTNet_setReadStream(net, rstream); - HTRequest_setOutputConnected(request, YES); - } + { + HTStream * rstream = HTStreamStack(HTAnchor_format(anchor), + HTRequest_outputFormat(request), + HTRequest_outputStream(request), + request, YES); + HTNet_setReadStream(net, rstream); + HTRequest_setOutputConnected(request, YES); + } - { - HTOutputStream * output = HTNet_getOutput(net, NULL, 0); - HTRequest_setInputStream(request, (HTStream *) output); - } + { + HTOutputStream * output = HTNet_getOutput(net, NULL, 0); + HTRequest_setInputStream(request, (HTStream *) output); + } - if (HTRequest_isSource(request) && !HTRequest_destinationsReady(request)) - return HT_OK; - HTRequest_addError(request, ERR_INFO, NO, HTERR_OK, NULL, 0, - (char*)"HTLoadFile"); - file->state = FS_NEED_BODY; - - if (HTEvent_isCallbacksRegistered()) { - if (!HTRequest_preemptive(request)) { - if (!HTNet_preemptive(net)) { - HTTRACE(PROT_TRACE, "HTLoadFile.. Returning\n"); - HTHost_register(HTNet_host(net), net, HTEvent_READ); - } else if (!file->timer) { - HTTRACE(PROT_TRACE, "HTLoadFile.. Returning\n"); - file->timer = - HTTimer_new(NULL, ReturnEvent, file, 1, YES, NO); + if (HTRequest_isSource(request) && !HTRequest_destinationsReady(request)) return HT_OK; + + HTRequest_addError(request, ERR_INFO, NO, HTERR_OK, NULL, 0, "HTLoadFile"); + file->state = FS_NEED_BODY; + + if (HTEvent_isCallbacksRegistered()) + { + if (!HTRequest_preemptive(request)) + { + if (!HTNet_preemptive(net)) + { + HTTRACE(PROT_TRACE, "HTLoadFile.. Returning\n"); + HTHost_register(HTNet_host(net), net, HTEvent_READ); + } + else if (!file->timer) + { + HTTRACE(PROT_TRACE, "HTLoadFile.. Returning\n"); + file->timer = HTTimer_new(NULL, ReturnEvent, file, 1, YES, NO); + } + return HT_OK; + } } + } + else if (status == HT_WOULD_BLOCK || status == HT_PENDING) + { return HT_OK; - } } - } else if (status == HT_WOULD_BLOCK || status == HT_PENDING) - return HT_OK; - else { - HTRequest_addError(request, ERR_INFO, NO, HTERR_INTERNAL, - NULL, 0, (char*)"HTLoadFile"); - file->state = FS_ERROR; /* Error or interrupt */ + else + { + HTRequest_addError(request, ERR_INFO, NO, HTERR_INTERNAL, NULL, 0, "HTLoadFile"); + file->state = FS_ERROR; /* Error or interrupt */ } break; - case FS_NEED_BODY: + case FS_NEED_BODY: status = HTHost_read(HTNet_host(net), net); if (status == HT_WOULD_BLOCK) - return HT_OK; - else if (status == HT_LOADED || status == HT_CLOSED) { - file->state = FS_GOT_DATA; - } else { - HTRequest_addError(request, ERR_INFO, NO, HTERR_FORBIDDEN, - NULL, 0, (char*)"HTLoadFile"); - file->state = FS_ERROR; + { + return HT_OK; + } + else if (status == HT_LOADED || status == HT_CLOSED) + { + file->state = FS_GOT_DATA; + } + else + { + HTRequest_addError(request, ERR_INFO, NO, HTERR_FORBIDDEN, NULL, 0, "HTLoadFile"); + file->state = FS_ERROR; } break; case FS_TRY_FTP: { - char *url = HTAnchor_physical(anchor); - HTAnchor *anchor; - char *newname = NULL; - StrAllocCopy(newname, "ftp:"); - if (!strncmp(url, "file:", 5)) - StrAllocCat(newname, url+5); - else - StrAllocCat(newname, url); - anchor = HTAnchor_findAddress(newname); - HTRequest_setAnchor(request, anchor); - HT_FREE(newname); - FileCleanup(request, HT_IGNORE); - return HTLoad(request, YES); + char *url = HTAnchor_physical(anchor); + HTAnchor *anchor; + char *newname = NULL; + StrAllocCopy(newname, "ftp:"); + if (!strncmp(url, "file:", 5)) + { + StrAllocCat(newname, url+5); + } + else + { + StrAllocCat(newname, url); + } + anchor = HTAnchor_findAddress(newname); + HTRequest_setAnchor(request, anchor); + HT_FREE(newname); + FileCleanup(request, HT_IGNORE); + return HTLoad(request, YES); } break; @@ -461,7 +485,8 @@ PRIVATE int HTNeLReader_read (HTInputStream * me) { HTAlertCallback * cbf = HTAlert_find(HT_PROG_READ); HTNet_addBytesRead(net, me->b_read); - if (cbf) { + if (cbf) + { int tr = HTNet_bytesRead(net); (*cbf)(net->request, HT_PROG_READ, HT_MSG_NULL, NULL, &tr, NULL); } @@ -472,18 +497,28 @@ PRIVATE int HTNeLReader_read (HTInputStream * me) /* Now push the data down the stream */ if ((status = (*net->readStream->isa->put_block) - (net->readStream, me->data, me->b_read)) != HT_OK) { - if (status == HT_WOULD_BLOCK) { + (net->readStream, me->data, me->b_read)) != HT_OK) + { + if (status == HT_WOULD_BLOCK) + { HTTRACE(PROT_TRACE, "ANSI read... Target WOULD BLOCK\n"); return HT_WOULD_BLOCK; - } else if (status == HT_PAUSE) { + } + else if (status == HT_PAUSE) + { HTTRACE(PROT_TRACE, "ANSI read... Target PAUSED\n"); return HT_PAUSE; - } else if (status > 0) { /* Stream specific return code */ + } + else if (status > 0) + { + /* Stream specific return code */ HTTRACE(PROT_TRACE, "ANSI read... Target returns %d\n" _ status); me->write = me->data + me->b_read; return status; - } else { /* We have a real error */ + } + else + { + /* We have a real error */ HTTRACE(PROT_TRACE, "ANSI read... Target ERROR\n"); return status; } @@ -506,13 +541,15 @@ PRIVATE int HTNeLReader_close (HTInputStream * me) HTNet * net = HTHost_getReadNet(me->host); - if (net && net->readStream) { - if ((status = (*net->readStream->isa->_free)(net->readStream))==HT_WOULD_BLOCK) - return HT_WOULD_BLOCK; - net->readStream = NULL; + if (net && net->readStream) + { + if ((status = (*net->readStream->isa->_free)(net->readStream))==HT_WOULD_BLOCK) return HT_WOULD_BLOCK; + net->readStream = NULL; } + HTTRACE(STREAM_TRACE, "Socket read. FREEING....\n"); HT_FREE(me); + return status; } @@ -540,7 +577,8 @@ PRIVATE int HTNeLReader_free (HTInputStream * me) } HTNet * net = HTHost_getReadNet(me->host); - if (net && net->readStream) { + if (net && net->readStream) + { int status = (*net->readStream->isa->_free)(net->readStream); if (status == HT_OK) net->readStream = NULL; return status; @@ -551,7 +589,8 @@ PRIVATE int HTNeLReader_free (HTInputStream * me) PRIVATE int HTNeLReader_abort (HTInputStream * me, HTList * /* e */) { HTNet * net = HTHost_getReadNet(me->host); - if (net && net->readStream) { + if (net && net->readStream) + { int status = (*net->readStream->isa->abort)(net->readStream, NULL); if (status != HT_IGNORE) net->readStream = NULL; } @@ -560,7 +599,7 @@ PRIVATE int HTNeLReader_abort (HTInputStream * me, HTList * /* e */) PRIVATE const HTInputStreamClass HTNeLReader = { - (char*)"SocketReader", + "SocketReader", HTNeLReader_flush, HTNeLReader_free, HTNeLReader_abort, @@ -569,20 +608,20 @@ PRIVATE const HTInputStreamClass HTNeLReader = HTNeLReader_consumed }; -PUBLIC HTInputStream * HTNeLReader_new (HTHost * host, HTChannel * ch, - void * /* param */, int /* mode */) +PUBLIC HTInputStream * HTNeLReader_new (HTHost * host, HTChannel * ch, void * /* param */, int /* mode */) { - if (host && ch) { - HTInputStream * me = HTChannel_input(ch); - if (me == NULL) { - if ((me=(HTInputStream *) HT_CALLOC(1, sizeof(HTInputStream))) == NULL) - HT_OUTOFMEM((char*)"HTNeLReader_new"); - me->isa = &HTNeLReader; - me->ch = ch; - me->host = host; - HTTRACE(STREAM_TRACE, "Reader...... Created reader stream %p\n" _ me); - } - return me; + if (host && ch) + { + HTInputStream * me = HTChannel_input(ch); + if (me == NULL) + { + if ((me=(HTInputStream *) HT_CALLOC(1, sizeof(HTInputStream))) == NULL) HT_OUTOFMEM("HTNeLReader_new"); + me->isa = &HTNeLReader; + me->ch = ch; + me->host = host; + HTTRACE(STREAM_TRACE, "Reader...... Created reader stream %p\n" _ me); + } + return me; } return NULL; } diff --git a/code/nel/src/gui/link_hack.cpp b/code/nel/src/gui/link_hack.cpp index 06a8c23e8..3ecc6fb0a 100644 --- a/code/nel/src/gui/link_hack.cpp +++ b/code/nel/src/gui/link_hack.cpp @@ -20,6 +20,7 @@ #include "nel/gui/dbview_number.h" #include "nel/gui/dbview_quantity.h" #include "nel/gui/view_pointer.h" +#include "nel/gui/group_editbox_decor.h" namespace NLGUI { @@ -39,5 +40,6 @@ namespace NLGUI force_link_dbgroup_select_number_cpp(); force_link_dbgroup_combo_box_cpp(); force_link_group_wheel_cpp(); + CGroupEditBoxDecor::forceLink(); } } \ No newline at end of file diff --git a/code/nel/src/gui/view_text.cpp b/code/nel/src/gui/view_text.cpp index db069a29d..0e3b420a0 100644 --- a/code/nel/src/gui/view_text.cpp +++ b/code/nel/src/gui/view_text.cpp @@ -44,6 +44,7 @@ namespace NLGUI { _CaseMode = CaseNormal; _Underlined = false; + _StrikeThrough = false; _ContinuousUpdate = false; _Active = true; _X = 0; @@ -58,6 +59,8 @@ namespace NLGUI _FontSize = 12 + CWidgetManager::getInstance()->getSystemOption( CWidgetManager::OptionAddCoefFont ).getValSInt32(); + _Embolden = false; + _Oblique = false; _Color = CRGBA(255,255,255,255); _Shadow = false; _ShadowOutline = false; @@ -157,6 +160,10 @@ namespace NLGUI _PosRef = vt._PosRef; _FontSize = vt._FontSize; + _Embolden = vt._Embolden; + _Oblique = vt._Oblique; + _Underlined = vt._Underlined; + _StrikeThrough = vt._StrikeThrough; _Color = vt._Color; _Shadow = vt._Shadow; _ShadowOutline = vt._ShadowOutline; @@ -221,6 +228,21 @@ namespace NLGUI ); } else + if( name == "fontweight" ) + { + if (_Embolden) + return "bold"; + + return "normal"; + } + if( name == "fontstyle" ) + { + if (_Oblique) + return "oblique"; + + return "normal"; + } + else if( name == "shadow" ) { return toString( _Shadow ); @@ -286,6 +308,11 @@ namespace NLGUI return toString( _Underlined ); } else + if( name == "strikthrough" ) + { + return toString( _StrikeThrough ); + } + else if( name == "case_mode" ) { return toString( uint32( _CaseMode ) ); @@ -358,6 +385,20 @@ namespace NLGUI return true; } else + if( name == "fontweight" ) + { + if (value == "bold") + _Embolden = true; + + return true; + } + if( name == "fontstyle" ) + { + if( value == "oblique" ) + _Oblique = true; + return true; + } + else if( name == "shadow" ) { bool b; @@ -444,6 +485,14 @@ namespace NLGUI return true; } else + if( name == "strikethrough" ) + { + bool b; + if( fromString( value, b ) ) + _StrikeThrough = b; + return true; + } + else if( name == "case_mode" ) { uint32 i; @@ -533,6 +582,16 @@ namespace NLGUI _FontSize - CWidgetManager::getInstance()->getSystemOption( CWidgetManager::OptionAddCoefFont ).getValSInt32() ).c_str() ); + std::string fontweight("normal"); + if (_Embolden) + fontweight = "bold"; + xmlSetProp( node, BAD_CAST "fontweight", BAD_CAST fontweight.c_str() ); + + std::string fontstyle("normal"); + if (_Oblique) + fontstyle = "oblique"; + xmlSetProp( node, BAD_CAST "fontstyle", BAD_CAST fontstyle.c_str() ); + xmlSetProp( node, BAD_CAST "shadow", BAD_CAST toString( _Shadow ).c_str() ); xmlSetProp( node, BAD_CAST "shadow_outline", BAD_CAST toString( _ShadowOutline ).c_str() ); xmlSetProp( node, BAD_CAST "shadow_color", BAD_CAST toString( _ShadowColor ).c_str() ); @@ -561,6 +620,7 @@ namespace NLGUI xmlSetProp( node, BAD_CAST "multi_line_maxw_only", BAD_CAST toString( _MultiLineMaxWOnly ).c_str() ); xmlSetProp( node, BAD_CAST "multi_max_line", BAD_CAST toString( _MultiMaxLine ).c_str() ); xmlSetProp( node, BAD_CAST "underlined", BAD_CAST toString( _Underlined ).c_str() ); + xmlSetProp( node, BAD_CAST "strikethrough", BAD_CAST toString( _StrikeThrough ).c_str() ); xmlSetProp( node, BAD_CAST "case_mode", BAD_CAST toString( uint32( _CaseMode ) ).c_str() ); xmlSetProp( node, BAD_CAST "over_extend_view_text", BAD_CAST toString( _OverExtendViewText ).c_str() ); xmlSetProp( node, BAD_CAST "over_extend_parent_rect", @@ -614,6 +674,22 @@ namespace NLGUI _FontSize += CWidgetManager::getInstance()->getSystemOption( CWidgetManager::OptionAddCoefFont).getValSInt32(); } + prop = (char*) xmlGetProp( cur, (xmlChar*)"fontweight" ); + _Embolden = false; + if (prop) + { + if (nlstricmp("bold", (const char*)prop) == 0) _Embolden = true; + else nlwarning(" bad fontweight '%s'", (const char *)prop); + } + + prop = (char*) xmlGetProp( cur, (xmlChar*)"fontstyle" ); + _Oblique = false; + if (prop) + { + if (nlstricmp("oblique", (const char *) prop) == 0) _Oblique = true; + else nlwarning(" bad fontstyle '%s'", (const char *)prop); + } + prop = (char*) xmlGetProp( cur, (xmlChar*)"shadow" ); _Shadow = false; if (prop) @@ -668,6 +744,11 @@ namespace NLGUI if (prop) _Underlined = convertBool(prop); + prop = (char*) xmlGetProp( cur, (xmlChar*)"strikethrough" ); + _StrikeThrough = false; + if (prop) + _StrikeThrough = convertBool(prop); + prop = (char*) xmlGetProp( cur, (xmlChar*)"case_mode" ); _CaseMode = CaseNormal; if (prop) @@ -887,6 +968,8 @@ namespace NLGUI TextContext->setShadeOutline (_ShadowOutline); TextContext->setShadeColor (shcol); TextContext->setFontSize (_FontSize); + TextContext->setEmbolden (_Embolden); + TextContext->setOblique (_Oblique); float y = (float)(_YReal) * ooh; // y is expressed in scree, coordinates [0..1] //y += _LinesInfos[_LinesInfos.size()-1].StringLine / h; @@ -953,7 +1036,7 @@ namespace NLGUI // skip spaces before current word float firstSpace = currWord.NumSpaces * currLine.getSpaceWidth(); sint line_width = 0; - if (_Underlined) + if (_Underlined || _StrikeThrough) { line_width = (sint)floorf(currLine.getWidthWithoutSpaces() + currLine.getSpaceWidth()); line_width -= (sint)floorf(firstSpace); @@ -971,6 +1054,9 @@ namespace NLGUI if (_Underlined) rVR.drawRotFlipBitmap (_RenderLayer, (sint)floorf(px), y_line, line_width, 1, 0, false, rVR.getBlankTextureId(), col); + if (_StrikeThrough) + rVR.drawRotFlipBitmap (_RenderLayer, (sint)floorf(px), y_line + (_FontHeight / 2), line_width, 1, 0, false, rVR.getBlankTextureId(), col); + // skip word px += currWord.Info.StringWidth; } @@ -1002,6 +1088,8 @@ namespace NLGUI TextContext->setShadeOutline (_ShadowOutline); TextContext->setShadeColor (shcol); TextContext->setFontSize (_FontSize); + TextContext->setEmbolden (_Embolden); + TextContext->setOblique (_Oblique); if(_LetterColors!=NULL && !TextContext->isSameLetterColors(_LetterColors, _Index)) @@ -1032,6 +1120,9 @@ namespace NLGUI if (_Underlined) rVR.drawRotFlipBitmap (_RenderLayer, _XReal, _YReal+_FontLegHeight-2, _WReal, 1, 0, false, rVR.getBlankTextureId(), col); + if (_StrikeThrough) + rVR.drawRotFlipBitmap (_RenderLayer, _XReal, _YReal+(_FontLegHeight/2), _WReal, 1, 0, false, rVR.getBlankTextureId(), col); + // reset selection if(_TextSelection) TextContext->resetStringSelection(_Index); @@ -1154,6 +1245,22 @@ namespace NLGUI return _FontSize - CWidgetManager::getInstance()->getSystemOption( CWidgetManager::OptionAddCoefFont).getValSInt32(); } + // *************************************************************************** + void CViewText::setEmbolden (bool embolden) + { + _Embolden = embolden; + computeFontSize (); + invalidateContent(); + } + + // *************************************************************************** + void CViewText::setOblique (bool oblique) + { + _Oblique = oblique; + computeFontSize (); + invalidateContent(); + } + // *************************************************************************** void CViewText::setColor(const NLMISC::CRGBA & color) { @@ -1679,6 +1786,8 @@ namespace NLGUI TextContext->setShaded (_Shadow); TextContext->setShadeOutline (_ShadowOutline); TextContext->setFontSize (_FontSize); + TextContext->setEmbolden (_Embolden); + TextContext->setOblique (_Oblique); // default state _SingleLineTextClamped= false; @@ -2000,6 +2109,8 @@ namespace NLGUI TextContext->setShaded (_Shadow); TextContext->setShadeOutline (_ShadowOutline); TextContext->setFontSize (_FontSize); + TextContext->setEmbolden (_Embolden); + TextContext->setOblique (_Oblique); // CViewRenderer &rVR = *CViewRenderer::getInstance(); height = getFontHeight(); // @@ -2132,6 +2243,8 @@ namespace NLGUI TextContext->setShaded (_Shadow); TextContext->setShadeOutline (_ShadowOutline); TextContext->setFontSize (_FontSize); + TextContext->setEmbolden (_Embolden); + TextContext->setOblique (_Oblique); // find the line where the character is // CViewRenderer &rVR = *CViewRenderer::getInstance(); uint charPos = 0; @@ -2407,6 +2520,8 @@ namespace NLGUI TextContext->setShaded (_Shadow); TextContext->setShadeOutline (_ShadowOutline); TextContext->setFontSize (_FontSize); + TextContext->setEmbolden (_Embolden); + TextContext->setOblique (_Oblique); TCharPos linePos = 0; while (linePos < _Text.length()) @@ -2492,6 +2607,8 @@ namespace NLGUI TextContext->setShaded (_Shadow); TextContext->setShadeOutline (_ShadowOutline); TextContext->setFontSize (_FontSize); + TextContext->setEmbolden (_Embolden); + TextContext->setOblique (_Oblique); // Current position in text TCharPos currPos = 0; @@ -2544,6 +2661,8 @@ namespace NLGUI TextContext->setShaded (_Shadow); TextContext->setShadeOutline (_ShadowOutline); TextContext->setFontSize (_FontSize); + TextContext->setEmbolden (_Embolden); + TextContext->setOblique (_Oblique); // Letter size UTextContext::CStringInfo si = TextContext->getStringInfo(ucstring("|")); // for now we can't now that directly from UTextContext diff --git a/code/nel/src/gui/widget_manager.cpp b/code/nel/src/gui/widget_manager.cpp index 81fbaf28b..b9efd50d5 100644 --- a/code/nel/src/gui/widget_manager.cpp +++ b/code/nel/src/gui/widget_manager.cpp @@ -2207,7 +2207,7 @@ namespace NLGUI } // Manage complex "Enter" - if (eventDesc.getKeyEventType() == CEventDescriptorKey::keychar && eventDesc.getChar() == NLMISC::KeyRETURN) + if( eventDesc.getKeyEventType() == CEventDescriptorKey::keychar && eventDesc.getChar() == NLMISC::KeyRETURN && !eventDesc.getKeyCtrl() ) { // If the top window has Enter AH CInterfaceGroup *tw= getTopWindow(); @@ -2436,6 +2436,9 @@ namespace NLGUI CCtrlBase *ctrl= _CtrlsUnderPointer[i]; if (ctrl && ctrl->isCapturable() && ctrl->isInGroup( pNewCurrentWnd ) ) { + if( CInterfaceElement::getEditorMode() && !ctrl->isEditorSelectable() ) + continue; + uint d = ctrl->getDepth( pNewCurrentWnd ); if (d > nMaxDepth) { @@ -2454,6 +2457,9 @@ namespace NLGUI CViewBase *v = _ViewsUnderPointer[i]; if( ( v != NULL ) && v->isInGroup( pNewCurrentWnd ) ) { + if( CInterfaceElement::getEditorMode() && !v->isEditorSelectable() ) + continue; + _CapturedView = v; captured = true; break; diff --git a/code/nel/src/misc/CMakeLists.txt b/code/nel/src/misc/CMakeLists.txt index f5bfa6c7b..39e75d0f3 100644 --- a/code/nel/src/misc/CMakeLists.txt +++ b/code/nel/src/misc/CMakeLists.txt @@ -1,6 +1,176 @@ FILE(GLOB SRC *.cpp *.h config_file/*.cpp config_file/*.h) FILE(GLOB HEADERS ../../include/nel/misc/*.h) +FILE(GLOB NLMISC_CDB + cdb.cpp ../../include/nel/misc/cdb.h + cdb_*.cpp ../../include/nel/misc/cdb_*.h +) + +FILE(GLOB NLMISC_EVENT + events.cpp ../../include/nel/misc/events.h + event_*.cpp ../../include/nel/misc/event_*.h + *_event_*.cpp ../../include/nel/misc/*_event_*.h +) + +FILE(GLOB NLMISC_DEBUG + debug.cpp ../../include/nel/misc/debug.h + report.cpp ../../include/nel/misc/report.h + log.cpp ../../include/nel/misc/log.h +) + +FILE(GLOB NLMISC_FILESYSTEM + async_file_manager.cpp ../../include/nel/misc/async_file_manager.h + file.cpp ../../include/nel/misc/file.h + path.cpp ../../include/nel/misc/path.h + big_file.cpp ../../include/nel/misc/big_file.h + *_xml.cpp ../../include/nel/misc/*_xml.h + xml_*.cpp ../../include/nel/misc/xml_*.h +) + +FILE(GLOB NLMISC_STREAM + *_stream.cpp ../../include/nel/misc/*_stream.h + stream.cpp ../../include/nel/misc/stream.h + stream_*.cpp ../../include/nel/misc/stream_*.h +) + +FILE(GLOB NLMISC_DISPLAYER + displayer.cpp ../../include/nel/misc/displayer.h + *_displayer.cpp ../../include/nel/misc/*_displayer.h +) + +FILE(GLOB NLMISC_MATH + plane.cpp ../../include/nel/misc/plane.h + ../../include/nel/misc/plane_inline.h + polygon.cpp ../../include/nel/misc/polygon.h + quad.cpp ../../include/nel/misc/quad.h + quat.cpp ../../include/nel/misc/quat.h + rect.cpp ../../include/nel/misc/rect.h + rgba.cpp ../../include/nel/misc/rgba.h + triangle.cpp ../../include/nel/misc/triangle.h + uv.cpp ../../include/nel/misc/uv.h + vector*.cpp ../../include/nel/misc/vector*.h + aabbox.cpp ../../include/nel/misc/aabbox.h + algo.cpp ../../include/nel/misc/algo.h + bsphere.cpp ../../include/nel/misc/bsphere.h + fast_floor.cpp ../../include/nel/misc/fast_floor.h + geom_ext.cpp ../../include/nel/misc/geom_ext.h + line.cpp ../../include/nel/misc/line.h + matrix.cpp ../../include/nel/misc/matrix.h +) + +FILE(GLOB NLMISC_PLATFORM + *_nl.cpp ../../include/nel/misc/*_nl.h + common.cpp ../../include/nel/misc/common.h + app_context.cpp ../../include/nel/misc/app_context.h + check_fpu.cpp ../../include/nel/misc/check_fpu.h + cpu_time_stat.cpp ../../include/nel/misc/cpu_time_stat.h + dummy_window.cpp ../../include/nel/misc/dummy_window.h + dynloadlib.cpp ../../include/nel/misc/dynloadlib.h + fast_mem.cpp ../../include/nel/misc/fast_mem.h + inter_window_msg_queue.cpp ../../include/nel/misc/inter_window_msg_queue.h + system_*.cpp ../../include/nel/misc/system_*.h + win32_util.cpp ../../include/nel/misc/win32_util.h + win_tray.cpp ../../include/nel/misc/win_tray.h +) + +FILE(GLOB NLMISC_GENERIC + ../../include/nel/misc/array_2d.h + *_memory.cpp ../../include/nel/misc/*_memory.h + buf_fifo.cpp ../../include/nel/misc/buf_fifo.h + ../../include/nel/misc/callback.h + *_allocator.cpp ../../include/nel/misc/*_allocator.h + ../../include/nel/misc/enum_bitset.h + fast_id_map.cpp ../../include/nel/misc/fast_id_map.h + hierarchical_timer.cpp ../../include/nel/misc/hierarchical_timer.h + ../../include/nel/misc/historic.h + ../../include/nel/misc/mutable_container.h + ../../include/nel/misc/random.h + smart_ptr.cpp ../../include/nel/misc/smart_ptr.h + ../../include/nel/misc/smart_ptr_inline.h + ../../include/nel/misc/resource_ptr.h + ../../include/nel/misc/resource_ptr_inline.h + bit_set.cpp ../../include/nel/misc/bit_set.h + stop_watch.cpp ../../include/nel/misc/stop_watch.h + ../../include/nel/misc/twin_map.h + object_vector.cpp ../../include/nel/misc/object_vector.h + ../../include/nel/misc/singleton.h + speaker_listener.cpp ../../include/nel/misc/speaker_listener.h + ../../include/nel/misc/static_map.h + stl_block_list.cpp ../../include/nel/misc/stl_block_list.h +) + +FILE(GLOB NLMISC_UTILITY + config_file.cpp ../../include/nel/misc/config_file.h + cf_*.cpp ../../include/nel/misc/cf_*.h + config_file/config_file.cpp config_file/config_file.h + config_file/cf_*.cpp config_file/cf_*.h + class_id.cpp ../../include/nel/misc/class_id.h + class_registry.cpp ../../include/nel/misc/class_registry.h + cmd_args.cpp ../../include/nel/misc/cmd_args.h + command.cpp ../../include/nel/misc/command.h + eid_translator.cpp ../../include/nel/misc/eid_translator.h + entity_id.cpp ../../include/nel/misc/entity_id.h + eval_num_expr.cpp ../../include/nel/misc/eval_num_expr.h + factory.cpp ../../include/nel/misc/factory.h + grid_traversal.cpp ../../include/nel/misc/grid_traversal.h + mouse_smoother.cpp ../../include/nel/misc/mouse_smoother.h + noise_value.cpp ../../include/nel/misc/noise_value.h + progress_callback.cpp ../../include/nel/misc/progress_callback.h + sheet_id.cpp ../../include/nel/misc/sheet_id.h + variable.cpp ../../include/nel/misc/variable.h + value_smoother.cpp ../../include/nel/misc/value_smoother.h +) + +FILE(GLOB NLMISC_STRING + string_*.cpp ../../include/nel/misc/string_*.h + ../../include/nel/misc/ucstring.h + unicode.cpp + sstring.cpp ../../include/nel/misc/sstring.h +) + +FILE(GLOB NLMISC_I18N + diff_tool.cpp ../../include/nel/misc/diff_tool.h + i18n.cpp ../../include/nel/misc/i18n.h + words_dictionary.cpp ../../include/nel/misc/words_dictionary.h +) + +FILE(GLOB NLMISC_THREAD + co_task.cpp ../../include/nel/misc/co_task.h + mutex.cpp ../../include/nel/misc/mutex.h + *_thread.cpp ../../include/nel/misc/*_thread.h + task_*.cpp ../../include/nel/misc/task_*.h + reader_writer.cpp ../../include/nel/misc/reader_writer.h + tds.cpp ../../include/nel/misc/tds.h + thread.cpp ../../include/nel/misc/thread.h +) + +FILE(GLOB NLMISC_BITMAP + bitmap.cpp ../../include/nel/misc/bitmap.h + bitmap_*.cpp +) + +FILE(GLOB NLMISC_CRYPT + md5.cpp ../../include/nel/misc/md5.h + sha1.cpp ../../include/nel/misc/sha1.h +) + +SOURCE_GROUP("" FILES ${SRC} ${HEADERS}) +SOURCE_GROUP("cdb" FILES ${NLMISC_CDB}) +SOURCE_GROUP("event" FILES ${NLMISC_EVENT}) +SOURCE_GROUP("debug" FILES ${NLMISC_DEBUG}) +SOURCE_GROUP("platform" FILES ${NLMISC_PLATFORM}) +SOURCE_GROUP("filesystem" FILES ${NLMISC_FILESYSTEM}) +SOURCE_GROUP("stream" FILES ${NLMISC_STREAM}) +SOURCE_GROUP("displayer" FILES ${NLMISC_DISPLAYER}) +SOURCE_GROUP("math" FILES ${NLMISC_MATH}) +SOURCE_GROUP("generic" FILES ${NLMISC_GENERIC}) +SOURCE_GROUP("utility" FILES ${NLMISC_UTILITY}) +SOURCE_GROUP("bitmap" FILES ${NLMISC_BITMAP}) +SOURCE_GROUP("thread" FILES ${NLMISC_THREAD}) +SOURCE_GROUP("i18n" FILES ${NLMISC_I18N}) +SOURCE_GROUP("crypt" FILES ${NLMISC_CRYPT}) +SOURCE_GROUP("string" FILES ${NLMISC_STRING}) + NL_TARGET_LIB(nelmisc ${HEADERS} ${SRC}) IF(WITH_GTK) diff --git a/code/nel/src/misc/app_context.cpp b/code/nel/src/misc/app_context.cpp index 32b981bb3..2383fcda5 100644 --- a/code/nel/src/misc/app_context.cpp +++ b/code/nel/src/misc/app_context.cpp @@ -114,6 +114,7 @@ CApplicationContext::CApplicationContext() DebugNeedAssert = false; NoAssert = false; AlreadyCreateSharedAmongThreads = false; + WindowedApplication = false; contextReady(); } @@ -242,6 +243,16 @@ void CApplicationContext::setAlreadyCreateSharedAmongThreads(bool b) AlreadyCreateSharedAmongThreads = b; } +bool CApplicationContext::isWindowedApplication() +{ + return WindowedApplication; +} + +void CApplicationContext::setWindowedApplication(bool b) +{ + WindowedApplication = b; +} + CLibraryContext::CLibraryContext(INelContext &applicationContext) : _ApplicationContext(&applicationContext) { @@ -430,6 +441,16 @@ void CLibraryContext::setAlreadyCreateSharedAmongThreads(bool b) _ApplicationContext->setAlreadyCreateSharedAmongThreads(b); } +bool CLibraryContext::isWindowedApplication() +{ + return _ApplicationContext->isWindowedApplication(); +} + +void CLibraryContext::setWindowedApplication(bool b) +{ + _ApplicationContext->setWindowedApplication(b); +} + void initNelLibrary(NLMISC::CLibrary &lib) { nlassert(lib.isLibraryLoaded()); diff --git a/code/nel/src/misc/co_task.cpp b/code/nel/src/misc/co_task.cpp index d238b4853..97a9e1e23 100644 --- a/code/nel/src/misc/co_task.cpp +++ b/code/nel/src/misc/co_task.cpp @@ -43,20 +43,7 @@ #else //NL_USE_THREAD_COTASK // some platform specifics #if defined (NL_OS_WINDOWS) -//# define _WIN32_WINNT 0x0500 -# define NL_WIN_CALLBACK CALLBACK -// Visual .NET won't allow Fibers for a Windows version older than 2000. However the basic features are sufficient for us, we want to compile them for all Windows >= 95 -# if !defined(_WIN32_WINNT) || (_WIN32_WINNT < 0x0400) -# ifdef _WIN32_WINNT -# undef _WIN32_WINNT -# endif -# define _WIN32_WINNT 0x0400 -# endif - -# ifndef NL_COMP_MINGW -# define NOMINMAX -# endif -# include +# define NL_WIN_CALLBACK CALLBACK #elif defined (NL_OS_UNIX) # define NL_WIN_CALLBACK # include diff --git a/code/nel/src/misc/common.cpp b/code/nel/src/misc/common.cpp index 31ad7edb0..8183430f1 100644 --- a/code/nel/src/misc/common.cpp +++ b/code/nel/src/misc/common.cpp @@ -20,10 +20,7 @@ #include "nel/misc/common.h" #ifdef NL_OS_WINDOWS -# ifndef NL_COMP_MINGW -# define NOMINMAX -# endif -# include +# include # include # include #elif defined NL_OS_UNIX @@ -670,7 +667,7 @@ bool abortProgram(uint32 pid) #endif } -bool launchProgram (const std::string &programName, const std::string &arguments) +bool launchProgram(const std::string &programName, const std::string &arguments, bool log) { #ifdef NL_OS_WINDOWS @@ -722,7 +719,8 @@ bool launchProgram (const std::string &programName, const std::string &arguments { LPVOID lpMsgBuf; FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, GetLastError(), MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR) &lpMsgBuf, 0, NULL); - nlwarning("LAUNCH: Failed launched '%s' with arg '%s' err %d: '%s'", programName.c_str(), arguments.c_str(), GetLastError (), lpMsgBuf); + if (log) + nlwarning("LAUNCH: Failed launched '%s' with arg '%s' err %d: '%s'", programName.c_str(), arguments.c_str(), GetLastError(), lpMsgBuf); LocalFree(lpMsgBuf); CloseHandle( pi.hProcess ); CloseHandle( pi.hThread ); @@ -779,7 +777,8 @@ bool launchProgram (const std::string &programName, const std::string &arguments if (status == -1) { char *err = strerror (errno); - nlwarning("LAUNCH: Failed launched '%s' with arg '%s' err %d: '%s'", programName.c_str(), arguments.c_str(), errno, err); + if (log) + nlwarning("LAUNCH: Failed launched '%s' with arg '%s' err %d: '%s'", programName.c_str(), arguments.c_str(), errno, err); } else if (status == 0) { @@ -799,7 +798,8 @@ bool launchProgram (const std::string &programName, const std::string &arguments return true; } #else - nlwarning ("LAUNCH: launchProgram() not implemented"); + if (log) + nlwarning ("LAUNCH: launchProgram() not implemented"); #endif return false; diff --git a/code/nel/src/misc/config_file/cf_gramatical.cpp b/code/nel/src/misc/config_file/cf_gramatical.cpp index c6a50934f..1d8c568b7 100644 --- a/code/nel/src/misc/config_file/cf_gramatical.cpp +++ b/code/nel/src/misc/config_file/cf_gramatical.cpp @@ -1499,7 +1499,7 @@ void cf_setVar (NLMISC::CConfigFile::CVar &Var, cf_value Val) switch (Val.Type) { case NLMISC::CConfigFile::CVar::T_REAL: Var.IntValues.push_back ((int)Val.Real); break; - case NLMISC::CConfigFile::CVar::T_STRING: Var.IntValues.push_back (atoi(Val.String)); break; + case NLMISC::CConfigFile::CVar::T_STRING: { int val = 0; NLMISC::fromString(Val.String, val); Var.IntValues.push_back(val); break; } default: break; } break; @@ -1507,7 +1507,7 @@ void cf_setVar (NLMISC::CConfigFile::CVar &Var, cf_value Val) switch (Val.Type) { case NLMISC::CConfigFile::CVar::T_INT: Var.RealValues.push_back ((double)Val.Int); break; - case NLMISC::CConfigFile::CVar::T_STRING: Var.RealValues.push_back (atof(Val.String)); break; + case NLMISC::CConfigFile::CVar::T_STRING: { double val = 0.0; NLMISC::fromString(Val.String, val); Var.RealValues.push_back(val); break; } default: break; } break; diff --git a/code/nel/src/misc/config_file/cf_gramatical.ypp b/code/nel/src/misc/config_file/cf_gramatical.ypp index 199f3df9a..578bf53bf 100644 --- a/code/nel/src/misc/config_file/cf_gramatical.ypp +++ b/code/nel/src/misc/config_file/cf_gramatical.ypp @@ -517,7 +517,7 @@ void cf_setVar (NLMISC::CConfigFile::CVar &Var, cf_value Val) switch (Val.Type) { case NLMISC::CConfigFile::CVar::T_REAL: Var.IntValues.push_back ((int)Val.Real); break; - case NLMISC::CConfigFile::CVar::T_STRING: Var.IntValues.push_back (atoi(Val.String)); break; + case NLMISC::CConfigFile::CVar::T_STRING: { int val = 0; NLMISC::fromString(Val.String, val); Var.RealValues.push_back(val); break; } default: break; } break; @@ -525,7 +525,7 @@ void cf_setVar (NLMISC::CConfigFile::CVar &Var, cf_value Val) switch (Val.Type) { case NLMISC::CConfigFile::CVar::T_INT: Var.RealValues.push_back ((double)Val.Int); break; - case NLMISC::CConfigFile::CVar::T_STRING: Var.RealValues.push_back (atof(Val.String)); break; + case NLMISC::CConfigFile::CVar::T_STRING: { double val = 0.0; NLMISC::fromString(Val.String, val); Var.RealValues.push_back(val); break; } default: break; } break; diff --git a/code/nel/src/misc/config_file/cf_lexical.cpp b/code/nel/src/misc/config_file/cf_lexical.cpp index 80fd4fd36..8c39112a6 100644 --- a/code/nel/src/misc/config_file/cf_lexical.cpp +++ b/code/nel/src/misc/config_file/cf_lexical.cpp @@ -2337,7 +2337,7 @@ YY_RULE_SETUP if (!cf_Ignore) { cflval.Val.Type = T_REAL; - cflval.Val.Real = atof (yytext); + NLMISC::fromString(yytext, cflval.Val.Real); DEBUG_PRINTF("lex: real '%s' '%f\n", yytext, cflval.Val.Real); return REAL; } diff --git a/code/nel/src/misc/config_file/config_file.cpp b/code/nel/src/misc/config_file/config_file.cpp index 6113a7a2c..c969f614d 100644 --- a/code/nel/src/misc/config_file/config_file.cpp +++ b/code/nel/src/misc/config_file/config_file.cpp @@ -85,8 +85,12 @@ double CConfigFile::CVar::asDouble (int index) const if (index >= (int)IntValues.size () || index < 0) throw EBadSize (Name, (int)IntValues.size (), index); return (double)IntValues[index]; case T_STRING: + { if (index >= (int)StrValues.size () || index < 0) throw EBadSize (Name, (int)StrValues.size (), index); - return atof(StrValues[index].c_str()); + double val; + NLMISC::fromString(StrValues[index], val); + return val; + } default: if (index >= (int)RealValues.size () || index < 0) throw EBadSize (Name, (int)RealValues.size (), index); return RealValues[index]; diff --git a/code/nel/src/misc/debug.cpp b/code/nel/src/misc/debug.cpp index c7667acc2..798161a21 100644 --- a/code/nel/src/misc/debug.cpp +++ b/code/nel/src/misc/debug.cpp @@ -17,28 +17,8 @@ #include "stdmisc.h" #include "nel/misc/types_nl.h" -#include "nel/misc/debug.h" - -#ifdef HAVE_NELCONFIG_H -# include "nelconfig.h" -#endif // HAVE_NELCONFIG_H - -#include "nel/misc/log.h" -#include "nel/misc/displayer.h" -#include "nel/misc/mem_displayer.h" -#include "nel/misc/command.h" -#include "nel/misc/report.h" -#include "nel/misc/path.h" -#include "nel/misc/variable.h" -#include "nel/misc/system_info.h" #ifdef NL_OS_WINDOWS -# define _WIN32_WINDOWS 0x0410 -# ifndef NL_COMP_MINGW -# define WINVER 0x0400 -# define NOMINMAX -# endif -# include # include # include # include @@ -59,6 +39,22 @@ # include #endif +#include "nel/misc/debug.h" + +#ifdef HAVE_NELCONFIG_H +# include "nelconfig.h" +#endif // HAVE_NELCONFIG_H + +#include "nel/misc/log.h" +#include "nel/misc/displayer.h" +#include "nel/misc/mem_displayer.h" +#include "nel/misc/command.h" +#include "nel/misc/report.h" +#include "nel/misc/path.h" +#include "nel/misc/variable.h" +#include "nel/misc/system_info.h" +#include "nel/misc/system_utils.h" + #define NL_NO_DEBUG_FILES 1 using namespace std; @@ -83,7 +79,8 @@ using namespace std; #define LOG_IN_FILE NEL_LOG_IN_FILE // If true, debug system will trap crash even if the application is in debugger -static const bool TrapCrashInDebugger = false; +//static const bool TrapCrashInDebugger = false; +static const bool TrapCrashInDebugger = true; #ifdef DEBUG_NEW #define new DEBUG_NEW @@ -552,8 +549,8 @@ public: { // yoyo: allow only to send the crash report once. Because users usually click ignore, // which create noise into list of bugs (once a player crash, it will surely continues to do it). - bool i = false; - report (progname+shortExc, "", subject, _Reason, true, 1, true, 1, !isCrashAlreadyReported(), i, NL_CRASH_DUMP_FILE); + report(progname + shortExc, subject, _Reason, NL_CRASH_DUMP_FILE, true, !isCrashAlreadyReported(), ReportAbort); + // TODO: Does this need to be synchronous? Why does this not handle the report result? // no more sent mail for crash setCrashAlreadyReported(true); @@ -1196,10 +1193,10 @@ void createDebug (const char *logPath, bool logInFile, bool eraseLastLog) #ifdef NL_OS_WINDOWS if (TrapCrashInDebugger || !IsDebuggerPresent ()) +#endif { DefaultMsgBoxDisplayer = new CMsgBoxDisplayer ("DEFAULT_MBD"); } -#endif #if LOG_IN_FILE if (logInFile) @@ -1227,6 +1224,9 @@ void createDebug (const char *logPath, bool logInFile, bool eraseLastLog) #endif // LOG_IN_FILE DefaultMemDisplayer = new CMemDisplayer ("DEFAULT_MD"); + if (NLMISC::CSystemUtils::detectWindowedApplication()) + INelContext::getInstance().setWindowedApplication(true); + initDebug2(logInFile); INelContext::getInstance().setAlreadyCreateSharedAmongThreads(true); diff --git a/code/nel/src/misc/displayer.cpp b/code/nel/src/misc/displayer.cpp index d48c44d02..57b3e09d4 100644 --- a/code/nel/src/misc/displayer.cpp +++ b/code/nel/src/misc/displayer.cpp @@ -18,6 +18,10 @@ #include "nel/misc/types_nl.h" +#ifndef NL_OS_WINDOWS +# define IsDebuggerPresent() false +#endif + #ifdef NL_OS_WINDOWS # include # include @@ -35,19 +39,6 @@ #include "nel/misc/debug.h" -#ifdef NL_OS_WINDOWS -// these defines is for IsDebuggerPresent(). it'll not compile on windows 95 -// just comment this and the IsDebuggerPresent to compile on windows 95 -# define _WIN32_WINDOWS 0x0410 -# ifndef NL_COMP_MINGW -# define WINVER 0x0400 -# define NOMINMAX -# endif -# include -#else -# define IsDebuggerPresent() false -#endif - #include "nel/misc/displayer.h" using namespace std; @@ -529,7 +520,7 @@ void CFileDisplayer::doDisplay ( const CLog::TDisplayInfo& args, const char *mes // in release "" void CMsgBoxDisplayer::doDisplay ( const CLog::TDisplayInfo& args, const char *message) { -#ifdef NL_OS_WINDOWS +//#ifdef NL_OS_WINDOWS bool needSpace = false; // stringstream ss; @@ -688,39 +679,35 @@ void CMsgBoxDisplayer::doDisplay ( const CLog::TDisplayInfo& args, const char *m // yoyo: allow only to send the crash report once. Because users usually click ignore, // which create noise into list of bugs (once a player crash, it will surely continues to do it). std::string filename = getLogDirectory() + NL_CRASH_DUMP_FILE; + + TReportResult reportResult = report(args.ProcessName + " NeL " + toString(logTypeToString(args.LogType, true)), + subject, body, filename, NL_REPORT_SYNCHRONOUS, !isCrashAlreadyReported(), NL_REPORT_DEFAULT); - if (ReportDebug == report (args.ProcessName + " NeL " + toString(logTypeToString(args.LogType, true)), "", subject, body, true, 2, true, 1, !isCrashAlreadyReported(), IgnoreNextTime, filename.c_str())) + switch (reportResult) { + case ReportAlwaysIgnore: + IgnoreNextTime = true; + break; + case ReportBreak: INelContext::getInstance().setDebugNeedAssert(true); + break; + case ReportAbort: +# ifdef NL_OS_WINDOWS +# ifndef NL_COMP_MINGW + // disable the Windows popup telling that the application aborted and disable the dr watson report. + _set_abort_behavior(0, _WRITE_ABORT_MSG | _CALL_REPORTFAULT); +# endif +# endif + abort(); + break; } // no more sent mail for crash setCrashAlreadyReported(true); } + } -/* // Check the envvar NEL_IGNORE_ASSERT - if (getenv ("NEL_IGNORE_ASSERT") == NULL) - { - // Ask the user to continue, debug or ignore - int result = MessageBox (NULL, ss2.str().c_str (), logTypeToString(args.LogType, true), MB_ABORTRETRYIGNORE | MB_ICONSTOP); - if (result == IDABORT) - { - // Exit the program now - exit (EXIT_FAILURE); - } - else if (result == IDRETRY) - { - // Give the debugger a try - DebugNeedAssert = true; - } - else if (result == IDIGNORE) - { - // Continue, do nothing - } - } -*/ } - -#endif +//#endif } diff --git a/code/nel/src/misc/gtk_displayer.cpp b/code/nel/src/misc/gtk_displayer.cpp index c2e04e67e..0c581b2e5 100644 --- a/code/nel/src/misc/gtk_displayer.cpp +++ b/code/nel/src/misc/gtk_displayer.cpp @@ -32,6 +32,7 @@ #pragma comment(lib, "gthread-1.3.lib") #endif +#include "nel/misc/app_context.h" #include "nel/misc/path.h" #include "nel/misc/command.h" #include "nel/misc/thread.h" @@ -59,6 +60,14 @@ static GtkWidget *hrootbox = NULL, *scrolled_win2 = NULL; // Functions // +CGtkDisplayer (const char *displayerName) : CWindowDisplayer(displayerName) +{ + needSlashR = false; + createLabel ("@Clear|CLEAR"); + + INelContext::getInstance().setWindowedApplication(true); +} + CGtkDisplayer::~CGtkDisplayer () { if (_Init) diff --git a/code/nel/src/misc/log.cpp b/code/nel/src/misc/log.cpp index 478a5e338..f0e3e36f8 100644 --- a/code/nel/src/misc/log.cpp +++ b/code/nel/src/misc/log.cpp @@ -19,11 +19,7 @@ #include "nel/misc/log.h" #ifdef NL_OS_WINDOWS -# ifndef NL_COMP_MINGW -# define NOMINMAX -# endif # include -# include #else # include #endif diff --git a/code/nel/src/misc/mem_displayer.cpp b/code/nel/src/misc/mem_displayer.cpp index 49431097d..0aaac26cc 100644 --- a/code/nel/src/misc/mem_displayer.cpp +++ b/code/nel/src/misc/mem_displayer.cpp @@ -24,10 +24,6 @@ #include "nel/misc/debug.h" #ifdef NL_OS_WINDOWS -# ifndef NL_COMP_MINGW -# define NOMINMAX -# endif -# include # include # pragma comment(lib, "imagehlp.lib") # ifdef NL_OS_WIN64 @@ -103,7 +99,7 @@ static string getFuncInfo (DWORD_TYPE funcAddr, DWORD_TYPE stackAddr) if (stop==0 && (parse[i] == ',' || parse[i] == ')')) { char tmp[32]; - sprintf (tmp, "=0x%p", *((ULONG*)(stackAddr) + 2 + pos++)); + sprintf(tmp, "=0x%p", *((DWORD_TYPE*)(stackAddr) + 2 + pos++)); str += tmp; } str += parse[i]; diff --git a/code/nel/src/misc/mutex.cpp b/code/nel/src/misc/mutex.cpp index 3c86e2b29..8135d954f 100644 --- a/code/nel/src/misc/mutex.cpp +++ b/code/nel/src/misc/mutex.cpp @@ -41,15 +41,6 @@ using namespace std; #ifdef NL_OS_WINDOWS -// these defines are for IsDebuggerPresent(). It'll not compile on windows 95 -// just comment this and the IsDebuggerPresent to compile on windows 95 -#define _WIN32_WINDOWS 0x0410 -#ifndef NL_COMP_MINGW -# define WINVER 0x0400 -# define NOMINMAX -#endif -#include - #ifdef DEBUG_NEW #define new DEBUG_NEW #endif @@ -406,13 +397,21 @@ void CUnfairMutex::leave() */ CFairMutex::CFairMutex() { +#ifdef NL_OS_MAC + _Sem = dispatch_semaphore_create(1); +#else sem_init( const_cast(&_Sem), 0, 1 ); +#endif } CFairMutex::CFairMutex( const std::string &name ) { +#ifdef NL_OS_MAC + _Sem = dispatch_semaphore_create(1); +#else sem_init( const_cast(&_Sem), 0, 1 ); +#endif } @@ -421,7 +420,11 @@ CFairMutex::CFairMutex( const std::string &name ) */ CFairMutex::~CFairMutex() { +#ifdef NL_OS_MAC + dispatch_release(_Sem); +#else sem_destroy( const_cast(&_Sem) ); // needs that no thread is waiting on the semaphore +#endif } @@ -430,7 +433,11 @@ CFairMutex::~CFairMutex() */ void CFairMutex::enter() { +#ifdef NL_OS_MAC + dispatch_semaphore_wait(_Sem, DISPATCH_TIME_FOREVER); +#else sem_wait( const_cast(&_Sem) ); +#endif } @@ -439,7 +446,11 @@ void CFairMutex::enter() */ void CFairMutex::leave() { +#ifdef NL_OS_MAC + dispatch_semaphore_signal(_Sem); +#else sem_post( const_cast(&_Sem) ); +#endif } diff --git a/code/nel/src/misc/p_thread.cpp b/code/nel/src/misc/p_thread.cpp index a24029b3c..e71f56611 100644 --- a/code/nel/src/misc/p_thread.cpp +++ b/code/nel/src/misc/p_thread.cpp @@ -17,8 +17,8 @@ #include "stdmisc.h" -#include -#include +#include "nel/misc/types_nl.h" +#include "nel/misc/debug.h" #ifdef NL_OS_UNIX diff --git a/code/nel/src/misc/path.cpp b/code/nel/src/misc/path.cpp index 4d8ad6969..7d7a294fc 100644 --- a/code/nel/src/misc/path.cpp +++ b/code/nel/src/misc/path.cpp @@ -26,10 +26,6 @@ #include "nel/misc/streamed_package_manager.h" #ifdef NL_OS_WINDOWS -# ifndef NL_COMP_MINGW -# define NOMINMAX -# endif -# include # include # include # include @@ -860,6 +856,8 @@ string getname (dirent *de) void CPath::getPathContent (const string &path, bool recurse, bool wantDir, bool wantFile, vector &result, class IProgressCallback *progressCallBack, bool showEverything) { getInstance()->_FileContainer.getPathContent(path, recurse, wantDir, wantFile, result, progressCallBack, showEverything); + + sort(result.begin(), result.end()); } void CFileContainer::getPathContent (const string &path, bool recurse, bool wantDir, bool wantFile, vector &result, class IProgressCallback *progressCallBack, bool showEverything) @@ -902,10 +900,10 @@ void CFileContainer::getPathContent (const string &path, bool recurse, bool want if (isdirectory(de)) { - // skip CVS and .svn directory - if ((!showEverything) && (fn == "CVS" || fn == ".svn")) + // skip CVS, .svn and .hg directory + if ((!showEverything) && (fn == "CVS" || fn == ".svn" || fn == ".hg")) { - NL_DISPLAY_PATH("PATH: CPath::getPathContent(%s, %d, %d, %d): skip CVS and .svn directory", path.c_str(), recurse, wantDir, wantFile); + NL_DISPLAY_PATH("PATH: CPath::getPathContent(%s, %d, %d, %d): skip CVS, .svn and .hg directory", path.c_str(), recurse, wantDir, wantFile); continue; } @@ -941,10 +939,10 @@ void CFileContainer::getPathContent (const string &path, bool recurse, bool want closedir (dir); #ifndef NL_OS_WINDOWS - BasePathgetPathContent = ""; + BasePathgetPathContent.clear(); #endif - // let s recurse + // let's recurse for (uint i = 0; i < recursPath.size (); i++) { // Progress bar @@ -962,8 +960,6 @@ void CFileContainer::getPathContent (const string &path, bool recurse, bool want progressCallBack->popCropedValues (); } } - - sort(result.begin(), result.end()); } void CPath::removeAllAlternativeSearchPath () @@ -1039,6 +1035,9 @@ void CFileContainer::addSearchPath (const string &path, bool recurse, bool alter { // find all path and subpath getPathContent (newPath, recurse, true, false, pathsToProcess, progressCallBack); + + // sort files + sort(pathsToProcess.begin(), pathsToProcess.end()); } for (uint p = 0; p < pathsToProcess.size(); p++) @@ -1084,7 +1083,10 @@ void CFileContainer::addSearchPath (const string &path, bool recurse, bool alter // find all files in the path and subpaths getPathContent (newPath, recurse, false, true, filesToProcess, progressCallBack); - // Progree bar + // sort files + sort(filesToProcess.begin(), filesToProcess.end()); + + // Progress bar if (progressCallBack) { progressCallBack->popCropedValues (); @@ -2624,6 +2626,57 @@ bool CPath::makePathRelative (const char *basePath, std::string &relativePath) return false; } +std::string CPath::makePathAbsolute( const std::string &relativePath, const std::string &directory ) +{ + if( relativePath.empty() ) + return ""; + if( directory.empty() ) + return ""; + +#ifdef NL_OS_WINDOWS + // Windows network address. Eg.: \\someshare\path + if( ( relativePath[ 0 ] == '\\' ) && ( relativePath[ 1 ] == '\\' ) ) + return relativePath; + + // Normal Windows absolute path. Eg.: C:\something + // + if( isalpha( relativePath[ 0 ] ) && ( relativePath[ 1 ] == ':' ) && ( ( relativePath[ 2 ] == '\\' ) || ( relativePath[ 2 ] == '/' ) ) ) + return relativePath; +#else + // Unix filesystem absolute path + if( relativePath[ 0 ] == '/' ) + return relativePath; + +#endif + + // Add a slash to the directory if necessary. + // If the relative path starts with dots we need a slash. + // If the relative path starts with a slash we don't. + // If it starts with neither, we need a slash. + bool needSlash = true; + char c = relativePath[ 0 ]; + if( ( c == '\\' ) || ( c == '/' ) ) + needSlash = false; + + bool hasSlash = false; + std::string npath = directory; + c = npath[ npath.size() - 1 ]; + if( ( c == '\\' ) || ( c == '/' ) ) + hasSlash = true; + + if( needSlash && !hasSlash ) + npath += '/'; + else + if( hasSlash && !needSlash ) + npath.resize( npath.size() - 1 ); + + // Now build the new absolute path + npath += relativePath; + npath = standardizePath( npath, false ); + + return npath; +} + bool CFile::setRWAccess(const std::string &filename) { #ifdef NL_OS_WINDOWS diff --git a/code/nel/src/misc/report.cpp b/code/nel/src/misc/report.cpp index 20b2b1c11..ef3280ef5 100644 --- a/code/nel/src/misc/report.cpp +++ b/code/nel/src/misc/report.cpp @@ -16,346 +16,209 @@ #include "stdmisc.h" +#include +#include + #include "nel/misc/common.h" #include "nel/misc/ucstring.h" #include "nel/misc/report.h" #include "nel/misc/path.h" - -#ifdef NL_OS_WINDOWS -# ifndef NL_COMP_MINGW -# define NOMINMAX -# endif -# include -# include -# include -#endif // NL_OS_WINDOWS - -#define NL_NO_DEBUG_FILES 1 - -using namespace std; +#include "nel/misc/file.h" +#include "nel/misc/system_utils.h" #ifdef DEBUG_NEW #define new DEBUG_NEW #endif +#define NL_REPORT_POST_URL_ENVVAR "NL_REPORT_POST_URL" +#ifdef NL_OS_WINDOWS +#define NL_CRASH_REPORT_TOOL "crash_report.exe" +#else +#define NL_CRASH_REPORT_TOOL "crash_report" +#endif +#define NL_DEBUG_REPORT 0 +// Set to 1 if you want command line report tool +#define NL_REPORT_CONSOLE 0 +// Set to 1 if you want command line report tool even when the debugger is present +#define NL_REPORT_CONSOLE_DEBUGGER 1 + namespace NLMISC { +void setReportPostUrl(const char *postUrl) +{ +#if NL_DEBUG_REPORT + if (INelContext::isContextInitialised()) + nldebug("Set report post url to '%s'", postUrl); +#endif #ifdef NL_OS_WINDOWS -static HWND sendReport=NULL; + SetEnvironmentVariableA(NL_REPORT_POST_URL_ENVVAR, postUrl); +#else + setenv(NL_REPORT_POST_URL_ENVVAR, postUrl, 1); #endif +} -//old doesn't work on visual c++ 7.1 due to default parameter typedef bool (*TEmailFunction) (const std::string &smtpServer, const std::string &from, const std::string &to, const std::string &subject, const std::string &body, const std::string &attachedFile = "", bool onlyCheck = false); -typedef bool (*TEmailFunction) (const std::string &smtpServer, const std::string &from, const std::string &to, const std::string &subject, const std::string &body, const std::string &attachedFile, bool onlyCheck); - -#define DELETE_OBJECT(a) if((a)!=NULL) { DeleteObject (a); a = NULL; } - -static TEmailFunction EmailFunction = NULL; - -void setReportEmailFunction (void *emailFunction) +inline const char *getReportPostURL() { - EmailFunction = (TEmailFunction)emailFunction; - #ifdef NL_OS_WINDOWS - if (sendReport) - EnableWindow(sendReport, FALSE); + static char buf[512]; + buf[0] = '\0'; + int res = GetEnvironmentVariableA(NL_REPORT_POST_URL_ENVVAR, buf, sizeof(buf)); + if (res <= 0 || res > 511) return NULL; + if (buf[0] == '\0') return NULL; + return buf; +#else + char *res = getenv(NL_REPORT_POST_URL_ENVVAR); + if (res == NULL || res[0] == '\0') return NULL; + return res; #endif } -#ifndef NL_OS_WINDOWS +TReportResult report(const std::string &title, const std::string &subject, const std::string &body, const std::string &attachment, bool synchronous, bool sendReport, TReportResult defaultResult) +{ + std::string reportPath; + if (!body.empty()) + { + std::stringstream reportFile; + reportFile << getLogDirectory(); + reportFile << "nel_report_"; + reportFile << (int)time(NULL); + reportFile << ".log"; + reportPath = CFile::findNewFile(reportFile.str()); + std::ofstream f; + f.open(reportPath.c_str()); + if (!f.good()) + { +#if NL_DEBUG_REPORT + if (INelContext::isContextInitialised()) + nldebug("Failed to write report log to '%s'", reportPath.c_str()); +#endif + reportPath.clear(); + } + else + { + f << body; + f.close(); + } + } -// GNU/Linux, do nothing + if (((INelContext::isContextInitialised() + && INelContext::getInstance().isWindowedApplication()) + || CSystemUtils::detectWindowedApplication()) + && CFile::isExists(NL_CRASH_REPORT_TOOL)) + { + std::stringstream params; + params << NL_CRASH_REPORT_TOOL; -void report () -{ -} + if (!reportPath.empty()) + params << " -log \"" << reportPath << "\""; -#else + if (!subject.empty()) + params << " -attachment \"" << attachment << "\""; -// Windows specific version + if (!title.empty()) + params << " -title \"" << title << "\""; -static string Body; -static string Subject; -static string AttachedFile; + if (!subject.empty()) + params << " -subject \"" << subject << "\""; -static HWND checkIgnore=NULL; -static HWND debug=NULL; -static HWND ignore=NULL; -static HWND quit=NULL; -static HWND dialog=NULL; + const char *reportPostUrl = getReportPostURL(); + if (reportPostUrl) + params << " -host \"" << reportPostUrl << "\""; -static bool NeedExit; -static TReportResult Result; -static bool IgnoreNextTime; -static bool CanSendMailReport= false; + if (synchronous) + params << " -dev"; -static bool DebugDefaultBehavior, QuitDefaultBehavior; + if (sendReport) + params << " -sendreport"; -static void sendEmail() -{ - if (CanSendMailReport && SendMessage(sendReport, BM_GETCHECK, 0, 0) != BST_CHECKED) - { - bool res = EmailFunction ("", "", "", Subject, Body, AttachedFile, false); - if (res) + std::string paramsStr = params.str(); + + if (synchronous) { - // EnableWindow(sendReport, FALSE); - // MessageBox (dialog, "The email was successfully sent", "email", MB_OK); -#ifndef NL_NO_DEBUG_FILES - CFile::createEmptyFile(getLogDirectory() + "report_sent"); + TReportResult result = (TReportResult)::system(paramsStr.c_str()); + if (result != ReportAlwaysIgnore + && result != ReportIgnore + && result != ReportAbort + && result != ReportBreak) + { +#if NL_DEBUG_REPORT + if (INelContext::isContextInitialised()) + nldebug("Return default result, invalid return code %i", (int)result); #endif + return defaultResult; + } + return result; } else { -#ifndef NL_NO_DEBUG_FILES - CFile::createEmptyFile(getLogDirectory() + "report_failed"); -#endif - // MessageBox (dialog, "Failed to send the email", "email", MB_OK | MB_ICONERROR); + NLMISC::launchProgram(NL_CRASH_REPORT_TOOL, paramsStr, + NL_DEBUG_REPORT ? INelContext::isContextInitialised() : false); // Only log if required, avoid infinite loop + return defaultResult; } } else { -#ifndef NL_NO_DEBUG_FILES - CFile::createEmptyFile(getLogDirectory() + "report_refused"); +#if NL_DEBUG_REPORT + if (INelContext::isContextInitialised() && !CFile::isExists(NL_CRASH_REPORT_TOOL)) + nldebug("Crash report tool '%s' does not exist", NL_CRASH_REPORT_TOOL); #endif - } -} - -static LRESULT CALLBACK WndProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) -{ - //MSGFILTER *pmf; - - if (message == WM_COMMAND && HIWORD(wParam) == BN_CLICKED) - { - if ((HWND) lParam == checkIgnore) +#if defined(NL_OS_WINDOWS) && !FINAL_VERSION && !NL_REPORT_CONSOLE_DEBUGGER + if (IsDebuggerPresent()) { - IgnoreNextTime = !IgnoreNextTime; - } - else if ((HWND) lParam == debug) - { - sendEmail(); - NeedExit = true; - Result = ReportDebug; - if (DebugDefaultBehavior) - { - NLMISC_BREAKPOINT; - } + return defaultResult; } - else if ((HWND) lParam == ignore) - { - sendEmail(); - NeedExit = true; - Result = ReportIgnore; - } - else if ((HWND) lParam == quit) - { - sendEmail(); - NeedExit = true; - Result = ReportQuit; - - if (QuitDefaultBehavior) - { - // ace: we cannot call exit() because it's call the static object dtor and can crash the application - // if the dtor call order is not good. - //exit(EXIT_SUCCESS); -#ifdef NL_OS_WINDOWS -#ifndef NL_COMP_MINGW - // disable the Windows popup telling that the application aborted and disable the dr watson report. - _set_abort_behavior(0, _WRITE_ABORT_MSG | _CALL_REPORTFAULT); -#endif + else #endif - // quit without calling atexit or static object dtors. - abort(); - } - } - /*else if ((HWND) lParam == sendReport) + if (synchronous) { - if (EmailFunction != NULL) +#if NL_REPORT_CONSOLE + // An interactive console based report + printf("\n"); + if (!title.empty()) + printf("%s\n", title.c_str()); + else + printf("NeL report\n"); + printf("\n"); + if (!subject.empty()) + printf("\tsubject: '%s'\n", subject.c_str()); + if (!body.empty()) + printf("\tbody: '%s'\n", reportPath.c_str()); + if (!attachment.empty()) + printf("\tattachment: '%s'\n", attachment.c_str()); + for (;;) { - bool res = EmailFunction ("", "", "", Subject, Body, AttachedFile, false); - if (res) - { - EnableWindow(sendReport, FALSE); - MessageBox (dialog, "The email was successfully sent", "email", MB_OK); - CFile::createEmptyFile(getLogDirectory() + "report_sent"); - } - else + printf("\n"); + printf("Always Ignore (S), Ignore (I), Abort (A), Break (B)?\n"); // S for Surpress + printf("> "); + int c = getchar(); + getchar(); + switch (c) { - MessageBox (dialog, "Failed to send the email", "email", MB_OK | MB_ICONERROR); + case 'S': + case 's': + return ReportAlwaysIgnore; + case 'I': + case 'i': + return ReportIgnore; + case 'A': + case 'a': + return ReportAbort; + case 'B': + case 'b': + return ReportBreak; } } - }*/ - } - else if (message == WM_CHAR) - { - if (wParam == 27) - { - // ESC -> ignore - sendEmail(); - NeedExit = true; - Result = ReportIgnore; - } - } - - return DefWindowProc (hWnd, message, wParam, lParam); -} - -TReportResult report (const std::string &title, const std::string &header, const std::string &subject, const std::string &body, bool enableCheckIgnore, uint debugButton, bool ignoreButton, sint quitButton, bool sendReportButton, bool &ignoreNextTime, const string &attachedFile) -{ - // register the window - static bool AlreadyRegister = false; - if(!AlreadyRegister) - { - WNDCLASSW wc; - memset (&wc,0,sizeof(wc)); - wc.style = CS_HREDRAW | CS_VREDRAW; - wc.lpfnWndProc = (WNDPROC)WndProc; - wc.cbClsExtra = 0; - wc.cbWndExtra = 0; - wc.hInstance = GetModuleHandle(NULL); - wc.hIcon = NULL; - wc.hCursor = LoadCursor(NULL,IDC_ARROW); - wc.hbrBackground = (HBRUSH)COLOR_WINDOW; - wc.lpszClassName = L"NLReportWindow"; - wc.lpszMenuName = NULL; - if (!RegisterClassW(&wc)) return ReportError; - AlreadyRegister = true; - } - - ucstring formatedTitle = title.empty() ? ucstring("NeL report") : ucstring(title); - - - // create the window - dialog = CreateWindowW (L"NLReportWindow", (LPCWSTR)formatedTitle.c_str(), WS_DLGFRAME | WS_CAPTION /*| WS_THICKFRAME*/, CW_USEDEFAULT, CW_USEDEFAULT, 456, 400, NULL, NULL, GetModuleHandle(NULL), NULL); - - // create the font - HFONT font = CreateFont (-12, 0, 0, 0, FW_DONTCARE, FALSE, FALSE, FALSE, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH | FF_DONTCARE, "Arial"); - - Subject = subject; - AttachedFile = attachedFile; - - // create the edit control - HWND edit = CreateWindowW (L"EDIT", NULL, WS_BORDER | WS_CHILD | WS_VISIBLE | WS_HSCROLL | WS_VSCROLL | ES_READONLY | ES_LEFT | ES_MULTILINE, 7, 70, 429, 212, dialog, (HMENU) NULL, (HINSTANCE) GetWindowLongPtr(dialog, GWLP_HINSTANCE), NULL); - SendMessage (edit, WM_SETFONT, (WPARAM) font, TRUE); - - // set the edit text limit to lot of :) - SendMessage (edit, EM_LIMITTEXT, ~0U, 0); - - Body = addSlashR (body); - - // set the message in the edit text - SendMessage (edit, WM_SETTEXT, (WPARAM)0, (LPARAM)Body.c_str()); - - if (enableCheckIgnore) - { - // create the combo box control - checkIgnore = CreateWindowW (L"BUTTON", L"Don't display this report again", WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX | BS_CHECKBOX, 7, 290, 429, 18, dialog, (HMENU) NULL, (HINSTANCE) GetWindowLongPtr(dialog, GWLP_HINSTANCE), NULL); - SendMessage (checkIgnore, WM_SETFONT, (WPARAM) font, TRUE); - - if(ignoreNextTime) - { - SendMessage (checkIgnore, BM_SETCHECK, BST_CHECKED, 0); +#else + return defaultResult; +#endif } - } - - // create the debug button control - debug = CreateWindowW (L"BUTTON", L"Debug", WS_CHILD | WS_VISIBLE, 7, 315, 75, 25, dialog, (HMENU) NULL, (HINSTANCE) GetWindowLongPtr(dialog, GWLP_HINSTANCE), NULL); - SendMessage (debug, WM_SETFONT, (WPARAM) font, TRUE); - - if (debugButton == 0) - EnableWindow(debug, FALSE); - - // create the ignore button control - ignore = CreateWindowW (L"BUTTON", L"Ignore", WS_CHILD | WS_VISIBLE, 75+7+7, 315, 75, 25, dialog, (HMENU) NULL, (HINSTANCE) GetWindowLongPtr(dialog, GWLP_HINSTANCE), NULL); - SendMessage (ignore, WM_SETFONT, (WPARAM) font, TRUE); - - if (ignoreButton == 0) - EnableWindow(ignore, FALSE); - - // create the quit button control - quit = CreateWindowW (L"BUTTON", L"Quit", WS_CHILD | WS_VISIBLE, 75+75+7+7+7, 315, 75, 25, dialog, (HMENU) NULL, (HINSTANCE) GetWindowLongPtr(dialog, GWLP_HINSTANCE), NULL); - SendMessage (quit, WM_SETFONT, (WPARAM) font, TRUE); - - if (quitButton == 0) - EnableWindow(quit, FALSE); - - // create the debug button control - sendReport = CreateWindowW (L"BUTTON", L"Don't send the report", WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX, 7, 315+32, 429, 18, dialog, (HMENU) NULL, (HINSTANCE) GetWindowLongPtr(dialog, GWLP_HINSTANCE), NULL); - SendMessage (sendReport, WM_SETFONT, (WPARAM) font, TRUE); - - string formatedHeader; - if (header.empty()) - { - formatedHeader = "This application stopped to display this report."; - } - else - { - formatedHeader = header; - } - - // ace don't do that because it s slow to try to send a mail - //CanSendMailReport = sendReportButton && EmailFunction != NULL && EmailFunction("", "", "", "", "", true); - CanSendMailReport = sendReportButton && EmailFunction != NULL; - - if (CanSendMailReport) - formatedHeader += " Send report will only email the contents of the box below. Please, send it to help us (it could take few minutes to send the email, be patient)."; - else - EnableWindow(sendReport, FALSE); - - ucstring uc = ucstring::makeFromUtf8(formatedHeader); - - // create the label control - HWND label = CreateWindowW (L"STATIC", (LPCWSTR)uc.c_str(), WS_CHILD | WS_VISIBLE /*| SS_WHITERECT*/, 7, 7, 429, 51, dialog, (HMENU) NULL, (HINSTANCE) GetWindowLongPtr(dialog, GWLP_HINSTANCE), NULL); - SendMessage (label, WM_SETFONT, (WPARAM) font, TRUE); - - - DebugDefaultBehavior = debugButton==1; - QuitDefaultBehavior = quitButton==1; - - IgnoreNextTime = ignoreNextTime; - - // show until the cursor really show :) - while (ShowCursor(TRUE) < 0) - ; - - SetWindowPos (dialog, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_SHOWWINDOW); - - SetFocus(dialog); - SetForegroundWindow(dialog); - - NeedExit = false; - - while(!NeedExit) - { - MSG msg; - while (PeekMessageW(&msg, NULL, 0, 0, PM_REMOVE)) + else { - TranslateMessage(&msg); - DispatchMessageW(&msg); + return defaultResult; } - nlSleep (1); } - - // set the user result - ignoreNextTime = IgnoreNextTime; - - ShowWindow(dialog, SW_HIDE); - - - - DELETE_OBJECT(sendReport) - DELETE_OBJECT(quit) - DELETE_OBJECT(ignore) - DELETE_OBJECT(debug) - DELETE_OBJECT(checkIgnore) - DELETE_OBJECT(edit) - DELETE_OBJECT(label) - DELETE_OBJECT(dialog) - - return Result; } -#endif - - } // NLMISC diff --git a/code/nel/src/misc/shared_memory.cpp b/code/nel/src/misc/shared_memory.cpp index 7b11fea52..3afe795f1 100644 --- a/code/nel/src/misc/shared_memory.cpp +++ b/code/nel/src/misc/shared_memory.cpp @@ -19,12 +19,7 @@ #include "nel/misc/shared_memory.h" #include "nel/misc/debug.h" -#ifdef NL_OS_WINDOWS -# ifndef NL_COMP_MINGW -# define NOMINMAX -# endif -# include -#else +#ifndef NL_OS_WINDOWS # include # include # include diff --git a/code/nel/src/misc/sheet_id.cpp b/code/nel/src/misc/sheet_id.cpp index 83dd4be89..690d09ab1 100644 --- a/code/nel/src/misc/sheet_id.cpp +++ b/code/nel/src/misc/sheet_id.cpp @@ -217,7 +217,7 @@ bool CSheetId::buildSheetId(const std::string& sheetName) return true; } } - + #ifdef NL_TEMP_YUBO_NO_SOUND_SHEET_ID if (a_NoSoundSheetId && sheetName.find(".sound") != std::string::npos) { @@ -236,7 +236,7 @@ bool CSheetId::buildSheetId(const std::string& sheetName) return true; } #endif - + return false; } @@ -417,10 +417,10 @@ void CSheetId::initWithoutSheet() nlassert(_DontHaveSheetKnowledge); return; } - + _Initialised = true; _DontHaveSheetKnowledge = true; - + // Initialize id 0,0 as unknown.unknown CSheetId unknownunknown = CSheetId("unknown.unknown"); nlassert(unknownunknown == CSheetId::Unknown); @@ -525,7 +525,7 @@ bool CSheetId::operator < (const CSheetId& sheetRef ) const string CSheetId::toString(bool ifNotFoundUseNumericId) const { if (!_Initialised) init(false); - + if (_DontHaveSheetKnowledge) { // FIXME: When someone punches in a fake sheet id this will @@ -564,7 +564,7 @@ string CSheetId::toString(bool ifNotFoundUseNumericId) const void CSheetId::serial(NLMISC::IStream &f) throw(NLMISC::EStream) { nlassert(!_DontHaveSheetKnowledge); - + f.serial( _Id.Id ); #ifdef NL_DEBUG_SHEET_ID diff --git a/code/nel/src/misc/sstring.cpp b/code/nel/src/misc/sstring.cpp index fe9332328..833553f21 100644 --- a/code/nel/src/misc/sstring.cpp +++ b/code/nel/src/misc/sstring.cpp @@ -1731,7 +1731,9 @@ namespace NLMISC double CSString::atof() const { - return ::atof(c_str()); + double val; + NLMISC::fromString(*this, val); + return val; } bool CSString::readFromFile(const CSString& fileName) diff --git a/code/nel/src/misc/stdmisc.h b/code/nel/src/misc/stdmisc.h index b98d92d2a..b24a74616 100644 --- a/code/nel/src/misc/stdmisc.h +++ b/code/nel/src/misc/stdmisc.h @@ -42,12 +42,20 @@ #include #include -#ifdef _WIN32 -# ifndef __MINGW32__ - #define NOMINMAX +#include + +#ifdef NL_OS_WINDOWS +# define WIN32_LEAN_AND_MEAN +# define _WIN32_WINDOWS 0x0410 +# ifndef _WIN32_WINNT +# define _WIN32_WINNT 0x0400 +# endif +# ifndef NL_COMP_MINGW +# define WINVER 0x0400 +# define NOMINMAX # endif # include -# include +# include #endif #endif // NL_STDMISC_H diff --git a/code/nel/src/misc/system_info.cpp b/code/nel/src/misc/system_info.cpp index 31cde5283..8524939c8 100644 --- a/code/nel/src/misc/system_info.cpp +++ b/code/nel/src/misc/system_info.cpp @@ -19,10 +19,6 @@ #include "nel/misc/system_info.h" #ifdef NL_OS_WINDOWS -# ifndef NL_COMP_MINGW -# define NOMINMAX -# endif -# include # include # include # include diff --git a/code/nel/src/misc/system_utils.cpp b/code/nel/src/misc/system_utils.cpp index a66eed02f..bb1111b88 100644 --- a/code/nel/src/misc/system_utils.cpp +++ b/code/nel/src/misc/system_utils.cpp @@ -18,16 +18,12 @@ #include "nel/misc/system_utils.h" #ifdef NL_OS_WINDOWS - #ifndef NL_COMP_MINGW - #define NOMINMAX - #endif - #include - - #ifdef _WIN32_WINNT_WIN7 +# include +# ifdef _WIN32_WINNT_WIN7 // only supported by Windows 7 Platform SDK - #include - #define TASKBAR_PROGRESS 1 - #endif +# include +# define TASKBAR_PROGRESS 1 +# endif #endif #ifdef DEBUG_NEW @@ -359,4 +355,14 @@ uint CSystemUtils::getCurrentColorDepth() return depth; } +/// Detect whether the current process is a windowed application. Return true if definitely yes, false if unknown +bool CSystemUtils::detectWindowedApplication() +{ +#ifdef NL_OS_WINDOWS + if (GetConsoleWindow() == NULL) + return true; +#endif + return false; +} + } // NLMISC diff --git a/code/nel/src/misc/time_nl.cpp b/code/nel/src/misc/time_nl.cpp index 8aacbd002..70b7b3807 100644 --- a/code/nel/src/misc/time_nl.cpp +++ b/code/nel/src/misc/time_nl.cpp @@ -21,10 +21,7 @@ #include "nel/misc/thread.h" #ifdef NL_OS_WINDOWS -# ifndef NL_COMP_MINGW -# define NOMINMAX -# endif -# include +# include #elif defined (NL_OS_UNIX) # include # include diff --git a/code/nel/src/misc/win32_util.cpp b/code/nel/src/misc/win32_util.cpp index 63315e1b2..6085e98e5 100644 --- a/code/nel/src/misc/win32_util.cpp +++ b/code/nel/src/misc/win32_util.cpp @@ -20,8 +20,6 @@ #ifdef NL_OS_WINDOWS -#include - #ifdef DEBUG_NEW #define new DEBUG_NEW #endif diff --git a/code/nel/src/misc/win_displayer.cpp b/code/nel/src/misc/win_displayer.cpp index 95b6b34cf..5da7db65b 100644 --- a/code/nel/src/misc/win_displayer.cpp +++ b/code/nel/src/misc/win_displayer.cpp @@ -18,10 +18,6 @@ #include "nel/misc/win_displayer.h" #ifdef NL_OS_WINDOWS -#ifndef NL_COMP_MINGW -# define NOMINMAX -#endif -#include #include #include #include @@ -30,6 +26,7 @@ #include #include +#include "nel/misc/app_context.h" #include "nel/misc/path.h" #include "nel/misc/command.h" #include "nel/misc/thread.h" @@ -45,6 +42,13 @@ namespace NLMISC { static CHARFORMAT2 CharFormat; +CWinDisplayer::CWinDisplayer(const char *displayerName) : CWindowDisplayer(displayerName), Exit(false) +{ + needSlashR = true; + createLabel("@Clear|CLEAR"); + + INelContext::getInstance().setWindowedApplication(true); +} CWinDisplayer::~CWinDisplayer () { diff --git a/code/nel/src/misc/win_event_emitter.cpp b/code/nel/src/misc/win_event_emitter.cpp index 01da89564..67e426f1e 100644 --- a/code/nel/src/misc/win_event_emitter.cpp +++ b/code/nel/src/misc/win_event_emitter.cpp @@ -22,10 +22,6 @@ #include "nel/misc/event_server.h" #ifdef NL_OS_WINDOWS -#ifndef NL_COMP_MINGW -#define NOMINMAX -#endif -#include #include /** diff --git a/code/nel/src/misc/win_thread.cpp b/code/nel/src/misc/win_thread.cpp index f556779ba..4178b7a58 100644 --- a/code/nel/src/misc/win_thread.cpp +++ b/code/nel/src/misc/win_thread.cpp @@ -198,7 +198,7 @@ void CWinThread::start () { if (isRunning()) throw EThread("Starting a thread that is already started, existing thread will continue running, this should not happen"); - + // ThreadHandle = (void *) ::CreateThread (NULL, _StackSize, ProxyFunc, this, 0, (DWORD *)&ThreadId); ThreadHandle = (void *) ::CreateThread (NULL, 0, ProxyFunc, this, 0, (DWORD *)&ThreadId); // nldebug("NLMISC: thread %x started for runnable '%x'", typeid( Runnable ).name()); diff --git a/code/nel/src/misc/words_dictionary.cpp b/code/nel/src/misc/words_dictionary.cpp index e2113e62d..4d5057dd7 100644 --- a/code/nel/src/misc/words_dictionary.cpp +++ b/code/nel/src/misc/words_dictionary.cpp @@ -251,7 +251,7 @@ void CWordsDictionary::exactLookupByKey( const CSString& key, CVectorSString& re */ inline CSString CWordsDictionary::makeResult( const CSString &key, const CSString &word ) { - return key + CSString(": ") + word; + return key + ": " + word.c_str(); } diff --git a/code/nel/src/net/service.cpp b/code/nel/src/net/service.cpp index f42806245..1f3436d1c 100644 --- a/code/nel/src/net/service.cpp +++ b/code/nel/src/net/service.cpp @@ -23,12 +23,6 @@ #ifdef NL_OS_WINDOWS // these defines is for IsDebuggerPresent(). it'll not compile on windows 95 // just comment this and the IsDebuggerPresent to compile on windows 95 -# define _WIN32_WINDOWS 0x0410 -# ifndef NL_COMP_MINGW -# define WINVER 0x0400 -# define NOMINMAX -# endif -# include # include #elif defined NL_OS_UNIX # include @@ -606,7 +600,7 @@ sint IService::main (const char *serviceShortName, const char *serviceLongName, ListeningPort = servicePort; - setReportEmailFunction ((void*)sendEmail); + // setReportEmailFunction ((void*)sendEmail); // setDefaultEmailParams ("gw.nevrax.com", "", "cado@nevrax.com"); diff --git a/code/nel/src/net/stdnet.h b/code/nel/src/net/stdnet.h index d18db3222..df2bc931d 100644 --- a/code/nel/src/net/stdnet.h +++ b/code/nel/src/net/stdnet.h @@ -17,7 +17,9 @@ #include "nel/misc/types_nl.h" #ifdef NL_OS_WINDOWS +# define _WIN32_WINDOWS 0x0410 # ifndef NL_COMP_MINGW +# define WINVER 0x0400 # define NOMINMAX # endif # include diff --git a/code/nel/src/pacs/local_retriever.cpp b/code/nel/src/pacs/local_retriever.cpp index 7158cee0a..c17709c70 100644 --- a/code/nel/src/pacs/local_retriever.cpp +++ b/code/nel/src/pacs/local_retriever.cpp @@ -2253,7 +2253,7 @@ bool NLPACS::CLocalRetriever::checkSurfaceIntegrity(uint surf, NLMISC::CVector t for (k=0; k+1(ochain[k], ochain[k+1])); + edges.push_back(std::pair(ochain[k], ochain[k+1])); } } } diff --git a/code/nel/src/sound/CMakeLists.txt b/code/nel/src/sound/CMakeLists.txt index 2cf570f69..6b0dc285d 100644 --- a/code/nel/src/sound/CMakeLists.txt +++ b/code/nel/src/sound/CMakeLists.txt @@ -86,6 +86,7 @@ NL_TARGET_LIB(nelsound ${HEADERS} ${SRC}) INCLUDE_DIRECTORIES(${VORBIS_INCLUDE_DIR}) +INCLUDE_DIRECTORIES(${OGG_INCLUDE_DIR}) TARGET_LINK_LIBRARIES(nelsound ${VORBISFILE_LIBRARY} ${VORBIS_LIBRARY}) diff --git a/code/nel/src/sound/driver/dsound/source_dsound.h b/code/nel/src/sound/driver/dsound/source_dsound.h index 81174c1a0..1aa2d5625 100644 --- a/code/nel/src/sound/driver/dsound/source_dsound.h +++ b/code/nel/src/sound/driver/dsound/source_dsound.h @@ -80,7 +80,7 @@ enum TSourceDSoundEndState class CSourceDSound : public ISource { friend class CSoundDriverDSound; - + public: /// Constructor CSourceDSound(uint sourcename = 0); @@ -446,7 +446,7 @@ private: // Set the 'used' state of the source. Managed by the driver. void setUsed(bool v) { _IsUsed = v; } - + // Return the 'used' state of the source bool isUsed() { return _IsUsed; } */ diff --git a/code/nel/src/sound/driver/fmod/source_fmod.cpp b/code/nel/src/sound/driver/fmod/source_fmod.cpp index c5c6e8266..6026ce2f5 100644 --- a/code/nel/src/sound/driver/fmod/source_fmod.cpp +++ b/code/nel/src/sound/driver/fmod/source_fmod.cpp @@ -419,7 +419,7 @@ void CSourceFMod::setMinMaxDistances( float mindist, float maxdist, bool /* defe nlwarning("SOUND_DEV (FMod): Ridiculously high max distance set on source"); maxdist = maxSqrt; } - + _MinDist= mindist; _MaxDist= maxdist; if(_FModChannel!=-1) diff --git a/code/nel/src/sound/driver/openal/buffer_al.cpp b/code/nel/src/sound/driver/openal/buffer_al.cpp index b63e39fa2..352128c3e 100644 --- a/code/nel/src/sound/driver/openal/buffer_al.cpp +++ b/code/nel/src/sound/driver/openal/buffer_al.cpp @@ -121,7 +121,7 @@ bool CBufferAL::unlock(uint size) // Error handling if (alGetError() == AL_NO_ERROR) _IsLoaded = true; // ->lock() set it to false - + return _IsLoaded; } @@ -162,7 +162,7 @@ bool CBufferAL::fill(const uint8 *src, uint size) // Error handling _IsLoaded = (alGetError() == AL_NO_ERROR); - + return _IsLoaded; } diff --git a/code/nel/src/sound/simple_source.cpp b/code/nel/src/sound/simple_source.cpp index 2c9dda86c..9b9ee5950 100644 --- a/code/nel/src/sound/simple_source.cpp +++ b/code/nel/src/sound/simple_source.cpp @@ -176,7 +176,7 @@ void CSimpleSource::play() // and play the sound bool play = pSource->play(); - + #ifdef NL_DEBUG nlassert(play); #else diff --git a/code/nel/src/sound/sound_animation.cpp b/code/nel/src/sound/sound_animation.cpp index 5a6f1c256..1d1f9093a 100644 --- a/code/nel/src/sound/sound_animation.cpp +++ b/code/nel/src/sound/sound_animation.cpp @@ -176,7 +176,10 @@ void CSoundAnimation::load() throw NLMISC::Exception("Invalid sound animation marker"); } - marker->setTime((float) atof(time)); + float val; + NLMISC::fromString(time, val); + + marker->setTime(val); xmlFree ((void*)time); diff --git a/code/nel/tools/3d/object_viewer_widget/src/object_viewer_widget.cpp b/code/nel/tools/3d/object_viewer_widget/src/object_viewer_widget.cpp index af026b3df..4d0936a1a 100644 --- a/code/nel/tools/3d/object_viewer_widget/src/object_viewer_widget.cpp +++ b/code/nel/tools/3d/object_viewer_widget/src/object_viewer_widget.cpp @@ -185,7 +185,7 @@ namespace NLQT NL3D::CBloomEffect::instance().setDriver(_Driver); NL3D::CBloomEffect::instance().setScene(_Scene); - NL3D::CBloomEffect::instance().init(!_Direct3D); + NL3D::CBloomEffect::instance().init(); //NL3D::CBloomEffect::instance().setDensityBloom(Modules::config().getConfigFile().getVar("BloomDensity").asInt()); //NL3D::CBloomEffect::instance().setSquareBloom(Modules::config().getConfigFile().getVar("BloomSquare").asBool()); } @@ -366,7 +366,7 @@ namespace NLQT // Render the scene. if((NL3D::CBloomEffect::instance().getDriver() != NULL) && (_BloomEffect)) { - NL3D::CBloomEffect::instance().initBloom(); + NL3D::CBloomEffect::instance().init(); } _Driver->clearBuffers(_BackgroundColor); } @@ -378,8 +378,7 @@ namespace NLQT if((NL3D::CBloomEffect::instance().getDriver() != NULL) && (_BloomEffect)) { - NL3D::CBloomEffect::instance().endBloom(); - NL3D::CBloomEffect::instance().endInterfacesDisplayBloom(); + NL3D::CBloomEffect::instance().applyBloom(); } } diff --git a/code/nel/tools/3d/panoply_maker/color_modifier.cpp b/code/nel/tools/3d/panoply_maker/color_modifier.cpp index 3c4b1814d..a55936b7c 100644 --- a/code/nel/tools/3d/panoply_maker/color_modifier.cpp +++ b/code/nel/tools/3d/panoply_maker/color_modifier.cpp @@ -70,7 +70,6 @@ void CColorModifier::convertBitmap(NLMISC::CBitmap &destBitmap, const NLMISC::CB // blend to the destination by using the mask alpha result.blendFromui(*dest, result, mask->R); - /// keep alpha from the source dest->R = result.R; @@ -78,7 +77,6 @@ void CColorModifier::convertBitmap(NLMISC::CBitmap &destBitmap, const NLMISC::CB dest->B = result.B; dest->A = src->A; - ++ mask; ++ src; ++ dest; diff --git a/code/nel/tools/3d/plugin_max/nel_3dsmax_shared/nel_3dsmax_shared.cpp b/code/nel/tools/3d/plugin_max/nel_3dsmax_shared/nel_3dsmax_shared.cpp index da04de211..76592f556 100644 --- a/code/nel/tools/3d/plugin_max/nel_3dsmax_shared/nel_3dsmax_shared.cpp +++ b/code/nel/tools/3d/plugin_max/nel_3dsmax_shared/nel_3dsmax_shared.cpp @@ -68,6 +68,7 @@ NEL_3DSMAX_SHARED_API NLMISC::INelContext &GetSharedNelContext() { new NLMISC::CApplicationContext(); NLMISC::createDebug(); + NLMISC::INelContext::getInstance().setWindowedApplication(true); } return NLMISC::INelContext::getInstance(); } diff --git a/code/nel/tools/3d/plugin_max/nel_export/nel_export.rc b/code/nel/tools/3d/plugin_max/nel_export/nel_export.rc index d01762618..e42b888ea 100644 --- a/code/nel/tools/3d/plugin_max/nel_export/nel_export.rc +++ b/code/nel/tools/3d/plugin_max/nel_export/nel_export.rc @@ -54,13 +54,13 @@ FONT 8, "MS Sans Serif" BEGIN DEFPUSHBUTTON "OK",IDOK,129,7,50,14 PUSHBUTTON "Cancel",IDCANCEL,129,42,50,14 - CONTROL "All",IDC_ALLCHANNEL,"Button",BS_AUTOCHECKBOX | + CONTROL "All",IDC_ALLCHANNEL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,7,23,10 CONTROL "Channel Position",IDC_CHANNELPOS,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,7,23,69,10 CONTROL "Channel Rotation",IDC_CHANNELROT,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,7,34,71,10 - CONTROL "Channel Scale",IDC_CHANNELSCA,"Button",BS_AUTOCHECKBOX | + CONTROL "Channel Scale",IDC_CHANNELSCA,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,46,62,10 END @@ -91,11 +91,11 @@ BEGIN 10 CONTROL "64x",IDC_RADIOSS4,"Button",BS_AUTORADIOBUTTON,15,146,27, 10 - CONTROL "Shadow",IDC_SHADOW,"Button",BS_AUTOCHECKBOX | + CONTROL "Shadow",IDC_SHADOW,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,81,18,42,10 CONTROL "Exclude non selected nodes from lighting",IDC_EXCLUDE, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,7,145,10 - CONTROL "Show Lumel",IDC_SHOWLUMEL,"Button",BS_AUTOCHECKBOX | + CONTROL "Show Lumel",IDC_SHOWLUMEL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,91,100,55,10 CONTROL "Export bg color",IDC_EXPORT_BG_COLOR,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,91,115,63,10 @@ -131,28 +131,28 @@ BEGIN GROUPBOX "LOD Root Properties",IDC_STATIC,5,5,172,95 LTEXT "List of lod mesh (ungrowing order):",IDC_STATIC,15,15, 108,10,SS_CENTERIMAGE - LISTBOX IDC_LIST1,15,25,111,70,LBS_NOINTEGRALHEIGHT | WS_VSCROLL | + LISTBOX IDC_LIST1,15,25,111,70,LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP PUSHBUTTON "Add..",IDC_ADD,131,25,40,14 PUSHBUTTON "Remove",IDC_REMOVE,131,39,40,14 PUSHBUTTON "Up",IDC_UP,131,54,40,14 PUSHBUTTON "Down",IDC_DOWN,131,68,40,14 GROUPBOX "LOD Properties",IDC_STATIC,5,105,172,50 - CONTROL "Blend in",IDC_BLEND_IN,"Button",BS_AUTO3STATE | + CONTROL "Blend in",IDC_BLEND_IN,"Button",BS_AUTO3STATE | WS_TABSTOP,15,121,40,10 - CONTROL "Blend out",IDC_BLEND_OUT,"Button",BS_AUTO3STATE | + CONTROL "Blend out",IDC_BLEND_OUT,"Button",BS_AUTO3STATE | WS_TABSTOP,15,130,45,10 - CONTROL "Coarse mesh",IDC_COARSE_MESH,"Button",BS_AUTO3STATE | + CONTROL "Coarse mesh",IDC_COARSE_MESH,"Button",BS_AUTO3STATE | WS_TABSTOP,15,140,55,10 - CONTROL "Dynamic mesh",IDC_DYNAMIC_MESH,"Button",BS_AUTO3STATE | + CONTROL "Dynamic mesh",IDC_DYNAMIC_MESH,"Button",BS_AUTO3STATE | WS_TABSTOP,80,120,60,10 LTEXT "Dist Max:",IDC_STATIC,5,160,45,13,SS_CENTERIMAGE EDITTEXT IDC_DIST_MAX,51,160,45,12,ES_AUTOHSCROLL | ES_NUMBER LTEXT "Blend length:",IDC_STATIC,80,135,45,13,SS_CENTERIMAGE - EDITTEXT IDC_BLEND_LENGTH,125,135,45,12,ES_AUTOHSCROLL | + EDITTEXT IDC_BLEND_LENGTH,125,135,45,12,ES_AUTOHSCROLL | ES_NUMBER GROUPBOX "MRM properties",IDC_STATIC,185,5,172,95 - CONTROL "Active MRM",IDC_ACTIVE_MRM,"Button",BS_AUTO3STATE | + CONTROL "Active MRM",IDC_ACTIVE_MRM,"Button",BS_AUTO3STATE | WS_TABSTOP,195,20,60,10 LTEXT "Skin reduction",IDC_STATIC,195,35,50,10,SS_CENTERIMAGE CONTROL "Min",IDC_SKIN_REDUCTION_MIN,"Button",BS_AUTORADIOBUTTON, @@ -170,12 +170,12 @@ BEGIN LTEXT "Dist middle:",IDC_STATIC,260,65,45,13,SS_CENTERIMAGE EDITTEXT IDC_DIST_MIDDLE,305,65,45,12,ES_AUTOHSCROLL | ES_NUMBER LTEXT "Dist coarsest:",IDC_STATIC,260,80,45,13,SS_CENTERIMAGE - EDITTEXT IDC_DIST_COARSEST,305,80,45,12,ES_AUTOHSCROLL | + EDITTEXT IDC_DIST_COARSEST,305,80,45,12,ES_AUTOHSCROLL | ES_NUMBER GROUPBOX "LOD Bones",IDC_STATIC,185,105,170,45 LTEXT "Disable Distance (0 means always activated) :", IDC_STATIC,190,120,160,10 - EDITTEXT IDC_BONE_LOD_DISTANCE,190,130,45,12,ES_AUTOHSCROLL | + EDITTEXT IDC_BONE_LOD_DISTANCE,190,130,45,12,ES_AUTOHSCROLL | ES_NUMBER CONTROL "Export as Lod character (.clod)",IDC_EXPORT_CLOD,"Button", BS_AUTO3STATE | WS_TABSTOP,190,160,150,10 @@ -197,21 +197,21 @@ BEGIN BS_AUTO3STATE | WS_TABSTOP,27,92,71,10 CONTROL "Dynamic Portal",IDC_DYNAMIC_PORTAL,"Button", BS_AUTO3STATE | WS_TABSTOP,27,44,63,10 - CONTROL "Clusterize",IDC_CLUSTERIZE,"Button",BS_AUTO3STATE | + CONTROL "Clusterize",IDC_CLUSTERIZE,"Button",BS_AUTO3STATE | WS_TABSTOP,93,5,46,10 - COMBOBOX IDC_OCC_MODEL,209,30,123,134,CBS_DROPDOWNLIST | + COMBOBOX IDC_OCC_MODEL,209,30,123,134,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP RTEXT "Occlusion model",IDC_STATIC,134,30,68,12,SS_CENTERIMAGE - COMBOBOX IDC_OPEN_OCC_MODEL,209,44,123,116,CBS_DROPDOWNLIST | + COMBOBOX IDC_OPEN_OCC_MODEL,209,44,123,116,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP RTEXT "Open portal occlusion model",IDC_STATIC,112,44,89,10, SS_CENTERIMAGE GROUPBOX "Audio properties",IDC_STATIC,105,19,237,141 RTEXT "Sound group",IDC_STATIC,111,86,90,14 - COMBOBOX IDC_ENV_FX,209,106,123,87,CBS_DROPDOWNLIST | WS_VSCROLL | + COMBOBOX IDC_ENV_FX,209,106,123,87,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP RTEXT "Environment FX",IDC_STATIC,112,106,89,10,SS_CENTERIMAGE - COMBOBOX IDC_SOUND_GROUP,209,86,123,101,CBS_DROPDOWN | CBS_SORT | + COMBOBOX IDC_SOUND_GROUP,209,86,123,101,CBS_DROPDOWN | CBS_SORT | WS_VSCROLL | WS_TABSTOP CONTROL "Father audible",IDC_FATHER_AUDIBLE,"Button", BS_AUTO3STATE | WS_TABSTOP,210,135,61,10 @@ -240,17 +240,17 @@ BEGIN GROUPBOX "Properties for objects without lightmaps",IDC_STATIC,5, 80,150,60 CONTROL "If checked, use per vertex lighting attenuation else use global lighting attenuation for the object. Doesn't work with per pixel lighting shader.", - IDC_USE_LIGHT_LOCAL_ATTENUATION,"Button",BS_AUTO3STATE | + IDC_USE_LIGHT_LOCAL_ATTENUATION,"Button",BS_AUTO3STATE | BS_TOP | BS_MULTILINE | WS_TABSTOP,15,95,120,41 GROUPBOX "Properties for lights",IDC_STATIC,160,5,185,200 CONTROL "RealTime Light. If set, this light will light scene objects.", - IDC_EXPORT_REALTIME_LIGHT,"Button",BS_AUTO3STATE | + IDC_EXPORT_REALTIME_LIGHT,"Button",BS_AUTO3STATE | BS_TOP | BS_MULTILINE | WS_TABSTOP,170,15,165,20 CONTROL "RealTime Sun Light. If set, this DIRECTIONNAL light will be used as sun light to light scene objects.", - IDC_EXPORT_AS_SUN_LIGHT,"Button",BS_AUTO3STATE | BS_TOP | + IDC_EXPORT_AS_SUN_LIGHT,"Button",BS_AUTO3STATE | BS_TOP | BS_MULTILINE | WS_TABSTOP,170,34,170,25 CONTROL "LightMap Light. If set, this light will be used to compute the lightmaps of the project objects.", - IDC_EXPORT_LIGHTMAP_LIGHT,"Button",BS_AUTO3STATE | + IDC_EXPORT_LIGHTMAP_LIGHT,"Button",BS_AUTO3STATE | BS_TOP | BS_MULTILINE | WS_TABSTOP,170,60,170,20 LTEXT "LightMap Animation Name. This is the name of the animation used to flick the light color.", IDC_STATIC,170,135,170,20 @@ -284,7 +284,7 @@ BEGIN CONTROL "Floating Object",IDC_FLOATING_OBJECT,"Button", BS_AUTO3STATE | WS_TABSTOP,5,5,65,12 GROUPBOX "Ligoscape",IDC_STATIC,5,100,120,45 - CONTROL "Symmetry",IDC_LIGO_SYMMETRY,"Button",BS_AUTO3STATE | + CONTROL "Symmetry",IDC_LIGO_SYMMETRY,"Button",BS_AUTO3STATE | WS_TABSTOP,11,110,44,12 LTEXT "Rotation:",IDC_STATIC,11,125,30,13,SS_CENTERIMAGE EDITTEXT IDC_LIGO_ROTATE,60,126,57,14,ES_AUTOHSCROLL @@ -313,7 +313,7 @@ BEGIN EDITTEXT IDC_EDIT_INTERFACE_THRESHOLD,221,137,110,14, ES_AUTOHSCROLL GROUPBOX "Bone Scale",IDC_STATIC,5,150,120,60 - CONTROL "Enable",IDC_EXPORT_BONE_SCALE,"Button",BS_AUTO3STATE | + CONTROL "Enable",IDC_EXPORT_BONE_SCALE,"Button",BS_AUTO3STATE | WS_TABSTOP,10,160,38,10 LTEXT "Bone Reference Name extension:",IDC_STATIC,10,175,110, 13,SS_CENTERIMAGE @@ -332,7 +332,7 @@ BEGIN EDITTEXT IDC_REMANENCE_SAMPLING_PERIOD,266,190,20,14, ES_AUTOHSCROLL CONTROL "Shift texture at start of animation", - IDC_REMANENCE_SHIFTING_TEXTURE,"Button",BS_AUTOCHECKBOX | + IDC_REMANENCE_SHIFTING_TEXTURE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,207,178,116,9 LTEXT "Rollup ratio :",IDC_ROLLUP_RATIO,290,192,41,8 EDITTEXT IDC_REMANENCE_ROLLUP_RATIO,332,190,16,14,ES_AUTOHSCROLL @@ -342,10 +342,10 @@ IDD_VEGETABLE DIALOG DISCARDABLE 0, 0, 360, 200 STYLE WS_CHILD FONT 8, "MS Sans Serif" BEGIN - CONTROL "Vegetable",IDC_VEGETABLE,"Button",BS_AUTO3STATE | + CONTROL "Vegetable",IDC_VEGETABLE,"Button",BS_AUTO3STATE | WS_TABSTOP,5,5,50,12 CONTROL "Alpha Blend ON (double sided)", - IDC_VEGETABLE_ALPHA_BLEND_ON,"Button",BS_AUTORADIOBUTTON | + IDC_VEGETABLE_ALPHA_BLEND_ON,"Button",BS_AUTORADIOBUTTON | WS_GROUP,21,30,112,15 CONTROL "Alpha Blend OFF",IDC_VEGETABLE_ALPHA_BLEND_OFF,"Button", BS_AUTORADIOBUTTON,20,74,85,15 @@ -394,7 +394,7 @@ BEGIN LTEXT "Name of the instance group where this instance will be inserted. Enter ... to erase all", IDC_STATIC,195,45,160,15 CONTROL "Don't add to scene. If checked, this instance will not be added in the scene.", - IDC_DONT_ADD_TO_SCENE,"Button",BS_AUTO3STATE | + IDC_DONT_ADD_TO_SCENE,"Button",BS_AUTO3STATE | WS_TABSTOP,5,71,255,10 CONTROL "Don't export the shape. If checked, no shape file will be exported from this object.", IDC_DONT_EXPORT,"Button",BS_AUTO3STATE | WS_TABSTOP,5,86, @@ -427,15 +427,15 @@ BEGIN CONTROL "Export note track",IDC_EXPORT_NOTE_TRACK,"Button", BS_AUTO3STATE | WS_TABSTOP,5,50,75,10 CONTROL "Export animated materials", - IDC_EXPORT_ANIMATED_MATERIALS,"Button",BS_AUTO3STATE | + IDC_EXPORT_ANIMATED_MATERIALS,"Button",BS_AUTO3STATE | WS_TABSTOP,5,35,98,10 CONTROL "Export node animation",IDC_EXPORT_NODE_ANIMATION,"Button", BS_AUTO3STATE | WS_TABSTOP,5,5,98,10 CONTROL "Prefixe tracks with node name (Instance name or, if emtpy, node name)", - IDC_EXPORT_ANIMATION_PREFIXE_NAME,"Button",BS_AUTO3STATE | + IDC_EXPORT_ANIMATION_PREFIXE_NAME,"Button",BS_AUTO3STATE | BS_MULTILINE | WS_TABSTOP,5,20,245,10 CONTROL "Allow automatic animation. If the shape is ""obj.shape"", then it will bind ""obj.anim"" automatically.", - IDC_AUTOMATIC_ANIM,"Button",BS_AUTO3STATE | BS_MULTILINE | + IDC_AUTOMATIC_ANIM,"Button",BS_AUTO3STATE | BS_MULTILINE | WS_TABSTOP,5,65,315,10 CONTROL "Export SSS track (Skeleton Spawn Script)", IDC_EXPORT_SSS_TRACK,"Button",BS_AUTO3STATE | WS_TABSTOP, @@ -449,7 +449,7 @@ END // #ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO DISCARDABLE +GUIDELINES DESIGNINFO DISCARDABLE BEGIN IDD_PANEL, DIALOG BEGIN @@ -548,18 +548,18 @@ END // TEXTINCLUDE // -1 TEXTINCLUDE DISCARDABLE +1 TEXTINCLUDE DISCARDABLE BEGIN "resource.h\0" END -2 TEXTINCLUDE DISCARDABLE +2 TEXTINCLUDE DISCARDABLE BEGIN "#include ""afxres.h""\r\n" "\0" END -3 TEXTINCLUDE DISCARDABLE +3 TEXTINCLUDE DISCARDABLE BEGIN "\r\n" "\0" @@ -575,8 +575,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 0, 11, 0, 0 - PRODUCTVERSION 0, 11, 0, 0 + FILEVERSION 0, 12, 0, 0 + PRODUCTVERSION 0, 12, 0, 0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -593,14 +593,14 @@ BEGIN BEGIN VALUE "Comments", "Based on Kinetix 3D Studio Max 3.0 plugin sample\0" VALUE "CompanyName", "Ryzom Core\0" - VALUE "FileVersion", "0.11.0\0" + VALUE "FileVersion", "0.12.0\0" VALUE "InternalName", "CNelExport\0" VALUE "LegalCopyright", "\0" VALUE "LegalTrademarks", "\0" VALUE "OriginalFilename", "CNelExport.dlu\0" VALUE "PrivateBuild", "\0" VALUE "ProductName", "Ryzom Core\0" - VALUE "ProductVersion", "0.11.0\0" + VALUE "ProductVersion", "0.12.0\0" VALUE "SpecialBuild", "\0" END END @@ -618,7 +618,7 @@ END // String Table // -STRINGTABLE DISCARDABLE +STRINGTABLE DISCARDABLE BEGIN IDS_LIBDESCRIPTION "Geometry Export/View" IDS_CATEGORY "Nel Tools" @@ -673,9 +673,9 @@ BEGIN BS_AUTOCHECKBOX | WS_TABSTOP,10,5,105,10 LTEXT "Frequency Scale :",IDC_STATIC,120,5,60,10 LTEXT "Distance Scale :",IDC_STATIC,245,5,60,10 - EDITTEXT IDC_EDIT_VPWT_FREQ_SCALE,190,5,35,12,ES_MULTILINE | + EDITTEXT IDC_EDIT_VPWT_FREQ_SCALE,190,5,35,12,ES_MULTILINE | ES_AUTOVSCROLL | ES_AUTOHSCROLL | ES_WANTRETURN - EDITTEXT IDC_EDIT_VPWT_DIST_SCALE,305,5,35,12,ES_MULTILINE | + EDITTEXT IDC_EDIT_VPWT_DIST_SCALE,305,5,35,12,ES_MULTILINE | ES_AUTOVSCROLL | ES_AUTOHSCROLL | ES_WANTRETURN GROUPBOX "Level 0 (eg: Tree Trunk)",IDC_STATIC,0,20,355,50 GROUPBOX "Level 1 (eg: branch)",IDC_STATIC,0,75,355,55 @@ -790,7 +790,7 @@ FONT 8, "MS Sans Serif" BEGIN DEFPUSHBUTTON "OK",IDOK,160,240,50,14 PUSHBUTTON "Cancel",IDCANCEL,160,265,50,14 - LISTBOX IDC_LMC_COPY_LIST,5,20,120,260,LBS_SORT | + LISTBOX IDC_LMC_COPY_LIST,5,20,120,260,LBS_SORT | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP LTEXT "List of objects in LMC mode.",IDC_STATIC,5,10,120,10 CONTROL "Custom1",IDC_LMC_COPY_ALWAYS_DIFFUSE,"ColorSwatch", @@ -829,7 +829,7 @@ END // #ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO DISCARDABLE +GUIDELINES DESIGNINFO DISCARDABLE BEGIN IDD_NODE_PROPERTIES_PANEL, DIALOG BEGIN diff --git a/code/nel/tools/3d/plugin_max/nel_export/nel_export_script.cpp b/code/nel/tools/3d/plugin_max/nel_export/nel_export_script.cpp index 7bc128706..c5457786e 100644 --- a/code/nel/tools/3d/plugin_max/nel_export/nel_export_script.cpp +++ b/code/nel/tools/3d/plugin_max/nel_export/nel_export_script.cpp @@ -957,6 +957,7 @@ protected: Value* force_quit_on_msg_displayer_cf(Value** arg_list, int count) { nlwarning("Enable force quit on NeL report msg displayer"); + NLMISC::INelContext::getInstance().setWindowedApplication(false); // disable the Windows popup telling that the application aborted and disable the dr watson report. _set_abort_behavior(0, _WRITE_ABORT_MSG | _CALL_REPORTFAULT); putenv("NEL_IGNORE_ASSERT=1"); diff --git a/code/nel/tools/3d/plugin_max/nel_mesh_lib/calc_lm.cpp b/code/nel/tools/3d/plugin_max/nel_mesh_lib/calc_lm.cpp index d6bdbb690..d82e2a394 100644 --- a/code/nel/tools/3d/plugin_max/nel_mesh_lib/calc_lm.cpp +++ b/code/nel/tools/3d/plugin_max/nel_mesh_lib/calc_lm.cpp @@ -2144,6 +2144,8 @@ void appendLightmapLog (COFile &outputLog, const char *lightmapName, const vecto bool CExportNel::calculateLM( CMesh::CMeshBuild *pZeMeshBuild, CMeshBase::CMeshBaseBuild *pZeMeshBaseBuild, INode& ZeNode, TimeValue tvTime, uint firstMaterial, bool outputLightmapLog) { + nldebug("Calculate LM: '%s'", ZeNode.GetName()); + DWORD t = timeGetTime(); uint32 i, j; diff --git a/code/nel/tools/3d/plugin_max/nel_patch_converter/nel_patch_converter.rc b/code/nel/tools/3d/plugin_max/nel_patch_converter/nel_patch_converter.rc index b6eea41a6..50fc5a48d 100644 --- a/code/nel/tools/3d/plugin_max/nel_patch_converter/nel_patch_converter.rc +++ b/code/nel/tools/3d/plugin_max/nel_patch_converter/nel_patch_converter.rc @@ -40,7 +40,7 @@ END // #ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO +GUIDELINES DESIGNINFO BEGIN IDD_PANEL, DIALOG BEGIN @@ -59,18 +59,18 @@ END // TEXTINCLUDE // -1 TEXTINCLUDE +1 TEXTINCLUDE BEGIN "resource.h\0" END -2 TEXTINCLUDE +2 TEXTINCLUDE BEGIN "#include ""afxres.h""\r\n" "\0" END -3 TEXTINCLUDE +3 TEXTINCLUDE BEGIN "\r\n" "\0" @@ -85,8 +85,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 0, 11, 0, 0 - PRODUCTVERSION 0, 11, 0, 0 + FILEVERSION 0, 12, 0, 0 + PRODUCTVERSION 0, 12, 0, 0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -103,12 +103,12 @@ BEGIN BEGIN VALUE "Comments", "http://www.ryzomcore.org/" VALUE "FileDescription", "PatchMesh to RykolPatchMesh" - VALUE "FileVersion", "0.11.0" + VALUE "FileVersion", "0.12.0" VALUE "InternalName", "PatchMesh to RykolPatchMesh" VALUE "LegalCopyright", "Copyright, 2000 Nevrax Ltd." VALUE "OriginalFilename", "nel_convert_patch.dlm" VALUE "ProductName", "NeL Patch Converter" - VALUE "ProductVersion", "0.11.0" + VALUE "ProductVersion", "0.12.0" END END BLOCK "VarFileInfo" @@ -123,7 +123,7 @@ END // String Table // -STRINGTABLE +STRINGTABLE BEGIN IDS_LIBDESCRIPTION "Rykol Patchmesh Converter" IDS_CATEGORY "Rykol Tools" diff --git a/code/nel/tools/3d/plugin_max/nel_patch_edit/mods.rc b/code/nel/tools/3d/plugin_max/nel_patch_edit/mods.rc index 243e02da8..c687fdd49 100644 --- a/code/nel/tools/3d/plugin_max/nel_patch_edit/mods.rc +++ b/code/nel/tools/3d/plugin_max/nel_patch_edit/mods.rc @@ -345,12 +345,12 @@ END // TEXTINCLUDE // -1 TEXTINCLUDE +1 TEXTINCLUDE BEGIN "modsres.h\0" END -2 TEXTINCLUDE +2 TEXTINCLUDE BEGIN "#define APSTUDIO_HIDDEN_SYMBOLS\r\n" "#include ""windows.h""\r\n" @@ -359,7 +359,7 @@ BEGIN "\0" END -3 TEXTINCLUDE +3 TEXTINCLUDE BEGIN "\r\n" "\0" @@ -439,7 +439,7 @@ IDB_PATCHSELMASK BITMAP "patselm.bmp" // #ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO +GUIDELINES DESIGNINFO BEGIN IDD_PASTE_NAMEDSET, DIALOG BEGIN @@ -514,8 +514,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 0, 11, 0, 0 - PRODUCTVERSION 0, 11, 0, 0 + FILEVERSION 0, 12, 0, 0 + PRODUCTVERSION 0, 12, 0, 0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -533,13 +533,13 @@ BEGIN VALUE "Comments", "Based on Kinetix 3D Studio Max 3.0 plugin sample\0" VALUE "CompanyName", "Ryzom Core" VALUE "FileDescription", "NeL Patch Edit" - VALUE "FileVersion", "0.11.0" + VALUE "FileVersion", "0.12.0" VALUE "InternalName", "neleditpatch" VALUE "LegalCopyright", "Copyright © 2000 Nevrax Ltd. Copyright © 1998 Autodesk Inc." VALUE "LegalTrademarks", "The following are registered trademarks of Autodesk, Inc.: 3D Studio MAX. The following are trademarks of Autodesk, Inc.: Kinetix, Kinetix(logo), BIPED, Physique, Character Studio, MAX DWG, DWG Unplugged, Heidi, FLI, FLC, DXF." VALUE "OriginalFilename", "neleditpatch.dlm" VALUE "ProductName", "Ryzom Core" - VALUE "ProductVersion", "0.11.0" + VALUE "ProductVersion", "0.12.0" END END BLOCK "VarFileInfo" @@ -565,7 +565,7 @@ IDI_ICON3 ICON "icon3.ico" // String Table // -STRINGTABLE +STRINGTABLE BEGIN IDS_RB_NORMALMOD "NormalMod" IDS_RB_SKEWMOD "SkewMod" @@ -585,7 +585,7 @@ BEGIN IDS_RB_VOLSELECT_CLASS "Vol. Select" END -STRINGTABLE +STRINGTABLE BEGIN IDS_RB_EDITMESH_CLASS "Edit Mesh" IDS_RB_PARAMETERS "Parameters" @@ -594,7 +594,7 @@ BEGIN IDS_RB_AMOUNT "Amount" END -STRINGTABLE +STRINGTABLE BEGIN IDS_RB_BEND2 "Bend" IDS_RB_FROM "Lower Limit" @@ -614,7 +614,7 @@ BEGIN IDS_RB_DISPLACEMOD "DisplaceMod" END -STRINGTABLE +STRINGTABLE BEGIN IDS_RB_NODEXFORM "Linked XForm" IDS_RB_NODEXFORM_CLASS "Linked XForm" @@ -630,7 +630,7 @@ BEGIN IDS_RB_SOT "Supports Objects of Type" END -STRINGTABLE +STRINGTABLE BEGIN IDS_RB_BIASL2 "Bias L2" IDS_RB_EDITMESHMOD "EditMeshMod" @@ -650,7 +650,7 @@ BEGIN IDS_RB_SMOOTHMOD "SmoothMod" END -STRINGTABLE +STRINGTABLE BEGIN IDS_RB_EXTRUDE "Extrude" IDS_RB_TAPER "Taper" @@ -663,7 +663,7 @@ BEGIN IDS_RB_APPARATUS "Gizmo" END -STRINGTABLE +STRINGTABLE BEGIN IDS_RB_FREQUENCY "Frequency" IDS_RB_MAPMOD "MapMod" @@ -683,7 +683,7 @@ BEGIN IDS_RB_BIASL1 "Bias L1" END -STRINGTABLE +STRINGTABLE BEGIN IDS_RB_AMOUNT2 "Amount" IDS_RB_CURVITURE "Curvature" @@ -697,13 +697,13 @@ BEGIN IDS_DB_EXTRUDE "Extrude" END -STRINGTABLE +STRINGTABLE BEGIN IDS_RB_RIPPLE "Ripple" IDS_RB_RIPPLE_BINDING "Ripple Binding" END -STRINGTABLE +STRINGTABLE BEGIN IDS_RB_DELETEVERT "Delete Vertex" IDS_RB_DELETEFACE "Delete Face" @@ -720,7 +720,7 @@ BEGIN IDS_RB_EDGEDIVIDE "Edge Divide" END -STRINGTABLE +STRINGTABLE BEGIN IDS_RB_EDGETURN "Edge Turn" IDS_RB_DELETEEDGE "Delete Edge" @@ -732,36 +732,36 @@ BEGIN IDS_PW_LATTICE "Lattice Map" END -STRINGTABLE +STRINGTABLE BEGIN IDS_RB_DEFDEFORMATIONS "MAX STANDARD" IDS_RB_DEFEDIT "MAX EDIT" END -STRINGTABLE +STRINGTABLE BEGIN IDS_RB_DEFLECTOR_CLASS "Deflector" IDS_RB_HIDEVERT "Hide Vertices" IDS_RB_DEFSURFACE "MAX SURFACE" END -STRINGTABLE +STRINGTABLE BEGIN IDS_RB_NOISE "Noise" END -STRINGTABLE +STRINGTABLE BEGIN IDS_RB_ROTATION2 "Rotation" IDS_RB_TWIST "Twist" END -STRINGTABLE +STRINGTABLE BEGIN IDS_RB_BENDMOD "BendMod" END -STRINGTABLE +STRINGTABLE BEGIN IDS_RB_DISPLACEBINDING "Displace Binding" IDS_RB_SELECTDISPIMAGE "Select Displacement Image" @@ -781,7 +781,7 @@ BEGIN IDS_RB_TURBULENCE "Turbulence" END -STRINGTABLE +STRINGTABLE BEGIN IDS_RB_SKEW_CLASS "Skew" IDS_RB_MATERIAL3_CLASS "Material" @@ -800,7 +800,7 @@ BEGIN IDS_RB_WAVE_CLASS "Wave" END -STRINGTABLE +STRINGTABLE BEGIN IDS_RB_STRENGTH2 "Strength" IDS_DS_MOVE "Move" @@ -809,7 +809,7 @@ BEGIN IDS_RB_ELEMENTSEL "Element" END -STRINGTABLE +STRINGTABLE BEGIN IDS_RB_NOVERTSTOWELD "No vertices within weld threshold." IDS_RB_CHAOS "Chaos" @@ -819,24 +819,24 @@ BEGIN IDS_RB_DUPFACEWARNING "This face already exists." END -STRINGTABLE +STRINGTABLE BEGIN IDS_RB_NONE "None" END -STRINGTABLE +STRINGTABLE BEGIN IDS_RB_SCALE "Scale" END -STRINGTABLE +STRINGTABLE BEGIN IDS_DS_MOVE2 "Move" IDS_DS_SELECT "Select" IDS_DS_CREATE "Create" END -STRINGTABLE +STRINGTABLE BEGIN IDS_TH_VERTDELETE "Delete Vertex" IDS_TH_BEZIERCORNER "Bezier Corner" @@ -848,7 +848,7 @@ BEGIN IDS_TH_NOPATCHESSEL "No patches selected" END -STRINGTABLE +STRINGTABLE BEGIN IDS_TH_EDGESUBDIVIDE "Edge Subdivide" IDS_TH_PATCHSUBDIVIDE "Patch Subdivide" @@ -863,16 +863,16 @@ BEGIN IDS_TH_CONNECT_COINCIDENT "Weld coincident endpoints?" END -STRINGTABLE +STRINGTABLE BEGIN IDS_TH_BOOLWELDFAILED "ERROR: Final boolean weld stage failed" IDS_TH_COINCIDENTVERTEX "Cannot perform boolean because splines have coincident vertices" - IDS_TH_SPLINESMUSTOVERLAP + IDS_TH_SPLINESMUSTOVERLAP "Cannot perform boolean because splines must overlap" IDS_TH_SELECTCLOSEDSPLINE "Please select a closed spline" IDS_TH_SPLINESELFINTERSECTS "Spline is invalid: Self-intersects" IDS_TH_ATTACH "Attach" - IDS_TH_CANHAVEONLYONESHAPE + IDS_TH_CANHAVEONLYONESHAPE "Can only have one shape in modifier for this operation" IDS_TH_NOVERTSSEL "No vertices selected" IDS_TH_VERTCHANGE "Vertex Change" @@ -885,7 +885,7 @@ BEGIN IDS_TH_LINE "Line" END -STRINGTABLE +STRINGTABLE BEGIN IDS_TH_MAKEFIRST "Make First" IDS_TH_EDITEDGE "Edit Edge" @@ -896,7 +896,7 @@ BEGIN IDS_TH_PATCHADD "Patch Add" END -STRINGTABLE +STRINGTABLE BEGIN IDS_TH_EDITSPLINE "Edit Spline" IDS_TH_EDITSEGMENT "Edit Segment" @@ -907,7 +907,7 @@ BEGIN IDS_TH_EDITOBJECT "Edit Object" END -STRINGTABLE +STRINGTABLE BEGIN IDS_TH_DETACHSPLINE "Detach Spline" IDS_TH_OUTLINE "Outline Spline" @@ -927,9 +927,9 @@ BEGIN IDS_TH_INTERSECTION "Intersection" END -STRINGTABLE +STRINGTABLE BEGIN - IDS_TH_CANHAVEONLYONEPATCH + IDS_TH_CANHAVEONLYONEPATCH "Can only have one patch object in modifier for this operation" IDS_TH_DETACHPATCH "Detach Patch" IDS_TH_COPY_SPLINE "Copy Spline" @@ -937,7 +937,7 @@ BEGIN IDS_TH_SPLINECHANGE "Spline Change" END -STRINGTABLE +STRINGTABLE BEGIN IDS_TH_EDITPATCH_CLASS "NeL Edit" IDS_TH_EDITSPLINE_CLASS "Edit Spline" @@ -957,7 +957,7 @@ BEGIN IDS_TH_NOSEGSSEL "No segments selected" END -STRINGTABLE +STRINGTABLE BEGIN IDS_TH_DEGREES "Degrees" IDS_TH_AXIS "Axis" @@ -968,12 +968,12 @@ BEGIN IDS_RB_STARTPOINT "Start Point" END -STRINGTABLE +STRINGTABLE BEGIN IDS_TH_MIRRORSPLINE "Mirror Spline" END -STRINGTABLE +STRINGTABLE BEGIN IDS_RB_ENDPOINT "End Point" IDS_RB_AFRPOINTS "Points" @@ -993,7 +993,7 @@ BEGIN IDS_RB_VOFFSET "V Offset" END -STRINGTABLE +STRINGTABLE BEGIN IDS_RB_WOFFSET "W Offset" IDS_RB_MAXEDGE1 "Max Edge Length 1" @@ -1013,14 +1013,14 @@ BEGIN IDS_RB_SHOULDRESET "Do you also want to reset the Unwrap UVW modifier\nto inherit the mapping from the new channel?\n\nChanges made within the UVW modifier will be lost." END -STRINGTABLE +STRINGTABLE BEGIN IDS_RB_NUMVERTSELP "%d Vertices Selected" IDS_RB_NUMFACESELP "%d Faces Selected" IDS_RB_NUMEDGESELP "%d Edges Selected" END -STRINGTABLE +STRINGTABLE BEGIN IDS_RB_RESETUNWRAPUVWS "Are you sure you want to reset?\n\nAll changes made within the Unwrap UVW modifier will be lost." IDS_RB_LENGTH "Length" @@ -1040,7 +1040,7 @@ BEGIN IDS_RB_ZOOMREG "Zoom Region" END -STRINGTABLE +STRINGTABLE BEGIN IDS_RB_UVW "Coordinates" IDS_RB_PROP "Unwrap Options" @@ -1060,10 +1060,10 @@ BEGIN IDS_EM_SHAPE "Shape" END -STRINGTABLE +STRINGTABLE BEGIN IDS_ADV_SURF_APPROX_WARNING_TITLE "Surface Approximation Verification" - IDS_ADV_SURF_APPROX_WARNING + IDS_ADV_SURF_APPROX_WARNING "You have selected a potentially dangerous setting for the SubDivision limits. Are you sure you want to do this?" IDS_PW_PICK "Pick Texture" IDS_PW_SNAP "Pixel Snap" @@ -1079,7 +1079,7 @@ BEGIN IDS_PW_FALLOFF "Falloff type" END -STRINGTABLE +STRINGTABLE BEGIN IDS_EM_SELBYCOLOR "Select By Color" IDS_EM_VERTEXCOLOR "Vertex Color" @@ -1099,7 +1099,7 @@ BEGIN IDS_EM_DETACHFACES "Detach Faces" END -STRINGTABLE +STRINGTABLE BEGIN IDS_EM_DETACHVERTS "Detach Verts" IDS_EM_INHERIT_MATERIAL "Inherit Material" @@ -1119,7 +1119,7 @@ BEGIN IDS_TH_SPLINE_VERT_COUNT "Vertex Count: %d" END -STRINGTABLE +STRINGTABLE BEGIN IDS_TH_SELECTION "Selection" IDS_TH_OBJECT_SEL "Whole Object Selected" @@ -1139,17 +1139,17 @@ BEGIN IDS_TH_CROSS_INSERT "Cross Insert" END -STRINGTABLE +STRINGTABLE BEGIN IDS_EM_BEVEL "Bevel" IDS_EM_OUTLINE "Outline" - IDS_ADV_DISP_APPROX_WARNING_TITLE + IDS_ADV_DISP_APPROX_WARNING_TITLE "Displacement Approximation Verification" - IDS_ADV_DISP_APPROX_WARNING + IDS_ADV_DISP_APPROX_WARNING "You have selected a potential dangerous setting for the SubDivision limits. Are you sure you want to do this?" END -STRINGTABLE +STRINGTABLE BEGIN IDS_PW_FALLOFFSPACE "World Falloff Space" IDS_PW_BREAK "Break Selected Vertices" @@ -1169,7 +1169,7 @@ BEGIN IDS_PW_TEXMAP "TextureMap" END -STRINGTABLE +STRINGTABLE BEGIN IDS_PW_CHANNEL "Map Channel" IDS_PW_MAP "Map Channel Type" @@ -1181,9 +1181,9 @@ BEGIN IDS_PW_FALLOFF2 "Falloff" END -STRINGTABLE +STRINGTABLE BEGIN - IDS_TH_CROSS_NOT_IN_THRESHOLD + IDS_TH_CROSS_NOT_IN_THRESHOLD "Crossing lines not within specified threshold" IDS_TH_EDGEDELETE "Delete Edge" IDS_TH_NOEDGESSEL "No edges selected" @@ -1200,7 +1200,7 @@ BEGIN IDS_TH_OPEN "Open" END -STRINGTABLE +STRINGTABLE BEGIN IDS_TH_CLOSED "Closed" IDS_EM_ATTACH_LIST "Attach List" @@ -1220,7 +1220,7 @@ BEGIN IDS_PW_SCALEV "Scale Vertical" END -STRINGTABLE +STRINGTABLE BEGIN IDS_PW_WELDSELECTED "Weld Selected" IDS_PW_APPLYPLANAR "Apply Planar" @@ -1240,7 +1240,7 @@ BEGIN IDS_PW_UNHIDEALL "Unhide All" END -STRINGTABLE +STRINGTABLE BEGIN IDS_PW_FREEZE_SELECTED "Freeze Selected" IDS_PW_UNFREEZEALL "Unfreeze All" @@ -1249,7 +1249,7 @@ BEGIN IDS_PW_SCALE_UVW "Scale UVWs" IDS_PW_WELD_UVW "Weld UVWs" IDS_PW_LINECOLOR "Line Color" - IDS_RB_UNSUPPORTED_MAP_TYPE + IDS_RB_UNSUPPORTED_MAP_TYPE "The Displace modifier does not support the mapping type that has been selected to acquire." IDS_MM_ACQ_MAPPING "Aquire Mapping" IDS_PARAM_CHANGE "Parameter Change" @@ -1261,7 +1261,7 @@ BEGIN IDS_PW_MOUSE_CONSTRAIN "SHIFT constrains the mouse to X/Y" END -STRINGTABLE +STRINGTABLE BEGIN IDS_PW_MOUSE_SELECTTV "Select texture vertices" IDS_PW_MOUSE_SELECTTRI "SHIFT selects triangle faces" diff --git a/code/nel/tools/3d/plugin_max/nel_patch_paint/nel_patch_paint.rc b/code/nel/tools/3d/plugin_max/nel_patch_paint/nel_patch_paint.rc index 507d36ab5..0093248c4 100644 --- a/code/nel/tools/3d/plugin_max/nel_patch_paint/nel_patch_paint.rc +++ b/code/nel/tools/3d/plugin_max/nel_patch_paint/nel_patch_paint.rc @@ -34,7 +34,7 @@ STYLE WS_CHILD FONT 8, "MS Sans Serif" BEGIN CONTROL "Paint",IDC_PAINT,"CustButton",WS_TABSTOP,7,5,38,19 - CONTROL "Meshes",IDC_INCLUDE_MESHES,"Button",BS_AUTOCHECKBOX | + CONTROL "Meshes",IDC_INCLUDE_MESHES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,50,5,45,10 CONTROL "Preload Tiles",IDC_PRELOAD_TILES,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,50,15,50,10 @@ -47,12 +47,12 @@ END // TEXTINCLUDE // -1 TEXTINCLUDE DISCARDABLE +1 TEXTINCLUDE DISCARDABLE BEGIN "modsres.h\0" END -2 TEXTINCLUDE DISCARDABLE +2 TEXTINCLUDE DISCARDABLE BEGIN "#define APSTUDIO_HIDDEN_SYMBOLS\r\n" "#include ""windows.h""\r\n" @@ -61,7 +61,7 @@ BEGIN "\0" END -3 TEXTINCLUDE DISCARDABLE +3 TEXTINCLUDE DISCARDABLE BEGIN "\r\n" "\0" @@ -76,7 +76,7 @@ END // #ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO DISCARDABLE +GUIDELINES DESIGNINFO DISCARDABLE BEGIN IDD_EDPATCH_OPS, DIALOG BEGIN @@ -96,8 +96,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 0, 11, 1, 0 - PRODUCTVERSION 0, 11, 1, 0 + FILEVERSION 0, 12, 0, 0 + PRODUCTVERSION 0, 12, 0, 0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -116,14 +116,14 @@ BEGIN VALUE "Comments", "TECH: cyril.corvazier\0" VALUE "CompanyName", "Ryzom Core\0" VALUE "FileDescription", "NeL Patch Paint\0" - VALUE "FileVersion", "0.11.1\0" + VALUE "FileVersion", "0.12.0\0" VALUE "InternalName", "mods\0" VALUE "LegalCopyright", "Copyright © 2000 Nevrax Ltd\0" VALUE "LegalTrademarks", "\0" VALUE "OriginalFilename", "nelpatchpaint.dlm\0" VALUE "PrivateBuild", "\0" VALUE "ProductName", "Ryzom Core\0" - VALUE "ProductVersion", "0.11.1\0" + VALUE "ProductVersion", "0.12.0\0" VALUE "SpecialBuild", "\0" END END diff --git a/code/nel/tools/3d/plugin_max/nel_vertex_tree_paint/vertex_tree_paint.rc b/code/nel/tools/3d/plugin_max/nel_vertex_tree_paint/vertex_tree_paint.rc index 4e70d1afc..fdf00449c 100644 --- a/code/nel/tools/3d/plugin_max/nel_vertex_tree_paint/vertex_tree_paint.rc +++ b/code/nel/tools/3d/plugin_max/nel_vertex_tree_paint/vertex_tree_paint.rc @@ -72,7 +72,7 @@ END // #ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO DISCARDABLE +GUIDELINES DESIGNINFO DISCARDABLE BEGIN IDD_PANEL, DIALOG BEGIN @@ -90,18 +90,18 @@ END // TEXTINCLUDE // -1 TEXTINCLUDE DISCARDABLE +1 TEXTINCLUDE DISCARDABLE BEGIN "resource.h\0" END -2 TEXTINCLUDE DISCARDABLE +2 TEXTINCLUDE DISCARDABLE BEGIN "#include ""afxres.h""\r\n" "\0" END -3 TEXTINCLUDE DISCARDABLE +3 TEXTINCLUDE DISCARDABLE BEGIN "\r\n" "\0" @@ -125,8 +125,8 @@ IDC_DROPPER_CURSOR CURSOR DISCARDABLE "dropcurs.cur" // VS_VERSION_INFO VERSIONINFO - FILEVERSION 0, 11, 0, 0 - PRODUCTVERSION 0, 11, 0, 0 + FILEVERSION 0, 12, 0, 0 + PRODUCTVERSION 0, 12, 0, 0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -145,13 +145,13 @@ BEGIN VALUE "Comments", "TECH: \0" VALUE "CompanyName", "Ryzom Core\0" VALUE "FileDescription", "Vertex Tree Paint\0" - VALUE "FileVersion", "0.11.0\0" + VALUE "FileVersion", "0.12.0\0" VALUE "InternalName", "VertexTreePaint\0" VALUE "LegalCopyright", "Copyright © 2000 Nevrax Ltd. Copyright © 1998 Autodesk Inc.\0" VALUE "LegalTrademarks", "The following are registered trademarks of Autodesk, Inc.: 3D Studio MAX. The following are trademarks of Autodesk, Inc.: Kinetix, Kinetix(logo), BIPED, Physique, Character Studio, MAX DWG, DWG Unplugged, Heidi, FLI, FLC, DXF.\0" VALUE "OriginalFilename", "nel_vertex_tree_paint.dlm\0" VALUE "ProductName", "Ryzom Core\0" - VALUE "ProductVersion", "0.11.0\0" + VALUE "ProductVersion", "0.12.0\0" END END BLOCK "VarFileInfo" @@ -179,11 +179,11 @@ IDB_BUTTON_MASK BITMAP DISCARDABLE "buttonmask.bmp" IDD_PANEL DLGINIT BEGIN IDC_COMBO_TYPE, 0x403, 10, 0 -0x6e49, 0x6574, 0x736e, 0x7469, 0x0079, +0x6e49, 0x6574, 0x736e, 0x7469, 0x0079, IDC_COMBO_TYPE, 0x403, 14, 0 -0x6850, 0x7361, 0x2065, 0x654c, 0x6576, 0x206c, 0x0031, +0x6850, 0x7361, 0x2065, 0x654c, 0x6576, 0x206c, 0x0031, IDC_COMBO_TYPE, 0x403, 14, 0 -0x6850, 0x7361, 0x2065, 0x654c, 0x6576, 0x206c, 0x0032, +0x6850, 0x7361, 0x2065, 0x654c, 0x6576, 0x206c, 0x0032, 0 END @@ -193,7 +193,7 @@ END // String Table // -STRINGTABLE DISCARDABLE +STRINGTABLE DISCARDABLE BEGIN IDS_LIBDESCRIPTION "Vertex tree painting modifier (Kinetix/Nel)" IDS_CATEGORY "NeL Tools" diff --git a/code/nel/tools/3d/plugin_max/tile_utility/tile_utility.rc b/code/nel/tools/3d/plugin_max/tile_utility/tile_utility.rc index 80d1d390d..cec8df28b 100644 --- a/code/nel/tools/3d/plugin_max/tile_utility/tile_utility.rc +++ b/code/nel/tools/3d/plugin_max/tile_utility/tile_utility.rc @@ -31,7 +31,7 @@ STYLE WS_CHILD | WS_VISIBLE FONT 8, "MS Sans Serif" BEGIN PUSHBUTTON "Button1",IDC_BANK_PATH,5,5,95,14 - COMBOBOX IDC_LAND,5,25,95,75,CBS_DROPDOWNLIST | CBS_SORT | + COMBOBOX IDC_LAND,5,25,95,75,CBS_DROPDOWNLIST | CBS_SORT | WS_DISABLED | WS_VSCROLL | WS_TABSTOP PUSHBUTTON "Setup material",IDC_SETUP,20,80,70,15,WS_DISABLED LTEXT "Static",IDC_TILE_COUNT1,10,45,85,8 @@ -56,9 +56,9 @@ BEGIN CONTROL "",IDC_MAPON2,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,201, 38,8,10 GROUPBOX "Alpha From:",IDC_STATIC,23,66,89,57 - CONTROL "Map #1",IDC_MULT_ALPHA1,"Button",BS_AUTORADIOBUTTON | + CONTROL "Map #1",IDC_MULT_ALPHA1,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,36,77,41,10 - CONTROL "Map #2",IDC_MULT_ALPHA2,"Button",BS_AUTORADIOBUTTON | + CONTROL "Map #2",IDC_MULT_ALPHA2,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,36,91,41,10 CONTROL "Multiply Alphas",IDC_MULT_ALPHA3,"Button", BS_AUTORADIOBUTTON | WS_TABSTOP,36,106,63,10 @@ -73,7 +73,7 @@ END // #ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO DISCARDABLE +GUIDELINES DESIGNINFO DISCARDABLE BEGIN IDD_PANEL, DIALOG BEGIN @@ -97,18 +97,18 @@ END // TEXTINCLUDE // -1 TEXTINCLUDE DISCARDABLE +1 TEXTINCLUDE DISCARDABLE BEGIN "resource.h\0" END -2 TEXTINCLUDE DISCARDABLE +2 TEXTINCLUDE DISCARDABLE BEGIN "#include ""afxres.h""\r\n" "\0" END -3 TEXTINCLUDE DISCARDABLE +3 TEXTINCLUDE DISCARDABLE BEGIN "\r\n" "\0" @@ -124,8 +124,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 0, 11, 0, 0 - PRODUCTVERSION 0, 11, 0, 0 + FILEVERSION 0, 12, 0, 0 + PRODUCTVERSION 0, 12, 0, 0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -142,12 +142,12 @@ BEGIN BEGIN VALUE "Comments", "Based on Kinetix 3D Studio Max 3.0 plugin sample\0" VALUE "CompanyName", "Ryzom Core\0" - VALUE "FileVersion", "0.11.0\0" + VALUE "FileVersion", "0.12.0\0" VALUE "InternalName", "Tile_utility\0" VALUE "LegalCopyright", "\0" VALUE "OriginalFilename", "Tile_utility.dlu\0" VALUE "ProductName", "Ryzom Core\0" - VALUE "ProductVersion", "0.11.0\0" + VALUE "ProductVersion", "0.12.0\0" VALUE "FileDescription", "Create material for tiles\0" VALUE "Comments", "TECH: \0" VALUE "LegalTrademarks", "\0" @@ -167,7 +167,7 @@ END // String Table // -STRINGTABLE DISCARDABLE +STRINGTABLE DISCARDABLE BEGIN IDS_LIBDESCRIPTION "Create material for tiles" IDS_CATEGORY "Rykol Tools" @@ -177,7 +177,7 @@ BEGIN IDS_COLOR1 "Color 1" END -STRINGTABLE DISCARDABLE +STRINGTABLE DISCARDABLE BEGIN IDS_DS_PHASE "Phase" IDS_DS_AMBIENT "Ambient Color" @@ -185,7 +185,7 @@ BEGIN IDS_DS_SPECULAR "Specular Color" END -STRINGTABLE DISCARDABLE +STRINGTABLE DISCARDABLE BEGIN IDS_DS_WIREFRAME "Wire" IDS_DS_SHININESS "Glossiness" @@ -203,7 +203,7 @@ BEGIN IDS_GRAD_TYPE "Gradient Type" END -STRINGTABLE DISCARDABLE +STRINGTABLE DISCARDABLE BEGIN IDS_JW_MAPENABLES "Map Enables" IDS_DS_THRESH "Position" @@ -223,7 +223,7 @@ BEGIN IDS_DS_ANGLE "Angle" END -STRINGTABLE DISCARDABLE +STRINGTABLE DISCARDABLE BEGIN IDS_DS_COLOR1 "Color 1" IDS_DS_COLOR2 "Color 2" @@ -243,7 +243,7 @@ BEGIN IDS_DS_MIXAMT "Mix Amount" END -STRINGTABLE DISCARDABLE +STRINGTABLE DISCARDABLE BEGIN IDS_DS_SHRINK_ENV "Shrink-wrap Environment" IDS_DS_SCREEN "Screen" @@ -263,7 +263,7 @@ BEGIN IDS_JW_MAPS "Maps" END -STRINGTABLE DISCARDABLE +STRINGTABLE DISCARDABLE BEGIN IDS_JW_MAPAMOUNTS "Map Amounts" IDS_DS_MATTE_SHADOW_PAR "Matte/Shadow Basic Parameters" @@ -280,7 +280,7 @@ BEGIN IDS_JW_SAMPLERBYNAME "Sampler Name" END -STRINGTABLE DISCARDABLE +STRINGTABLE DISCARDABLE BEGIN IDS_DS_NOISEPARMS "Noise Parameters" IDS_DS_MIXPARMS "Mix Parameters" @@ -300,7 +300,7 @@ BEGIN IDS_DS_CYL_ENV "Cylindrical Environment" END -STRINGTABLE DISCARDABLE +STRINGTABLE DISCARDABLE BEGIN IDS_DS_XLABEL "X:" IDS_DS_YLABEL "Y:" @@ -311,7 +311,7 @@ BEGIN IDS_DS_BITMAP_TEXTURE_ERR "Bitmap Texture Error" END -STRINGTABLE DISCARDABLE +STRINGTABLE DISCARDABLE BEGIN IDS_RB_NOISE "Noise" IDS_RB_MULTISUBOBJECT "Multi/Sub-Object" @@ -320,7 +320,7 @@ BEGIN IDS_RB_BACK "Back" END -STRINGTABLE DISCARDABLE +STRINGTABLE DISCARDABLE BEGIN IDS_RB_FACING "Facing" IDS_RB_MASK "Mask" @@ -340,7 +340,7 @@ BEGIN IDS_RB_CENTER2 "Color 2 Position" END -STRINGTABLE DISCARDABLE +STRINGTABLE DISCARDABLE BEGIN IDS_RB_HIGHTHRESHOLD "High Threshold" IDS_RB_LOWTHRESHOLD "Low Threshold" @@ -360,12 +360,12 @@ BEGIN IDS_DS_BOTTOM "Bottom" END -STRINGTABLE DISCARDABLE +STRINGTABLE DISCARDABLE BEGIN IDS_RB_AMOUNT "Amount" END -STRINGTABLE DISCARDABLE +STRINGTABLE DISCARDABLE BEGIN IDS_RB_CURVITURE "Curvature" IDS_RB_AMPLITUDE "Amplitude" @@ -374,13 +374,13 @@ BEGIN IDS_RB_DECAY "Decay" END -STRINGTABLE DISCARDABLE +STRINGTABLE DISCARDABLE BEGIN IDS_RB_LOWTHRESH "Low Threshold" IDS_RB_HIGHTHRESH "High Threshold" END -STRINGTABLE DISCARDABLE +STRINGTABLE DISCARDABLE BEGIN IDS_DS_MARBLE "Marble" IDS_DS_MIX "Mix" @@ -400,7 +400,7 @@ BEGIN IDS_DS_CHECKER "Checker" END -STRINGTABLE DISCARDABLE +STRINGTABLE DISCARDABLE BEGIN IDS_DS_NONE "None" IDS_DS_TRANS "Opacity" @@ -420,12 +420,12 @@ BEGIN IDS_DS_CLIPV "Clip V Offset" END -STRINGTABLE DISCARDABLE +STRINGTABLE DISCARDABLE BEGIN IDS_DS_PARAMCHG "Param Change" END -STRINGTABLE DISCARDABLE +STRINGTABLE DISCARDABLE BEGIN IDS_DS_CLIPW "Clip U Width" IDS_DS_CLIPH "Clip V Width" @@ -445,7 +445,7 @@ BEGIN IDS_DS_FALLOFF "Falloff" END -STRINGTABLE DISCARDABLE +STRINGTABLE DISCARDABLE BEGIN IDS_DS_FALLOFFPARAMS "Falloff Parameters" IDS_DS_PERVAL "Perpendicular Value:" @@ -465,7 +465,7 @@ BEGIN IDS_DS_PLATE_PARAMS "Thin Wall Refraction Parameters" END -STRINGTABLE DISCARDABLE +STRINGTABLE DISCARDABLE BEGIN IDS_DS_THICKFACT "Thickness Offset" IDS_DS_REFRAMT "Bump Map Effect" @@ -485,7 +485,7 @@ BEGIN IDS_DS_GREEN "Green" END -STRINGTABLE DISCARDABLE +STRINGTABLE DISCARDABLE BEGIN IDS_DS_BLUE "Blue" IDS_DS_SOFTEN "Soften Level" @@ -505,7 +505,7 @@ BEGIN IDS_KE_OREN_NAYAR_BLINN "Oren-Nayar-Blinn" END -STRINGTABLE DISCARDABLE +STRINGTABLE DISCARDABLE BEGIN IDS_KE_DIFF_LEVEL "Diffuse Level" IDS_KE_DIFF_ROUGH "Diff. Roughness" @@ -525,7 +525,7 @@ BEGIN IDS_KE_COLOR "Color" END -STRINGTABLE DISCARDABLE +STRINGTABLE DISCARDABLE BEGIN IDS_KE_ANISOTROPY "Anisotropy" IDS_KE_ORIENTATION "Orientation" @@ -545,7 +545,7 @@ BEGIN IDS_KE_GLOSS1 "Glossiness 1" END -STRINGTABLE DISCARDABLE +STRINGTABLE DISCARDABLE BEGIN IDS_KE_GLOSS2 "Glossiness 2" IDS_KE_ANISO1 "Anisotropy 1" @@ -565,7 +565,7 @@ BEGIN IDS_JW_APPLYREFDIM "Apply Reflection Dimming" END -STRINGTABLE DISCARDABLE +STRINGTABLE DISCARDABLE BEGIN IDS_JW_PIXELSAMPLER "Pixel Sampler" IDS_JW_SAMPLERQUAL "Sampler Quality" @@ -585,7 +585,7 @@ BEGIN IDS_RB_BLENDMAT_CDESC "Blend" END -STRINGTABLE DISCARDABLE +STRINGTABLE DISCARDABLE BEGIN IDS_DS_MIX_CDESC "Mix" IDS_DS_FLATMIRROR_CDESC "Flat Mirror" @@ -602,7 +602,7 @@ BEGIN IDS_JW_ADTEXLOCK "Ambient-Diffuse Texture Lock" END -STRINGTABLE DISCARDABLE +STRINGTABLE DISCARDABLE BEGIN IDS_JW_ADLOCK "Ambient-Diffuse Lock" IDS_JW_DSLOCK "Diffuse-Specular Lock" @@ -621,7 +621,7 @@ BEGIN IDS_PW_APPLYATMOS "ApplyAtmosphere" END -STRINGTABLE DISCARDABLE +STRINGTABLE DISCARDABLE BEGIN IDS_PW_ATMOSDEPTH "AtmossphereDepth" IDS_PW_RECEIVESHADOWS "RecieveShadows" @@ -641,7 +641,7 @@ BEGIN IDS_PW_STARTTIME "StartTime" END -STRINGTABLE DISCARDABLE +STRINGTABLE DISCARDABLE BEGIN IDS_PW_PLAYBACK "PlayBackRate" IDS_PW_ENDCONDITION "EndCondition" @@ -661,7 +661,7 @@ BEGIN IDS_PW_APPLYBLUR "ApplyBlur" END -STRINGTABLE DISCARDABLE +STRINGTABLE DISCARDABLE BEGIN IDS_KE_FACETED "Faceted" IDS_KE_ORIENTATION1 "Orientation 1" @@ -680,7 +680,7 @@ BEGIN IDS_PW_MAT "Mat." END -STRINGTABLE DISCARDABLE +STRINGTABLE DISCARDABLE BEGIN IDS_PW_BASE "Base" IDS_DS_USEREFL "UseReflMap" @@ -695,7 +695,7 @@ BEGIN IDS_ACUBIC_SELECT_INPUT_FILE "Select Input Reflection Map" END -STRINGTABLE DISCARDABLE +STRINGTABLE DISCARDABLE BEGIN 65505 "RGB Level" 65506 "RGB Offset" diff --git a/code/nel/tools/3d/tga_2_dds/tga2dds.cpp b/code/nel/tools/3d/tga_2_dds/tga2dds.cpp index 292280349..34b47735f 100644 --- a/code/nel/tools/3d/tga_2_dds/tga2dds.cpp +++ b/code/nel/tools/3d/tga_2_dds/tga2dds.cpp @@ -359,6 +359,27 @@ void dividSize (CBitmap &bitmap) } } +const int bayerDiv8R[4][4] = { + 7, 3, 6, 2, + 1, 5, 0, 4, + 6, 2, 7, 3, + 0, 4, 1, 5, +}; + +const int bayerDiv8G[4][4] = { + 0, 4, 1, 5, + 6, 2, 7, 3, + 1, 5, 0, 4, + 7, 3, 6, 2, +}; + +const int bayerDiv8B[4][4] = { + 5, 1, 4, 0, + 3, 7, 2, 6, + 4, 0, 5, 1, + 2, 6, 3, 7, +}; + // *************************************************************************** int main(int argc, char **argv) { @@ -601,6 +622,26 @@ int main(int argc, char **argv) Reduce--; } + if (algo == TGA16) + { + // Apply bayer dither + CObjectVector &rgba = picSrc.getPixels(0); + const uint32 w = picSrc.getWidth(0); + uint32 x = 0; + uint32 y = 0; + for (uint32 i = 0; i < rgba.size(); i += 4) + { + NLMISC::CRGBA &c = reinterpret_cast(rgba[i]); + c.R = (uint8)std::min(255, (int)c.R + bayerDiv8R[x % 4][y % 4]); + c.G = (uint8)std::min(255, (int)c.G + bayerDiv8G[x % 4][y % 4]); + c.B = (uint8)std::min(255, (int)c.B + bayerDiv8B[x % 4][y % 4]); + ++x; + x %= w; + if (x == 0) + ++y; + } + } + // 8 or 16 bits TGA or PNG ? if ((algo == TGA16) || (algo == TGA8) || (algo == PNG16) || (algo == PNG8)) { diff --git a/code/nel/tools/CMakeLists.txt b/code/nel/tools/CMakeLists.txt index 2c1f641a0..0e1c5709d 100644 --- a/code/nel/tools/CMakeLists.txt +++ b/code/nel/tools/CMakeLists.txt @@ -1,4 +1,3 @@ - # Don't add other subdirectories if only max plugins are selected. IF(WITH_NEL_TOOLS) ADD_SUBDIRECTORY(misc) diff --git a/code/nel/tools/build_gamedata/generators/max_exporter_scripts/clod.ms b/code/nel/tools/build_gamedata/generators/max_exporter_scripts/clod.ms index 68c8455d6..1a947f7d6 100755 --- a/code/nel/tools/build_gamedata/generators/max_exporter_scripts/clod.ms +++ b/code/nel/tools/build_gamedata/generators/max_exporter_scripts/clod.ms @@ -49,6 +49,7 @@ fn runNelMaxExport inputMaxFile = tagThisFile = true -- Unhide category + unhidelayers() unhidecategory() -- Unhide diff --git a/code/nel/tools/build_gamedata/generators/max_exporter_scripts/ig.ms b/code/nel/tools/build_gamedata/generators/max_exporter_scripts/ig.ms index df0ecf7fc..43a05abcc 100755 --- a/code/nel/tools/build_gamedata/generators/max_exporter_scripts/ig.ms +++ b/code/nel/tools/build_gamedata/generators/max_exporter_scripts/ig.ms @@ -54,6 +54,7 @@ fn runNelMaxExport inputMaxFile = tagThisFile = true -- Unhide category + unhidelayers() unhidecategory() -- Unhide diff --git a/code/nel/tools/build_gamedata/generators/max_exporter_scripts/shape.ms b/code/nel/tools/build_gamedata/generators/max_exporter_scripts/shape.ms index d8d6c8d9d..cfb51d0e0 100755 --- a/code/nel/tools/build_gamedata/generators/max_exporter_scripts/shape.ms +++ b/code/nel/tools/build_gamedata/generators/max_exporter_scripts/shape.ms @@ -187,11 +187,14 @@ fn haveCoarseMesh node = return false ) +fn getRoot node = if isvalidnode node.parent then getRoot node.parent else node + fn runNelMaxExportSub inputMaxFile retryCount = ( tagThisFile = false -- Unhide category + unhidelayers() unhidecategory() -- Unhide @@ -273,55 +276,51 @@ fn runNelMaxExportSub inputMaxFile retryCount = -- For each node for node in array_node do ( - -- It is root ? - if (node.parent == undefined) then + -- Is not a skeleton ? + if (((substring node.name 1 3) != "Bip") and ((substring (getRoot node).name 1 3) != "Bip")) then ( - -- Is not a skeleton ? - if (node.name != "Bip01") then + -- Can be exported ? + if (isToBeExported node == true) then ( - -- Can be exported ? - if (isToBeExported node == true) then + -- Not a lod ? + if ((isLod node) == false) then ( - -- Not a lod ? - if ((isLod node) == false) then + -- Output directory + if (haveCoarseMesh node) == true then + output = ("%OutputDirectoryWithCoarseMesh%/" + (node.name) + ".shape") + else + output = ("%OutputDirectoryWithoutCoarseMesh%/" + (node.name) + ".shape") + + -- Compare file date + if (NeLTestFileDate output inputMaxFile) == true then ( - -- Output directory - if (haveCoarseMesh node) == true then - output = ("%OutputDirectoryWithCoarseMesh%/" + (node.name) + ".shape") - else - output = ("%OutputDirectoryWithoutCoarseMesh%/" + (node.name) + ".shape") - - -- Compare file date - if (NeLTestFileDate output inputMaxFile) == true then + try ( - try + -- Export the shape + if (NelExportShapeEx node output %ShapeExportOptShadow% %ShapeExportOptExportLighting% "%OutputDirectoryLightmap%" %ShapeExportOptLightingLimit% %ShapeExportOptLumelSize% %ShapeExportOptOversampling% true false %ShapeExportOptLightmapLog%) == true then ( - -- Export the shape - if (NelExportShapeEx node output %ShapeExportOptShadow% %ShapeExportOptExportLighting% "%OutputDirectoryLightmap%" %ShapeExportOptLightingLimit% %ShapeExportOptLumelSize% %ShapeExportOptOversampling% true false %ShapeExportOptLightmapLog%) == true then - ( - nlerror("OK "+output) - exported = exported +1 - ) - else - ( - -- Error - nlerror("ERROR exporting shape " + node.name + " in file " + inputMaxFile) - tagThisFile = false - ) + nlerror("OK "+output) + exported = exported +1 ) - catch + else ( -- Error - nlerror("ERROR fatal error exporting shape " + node.name + " in file " + inputMaxFile) + nlerror("ERROR exporting shape " + node.name + " in file " + inputMaxFile) tagThisFile = false ) ) - else + catch ( - nlerror("SKIPPED " + output) - exported = exported + 1 + -- Error + nlerror("ERROR fatal error exporting shape " + node.name + " in file " + inputMaxFile) + tagThisFile = false ) ) + else + ( + nlerror("SKIPPED " + output) + exported = exported + 1 + ) ) ) ) diff --git a/code/nel/tools/build_gamedata/generators/max_exporter_scripts/veget.ms b/code/nel/tools/build_gamedata/generators/max_exporter_scripts/veget.ms index 22c49013a..614a9a94f 100755 --- a/code/nel/tools/build_gamedata/generators/max_exporter_scripts/veget.ms +++ b/code/nel/tools/build_gamedata/generators/max_exporter_scripts/veget.ms @@ -39,6 +39,7 @@ fn runNelMaxExport inputMaxFile = tagThisFile = true -- Unhide category + unhidelayers() unhidecategory() -- Unhide diff --git a/code/nel/tools/build_gamedata/generators/simple_max_exporter_template/export_header.ms b/code/nel/tools/build_gamedata/generators/simple_max_exporter_template/export_header.ms index 2d5e5434f..f06bab786 100755 --- a/code/nel/tools/build_gamedata/generators/simple_max_exporter_template/export_header.ms +++ b/code/nel/tools/build_gamedata/generators/simple_max_exporter_template/export_header.ms @@ -13,6 +13,16 @@ nlErrorStream = openFile nlErrorFilename mode:"a" if nlErrorStream == undefined then nlErrorStream = createFile nlErrorFilename +-- Unhide layers +fn unhidelayers = +( + for i = 0 to (LayerManager.count - 1) do + ( + layer = (LayerManager.getLayer i) + layer.ishidden = false + ) +) + -- Unhide category fn unhidecategory = ( diff --git a/code/nel/tools/build_gamedata/generators/tagged_max_exporter_template/export_header.ms b/code/nel/tools/build_gamedata/generators/tagged_max_exporter_template/export_header.ms index 03bfea443..a7b97a064 100755 --- a/code/nel/tools/build_gamedata/generators/tagged_max_exporter_template/export_header.ms +++ b/code/nel/tools/build_gamedata/generators/tagged_max_exporter_template/export_header.ms @@ -16,6 +16,16 @@ nlErrorStream = openFile nlErrorFilename mode:"a" if nlErrorStream == undefined then nlErrorStream = createFile nlErrorFilename +-- Unhide layers +fn unhidelayers = +( + for i = 0 to (LayerManager.count - 1) do + ( + layer = (LayerManager.getLayer i) + layer.ishidden = false + ) +) + -- Unhide category fn unhidecategory = ( diff --git a/code/nel/tools/build_gamedata/processes/anim/1_export.py b/code/nel/tools/build_gamedata/processes/anim/1_export.py index 4c51fc261..1745c45a9 100755 --- a/code/nel/tools/build_gamedata/processes/anim/1_export.py +++ b/code/nel/tools/build_gamedata/processes/anim/1_export.py @@ -6,7 +6,7 @@ # # \file 1_export.py # \brief Export anim -# \date 2011-09-21-20-51-GMT +# \date 2015-01-06-16-31-GMT # \author Jan Boon (Kaetemi) # Python port of game data build pipeline. # Export anim diff --git a/code/nel/tools/build_gamedata/processes/anim/maxscript/anim_export.ms b/code/nel/tools/build_gamedata/processes/anim/maxscript/anim_export.ms index 7121e16d5..fc1eda5f9 100755 --- a/code/nel/tools/build_gamedata/processes/anim/maxscript/anim_export.ms +++ b/code/nel/tools/build_gamedata/processes/anim/maxscript/anim_export.ms @@ -16,6 +16,16 @@ nlErrorStream = openFile nlErrorFilename mode:"a" if nlErrorStream == undefined then nlErrorStream = createFile nlErrorFilename +-- Unhide layers +fn unhidelayers = +( + for i = 0 to (LayerManager.count - 1) do + ( + layer = (LayerManager.getLayer i) + layer.ishidden = false + ) +) + -- Unhide category fn unhidecategory = ( diff --git a/code/nel/tools/build_gamedata/processes/clodbank/1_export.py b/code/nel/tools/build_gamedata/processes/clodbank/1_export.py index 64cd875df..c73a86ac7 100755 --- a/code/nel/tools/build_gamedata/processes/clodbank/1_export.py +++ b/code/nel/tools/build_gamedata/processes/clodbank/1_export.py @@ -6,7 +6,7 @@ # # \file 1_export.py # \brief Export clodbank -# \date 2011-09-21-20-51-GMT +# \date 2015-01-06-16-31-GMT # \author Jan Boon (Kaetemi) # Python port of game data build pipeline. # Export clodbank diff --git a/code/nel/tools/build_gamedata/processes/clodbank/maxscript/clod_export.ms b/code/nel/tools/build_gamedata/processes/clodbank/maxscript/clod_export.ms index a8693dc8a..02856d2c7 100755 --- a/code/nel/tools/build_gamedata/processes/clodbank/maxscript/clod_export.ms +++ b/code/nel/tools/build_gamedata/processes/clodbank/maxscript/clod_export.ms @@ -16,6 +16,16 @@ nlErrorStream = openFile nlErrorFilename mode:"a" if nlErrorStream == undefined then nlErrorStream = createFile nlErrorFilename +-- Unhide layers +fn unhidelayers = +( + for i = 0 to (LayerManager.count - 1) do + ( + layer = (LayerManager.getLayer i) + layer.ishidden = false + ) +) + -- Unhide category fn unhidecategory = ( @@ -115,6 +125,7 @@ fn runNelMaxExport inputMaxFile = tagThisFile = true -- Unhide category + unhidelayers() unhidecategory() -- Unhide diff --git a/code/nel/tools/build_gamedata/processes/ig/maxscript/ig_export.ms b/code/nel/tools/build_gamedata/processes/ig/maxscript/ig_export.ms index 65cb38c4a..e91732391 100755 --- a/code/nel/tools/build_gamedata/processes/ig/maxscript/ig_export.ms +++ b/code/nel/tools/build_gamedata/processes/ig/maxscript/ig_export.ms @@ -16,6 +16,16 @@ nlErrorStream = openFile nlErrorFilename mode:"a" if nlErrorStream == undefined then nlErrorStream = createFile nlErrorFilename +-- Unhide layers +fn unhidelayers = +( + for i = 0 to (LayerManager.count - 1) do + ( + layer = (LayerManager.getLayer i) + layer.ishidden = false + ) +) + -- Unhide category fn unhidecategory = ( @@ -120,6 +130,7 @@ fn runNelMaxExport inputMaxFile = tagThisFile = true -- Unhide category + unhidelayers() unhidecategory() -- Unhide diff --git a/code/nel/tools/build_gamedata/processes/ligo/maxscript/nel_ligo_export.ms b/code/nel/tools/build_gamedata/processes/ligo/maxscript/nel_ligo_export.ms index 933468459..07d032809 100755 --- a/code/nel/tools/build_gamedata/processes/ligo/maxscript/nel_ligo_export.ms +++ b/code/nel/tools/build_gamedata/processes/ligo/maxscript/nel_ligo_export.ms @@ -17,6 +17,16 @@ NEL3D_APPDATA_IGNAME = 1423062564 -- string : name of the Instance Group tagThisFile = true +-- Unhide layers +fn unhidelayers = +( + for i = 0 to (LayerManager.count - 1) do + ( + layer = (LayerManager.getLayer i) + layer.ishidden = false + ) +) + -- Unhide category fn unhidecategory = ( @@ -307,6 +317,10 @@ fn buildTransitionMatrixObj mt transitionZone cellSize = -- Export instance groups from the current loaded zone fn exportInstanceGroupFromZone inputFile outputPath igName transitionZone cellSize = ( + -- Unhide category + unhidelayers() + unhidecategory() + -- Unhide max unhide all @@ -501,6 +515,7 @@ try objXRefMgr.UpdateAllRecords() -- Unhide category + unhidelayers() unhidecategory() DeleteDebugMarkersFn () @@ -648,6 +663,7 @@ try objXRefMgr.UpdateAllRecords() -- Unhide category + unhidelayers() unhidecategory() DeleteDebugMarkersFn () @@ -863,6 +879,7 @@ try objXRefMgr.UpdateAllRecords() -- Unhide category + unhidelayers() unhidecategory() DeleteDebugMarkersFn () diff --git a/code/nel/tools/build_gamedata/processes/pacs_prim/1_export.py b/code/nel/tools/build_gamedata/processes/pacs_prim/1_export.py index 4fb464704..cfb46635f 100755 --- a/code/nel/tools/build_gamedata/processes/pacs_prim/1_export.py +++ b/code/nel/tools/build_gamedata/processes/pacs_prim/1_export.py @@ -6,7 +6,7 @@ # # \file 1_export.py # \brief Export pacs_prim -# \date 2013-07-24-14-21-GMT +# \date 2015-01-06-16-31-GMT # \author Jan Boon (Kaetemi) # Python port of game data build pipeline. # Export pacs_prim @@ -130,6 +130,13 @@ if MaxAvailable: +# Remove bad file from previous script version +listPath = ExportBuildDirectory + "/" + PacsPrimExportDirectory + "/landscape_col_prim_pacs_list.txt" +if os.path.isfile(listPath): + os.remove(listPath) + + + log.close() if os.path.isfile("log.log"): os.remove("log.log") diff --git a/code/nel/tools/build_gamedata/processes/pacs_prim/maxscript/pacs_prim_export.ms b/code/nel/tools/build_gamedata/processes/pacs_prim/maxscript/pacs_prim_export.ms index 750af80d9..d0d7c7ce4 100755 --- a/code/nel/tools/build_gamedata/processes/pacs_prim/maxscript/pacs_prim_export.ms +++ b/code/nel/tools/build_gamedata/processes/pacs_prim/maxscript/pacs_prim_export.ms @@ -16,6 +16,16 @@ nlErrorStream = openFile nlErrorFilename mode:"a" if nlErrorStream == undefined then nlErrorStream = createFile nlErrorFilename +-- Unhide layers +fn unhidelayers = +( + for i = 0 to (LayerManager.count - 1) do + ( + layer = (LayerManager.getLayer i) + layer.ishidden = false + ) +) + -- Unhide category fn unhidecategory = ( diff --git a/code/nel/tools/build_gamedata/processes/rbank/1_export.py b/code/nel/tools/build_gamedata/processes/rbank/1_export.py index 4b5667961..65c14c907 100755 --- a/code/nel/tools/build_gamedata/processes/rbank/1_export.py +++ b/code/nel/tools/build_gamedata/processes/rbank/1_export.py @@ -6,7 +6,7 @@ # # \file 1_export.py # \brief Export rbank -# \date 2011-09-21-20-51-GMT +# \date 2015-01-06-16-31-GMT # \author Jan Boon (Kaetemi) # Python port of game data build pipeline. # Export rbank diff --git a/code/nel/tools/build_gamedata/processes/rbank/maxscript/cmb_export.ms b/code/nel/tools/build_gamedata/processes/rbank/maxscript/cmb_export.ms index 59b444db3..4949f7c60 100755 --- a/code/nel/tools/build_gamedata/processes/rbank/maxscript/cmb_export.ms +++ b/code/nel/tools/build_gamedata/processes/rbank/maxscript/cmb_export.ms @@ -16,6 +16,16 @@ nlErrorStream = openFile nlErrorFilename mode:"a" if nlErrorStream == undefined then nlErrorStream = createFile nlErrorFilename +-- Unhide layers +fn unhidelayers = +( + for i = 0 to (LayerManager.count - 1) do + ( + layer = (LayerManager.getLayer i) + layer.ishidden = false + ) +) + -- Unhide category fn unhidecategory = ( diff --git a/code/nel/tools/build_gamedata/processes/shape/maxscript/shape_export.ms b/code/nel/tools/build_gamedata/processes/shape/maxscript/shape_export.ms index 16c6dcec9..f97419aa7 100755 --- a/code/nel/tools/build_gamedata/processes/shape/maxscript/shape_export.ms +++ b/code/nel/tools/build_gamedata/processes/shape/maxscript/shape_export.ms @@ -16,6 +16,16 @@ nlErrorStream = openFile nlErrorFilename mode:"a" if nlErrorStream == undefined then nlErrorStream = createFile nlErrorFilename +-- Unhide layers +fn unhidelayers = +( + for i = 0 to (LayerManager.count - 1) do + ( + layer = (LayerManager.getLayer i) + layer.ishidden = false + ) +) + -- Unhide category fn unhidecategory = ( @@ -253,11 +263,14 @@ fn haveCoarseMesh node = return false ) +fn getRoot node = if isvalidnode node.parent then getRoot node.parent else node + fn runNelMaxExportSub inputMaxFile retryCount = ( tagThisFile = false -- Unhide category + unhidelayers() unhidecategory() -- Unhide @@ -339,55 +352,51 @@ fn runNelMaxExportSub inputMaxFile retryCount = -- For each node for node in array_node do ( - -- It is root ? - if (node.parent == undefined) then + -- Is not a skeleton ? + if (((substring node.name 1 3) != "Bip") and ((substring (getRoot node).name 1 3) != "Bip")) then ( - -- Is not a skeleton ? - if (node.name != "Bip01") then + -- Can be exported ? + if (isToBeExported node == true) then ( - -- Can be exported ? - if (isToBeExported node == true) then + -- Not a lod ? + if ((isLod node) == false) then ( - -- Not a lod ? - if ((isLod node) == false) then + -- Output directory + if (haveCoarseMesh node) == true then + output = ("%OutputDirectoryWithCoarseMesh%/" + (node.name) + ".shape") + else + output = ("%OutputDirectoryWithoutCoarseMesh%/" + (node.name) + ".shape") + + -- Compare file date + if (NeLTestFileDate output inputMaxFile) == true then ( - -- Output directory - if (haveCoarseMesh node) == true then - output = ("%OutputDirectoryWithCoarseMesh%/" + (node.name) + ".shape") - else - output = ("%OutputDirectoryWithoutCoarseMesh%/" + (node.name) + ".shape") - - -- Compare file date - if (NeLTestFileDate output inputMaxFile) == true then + try ( - try + -- Export the shape + if (NelExportShapeEx node output %ShapeExportOptShadow% %ShapeExportOptExportLighting% "%OutputDirectoryLightmap%" %ShapeExportOptLightingLimit% %ShapeExportOptLumelSize% %ShapeExportOptOversampling% true false %ShapeExportOptLightmapLog%) == true then ( - -- Export the shape - if (NelExportShapeEx node output %ShapeExportOptShadow% %ShapeExportOptExportLighting% "%OutputDirectoryLightmap%" %ShapeExportOptLightingLimit% %ShapeExportOptLumelSize% %ShapeExportOptOversampling% true false %ShapeExportOptLightmapLog%) == true then - ( - nlerror("OK "+output) - exported = exported +1 - ) - else - ( - -- Error - nlerror("ERROR exporting shape " + node.name + " in file " + inputMaxFile) - tagThisFile = false - ) + nlerror("OK "+output) + exported = exported +1 ) - catch + else ( -- Error - nlerror("ERROR fatal error exporting shape " + node.name + " in file " + inputMaxFile) + nlerror("ERROR exporting shape " + node.name + " in file " + inputMaxFile) tagThisFile = false ) ) - else + catch ( - nlerror("SKIPPED " + output) - exported = exported + 1 + -- Error + nlerror("ERROR fatal error exporting shape " + node.name + " in file " + inputMaxFile) + tagThisFile = false ) ) + else + ( + nlerror("SKIPPED " + output) + exported = exported + 1 + ) ) ) ) diff --git a/code/nel/tools/build_gamedata/processes/skel/1_export.py b/code/nel/tools/build_gamedata/processes/skel/1_export.py index 5f065fe5d..dcf336dbd 100755 --- a/code/nel/tools/build_gamedata/processes/skel/1_export.py +++ b/code/nel/tools/build_gamedata/processes/skel/1_export.py @@ -6,7 +6,7 @@ # # \file 1_export.py # \brief Export skel -# \date 2011-09-28-07-42-GMT +# \date 2015-01-06-16-31-GMT # \author Jan Boon (Kaetemi) # Python port of game data build pipeline. # Export skel diff --git a/code/nel/tools/build_gamedata/processes/skel/maxscript/skel_export.ms b/code/nel/tools/build_gamedata/processes/skel/maxscript/skel_export.ms index 7fd2af0fb..74440350b 100755 --- a/code/nel/tools/build_gamedata/processes/skel/maxscript/skel_export.ms +++ b/code/nel/tools/build_gamedata/processes/skel/maxscript/skel_export.ms @@ -13,6 +13,16 @@ nlErrorStream = openFile nlErrorFilename mode:"a" if nlErrorStream == undefined then nlErrorStream = createFile nlErrorFilename +-- Unhide layers +fn unhidelayers = +( + for i = 0 to (LayerManager.count - 1) do + ( + layer = (LayerManager.getLayer i) + layer.ishidden = false + ) +) + -- Unhide category fn unhidecategory = ( diff --git a/code/nel/tools/build_gamedata/processes/swt/1_export.py b/code/nel/tools/build_gamedata/processes/swt/1_export.py index 0803f1246..820950fe5 100755 --- a/code/nel/tools/build_gamedata/processes/swt/1_export.py +++ b/code/nel/tools/build_gamedata/processes/swt/1_export.py @@ -6,7 +6,7 @@ # # \file 1_export.py # \brief Export swt -# \date 2011-09-28-07-42-GMT +# \date 2015-01-06-16-31-GMT # \author Jan Boon (Kaetemi) # Python port of game data build pipeline. # Export swt diff --git a/code/nel/tools/build_gamedata/processes/swt/maxscript/swt_export.ms b/code/nel/tools/build_gamedata/processes/swt/maxscript/swt_export.ms index ea6ff95c3..99d684ea3 100755 --- a/code/nel/tools/build_gamedata/processes/swt/maxscript/swt_export.ms +++ b/code/nel/tools/build_gamedata/processes/swt/maxscript/swt_export.ms @@ -13,6 +13,16 @@ nlErrorStream = openFile nlErrorFilename mode:"a" if nlErrorStream == undefined then nlErrorStream = createFile nlErrorFilename +-- Unhide layers +fn unhidelayers = +( + for i = 0 to (LayerManager.count - 1) do + ( + layer = (LayerManager.getLayer i) + layer.ishidden = false + ) +) + -- Unhide category fn unhidecategory = ( diff --git a/code/nel/tools/build_gamedata/processes/veget/1_export.py b/code/nel/tools/build_gamedata/processes/veget/1_export.py index b2f8a7c57..ae8b835a3 100755 --- a/code/nel/tools/build_gamedata/processes/veget/1_export.py +++ b/code/nel/tools/build_gamedata/processes/veget/1_export.py @@ -6,7 +6,7 @@ # # \file 1_export.py # \brief Export veget -# \date 2011-09-21-20-51-GMT +# \date 2015-01-06-16-31-GMT # \author Jan Boon (Kaetemi) # Python port of game data build pipeline. # Export veget diff --git a/code/nel/tools/build_gamedata/processes/veget/maxscript/veget_export.ms b/code/nel/tools/build_gamedata/processes/veget/maxscript/veget_export.ms index cbc2f2177..1b8154530 100755 --- a/code/nel/tools/build_gamedata/processes/veget/maxscript/veget_export.ms +++ b/code/nel/tools/build_gamedata/processes/veget/maxscript/veget_export.ms @@ -16,6 +16,16 @@ nlErrorStream = openFile nlErrorFilename mode:"a" if nlErrorStream == undefined then nlErrorStream = createFile nlErrorFilename +-- Unhide layers +fn unhidelayers = +( + for i = 0 to (LayerManager.count - 1) do + ( + layer = (LayerManager.getLayer i) + layer.ishidden = false + ) +) + -- Unhide category fn unhidecategory = ( @@ -105,6 +115,7 @@ fn runNelMaxExport inputMaxFile = tagThisFile = true -- Unhide category + unhidelayers() unhidecategory() -- Unhide diff --git a/code/nel/tools/build_gamedata/processes/zone/1_export.py b/code/nel/tools/build_gamedata/processes/zone/1_export.py index 94a90900c..acffe9abb 100755 --- a/code/nel/tools/build_gamedata/processes/zone/1_export.py +++ b/code/nel/tools/build_gamedata/processes/zone/1_export.py @@ -6,7 +6,7 @@ # # \file 1_export.py # \brief Export zone -# \date 2011-09-28-07-42-GMT +# \date 2015-01-06-16-31-GMT # \author Jan Boon (Kaetemi) # Python port of game data build pipeline. # Export zone diff --git a/code/nel/tools/build_gamedata/processes/zone/maxscript/zone_export.ms b/code/nel/tools/build_gamedata/processes/zone/maxscript/zone_export.ms index 3a0ebf8fe..6c4e0c8a0 100755 --- a/code/nel/tools/build_gamedata/processes/zone/maxscript/zone_export.ms +++ b/code/nel/tools/build_gamedata/processes/zone/maxscript/zone_export.ms @@ -13,6 +13,16 @@ nlErrorStream = openFile nlErrorFilename mode:"a" if nlErrorStream == undefined then nlErrorStream = createFile nlErrorFilename +-- Unhide layers +fn unhidelayers = +( + for i = 0 to (LayerManager.count - 1) do + ( + layer = (LayerManager.getLayer i) + layer.ishidden = false + ) +) + -- Unhide category fn unhidecategory = ( diff --git a/code/nel/tools/build_gamedata/sky_dev.bat b/code/nel/tools/build_gamedata/sky_dev.bat new file mode 100644 index 000000000..ac80d591e --- /dev/null +++ b/code/nel/tools/build_gamedata/sky_dev.bat @@ -0,0 +1,11 @@ +title Ryzom Core: 1_export.py (LEVELDESIGN) +1_export.py -ipj common/sky common/sfx common/gamedev common/data_common common/data_shard common/leveldesign common/exedll common/cfg shard/data_shard shard/data_language shard/data_leveldesign shard/data_game_share +title Ryzom Core: 2_build.py (LEVELDESIGN) +2_build.py -ipj common/sky common/sfx common/gamedev common/data_common common/data_shard common/leveldesign common/exedll common/cfg shard/data_shard shard/data_language shard/data_leveldesign shard/data_game_share +title Ryzom Core: 3_install.py (LEVELDESIGN) +3_install.py -ipj common/sky common/sfx common/gamedev common/data_common common/data_shard common/leveldesign common/exedll common/cfg shard/data_shard shard/data_language shard/data_leveldesign shard/data_game_share +title Ryzom Core: b1_client_dev.py (LEVELDESIGN) +b1_client_dev.py +title Ryzom Core: b2_shard_data.py (LEVELDESIGN) +b2_shard_data.py +title Ryzom Core: Ready diff --git a/code/nel/tools/misc/CMakeLists.txt b/code/nel/tools/misc/CMakeLists.txt index 76399f6a3..72e3151cc 100644 --- a/code/nel/tools/misc/CMakeLists.txt +++ b/code/nel/tools/misc/CMakeLists.txt @@ -3,6 +3,7 @@ SUBDIRS(bnp_make snp_make disp_sheet_id extract_filename lock make_sheet_id xml_ IF(WITH_QT) ADD_SUBDIRECTORY(words_dic_qt) ADD_SUBDIRECTORY(message_box_qt) + ADD_SUBDIRECTORY(crash_report) ENDIF(WITH_QT) IF(WIN32) diff --git a/code/nel/tools/misc/crash_report/CMakeLists.txt b/code/nel/tools/misc/crash_report/CMakeLists.txt new file mode 100644 index 000000000..0e2d2a9bc --- /dev/null +++ b/code/nel/tools/misc/crash_report/CMakeLists.txt @@ -0,0 +1,39 @@ +INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SRC_DIR} ${QT_INCLUDES}) +FILE(GLOB CRASHREPORT_SRC *.cpp) +FILE(GLOB CRASHREPORT_HDR *h) + +SET(CRASHREPORT_MOC_HDR +crash_report_socket.h +crash_report_widget.h +) + +SET(CRASHREPORT_UI +crash_report_widget.ui +) + +SET(QT_USE_QTGUI TRUE) +SET(QT_USE_QTNETWORK TRUE) +SET(QT_USE_QTMAIN TRUE) +SET(QT_USE_QTOPENGL FALSE) +SET(QT_USE_QTXML FALSE) + +INCLUDE(${QT_USE_FILE}) +ADD_DEFINITIONS(${QT_DEFINITIONS}) + +QT4_WRAP_CPP(CRASHREPORT_MOC_SRC ${CRASHREPORT_MOC_HDR}) +QT4_WRAP_UI(CRASHREPORT_UI_HDR ${CRASHREPORT_UI}) + +SOURCE_GROUP(QtResources FILES ${CRASHREPORT_UI}) +SOURCE_GROUP(QtGeneratedUiHdr FILES ${CRASHREPORT_UI_HDR}) +SOURCE_GROUP(QtGeneratedMocQrcSrc FILES ${CRASHREPORT_MOC_SRC}) +SOURCE_GROUP("source files" FILES ${CRASHREPORT_SRC}) +SOURCE_GROUP("header files" FILES ${CRASHREPORT_HDR}) + +ADD_EXECUTABLE(crash_report WIN32 MACOSX_BUNDLE ${CRASHREPORT_SRC} ${CRASHREPORT_MOC_HDR} ${CRASHREPORT_MOC_SRC} ${CRASHREPORT_UI_HDR}) +TARGET_LINK_LIBRARIES(crash_report ${QT_LIBRARIES} ${QT_QTMAIN_LIBRARY}) + +NL_DEFAULT_PROPS(crash_report "NeL, Tools, Misc: Crash Report") +NL_ADD_RUNTIME_FLAGS(crash_report) + +INSTALL(TARGETS crash_report RUNTIME DESTINATION ${NL_BIN_PREFIX}) + diff --git a/code/nel/tools/misc/crash_report/crash_report.cpp b/code/nel/tools/misc/crash_report/crash_report.cpp new file mode 100644 index 000000000..c42f1ae6f --- /dev/null +++ b/code/nel/tools/misc/crash_report/crash_report.cpp @@ -0,0 +1,111 @@ +// Nel MMORPG framework - Error Reporter +// +// Copyright (C) 2015 Laszlo Kis-Adam +// Copyright (C) 2010 Ryzom Core +// +// 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 . + + +#include "crash_report_widget.h" +#include +#include + +#include +#include +#include + +class CCmdLineParser +{ +public: + static void parse( int argc, char **argv, std::vector< std::pair< std::string, std::string > > &v ) + { + std::stack< std::string > stack; + std::string key; + std::string value; + + for( int i = argc - 1 ; i >= 0; i-- ) + { + stack.push( std::string( argv[ i ] ) ); + } + + while( !stack.empty() ) + { + key = stack.top(); + stack.pop(); + + // If not a real parameter ( they start with '-' ), discard. + if( key[ 0 ] != '-' ) + continue; + + // Remove the '-' + key = key.substr( 1 ); + + // No more parameters + if( stack.empty() ) + { + v.push_back( std::make_pair( key, "" ) ); + break; + } + + value = stack.top(); + + // If next parameter is a key, process it in the next iteration + if( value[ 0 ] == '-' ) + { + v.push_back( std::make_pair( key, "" ) ); + continue; + } + // Otherwise store the pair + else + { + v.push_back( std::make_pair( key, value ) ); + stack.pop(); + } + } + } +}; + +int main( int argc, char **argv ) +{ +#ifndef WIN32 + // Workaround to default -style=gtk+ on recent Cinnamon versions + char *currentDesktop = getenv("XDG_CURRENT_DESKTOP"); + if (currentDesktop) + { + printf("XDG_CURRENT_DESKTOP: %s\n", currentDesktop); + if (!strcmp(currentDesktop, "X-Cinnamon")) + { + setenv("XDG_CURRENT_DESKTOP", "gnome", 1); + } + } +#endif + + QApplication app( argc, argv ); + + std::vector< std::pair< std::string, std::string > > params; + + CCmdLineParser::parse( argc, argv, params ); + + CCrashReportWidget w; + w.setup( params ); + w.show(); + + int ret = app.exec(); + + if( ret != EXIT_SUCCESS ) + return ret; + else + return w.getReturnValue(); + +} \ No newline at end of file diff --git a/code/nel/tools/misc/crash_report/crash_report_data.h b/code/nel/tools/misc/crash_report/crash_report_data.h new file mode 100644 index 000000000..5884e7eb4 --- /dev/null +++ b/code/nel/tools/misc/crash_report/crash_report_data.h @@ -0,0 +1,33 @@ +// Ryzom Core MMORPG framework - Error Reporter +// +// Copyright (C) 2015 Laszlo Kis-Adam +// Copyright (C) 2010 Ryzom Core +// +// 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 . + + +#ifndef RCERROR_DATA +#define RCERROR_DATA + +#include + + +struct SCrashReportData +{ + QString description; + QString report; + QString email; +}; + +#endif diff --git a/code/nel/tools/misc/crash_report/crash_report_socket.cpp b/code/nel/tools/misc/crash_report/crash_report_socket.cpp new file mode 100644 index 000000000..f2a14e84b --- /dev/null +++ b/code/nel/tools/misc/crash_report/crash_report_socket.cpp @@ -0,0 +1,78 @@ +// Nel MMORPG framework - Error Reporter +// +// Copyright (C) 2015 Laszlo Kis-Adam +// Copyright (C) 2010 Ryzom Core +// +// 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 . + +#include "crash_report_socket.h" +#include +#include +#include +#include +#if QT_VERSION >= QT_VERSION_CHECK(5,0,0) +# include +#endif + +class CCrashReportSocketPvt +{ +public: + QNetworkAccessManager mgr; +}; + +CCrashReportSocket::CCrashReportSocket( QObject *parent ) : +QObject( parent ) +{ + m_pvt = new CCrashReportSocketPvt(); + + connect( &m_pvt->mgr, SIGNAL( finished( QNetworkReply* ) ), this, SLOT( onFinished( QNetworkReply* ) ) ); +} + +CCrashReportSocket::~CCrashReportSocket() +{ + delete m_pvt; +} + +void CCrashReportSocket::sendReport( const SCrashReportData &data ) +{ +#if QT_VERSION >= QT_VERSION_CHECK(5,0,0) + QUrlQuery params; +#else + QUrl params; +#endif + params.addQueryItem( "report", data.report ); + params.addQueryItem( "descr", data.description ); + params.addQueryItem("email", data.email); + + QUrl url( m_url ); + QNetworkRequest request( url ); + request.setRawHeader( "Connection", "close" ); + +#if QT_VERSION >= QT_VERSION_CHECK(5,0,0) + QByteArray postData = params.query(QUrl::FullyEncoded).toUtf8(); +#else + QByteArray postData = params.encodedQuery(); +#endif + + m_pvt->mgr.post(request, postData); +} + +void CCrashReportSocket::onFinished( QNetworkReply *reply ) +{ + if( reply->error() != QNetworkReply::NoError ) + Q_EMIT reportFailed(); + else + Q_EMIT reportSent(); +} + diff --git a/code/nel/tools/misc/crash_report/crash_report_socket.h b/code/nel/tools/misc/crash_report/crash_report_socket.h new file mode 100644 index 000000000..32ccc5da0 --- /dev/null +++ b/code/nel/tools/misc/crash_report/crash_report_socket.h @@ -0,0 +1,55 @@ +// Nel MMORPG framework - Error Reporter +// +// Copyright (C) 2015 Laszlo Kis-Adam +// Copyright (C) 2010 Ryzom Core +// +// 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 . + + +#ifndef RCERROR_SOCKET +#define RCERROR_SOCKET + +#include +#include "crash_report_data.h" + +class CCrashReportSocketPvt; +class QNetworkReply; + +class CCrashReportSocket : public QObject +{ + Q_OBJECT + +public: + CCrashReportSocket( QObject *parent ); + ~CCrashReportSocket(); + + void setURL( const char *URL ){ m_url = URL; } + QString url() const{ return m_url; } + + void sendReport( const SCrashReportData &data ); + +Q_SIGNALS: + void reportSent(); + void reportFailed(); + +private Q_SLOTS: + void onFinished( QNetworkReply *reply ); + +private: + CCrashReportSocketPvt *m_pvt; + QString m_url; +}; + +#endif + diff --git a/code/nel/tools/misc/crash_report/crash_report_widget.cpp b/code/nel/tools/misc/crash_report/crash_report_widget.cpp new file mode 100644 index 000000000..218b3545c --- /dev/null +++ b/code/nel/tools/misc/crash_report/crash_report_widget.cpp @@ -0,0 +1,301 @@ +// Nel MMORPG framework - Error Reporter +// +// Copyright (C) 2015 Laszlo Kis-Adam +// Copyright (C) 2010 Ryzom Core +// +// 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 . + + +#include "crash_report_widget.h" +#include "crash_report_socket.h" +#include "crash_report_data.h" +#include +#include +#include +#include +#include +#include +#include +#include + +CCrashReportWidget::CCrashReportWidget( QWidget *parent ) : +QWidget( parent ) +{ + m_developerMode = false; + m_forceSend = false; + m_devSendReport = false; + m_returnValue = ERET_NULL; + + m_ui.setupUi( this ); + + m_socket = new CCrashReportSocket( this ); + + QTimer::singleShot( 1, this, SLOT( onLoad() ) ); + + connect( m_ui.emailCB, SIGNAL( stateChanged( int ) ), this, SLOT( onCBClicked() ) ); + + connect( m_socket, SIGNAL( reportSent() ), this, SLOT( onReportSent() ) ); + connect( m_socket, SIGNAL( reportFailed() ), this, SLOT( onReportFailed() ) ); +} + +CCrashReportWidget::~CCrashReportWidget() +{ + m_socket = NULL; +} + +void CCrashReportWidget::setup( const std::vector< std::pair< std::string, std::string > > ¶ms ) +{ + for( int i = 0; i < params.size(); i++ ) + { + const std::pair< std::string, std::string > &p = params[ i ]; + const std::string &k = p.first; + const std::string &v = p.second; + + if( k == "log" ) + { + m_fileName = v.c_str(); + if( !QFile::exists( m_fileName ) ) + m_fileName.clear(); + } + else + if( k == "host" ) + { + m_socket->setURL( v.c_str() ); + } + else + if( k == "title" ) + { + setWindowTitle( v.c_str() ); + } + else + if( k == "dev" ) + { + m_developerMode = true; + } + else + if( k == "sendreport" ) + { + m_forceSend = true; + } + } + + if( m_fileName.isEmpty() ) + { + m_ui.reportLabel->hide(); + m_ui.reportEdit->hide(); + } + + + if( m_socket->url().isEmpty() || m_fileName.isEmpty() ) + { + m_ui.descriptionEdit->hide(); + m_ui.emailCB->hide(); + m_ui.emailEdit->hide(); + m_ui.descrLabel->hide(); + } + + QHBoxLayout *hbl = new QHBoxLayout( this ); + + if( m_developerMode ) + { + if( !m_socket->url().isEmpty() && !m_fileName.isEmpty() ) + { + m_ui.emailCB->setEnabled( false ); + + QCheckBox *cb = new QCheckBox( tr( "Send report" ), this ); + m_ui.gridLayout->addWidget( cb, 4, 0, 1, 1 ); + + m_ui.gridLayout->addWidget( m_ui.emailCB, 5, 0, 1, 1 ); + m_ui.gridLayout->addWidget( m_ui.emailEdit, 6, 0, 1, 1 ); + + connect(cb, SIGNAL(stateChanged(int)), this, SLOT(onSendCBClicked())); + if (m_forceSend) + cb->setChecked(true); + } + + hbl->addStretch(); + + QPushButton *alwaysIgnoreButton = new QPushButton( tr( "Always Ignore" ), this ); + QPushButton *ignoreButton = new QPushButton( tr( "Ignore" ), this ); + QPushButton *abortButton = new QPushButton( tr( "Abort" ), this ); + QPushButton *breakButton = new QPushButton(tr("Break"), this); + breakButton->setAutoDefault(true); + + hbl->addWidget( alwaysIgnoreButton ); + hbl->addWidget( ignoreButton ); + hbl->addWidget( abortButton ); + hbl->addWidget( breakButton ); + + m_ui.gridLayout->addLayout( hbl, 7, 0, 1, 3 ); + + connect( alwaysIgnoreButton, SIGNAL( clicked( bool ) ), this, SLOT( onAlwaysIgnoreClicked() ) ); + connect( ignoreButton, SIGNAL( clicked( bool ) ), this, SLOT( onIgnoreClicked() ) ); + connect( abortButton, SIGNAL( clicked( bool ) ), this, SLOT( onAbortClicked() ) ); + connect( breakButton, SIGNAL( clicked( bool ) ), this, SLOT( onBreakClicked() ) ); + } + else + { + hbl->addStretch(); + + // If -host is specified, offer the send function + if( !m_socket->url().isEmpty() && !m_fileName.isEmpty() ) + { + if (!m_forceSend) + { + QPushButton *cancelButton = new QPushButton(tr("Don't send report"), this); + connect(cancelButton, SIGNAL(clicked(bool)), this, SLOT(onCancelClicked())); + hbl->addWidget(cancelButton); + } + + QPushButton *sendButton = new QPushButton( tr( "Send report" ), this ); + sendButton->setAutoDefault(true); + connect( sendButton, SIGNAL( clicked( bool ) ), this, SLOT( onSendClicked() ) ); + hbl->addWidget( sendButton ); + } + // Otherwise only offer exit + else + { + QPushButton *exitButton = new QPushButton( tr( "Exit" ), this ); + connect( exitButton, SIGNAL( clicked( bool ) ), this, SLOT( onCancelClicked() ) ); + hbl->addWidget(exitButton); + exitButton->setAutoDefault(true); + } + + m_ui.gridLayout->addLayout( hbl, 6, 0, 1, 3 ); + } +} + +void CCrashReportWidget::onLoad() +{ + if( m_fileName.isEmpty() ) + return; + + QFile f( m_fileName ); + bool b = f.open( QFile::ReadOnly | QFile::Text ); + if( !b ) + { + m_fileName.clear(); + return; + } + + QTextStream ss( &f ); + m_ui.reportEdit->setPlainText( ss.readAll() ); + f.close(); +} + +void CCrashReportWidget::onSendClicked() +{ + if( m_developerMode && !m_devSendReport ) + { + close(); + return; + } + + if( m_socket->url().isEmpty() || m_fileName.isEmpty() ) + { + close(); + return; + } + + QApplication::setOverrideCursor( Qt::WaitCursor ); + + SCrashReportData data; + data.description = m_ui.descriptionEdit->toPlainText(); + data.report = m_ui.reportEdit->toPlainText(); + + if( m_ui.emailCB->isChecked() ) + data.email = m_ui.emailEdit->text(); + + m_socket->sendReport( data ); +} + +void CCrashReportWidget::onCancelClicked() +{ + removeAndQuit(); +} + +void CCrashReportWidget::onCBClicked() +{ + m_ui.emailEdit->setEnabled( m_ui.emailCB->isChecked() ); +} + +void CCrashReportWidget::onSendCBClicked() +{ + bool b = m_ui.emailCB->isEnabled(); + + if( b ) + { + m_ui.emailCB->setChecked( false ); + } + + m_ui.emailCB->setEnabled( !b ); + + m_devSendReport = !m_devSendReport; +} + +void CCrashReportWidget::onAlwaysIgnoreClicked() +{ + m_returnValue = ERET_ALWAYS_IGNORE; + onSendClicked(); +} + +void CCrashReportWidget::onIgnoreClicked() +{ + m_returnValue = ERET_IGNORE; + onSendClicked(); +} + +void CCrashReportWidget::onAbortClicked() +{ + m_returnValue = ERET_ABORT; + onSendClicked(); +} + +void CCrashReportWidget::onBreakClicked() +{ + m_returnValue = ERET_BREAK; + onSendClicked(); +} + + +void CCrashReportWidget::onReportSent() +{ + QApplication::setOverrideCursor( Qt::ArrowCursor ); + + QMessageBox::information( this, + tr( "Report sent" ), + tr( "The report has been sent." ) ); + + removeAndQuit(); +} + +void CCrashReportWidget::onReportFailed() +{ + QApplication::setOverrideCursor( Qt::ArrowCursor ); + + QMessageBox::information( this, + tr( "Report failed" ), + tr( "Failed to send the report..." ) ); + + removeAndQuit(); +} + +void CCrashReportWidget::removeAndQuit() +{ + if( !m_fileName.isEmpty() ) + QFile::remove( m_fileName ); + + close(); +} + diff --git a/code/nel/tools/misc/crash_report/crash_report_widget.h b/code/nel/tools/misc/crash_report/crash_report_widget.h new file mode 100644 index 000000000..f40e40854 --- /dev/null +++ b/code/nel/tools/misc/crash_report/crash_report_widget.h @@ -0,0 +1,82 @@ +// Nel MMORPG framework - Error Reporter +// +// Copyright (C) 2015 Laszlo Kis-Adam +// Copyright (C) 2010 Ryzom Core +// +// 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 . + + +#ifndef RCERROR_WIDGET +#define RCERROR_WIDGET + + +#include "ui_crash_report_widget.h" +#include +#include + +class CCrashReportSocket; + +class CCrashReportWidget : public QWidget +{ + Q_OBJECT +public: + + enum EReturnValue + { + ERET_NULL = 0, + ERET_ALWAYS_IGNORE = 21, + ERET_IGNORE = 22, + ERET_ABORT = 23, + ERET_BREAK = 24 + }; + + CCrashReportWidget( QWidget *parent = NULL ); + ~CCrashReportWidget(); + + void setFileName( const char *fn ){ m_fileName = fn; } + + void setup( const std::vector< std::pair< std::string, std::string > > ¶ms ); + + EReturnValue getReturnValue() const{ return m_returnValue; } + +private Q_SLOTS: + void onLoad(); + void onSendClicked(); + void onCancelClicked(); + void onCBClicked(); + void onSendCBClicked(); + + void onAlwaysIgnoreClicked(); + void onIgnoreClicked(); + void onAbortClicked(); + void onBreakClicked(); + + void onReportSent(); + void onReportFailed(); + +private: + void removeAndQuit(); + + Ui::CrashReportWidget m_ui; + QString m_fileName; + CCrashReportSocket *m_socket; + bool m_developerMode; + bool m_forceSend; + bool m_devSendReport; + + EReturnValue m_returnValue; +}; + +#endif + diff --git a/code/nel/tools/misc/crash_report/crash_report_widget.ui b/code/nel/tools/misc/crash_report/crash_report_widget.ui new file mode 100644 index 000000000..da1e38618 --- /dev/null +++ b/code/nel/tools/misc/crash_report/crash_report_widget.ui @@ -0,0 +1,68 @@ + + + CrashReportWidget + + + Qt::ApplicationModal + + + + 0 + 0 + 406 + 430 + + + + NeL report + + + + + + What were you doing when the crash occured? + + + + + + + Contents of the report ( automatically generated ) + + + + + + + + + + Email me if you have further questions, or updates on this issue + + + + + + + false + + + Enter your email address here + + + + + + + true + + + Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + + + + + + diff --git a/code/nel/tools/misc/make_sheet_id/make_sheet_id.cpp b/code/nel/tools/misc/make_sheet_id/make_sheet_id.cpp index 53d515fdd..851dfe6df 100644 --- a/code/nel/tools/misc/make_sheet_id/make_sheet_id.cpp +++ b/code/nel/tools/misc/make_sheet_id/make_sheet_id.cpp @@ -163,7 +163,7 @@ void readFormId( string& outputFileName ) map::iterator itFT = FileTypeToId.find(fileType); if( itFT == FileTypeToId.end() ) { - FileTypeToId.insert( make_pair(fileType,fid.FormIDInfos.Type) ); + FileTypeToId.insert( std::pair(fileType,fid.FormIDInfos.Type) ); } } else diff --git a/code/nel/tools/misc/xml_packer/xml_packer.cpp b/code/nel/tools/misc/xml_packer/xml_packer.cpp index 6f82b5426..2d7695de4 100644 --- a/code/nel/tools/misc/xml_packer/xml_packer.cpp +++ b/code/nel/tools/misc/xml_packer/xml_packer.cpp @@ -379,7 +379,7 @@ int main(int argc, char *argv[]) CSString subFileName = parser.leftCrop(sizeof(" (i, fi)); + faultyInstances.insert(std::pair(i, fi)); } } @@ -1046,7 +1046,7 @@ void processGlobalRetriever() { if (Verbose) nlinfo("after fix: unlink: %s", unlinkstr.c_str()); - faultyInstances.insert(make_pair(i, fi)); + faultyInstances.insert(std::pair(i, fi)); } } } diff --git a/code/nel/tools/pacs/build_rbank/build_surf.cpp b/code/nel/tools/pacs/build_rbank/build_surf.cpp index 9546e19f1..10d4c6a19 100644 --- a/code/nel/tools/pacs/build_rbank/build_surf.cpp +++ b/code/nel/tools/pacs/build_rbank/build_surf.cpp @@ -201,8 +201,7 @@ template class CHashPtr { public: - static const size_t bucket_size = 4; - static const size_t min_buckets = 8; + enum { bucket_size = 4, min_buckets = 8, }; typedef A *ptrA; size_t operator() (const ptrA &a) const diff --git a/code/nelns/login_service/connection_client.cpp b/code/nelns/login_service/connection_client.cpp index 8ff713ec2..ebdef1b9a 100644 --- a/code/nelns/login_service/connection_client.cpp +++ b/code/nelns/login_service/connection_client.cpp @@ -126,7 +126,7 @@ retry: // now the user is on the database - uid = atoi(row[0]); + NLMISC::fromString(row[0], uid); if(cpassword != row[2]) { diff --git a/code/nelns/login_system/nel_launcher_windows_ext/Configuration.cpp b/code/nelns/login_system/nel_launcher_windows_ext/Configuration.cpp index f9092e56b..88b0d854a 100644 --- a/code/nelns/login_system/nel_launcher_windows_ext/Configuration.cpp +++ b/code/nelns/login_system/nel_launcher_windows_ext/Configuration.cpp @@ -52,7 +52,7 @@ BOOL CConfiguration::Load() // Reading the configuration file version GetValue(csBuffer, KEY_VERSION, csValue); - m_dVersion = atof(csValue); + NLMISC::fromString(csValue, m_dVersion); nlinfo("Config' version %s", csValue); if(m_dVersion < APP.m_dVersion) diff --git a/code/nelns/login_system/nel_launcher_windows_ext/nel_launcher.cpp b/code/nelns/login_system/nel_launcher_windows_ext/nel_launcher.cpp index 8ace867f7..2e36702d8 100644 --- a/code/nelns/login_system/nel_launcher_windows_ext/nel_launcher.cpp +++ b/code/nelns/login_system/nel_launcher_windows_ext/nel_launcher.cpp @@ -324,7 +324,7 @@ void CNel_launcherApp::LoadVersion() else { nlinfo("Launcher' version %s", csVersion); - m_dVersion = atof(csVersion); + NLMISC::fromString(csVersion, m_dVersion); } } diff --git a/code/ryzom/client/src/3d_notes.cpp b/code/ryzom/client/src/3d_notes.cpp index 7156854e4..618525de4 100644 --- a/code/ryzom/client/src/3d_notes.cpp +++ b/code/ryzom/client/src/3d_notes.cpp @@ -57,9 +57,10 @@ void cbNotesChanged() Notes.Notes.clear(); return; } - pos.x = (float)atof(posstr[0].c_str()); - pos.y = (float)atof(posstr[1].c_str()); - pos.z = (float)atof(posstr[2].c_str()); + + NLMISC::fromString(posstr[0], pos.x); + NLMISC::fromString(posstr[1], pos.y); + NLMISC::fromString(posstr[2], pos.z); string note(var.asString(i+2)); if(note.empty()) diff --git a/code/ryzom/client/src/CMakeLists.txt b/code/ryzom/client/src/CMakeLists.txt index 3fbbfd0e2..80f931147 100644 --- a/code/ryzom/client/src/CMakeLists.txt +++ b/code/ryzom/client/src/CMakeLists.txt @@ -1,4 +1,3 @@ - # Need clientsheets lib for sheets packer tool ADD_SUBDIRECTORY(client_sheets) @@ -82,6 +81,7 @@ INCLUDE_DIRECTORIES( ${LUABIND_INCLUDE_DIR} ${LIBWWW_INCLUDE_DIR} ${CURL_INCLUDE_DIRS} + ${ZLIB_INCLUDE_DIR} ) TARGET_LINK_LIBRARIES(ryzom_client @@ -119,6 +119,14 @@ NL_ADD_RUNTIME_FLAGS(ryzom_client) NL_ADD_LIB_SUFFIX(ryzom_client) +IF(WITH_RYZOM_CLIENT_UAC) + IF(CMAKE_GENERATOR MATCHES "Visual Studio") + SET_PROPERTY(TARGET ryzom_client PROPERTY LINK_FLAGS_RELEASE "/level='requireAdministrator'") + ELSEIF(CMAKE_GENERATOR MATCHES "NMake Makefiles") + SET_PROPERTY(TARGET ryzom_client PROPERTY LINK_FLAGS_RELEASE "/MANIFESTUAC:\"level='requireAdministrator' uiAccess='false'\"") + ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio") +ENDIF(WITH_RYZOM_CLIENT_UAC) + IF(WITH_PCH AND (NOT MINGW OR NOT WITH_SYMBOLS)) ADD_NATIVE_PRECOMPILED_HEADER(ryzom_client ${CMAKE_CURRENT_SOURCE_DIR}/stdpch.h ${CMAKE_CURRENT_SOURCE_DIR}/stdpch.cpp) ENDIF(WITH_PCH AND (NOT MINGW OR NOT WITH_SYMBOLS)) diff --git a/code/ryzom/client/src/actions.h b/code/ryzom/client/src/actions.h index e9b9d53e0..b177c1818 100644 --- a/code/ryzom/client/src/actions.h +++ b/code/ryzom/client/src/actions.h @@ -30,8 +30,8 @@ /////////// // CLASS // class CCombo; -class CActionsManager; class CAction; +class CActionsManager; /** * The goal of CCombo is to gather together Inputs that will validate an Action. @@ -281,8 +281,7 @@ public: // HashMapTraits for NLMISC::TKey struct CTKeyHashMapTraits { - static const size_t bucket_size = 4; - static const size_t min_buckets = 8; + enum { bucket_size = 4, min_buckets = 8, }; CTKeyHashMapTraits() { } size_t operator() (NLMISC::TKey key) const { diff --git a/code/ryzom/client/src/bug_report/bug_reportDlg.cpp b/code/ryzom/client/src/bug_report/bug_reportDlg.cpp index 21ab0cfb4..fce9975d0 100644 --- a/code/ryzom/client/src/bug_report/bug_reportDlg.cpp +++ b/code/ryzom/client/src/bug_report/bug_reportDlg.cpp @@ -389,8 +389,8 @@ END_MESSAGE_MAP() BOOL CBug_reportDlg::OnInitDialog() { - setReportEmailFunction ((void*)sendEmail); - setDefaultEmailParams ("gw.nevrax.com", "", "lecroart@nevrax.com"); + // setReportEmailFunction ((void*)sendEmail); + // setDefaultEmailParams ("gw.nevrax.com", "", "lecroart@nevrax.com"); CDialog::OnInitDialog(); diff --git a/code/ryzom/client/src/cdb_synchronised.cpp b/code/ryzom/client/src/cdb_synchronised.cpp index 45c57dd55..2ad3022cf 100644 --- a/code/ryzom/client/src/cdb_synchronised.cpp +++ b/code/ryzom/client/src/cdb_synchronised.cpp @@ -41,7 +41,7 @@ #include -#include "../../common/src/game_share/ryzom_database_banks.h" +#include "game_share/ryzom_database_banks.h" //////////////// diff --git a/code/ryzom/client/src/character_cl.cpp b/code/ryzom/client/src/character_cl.cpp index 23fdb78e2..89c9b805b 100644 --- a/code/ryzom/client/src/character_cl.cpp +++ b/code/ryzom/client/src/character_cl.cpp @@ -4537,7 +4537,7 @@ void CCharacterCL::applyBehaviourFlyingHPs(const CBehaviourContext &bc, const MB { if(behaviour.DeltaHP != 0) { - CRGBA deltaHPColor( 0, 0, 0 ); + CRGBA deltaHPColor(0, 0, 0); // if it's a hit if( behaviour.DeltaHP < 0 ) { diff --git a/code/ryzom/client/src/client.cpp b/code/ryzom/client/src/client.cpp index 19af0545d..d3bb5254e 100644 --- a/code/ryzom/client/src/client.cpp +++ b/code/ryzom/client/src/client.cpp @@ -26,7 +26,6 @@ #include "nel/misc/types_nl.h" #ifdef NL_OS_WINDOWS -#include #include #else #include @@ -366,6 +365,8 @@ int main(int argc, char **argv) createDebug(); + INelContext::getInstance().setWindowedApplication(true); + #ifndef NL_DEBUG INelContext::getInstance().getDebugLog()->removeDisplayer("DEFAULT_SD"); INelContext::getInstance().getInfoLog()->removeDisplayer("DEFAULT_SD"); @@ -435,9 +436,9 @@ int main(int argc, char **argv) // Set default email value for reporting error #ifdef TEST_CRASH_COUNTER - //initCrashReport (); - setReportEmailFunction ((void*)sendEmail); - setDefaultEmailParams ("smtp.nevrax.com", "", "hulud@nevrax.com"); + // initCrashReport (); + // setReportEmailFunction ((void*)sendEmail); + // setDefaultEmailParams ("smtp.nevrax.com", "", "hulud@nevrax.com"); if (string(cmdline) == "/crash") volatile int toto = *(int*)0; diff --git a/code/ryzom/client/src/client_chat_manager.cpp b/code/ryzom/client/src/client_chat_manager.cpp index 09f874b96..141edea27 100644 --- a/code/ryzom/client/src/client_chat_manager.cpp +++ b/code/ryzom/client/src/client_chat_manager.cpp @@ -969,8 +969,6 @@ void CClientChatManager::buildTellSentence(const ucstring &sender, const ucstrin name = STRING_MANAGER::CStringManagerClient::getTitleLocalizedName(CEntityCL::getTitleFromName(name), bWoman); } } - - } else { @@ -1052,8 +1050,6 @@ void CClientChatManager::buildChatSentence(TDataSetIndex /* compressedSenderInde senderName = STRING_MANAGER::CStringManagerClient::getTitleLocalizedName(CEntityCL::getTitleFromName(senderName), bWoman); } } - - } switch(type) @@ -1208,7 +1204,7 @@ class CHandlerTell : public IActionHandler ucstring s = CI18N::get("youTellPlayer"); strFindReplace(s, "%name", receiver); strFindReplace(finalMsg, CI18N::get("youTell"), s); - CInterfaceManager::getInstance()->log(finalMsg); + CInterfaceManager::getInstance()->log(finalMsg, CChatGroup::groupTypeToString(CChatGroup::tell)); } }; REGISTER_ACTION_HANDLER( CHandlerTell, "tell"); diff --git a/code/ryzom/client/src/commands.cpp b/code/ryzom/client/src/commands.cpp index ad8a328ba..90287955d 100644 --- a/code/ryzom/client/src/commands.cpp +++ b/code/ryzom/client/src/commands.cpp @@ -3890,7 +3890,6 @@ NLMISC_COMMAND(displayInventoryCounter, "display the Inventory counter to compar NLMISC_COMMAND(displayActionCounter, "display the action counters", "") { - CInterfaceManager *pIM= CInterfaceManager::getInstance(); CSPhraseManager *pPM= CSPhraseManager::getInstance(); diff --git a/code/ryzom/client/src/connection.cpp b/code/ryzom/client/src/connection.cpp index 8b07cc7f2..3f3a3d809 100644 --- a/code/ryzom/client/src/connection.cpp +++ b/code/ryzom/client/src/connection.cpp @@ -31,7 +31,7 @@ // 3D Interface. #include "nel/3d/u_driver.h" #include "nel/3d/u_text_context.h" -#include +#include "nel/3d/stereo_display.h" // Game Share //#include "game_share/gd_time.h" // \todo GUIGUI : TO DELETE/CHANGE #include "game_share/gender.h" @@ -103,7 +103,6 @@ extern uint32 Version; // Client Version. extern UDriver *Driver; extern UTextContext *TextContext; extern bool game_exit; -extern CMsgBoxDisplayer MsgBoxError; extern CSoundManager *SoundMngr; diff --git a/code/ryzom/client/src/entities.cpp b/code/ryzom/client/src/entities.cpp index 7bc478ce7..516232108 100644 --- a/code/ryzom/client/src/entities.cpp +++ b/code/ryzom/client/src/entities.cpp @@ -426,7 +426,7 @@ void CEntityManager::initialize(uint nbMaxEntity) _Entities.resize(_NbMaxEntity, 0); _EntityGroundFXHandle.resize(_NbMaxEntity); } - + ICDBNode::CTextId textId; // Add an observer on the mission database diff --git a/code/ryzom/client/src/entity_cl.cpp b/code/ryzom/client/src/entity_cl.cpp index 0063c93f4..6a14d6400 100644 --- a/code/ryzom/client/src/entity_cl.cpp +++ b/code/ryzom/client/src/entity_cl.cpp @@ -2296,6 +2296,7 @@ void CEntityCL::onStringAvailable(uint /* stringId */, const ucstring &value) } ucstring replacement(STRING_MANAGER::CStringManagerClient::getTitleLocalizedName(_TitleRaw, womanTitle)); + // Sometimes translation contains another title { ucstring::size_type pos = replacement.find('$'); @@ -2308,7 +2309,7 @@ void CEntityCL::onStringAvailable(uint /* stringId */, const ucstring &value) replacement = STRING_MANAGER::CStringManagerClient::getTitleLocalizedName(_TitleRaw, womanTitle); } } - + _Tags = STRING_MANAGER::CStringManagerClient::getTitleInfos(_TitleRaw, womanTitle); if (!replacement.empty() || !ClientCfg.DebugStringManager) @@ -2949,7 +2950,7 @@ void CEntityCL::dataSetId(CLFECOMMON::TClientDataSetIndex dataSet) { _DataSetId = dataSet; - if (_Primitive && _Primitive->UserData == UserDataEntity) + if (_Primitive && _Primitive->UserData == UserDataEntity) _Primitive->UserData |= (((uint64)_DataSetId)<<16); // additionaly, on a UID change, must check the IsInTeam and IsAniml flags diff --git a/code/ryzom/client/src/far_tp.cpp b/code/ryzom/client/src/far_tp.cpp index 4f48d2ff5..5b9b0c836 100644 --- a/code/ryzom/client/src/far_tp.cpp +++ b/code/ryzom/client/src/far_tp.cpp @@ -188,7 +188,6 @@ const std::string& CLoginStateMachine::toString(CLoginStateMachine::TEvent event _CurrentState = stateId; \ break; \ } \ - extern std::string LoginLogin, LoginPassword; extern bool noUserChar; diff --git a/code/ryzom/client/src/hair_set.cpp b/code/ryzom/client/src/hair_set.cpp index d82733162..5d44e2857 100644 --- a/code/ryzom/client/src/hair_set.cpp +++ b/code/ryzom/client/src/hair_set.cpp @@ -45,20 +45,20 @@ void CHairSet::init (NLMISC::IProgressCallback &progress) progress.progress ((float)k/(float)numHairItem); const CItemSheet *item = SheetMngr.getItem(SLOTTYPE::HEAD_SLOT, k); - if( (item) && (!item->getShape().empty()) ) + if (item && !item->getShape().empty()) { - std::string itemName = NLMISC::toLower(item->getShape()); - if (item->getShape().find("cheveux", 0) != std::string::npos) { // get race - uint16 race = (uint16) itemName[1] | ((uint16) itemName[0] << 8); - switch(race) + std::string itemName = NLMISC::toLower(item->getShape()); + + // fortunately, first character of each race is distinct + switch(itemName[0]) { - case 'ma': _Hairs[Matis].push_back(k); break; - case 'tr': _Hairs[Tryker].push_back(k); break; - case 'zo': _Hairs[Zorai].push_back(k); break; - case 'fy': _Hairs[Fyros].push_back(k); break; + case 'm': _Hairs[Matis].push_back(k); break; + case 't': _Hairs[Tryker].push_back(k); break; + case 'z': _Hairs[Zorai].push_back(k); break; + case 'f': _Hairs[Fyros].push_back(k); break; } } } diff --git a/code/ryzom/client/src/http_client_curl.cpp b/code/ryzom/client/src/http_client_curl.cpp index db830a9df..008bef19a 100644 --- a/code/ryzom/client/src/http_client_curl.cpp +++ b/code/ryzom/client/src/http_client_curl.cpp @@ -15,7 +15,6 @@ // along with this program. If not, see . #include "stdpch.h" -#define CURL_STATICLIB 1 #include #include "http_client_curl.h" diff --git a/code/ryzom/client/src/init.cpp b/code/ryzom/client/src/init.cpp index 6a1cf5bcf..c40cbd258 100644 --- a/code/ryzom/client/src/init.cpp +++ b/code/ryzom/client/src/init.cpp @@ -143,7 +143,6 @@ using namespace std; // Ligo primitive class CLigoConfig LigoConfig; -CMsgBoxDisplayer MsgBoxError; CClientChatManager ChatMngr; bool LastScreenSaverEnabled = false; @@ -555,27 +554,6 @@ void checkDriverDepth () } } -static std::string replaceApplicationDirToken(const std::string &dir) -{ - -#ifdef NL_OS_MAC - // if client_default.cfg is not in current directory, and it's not an absolute path, use application default directory - if (!CFile::isExists("client_default.cfg") && dir.size()>0 && dir[0]!='/') - { - return getAppBundlePath() + "/Contents/Resources/" + dir; - } -#else - static const std::string token = ""; - std::string::size_type pos = dir.find(token); - if (pos != std::string::npos) - return dir.substr(0, pos) + getAppBundlePath() + dir.substr(pos + token.length()); -#endif - -// preDataPath = getAppBundlePath() + "/Contents/Resources/" + preDataPath; - - return dir; -} - void listStereoDisplayDevices(std::vector &devices) { bool cache = VRDeviceCache.empty(); @@ -590,7 +568,7 @@ void listStereoDisplayDevices(std::vector &devices) std::stringstream name; name << IStereoDisplay::getLibraryName(it->Library) << " - " << it->Manufacturer << " - " << it->ProductName; std::stringstream fullname; - fullname << std::string("[") << name << "] [" << it->Serial << "]"; + fullname << std::string("[") << name.str() << "] [" << it->Serial << "]"; nlinfo("VR [C]: Stereo Display: %s", name.str().c_str()); if (cache) { @@ -687,39 +665,94 @@ void addSearchPaths(IProgressCallback &progress) progress.progress ((float)i/(float)ClientCfg.DataPath.size()); progress.pushCropedValues ((float)i/(float)ClientCfg.DataPath.size(), (float)(i+1)/(float)ClientCfg.DataPath.size()); - CPath::addSearchPath(replaceApplicationDirToken(ClientCfg.DataPath[i]), true, false, &progress); + CPath::addSearchPath(ClientCfg.DataPath[i], true, false, &progress); progress.popCropedValues (); } CPath::loadRemappedFiles("remap_files.csv"); } + for (uint i = 0; i < ClientCfg.DataPathNoRecurse.size(); i++) { progress.progress ((float)i/(float)ClientCfg.DataPathNoRecurse.size()); progress.pushCropedValues ((float)i/(float)ClientCfg.DataPathNoRecurse.size(), (float)(i+1)/(float)ClientCfg.DataPathNoRecurse.size()); - CPath::addSearchPath(replaceApplicationDirToken(ClientCfg.DataPathNoRecurse[i]), false, false, &progress); + CPath::addSearchPath(ClientCfg.DataPathNoRecurse[i], false, false, &progress); progress.popCropedValues (); } -} + std::string defaultDirectory; + +#ifdef NL_OS_MAC + defaultDirectory = CPath::standardizePath(getAppBundlePath() + "/Contents/Resources"); +#elif defined(NL_OS_UNIX) && defined(RYZOM_SHARE_PREFIX) + defaultDirectory = CPath::standardizePath(std::string(RYZOM_SHARE_PREFIX)); +#endif + + // add in last position, a specific possibly read only directory + if (!defaultDirectory.empty()) + { + for (uint i = 0; i < ClientCfg.DataPath.size(); i++) + { + // don't prepend default directory if path is absolute + if (!ClientCfg.DataPath[i].empty() && ClientCfg.DataPath[i][0] != '/') + { + progress.progress ((float)i/(float)ClientCfg.DataPath.size()); + progress.pushCropedValues ((float)i/(float)ClientCfg.DataPath.size(), (float)(i+1)/(float)ClientCfg.DataPath.size()); + + CPath::addSearchPath(defaultDirectory + ClientCfg.DataPath[i], true, false, &progress); + + progress.popCropedValues (); + } + } + } +} void addPreDataPaths(NLMISC::IProgressCallback &progress) { NLMISC::TTime initPaths = ryzomGetLocalTime (); - H_AUTO(InitRZAddSearchPaths) + + H_AUTO(InitRZAddSearchPaths); + for (uint i = 0; i < ClientCfg.PreDataPath.size(); i++) { progress.progress ((float)i/(float)ClientCfg.PreDataPath.size()); progress.pushCropedValues ((float)i/(float)ClientCfg.PreDataPath.size(), (float)(i+1)/(float)ClientCfg.PreDataPath.size()); - CPath::addSearchPath(replaceApplicationDirToken(ClientCfg.PreDataPath[i]), true, false, &progress); + CPath::addSearchPath(ClientCfg.PreDataPath[i], true, false, &progress); progress.popCropedValues (); } + //nlinfo ("PROFILE: %d seconds for Add search paths Predata", (uint32)(ryzomGetLocalTime ()-initPaths)/1000); + + std::string defaultDirectory; + +#ifdef NL_OS_MAC + defaultDirectory = CPath::standardizePath(getAppBundlePath() + "/Contents/Resources"); +#elif defined(NL_OS_UNIX) && defined(RYZOM_SHARE_PREFIX) + defaultDirectory = CPath::standardizePath(std::string(RYZOM_SHARE_PREFIX)); +#endif + + // add in last position, a specific possibly read only directory + if (!defaultDirectory.empty()) + { + for (uint i = 0; i < ClientCfg.PreDataPath.size(); i++) + { + // don't prepend default directory if path is absolute + if (!ClientCfg.PreDataPath[i].empty() && ClientCfg.PreDataPath[i][0] != '/') + { + progress.progress ((float)i/(float)ClientCfg.PreDataPath.size()); + progress.pushCropedValues ((float)i/(float)ClientCfg.PreDataPath.size(), (float)(i+1)/(float)ClientCfg.PreDataPath.size()); + + CPath::addSearchPath(defaultDirectory + ClientCfg.PreDataPath[i], true, false, &progress); + + progress.popCropedValues (); + } + } + } } static void addPackedSheetUpdatePaths(NLMISC::IProgressCallback &progress) @@ -728,7 +761,7 @@ static void addPackedSheetUpdatePaths(NLMISC::IProgressCallback &progress) { progress.progress((float)i/(float)ClientCfg.UpdatePackedSheetPath.size()); progress.pushCropedValues ((float)i/(float)ClientCfg.UpdatePackedSheetPath.size(), (float)(i+1)/(float)ClientCfg.UpdatePackedSheetPath.size()); - CPath::addSearchPath(replaceApplicationDirToken(ClientCfg.UpdatePackedSheetPath[i]), true, false, &progress); + CPath::addSearchPath(ClientCfg.UpdatePackedSheetPath[i], true, false, &progress); progress.popCropedValues(); } } @@ -763,12 +796,12 @@ void prelogInit() #ifdef NL_OS_WINDOWS _control87 (_EM_INVALID|_EM_DENORMAL/*|_EM_ZERODIVIDE|_EM_OVERFLOW*/|_EM_UNDERFLOW|_EM_INEXACT, _MCW_EM); #endif // NL_OS_WINDOWS - + CTime::CTimerInfo timerInfo; NLMISC::CTime::probeTimerInfo(timerInfo); if (timerInfo.RequiresSingleCore) // TODO: Also have a FV configuration value to force single core. setCPUMask(); - + FPU_CHECKER_ONCE NLMISC::TTime initStart = ryzomGetLocalTime (); @@ -822,8 +855,8 @@ void prelogInit() FPU_CHECKER_ONCE // Set default email value for reporting error - setReportEmailFunction ((void*)sendEmail); - setDefaultEmailParams ("smtp.nevrax.com", "", "ryzombug@nevrax.com"); + // setReportEmailFunction ((void*)sendEmail); + // setDefaultEmailParams ("smtp.nevrax.com", "", "ryzombug@nevrax.com"); // create the save dir. if (!CFile::isExists("save")) CFile::createDirectory("save"); @@ -906,7 +939,6 @@ void prelogInit() switch(ClientCfg.Driver3D) { #ifdef NL_OS_WINDOWS - case CClientConfig::Direct3D: driver = UDriver::Direct3d; break; @@ -959,7 +991,7 @@ void prelogInit() Driver->setSwapVBLInterval(1); else Driver->setSwapVBLInterval(0); - + if (StereoDisplay) // VR_CONFIG // VR_DRIVER { // override mode TODO @@ -1087,7 +1119,7 @@ void prelogInit() // Set the monitor color properties CMonitorColorProperties monitorColor; - for ( uint i=0; i<3; i++) + for (uint i=0; i<3; i++) { monitorColor.Contrast[i] = ClientCfg.Contrast; monitorColor.Luminosity[i] = ClientCfg.Luminosity; diff --git a/code/ryzom/client/src/interface_v3/action_handler_game.cpp b/code/ryzom/client/src/interface_v3/action_handler_game.cpp index 63d2c93b7..b76bbce21 100644 --- a/code/ryzom/client/src/interface_v3/action_handler_game.cpp +++ b/code/ryzom/client/src/interface_v3/action_handler_game.cpp @@ -1950,13 +1950,14 @@ public: womanTitle = pChar->getGender() == GSGENDER::female; STRING_MANAGER::CStringManagerClient::getTitleLocalizedName(CEntityCL::getTitleFromName(copyInout), womanTitle); - + // Sometimes translation contains another title ucstring::size_type pos = copyInout.find('$'); if (pos != ucstring::npos) { copyInout = STRING_MANAGER::CStringManagerClient::getTitleLocalizedName(CEntityCL::getTitleFromName(copyInout), womanTitle); } + CStringPostProcessRemoveTitle::cbIDStringReceived(copyInout); inout = copyInout; } diff --git a/code/ryzom/client/src/interface_v3/action_handler_help.cpp b/code/ryzom/client/src/interface_v3/action_handler_help.cpp index e519bb2d0..ed2b34ce3 100644 --- a/code/ryzom/client/src/interface_v3/action_handler_help.cpp +++ b/code/ryzom/client/src/interface_v3/action_handler_help.cpp @@ -1117,6 +1117,11 @@ class CHandlerHTMLSubmitForm : public IActionHandler fromString(getParam (sParams, "form"), form); string submit_button = getParam (sParams, "submit_button"); + string type = getParam (sParams, "submit_button_type"); + string value = getParam (sParams, "submit_button_value"); + + sint32 x = pCaller->getEventX(); + sint32 y = pCaller->getEventY(); CInterfaceElement *element = CWidgetManager::getInstance()->getElementFromId(container); { @@ -1125,7 +1130,7 @@ class CHandlerHTMLSubmitForm : public IActionHandler if (groupHtml) { // Submit the form the url - groupHtml->submitForm (form, submit_button.c_str ()); + groupHtml->submitForm (form, type.c_str(), submit_button.c_str(), value.c_str(), x, y); } } } @@ -3613,7 +3618,7 @@ public: uint8 index; fromString(Params, index); --index; // Param is 1-based so subtract 1 - if ( index >= MAX_INVENTORY_ANIMAL) + if (index >= MAX_INVENTORY_ANIMAL) { return; } diff --git a/code/ryzom/client/src/interface_v3/action_handler_item.cpp b/code/ryzom/client/src/interface_v3/action_handler_item.cpp index 24f59cecc..f6dec2d1f 100644 --- a/code/ryzom/client/src/interface_v3/action_handler_item.cpp +++ b/code/ryzom/client/src/interface_v3/action_handler_item.cpp @@ -815,7 +815,6 @@ public: CurrentStackDst= NULL; validateStackItem(pCSSrc, pCSDst, val, CurrentStackMode); } - }; REGISTER_ACTION_HANDLER( CHandlerStackOk, "stack_item"); @@ -826,17 +825,17 @@ class CPlayerTradePutBagItemToExchange : public IActionHandler public: virtual void execute (CCtrlBase *pCaller, const string &/* Params */) { - CInterfaceManager *im = CInterfaceManager::getInstance(); - CDBCtrlSheet *src = dynamic_cast(pCaller); - CDBCtrlSheet *dest = dynamic_cast(CWidgetManager::getInstance()->getCtrlLaunchingModal()); - if (src->getSheetId() == 0) - { - putExchangedItemToInventory(dest); - } - else - { - putInventoryItemToExchange(src, dest); - } + CInterfaceManager *im = CInterfaceManager::getInstance(); + CDBCtrlSheet *src = dynamic_cast(pCaller); + CDBCtrlSheet *dest = dynamic_cast(CWidgetManager::getInstance()->getCtrlLaunchingModal()); + if (src->getSheetId() == 0) + { + putExchangedItemToInventory(dest); + } + else + { + putInventoryItemToExchange(src, dest); + } } }; REGISTER_ACTION_HANDLER(CPlayerTradePutBagItemToExchange, "put_bag_item_to_exchange"); diff --git a/code/ryzom/client/src/interface_v3/action_handler_misc.cpp b/code/ryzom/client/src/interface_v3/action_handler_misc.cpp index 688c27635..4e8966e16 100644 --- a/code/ryzom/client/src/interface_v3/action_handler_misc.cpp +++ b/code/ryzom/client/src/interface_v3/action_handler_misc.cpp @@ -520,7 +520,7 @@ CCameraBackup setupCameraForScreenshot(UScene &scene, uint left, uint right, uin // Build a viewport CViewport viewport; NL3D::UDriver *Driver = CViewRenderer::getInstance()->getDriver(); - viewport.init (0, 0, (float)(right-left)/Driver->getWindowWidth(),(float)(bottom-top)/Driver->getWindowHeight()); + viewport.init (0, 0, (float)(right-left)/Driver->getWindowWidth(), (float)(bottom-top)/Driver->getWindowHeight()); // Activate all this scene.getCam().setFrustum (frustumPart); diff --git a/code/ryzom/client/src/interface_v3/action_handler_phrase.cpp b/code/ryzom/client/src/interface_v3/action_handler_phrase.cpp index efd19fe45..67f798cb8 100644 --- a/code/ryzom/client/src/interface_v3/action_handler_phrase.cpp +++ b/code/ryzom/client/src/interface_v3/action_handler_phrase.cpp @@ -777,7 +777,7 @@ void CHandlerMemorizePhraseOrMacro::execute (CCtrlBase *pCaller, const string &P sint32 dstPhraseId= pCSDst->getSPhraseId(); sint32 dstMacroId= pCSDst->getMacroId(); - if ((src.empty()) && (CHandlerPhraseMemoryCopy::haveLastPhraseElement)) + if (src.empty() && (CHandlerPhraseMemoryCopy::haveLastPhraseElement)) { // get the slot ids from save srcIsMacro= CHandlerPhraseMemoryCopy::isMacro; @@ -1600,7 +1600,6 @@ public: } } }; - REGISTER_ACTION_HANDLER(CHandlerPhraseSelectMemory2, "phrase_select_memory_2"); // *************************************************************************** diff --git a/code/ryzom/client/src/interface_v3/bot_chat_page_mission.cpp b/code/ryzom/client/src/interface_v3/bot_chat_page_mission.cpp index bb16353f5..caa90cdda 100644 --- a/code/ryzom/client/src/interface_v3/bot_chat_page_mission.cpp +++ b/code/ryzom/client/src/interface_v3/bot_chat_page_mission.cpp @@ -53,7 +53,6 @@ void CBotChatPageMission::init() NLGUI::CDBManager::getInstance()->addBranchObserver("SERVER:CHOOSE_MISSIONS", &_MissionPagesObs); } - // *************************************************************************************** void CBotChatPageMission::begin() { diff --git a/code/ryzom/client/src/interface_v3/bot_chat_page_trade.cpp b/code/ryzom/client/src/interface_v3/bot_chat_page_trade.cpp index 17aaead48..966a3886a 100644 --- a/code/ryzom/client/src/interface_v3/bot_chat_page_trade.cpp +++ b/code/ryzom/client/src/interface_v3/bot_chat_page_trade.cpp @@ -1808,7 +1808,6 @@ void CBotChatPageTrade::giveFocusToMaxEBChangeBuyFilterDialog() setFocusOnEditBox(ig->getGroup("edit_max:eb")); } - // *************************************************************************** void CBotChatPageTrade::startChangeBuyFilterMPDialog() { @@ -1822,7 +1821,6 @@ void CBotChatPageTrade::startChangeBuyFilterMPDialog() CWidgetManager::getInstance()->enableModalWindow(NULL, ig); } - // *************************************************************************** void CBotChatPageTrade::confirmChangeBuyFilterMPDialog(uint ft) { @@ -1840,7 +1838,6 @@ void CBotChatPageTrade::confirmChangeBuyFilterMPDialog(uint ft) CWidgetManager::getInstance()->disableModalWindow(); } - // *************************************************************************** void CBotChatPageTrade::resetItemPartAndTypeFilters() { diff --git a/code/ryzom/client/src/interface_v3/character_3d.cpp b/code/ryzom/client/src/interface_v3/character_3d.cpp index c76407f11..f711fb764 100644 --- a/code/ryzom/client/src/interface_v3/character_3d.cpp +++ b/code/ryzom/client/src/interface_v3/character_3d.cpp @@ -797,7 +797,7 @@ void CCharacter3D::setup (const SCharacter3DSetup &c3ds) } // Instance skin color - if (c3ds.People != -1) + if (c3ds.People != EGSPD::CPeople::Undefined) if ((c3ds.People != _CurrentSetup.People) || bInstanceRebuilt || bQualityRebuilt) { if (!_Instances[i].empty()) diff --git a/code/ryzom/client/src/interface_v3/chat_displayer.h b/code/ryzom/client/src/interface_v3/chat_displayer.h index e84179f94..e2afc7207 100644 --- a/code/ryzom/client/src/interface_v3/chat_displayer.h +++ b/code/ryzom/client/src/interface_v3/chat_displayer.h @@ -30,7 +30,6 @@ #undef LOG_WARNING #endif - /** * class used to display console text commands in the chat window * \author Nicolas Brigand diff --git a/code/ryzom/client/src/interface_v3/chat_text_manager.cpp b/code/ryzom/client/src/interface_v3/chat_text_manager.cpp index faaf86092..83ef7474e 100644 --- a/code/ryzom/client/src/interface_v3/chat_text_manager.cpp +++ b/code/ryzom/client/src/interface_v3/chat_text_manager.cpp @@ -47,7 +47,6 @@ CChatTextManager::~CChatTextManager() _TextShadowed = NULL; delete _ShowTimestamps; _ShowTimestamps = NULL; - } //================================================================================= uint CChatTextManager::getTextFontSize() const @@ -96,6 +95,7 @@ bool CChatTextManager::showTimestamps() const } return _ShowTimestamps->getValueBool(); } + //================================================================================= static CInterfaceGroup *parseCommandTag(ucstring &line) { @@ -186,7 +186,6 @@ CViewBase *CChatTextManager::createMsgText(const ucstring &cstMsg, NLMISC::CRGBA msg = cur_time + msg; } - vt->setTextFormatTaged(msg); vt->setColor(NLMISC::CRGBA::White); } diff --git a/code/ryzom/client/src/interface_v3/chat_window.cpp b/code/ryzom/client/src/interface_v3/chat_window.cpp index e74392432..0bb192fc5 100644 --- a/code/ryzom/client/src/interface_v3/chat_window.cpp +++ b/code/ryzom/client/src/interface_v3/chat_window.cpp @@ -483,7 +483,7 @@ void CChatWindow::displayLocalPlayerTell(const ucstring &receiver, const ucstrin strFindReplace(s, "%name", receiver); strFindReplace(finalMsg, CI18N::get("youTell"), s); displayMessage(finalMsg, prop.getRGBA(), CChatGroup::tell, 0, numBlinks); - CInterfaceManager::getInstance()->log(finalMsg); + CInterfaceManager::getInstance()->log(finalMsg, CChatGroup::groupTypeToString(CChatGroup::tell)); } void CChatWindow::encodeColorTag(const NLMISC::CRGBA &color, ucstring &text, bool append) @@ -601,10 +601,14 @@ void CChatGroupWindow::displayMessage(const ucstring &msg, NLMISC::CRGBA col, CC if (pos == ucstring::npos || (colonpos < pos)) { // No timestamp, so put it right after the color and add a space - pos = newmsg.find(ucstring("}"));; + pos = newmsg.find(ucstring("}")); prefix += " "; } - newmsg = newmsg.substr(0, pos + 1) + prefix + newmsg.substr(pos + 1); + + if (pos == ucstring::npos) + newmsg = prefix + newmsg; + else + newmsg = newmsg.substr(0, pos + 1) + prefix + newmsg.substr(pos + 1); // Add dynchannel number and optionally name before text if user channel CCDBNodeLeaf* node = NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:CHAT:SHOW_DYN_CHANNEL_NAME_IN_CHAT_CB", false); @@ -615,7 +619,11 @@ void CChatGroupWindow::displayMessage(const ucstring &msg, NLMISC::CRGBA col, CC STRING_MANAGER::CStringManagerClient::instance()->getDynString(textId, title); prefix = title.empty() ? ucstring("") : ucstring(" ") + title; pos = newmsg.find(ucstring("] ")); - newmsg = newmsg.substr(0, pos) + prefix + newmsg.substr(pos); + + if (pos == ucstring::npos) + newmsg = prefix + newmsg; + else + newmsg = newmsg.substr(0, pos) + prefix + newmsg.substr(pos); } } break; diff --git a/code/ryzom/client/src/interface_v3/dbctrl_sheet.cpp b/code/ryzom/client/src/interface_v3/dbctrl_sheet.cpp index 293582f52..68ceb7bf0 100644 --- a/code/ryzom/client/src/interface_v3/dbctrl_sheet.cpp +++ b/code/ryzom/client/src/interface_v3/dbctrl_sheet.cpp @@ -333,29 +333,29 @@ bool CCtrlSheetInfo::parseCtrlInfo(xmlNodePtr cur, CInterfaceGroup * /* parentGr prop = (char*) xmlGetProp( cur, (xmlChar*)"nature" ); if (prop) { - if (NLMISC::strlwr(prop) == "item") + if (NLMISC::strlwr(prop.str()) == "item") _Type = CCtrlSheetInfo::SheetType_Item; - else if (NLMISC::strlwr(prop) == "pact") + else if (NLMISC::strlwr(prop.str()) == "pact") _Type = CCtrlSheetInfo::SheetType_Pact; - else if (NLMISC::strlwr(prop) == "skill") + else if (NLMISC::strlwr(prop.str()) == "skill") _Type = CCtrlSheetInfo::SheetType_Skill; - else if (NLMISC::strlwr(prop) == "auto") + else if (NLMISC::strlwr(prop.str()) == "auto") _Type = CCtrlSheetInfo::SheetType_Auto; - else if (NLMISC::strlwr(prop) == "macro") + else if (NLMISC::strlwr(prop.str()) == "macro") _Type = CCtrlSheetInfo::SheetType_Macro; - else if (NLMISC::strlwr(prop) == "guild_flag") + else if (NLMISC::strlwr(prop.str()) == "guild_flag") _Type = CCtrlSheetInfo::SheetType_GuildFlag; - else if (NLMISC::strlwr(prop) == "mission") + else if (NLMISC::strlwr(prop.str()) == "mission") _Type = CCtrlSheetInfo::SheetType_Mission; - else if (NLMISC::strlwr(prop) == "sbrick") + else if (NLMISC::strlwr(prop.str()) == "sbrick") _Type = CCtrlSheetInfo::SheetType_SBrick; - else if (NLMISC::strlwr(prop) == "sphraseid") + else if (NLMISC::strlwr(prop.str()) == "sphraseid") _Type = CCtrlSheetInfo::SheetType_SPhraseId; - else if (NLMISC::strlwr(prop) == "sphrase") + else if (NLMISC::strlwr(prop.str()) == "sphrase") _Type = CCtrlSheetInfo::SheetType_SPhrase; - else if (NLMISC::strlwr(prop) == "elevator_destination") + else if (NLMISC::strlwr(prop.str()) == "elevator_destination") _Type = CCtrlSheetInfo::SheetType_ElevatorDestination; - else if (NLMISC::strlwr(prop) == "outpost_building") + else if (NLMISC::strlwr(prop.str()) == "outpost_building") _Type = CCtrlSheetInfo::SheetType_OutpostBuilding; } @@ -456,7 +456,7 @@ bool CCtrlSheetInfo::parseCtrlInfo(xmlNodePtr cur, CInterfaceGroup * /* parentGr else { // must not have so much brick type, else must change code! - nlassert(brickType<32); + // nlassert(brickType<32); // Ok set the bit associated _BrickTypeBitField|= 1<getDbBranch(prop); + CCDBNodeBranch *branch = NLGUI::CDBManager::getInstance()->getDbBranch(prop.str()); if(!branch) { nlinfo ("Branch not found in the database %s", (const char*)prop); diff --git a/code/ryzom/client/src/interface_v3/dbgroup_list_sheet_text.cpp b/code/ryzom/client/src/interface_v3/dbgroup_list_sheet_text.cpp index 772f99418..2294d3926 100644 --- a/code/ryzom/client/src/interface_v3/dbgroup_list_sheet_text.cpp +++ b/code/ryzom/client/src/interface_v3/dbgroup_list_sheet_text.cpp @@ -98,7 +98,7 @@ bool CDBGroupListSheetText::parse (xmlNodePtr cur, CInterfaceGroup *parentGroup) if (prop) { // get a branch in the database. - CCDBNodeBranch *branch= NLGUI::CDBManager::getInstance()->getDbBranch(prop); + CCDBNodeBranch *branch = NLGUI::CDBManager::getInstance()->getDbBranch(prop.str()); if(!branch) { nlinfo ("Branch not found in the database %s", (const char*)prop); diff --git a/code/ryzom/client/src/interface_v3/dbgroup_list_sheet_text_share.cpp b/code/ryzom/client/src/interface_v3/dbgroup_list_sheet_text_share.cpp index fcef370e0..112ec3e9e 100644 --- a/code/ryzom/client/src/interface_v3/dbgroup_list_sheet_text_share.cpp +++ b/code/ryzom/client/src/interface_v3/dbgroup_list_sheet_text_share.cpp @@ -175,7 +175,6 @@ void CDBGroupListSheetTextShare::CSheetChildShare::init(CDBGroupListSheetText *p pNL = NLGUI::CDBManager::getInstance()->getDbProp(sTmp, false); nlassert(pNL != NULL); CurrentWanted.link ( sTmp.c_str() ); - } diff --git a/code/ryzom/client/src/interface_v3/dbgroup_list_sheet_trade.cpp b/code/ryzom/client/src/interface_v3/dbgroup_list_sheet_trade.cpp index 0028ad964..d4fc5da86 100644 --- a/code/ryzom/client/src/interface_v3/dbgroup_list_sheet_trade.cpp +++ b/code/ryzom/client/src/interface_v3/dbgroup_list_sheet_trade.cpp @@ -728,7 +728,6 @@ void CDBGroupListSheetTrade::sort() } } - bool CDBGroupListSheetTrade::needCheckAllItems() { if (_LastFamePriceFactor != _FamePriceFactorLeaf->getValue16()) diff --git a/code/ryzom/client/src/interface_v3/group_html_webig.cpp b/code/ryzom/client/src/interface_v3/group_html_webig.cpp index 8ffa25878..680a26273 100644 --- a/code/ryzom/client/src/interface_v3/group_html_webig.cpp +++ b/code/ryzom/client/src/interface_v3/group_html_webig.cpp @@ -22,6 +22,7 @@ #include "../user_entity.h" #include "../entities.h" #include "interface_manager.h" +#include "user_agent.h" // used for login cookie to be sent to the web server #include "../net_manager.h" @@ -157,7 +158,7 @@ struct CWebigNotificationThread : public NLMISC::IRunnable if(!Curl) return; curl_easy_setopt(Curl, CURLOPT_COOKIEFILE, ""); curl_easy_setopt(Curl, CURLOPT_NOPROGRESS, 1); - curl_easy_setopt(Curl, CURLOPT_USERAGENT, "Ryzom"); + curl_easy_setopt(Curl, CURLOPT_USERAGENT, getUserAgent().c_str()); curl_easy_setopt(Curl, CURLOPT_FOLLOWLOCATION, 1); curl_easy_setopt(Curl, CURLOPT_WRITEFUNCTION, writeDataFromCurl); //nlinfo("ctor CWebigNotificationThread"); diff --git a/code/ryzom/client/src/interface_v3/group_in_scene_user_info.cpp b/code/ryzom/client/src/interface_v3/group_in_scene_user_info.cpp index 76d97c519..53cddc93b 100644 --- a/code/ryzom/client/src/interface_v3/group_in_scene_user_info.cpp +++ b/code/ryzom/client/src/interface_v3/group_in_scene_user_info.cpp @@ -198,7 +198,7 @@ CGroupInSceneUserInfo *CGroupInSceneUserInfo::build (CEntityCL *entity) ucstring theTribeName; ucstring entityName = entity->getDisplayName(); ucstring entityTitle = entity->getTitle(); - + // For some NPC's the name is empty and only a title is given, // in that case, treat the title as the name. if (entityName.empty()) @@ -652,7 +652,6 @@ CGroupInSceneUserInfo *CGroupInSceneUserInfo::build (CEntityCL *entity) if (pPlayer == NULL) needPvPLogo = false; - if (pPlayer != NULL && needPvPLogo) { if (pvpFactionLogo) @@ -756,7 +755,6 @@ CGroupInSceneUserInfo *CGroupInSceneUserInfo::build (CEntityCL *entity) view = leftGroup->getView ("win_jauge_bot"); if (view) leftGroup->delView (view); - } // Delete remaining strings @@ -771,8 +769,7 @@ CGroupInSceneUserInfo *CGroupInSceneUserInfo::build (CEntityCL *entity) CViewBase *win_mid = leftGroup->getView ("win_mid"); if (win_mid) { - win_mid->setH (win_mid->getH() - spaceBar/2 ); - + win_mid->setH (win_mid->getH() - spaceBar/2); } // Set player name @@ -963,7 +960,7 @@ void CGroupInSceneUserInfo::updateDynamicData () if (pPlayer != NULL) if (pPlayer->isAFK()) - entityName += CI18N::get("uiAFK"); + entityName += CI18N::get("uiAFK"); _Name->setText(entityName); // Title color get the PVP color diff --git a/code/ryzom/client/src/interface_v3/group_map.cpp b/code/ryzom/client/src/interface_v3/group_map.cpp index 558ab960c..667e900c4 100644 --- a/code/ryzom/client/src/interface_v3/group_map.cpp +++ b/code/ryzom/client/src/interface_v3/group_map.cpp @@ -556,7 +556,7 @@ bool CGroupMap::parse(xmlNodePtr cur, CInterfaceGroup * parentGroup) ptr = (char*) xmlGetProp( cur, (xmlChar*)"map_mode" ); if (ptr) { - string sTmp = ptr; + string sTmp = ptr.str(); if (sTmp == "normal") _MapMode = MapMode_Normal; else if (sTmp == "death") @@ -3213,7 +3213,7 @@ class CAHValidateUserLandMarkName : public IActionHandler CGroupEditBox *eb = dynamic_cast(ig->getGroup("eb")); if (!eb) return; ig->setActive(false); - + CGroupContainer *gc = dynamic_cast(CWidgetManager::getInstance()->getElementFromId(WIN_LANDMARK_NAME)); if (!gc) return; // Retrieve ComboBox to get the position(ordered landmark type) of the selected item diff --git a/code/ryzom/client/src/interface_v3/group_skills.cpp b/code/ryzom/client/src/interface_v3/group_skills.cpp index e414ab4e4..b5e5c5d34 100644 --- a/code/ryzom/client/src/interface_v3/group_skills.cpp +++ b/code/ryzom/client/src/interface_v3/group_skills.cpp @@ -87,7 +87,7 @@ bool CGroupSkills::parse (xmlNodePtr cur, CInterfaceGroup *parentGroup) string sTmp; ICDBNode::CTextId textId; - + for (uint k = 0; k < SKILLS::NUM_SKILLS; ++k) { sTmp = string(DB_SKILLS)+":"+NLMISC::toString((sint32)k)+":BaseSKILL"; diff --git a/code/ryzom/client/src/interface_v3/guild_manager.cpp b/code/ryzom/client/src/interface_v3/guild_manager.cpp index 9edf86c56..2e0e4e3e7 100644 --- a/code/ryzom/client/src/interface_v3/guild_manager.cpp +++ b/code/ryzom/client/src/interface_v3/guild_manager.cpp @@ -378,13 +378,13 @@ void CGuildManager::update() // Online status not changed for this member continue; } - + if ( (*it).second.Online != ccs_offline && _GuildMembers[i].Online != ccs_offline) { // Not from offline, or to offline, so don't show anything continue; } - + ucstring msg = (_GuildMembers[i].Online != ccs_offline) ? onlineMessage : offlineMessage; strFindReplace(msg, "%s", _GuildMembers[i].Name); string cat = getStringCategory(msg, msg); @@ -398,7 +398,6 @@ void CGuildManager::update() bool dummy; PeopleInterraction.ChatInput.Guild.displayMessage(msg, col, 2, &dummy); break; - } } diff --git a/code/ryzom/client/src/interface_v3/interface_3d_scene.cpp b/code/ryzom/client/src/interface_v3/interface_3d_scene.cpp index 0d51a538e..6acc2a17b 100644 --- a/code/ryzom/client/src/interface_v3/interface_3d_scene.cpp +++ b/code/ryzom/client/src/interface_v3/interface_3d_scene.cpp @@ -162,13 +162,13 @@ bool CInterface3DScene::parse (xmlNodePtr cur, CInterfaceGroup *parentGroup) _Ref3DScene = NULL; if (ptr) { - CInterfaceElement *pIE = CWidgetManager::getInstance()->getElementFromId(this->getId(), ptr); + CInterfaceElement *pIE = CWidgetManager::getInstance()->getElementFromId(this->getId(), ptr.str()); _Ref3DScene = dynamic_cast(pIE); } if (_Ref3DScene != NULL) { ptr = (char*) xmlGetProp( cur, (xmlChar*)"curcam" ); - if (ptr) setCurrentCamera (ptr); + if (ptr) setCurrentCamera (ptr.str()); return true; } @@ -294,7 +294,7 @@ bool CInterface3DScene::parse (xmlNodePtr cur, CInterfaceGroup *parentGroup) CXMLAutoPtr ptr((const char*)xmlGetProp (cur, (xmlChar*)"name")); string animName; if (ptr) - animName = strlwr (CFile::getFilenameWithoutExtension(ptr)); + animName = strlwr (CFile::getFilenameWithoutExtension(ptr.str())); if (!animName.empty()) { @@ -340,7 +340,7 @@ bool CInterface3DScene::parse (xmlNodePtr cur, CInterfaceGroup *parentGroup) // Get the current camera ptr = (char*) xmlGetProp( cur, (xmlChar*)"curcam" ); - if (ptr) setCurrentCamera (ptr); + if (ptr) setCurrentCamera(ptr.str()); return true; } diff --git a/code/ryzom/client/src/interface_v3/interface_manager.cpp b/code/ryzom/client/src/interface_v3/interface_manager.cpp index b89566ecd..70be8abe4 100644 --- a/code/ryzom/client/src/interface_v3/interface_manager.cpp +++ b/code/ryzom/client/src/interface_v3/interface_manager.cpp @@ -467,8 +467,8 @@ CInterfaceManager::CInterfaceManager() CGroupHTML::options.trustedDomains = ClientCfg.WebIgTrustedDomains; CGroupHTML::options.languageCode = ClientCfg.getHtmlLanguageCode(); - CGroupHTML::options.appName = "Ryzom"; - CGroupHTML::options.appVersion = getUserAgent(); + CGroupHTML::options.appName = getUserAgentName(); + CGroupHTML::options.appVersion = getUserAgentVersion(); NLGUI::CDBManager::getInstance()->resizeBanks( NB_CDB_BANKS ); interfaceLinkUpdater = new CInterfaceLink::CInterfaceLinkUpdater(); @@ -2684,7 +2684,7 @@ bool CInterfaceManager::deletePlayerKeys (const std::string &playerFileIdent) } // *************************************************************************** -void CInterfaceManager::log(const ucstring &str) +void CInterfaceManager::log(const ucstring &str, const std::string &cat) { if (_LogState) { @@ -2693,7 +2693,7 @@ void CInterfaceManager::log(const ucstring &str) FILE *f = fopen(fileName.c_str(), "at"); if (f != NULL) { - const string finalString = string(NLMISC::IDisplayer::dateToHumanString()) + " * " + str.toUtf8(); + const string finalString = string(NLMISC::IDisplayer::dateToHumanString()) + " (" + NLMISC::toUpper(cat) + ") * " + str.toUtf8(); fprintf(f, "%s\n", finalString.c_str()); } fclose(f); @@ -2925,7 +2925,7 @@ void CInterfaceManager::initEmotes() CSkillManager *pSM = CSkillManager::getInstance(); betaTester = pSM->isTitleUnblocked(CHARACTER_TITLE::FBT); - string previousMind = ""; + string previousMind; CGroupSubMenu *pFirstMenu = 0; for (list::const_iterator it = entries.begin(); it != entries.end(); it++) @@ -3982,5 +3982,3 @@ bool CInterfaceManager::parseTokens(ucstring& ucstr) ucstr = str; return true;; } - - diff --git a/code/ryzom/client/src/interface_v3/interface_manager.h b/code/ryzom/client/src/interface_v3/interface_manager.h index 36bd909e3..d947f4912 100644 --- a/code/ryzom/client/src/interface_v3/interface_manager.h +++ b/code/ryzom/client/src/interface_v3/interface_manager.h @@ -218,7 +218,7 @@ public: // Log system (all chat/tell void setLogState(bool state) { _LogState = state; } bool getLogState() const { return _LogState; } - void log(const ucstring &str); + void log(const ucstring &str, const std::string &cat = ""); /// Text from here and from server diff --git a/code/ryzom/client/src/interface_v3/interface_observer.h b/code/ryzom/client/src/interface_v3/interface_observer.h index 4261f10a4..6da93637e 100644 --- a/code/ryzom/client/src/interface_v3/interface_observer.h +++ b/code/ryzom/client/src/interface_v3/interface_observer.h @@ -119,7 +119,7 @@ public: char * end = ptr.getDatas() + strlen( ptr.getDatas() ); char * dataTok = strtok( ptr.getDatas()," ,"); NLMISC::ICDBNode::CTextId textId; - + while(dataTok) { std::string data (dataTok); diff --git a/code/ryzom/client/src/interface_v3/inventory_manager.cpp b/code/ryzom/client/src/interface_v3/inventory_manager.cpp index 5e7d66075..7a56e470e 100644 --- a/code/ryzom/client/src/interface_v3/inventory_manager.cpp +++ b/code/ryzom/client/src/interface_v3/inventory_manager.cpp @@ -1981,7 +1981,7 @@ bool SBagOptions::parse(xmlNodePtr cur, CInterfaceGroup * /* parentGroup */) prop = xmlGetProp (cur, (xmlChar*)"inv_type"); if (prop) { - InvType = CInventoryManager::invTypeFromString(prop); + InvType = CInventoryManager::invTypeFromString(prop.str()); } else { @@ -1990,22 +1990,22 @@ bool SBagOptions::parse(xmlNodePtr cur, CInterfaceGroup * /* parentGroup */) } prop = xmlGetProp (cur, (xmlChar*)"filter_armor"); - if (prop) DbFilterArmor = NLGUI::CDBManager::getInstance()->getDbProp(prop); + if (prop) DbFilterArmor = NLGUI::CDBManager::getInstance()->getDbProp(prop.str()); prop = xmlGetProp (cur, (xmlChar*)"filter_weapon"); - if (prop) DbFilterWeapon = NLGUI::CDBManager::getInstance()->getDbProp(prop); + if (prop) DbFilterWeapon = NLGUI::CDBManager::getInstance()->getDbProp(prop.str()); prop = xmlGetProp (cur, (xmlChar*)"filter_tool"); - if (prop) DbFilterTool = NLGUI::CDBManager::getInstance()->getDbProp(prop); + if (prop) DbFilterTool = NLGUI::CDBManager::getInstance()->getDbProp(prop.str()); prop = xmlGetProp (cur, (xmlChar*)"filter_mp"); - if (prop) DbFilterMP = NLGUI::CDBManager::getInstance()->getDbProp(prop); + if (prop) DbFilterMP = NLGUI::CDBManager::getInstance()->getDbProp(prop.str()); prop = xmlGetProp (cur, (xmlChar*)"filter_missmp"); - if (prop) DbFilterMissMP = NLGUI::CDBManager::getInstance()->getDbProp(prop); + if (prop) DbFilterMissMP = NLGUI::CDBManager::getInstance()->getDbProp(prop.str()); prop = xmlGetProp (cur, (xmlChar*)"filter_tp"); - if (prop) DbFilterTP = NLGUI::CDBManager::getInstance()->getDbProp(prop); + if (prop) DbFilterTP = NLGUI::CDBManager::getInstance()->getDbProp(prop.str()); return true; } diff --git a/code/ryzom/client/src/interface_v3/parser_modules.cpp b/code/ryzom/client/src/interface_v3/parser_modules.cpp index ff1c93645..b540900a4 100644 --- a/code/ryzom/client/src/interface_v3/parser_modules.cpp +++ b/code/ryzom/client/src/interface_v3/parser_modules.cpp @@ -353,7 +353,7 @@ bool CCommandParser::parse( xmlNodePtr cur, NLGUI::CInterfaceGroup *parentGroup if (ptrName) { // Does the action exist ? - std::string name = ptrName; + std::string name = ptrName.str(); if (!ICommand::exists (name) || (CUserCommand::CommandMap.find(name) != CUserCommand::CommandMap.end())) { // Get the action @@ -369,7 +369,7 @@ bool CCommandParser::parse( xmlNodePtr cur, NLGUI::CInterfaceGroup *parentGroup // if prop "ctrlchar" is declared with false, then disable ctrlchar for this command CXMLAutoPtr prop((const char*) xmlGetProp( cur, (xmlChar*)"ctrlchar" )); if( (const char*)prop && (CInterfaceElement::convertBool((const char*)prop)==false) ) - ICommand::enableControlCharForCommand(ptrName, false); + ICommand::enableControlCharForCommand(ptrName.str(), false); // Done ret = true; diff --git a/code/ryzom/client/src/interface_v3/people_interraction.cpp b/code/ryzom/client/src/interface_v3/people_interraction.cpp index 332bcac57..c2eb972dd 100644 --- a/code/ryzom/client/src/interface_v3/people_interraction.cpp +++ b/code/ryzom/client/src/interface_v3/people_interraction.cpp @@ -2193,7 +2193,6 @@ class CHandlerTellContact : public IActionHandler CInterfaceGroup *ig = pCaller->getParent(); if (!ig) return; CGroupContainer *gc = static_cast< CGroupContainer* >( ig->getEnclosingContainer() ); - if (!gc) return; CPeopleList *list; uint peopleIndex; diff --git a/code/ryzom/client/src/interface_v3/people_list.cpp b/code/ryzom/client/src/interface_v3/people_list.cpp index a2ee04808..c2167358f 100644 --- a/code/ryzom/client/src/interface_v3/people_list.cpp +++ b/code/ryzom/client/src/interface_v3/people_list.cpp @@ -478,7 +478,7 @@ void CPeopleList::displayLocalPlayerTell(const ucstring &receiver, uint index, c strFindReplace(s, "%name", receiver); strFindReplace(finalMsg, CI18N::get("youTell"), s); gl->addChild(getChatTextMngr().createMsgText(finalMsg, prop.getRGBA())); - CInterfaceManager::getInstance()->log(finalMsg); + CInterfaceManager::getInstance()->log(finalMsg, CChatGroup::groupTypeToString(CChatGroup::tell)); // if the group is closed, make it blink if (!gc->isOpen()) @@ -895,7 +895,7 @@ class CHandlerContactEntry : public IActionHandler // it is simpler to keep it as it and to just use this action handler to manage user input. if (!pCaller || !pCaller->getParent()) return; CGroupContainer *gc = static_cast< CGroupContainer* >( pCaller->getParent()->getEnclosingContainer() ); - + // title gives the name of the player ucstring playerName = gc->getUCTitle(); @@ -946,7 +946,7 @@ class CHandlerContactEntry : public IActionHandler ucstring s = CI18N::get("youTellPlayer"); strFindReplace(s, "%name", pWin->getFreeTellerName(str)); strFindReplace(final, CI18N::get("youTell"), s); - CInterfaceManager::getInstance()->log(final); + CInterfaceManager::getInstance()->log(final, CChatGroup::groupTypeToString(CChatGroup::tell)); } } } diff --git a/code/ryzom/client/src/interface_v3/skill_manager.cpp b/code/ryzom/client/src/interface_v3/skill_manager.cpp index e71225cc2..d8656d925 100644 --- a/code/ryzom/client/src/interface_v3/skill_manager.cpp +++ b/code/ryzom/client/src/interface_v3/skill_manager.cpp @@ -159,10 +159,8 @@ void CSkillManager::initInGame() _TrackSkillChange= NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:TRACK_SKILL_CHANGE", true); // Add a branch observer on skill value change NLGUI::CDBManager::getInstance()->addBranchObserver( "SERVER:CHARACTER_INFO:SKILLS", &_SkillChangeObs ); - } - // *************************************************************************** void CSkillManager::uninitInGame() { diff --git a/code/ryzom/client/src/interface_v3/sphrase_manager.cpp b/code/ryzom/client/src/interface_v3/sphrase_manager.cpp index 790657e2e..d214d1150 100644 --- a/code/ryzom/client/src/interface_v3/sphrase_manager.cpp +++ b/code/ryzom/client/src/interface_v3/sphrase_manager.cpp @@ -474,16 +474,16 @@ void CSPhraseManager::memorizePhrase(uint32 memoryLine, uint32 memorySlot, ui } } -void CSPhraseManager::selectMemoryLineDBalt(sint32 memoryLine) +// *************************************************************************** +void CSPhraseManager::selectMemoryLineDB(sint32 memoryLine) { if(memoryLine<0) memoryLine= -1; - - if(_SelectedMemoryDBalt!=memoryLine) + + if(_SelectedMemoryDB!=memoryLine) { - _SelectedMemoryDBalt= memoryLine; + _SelectedMemoryDB= memoryLine; // since memory selection changes then must update all the DB and the Ctrl states - updateMemoryDBAll(); updateAllMemoryCtrlState(); updateAllMemoryCtrlRegenTickRange(); @@ -492,14 +492,14 @@ void CSPhraseManager::selectMemoryLineDBalt(sint32 memoryLine) } } -// *************************************************************************** -void CSPhraseManager::selectMemoryLineDB(sint32 memoryLine) +void CSPhraseManager::selectMemoryLineDBalt(sint32 memoryLine) { if(memoryLine<0) memoryLine= -1; - if(_SelectedMemoryDB!=memoryLine) + + if(_SelectedMemoryDBalt!=memoryLine) { - _SelectedMemoryDB= memoryLine; + _SelectedMemoryDBalt= memoryLine; // since memory selection changes then must update all the DB and the Ctrl states updateMemoryDBAll(); updateAllMemoryCtrlState(); @@ -573,7 +573,7 @@ void CSPhraseManager::updateMemoryDBSlot(uint32 memorySlot) _MemoryDbLeaves[memorySlot]->setValue32(0); else _MemoryDbLeaves[memorySlot]->setValue32(slot.Id); - + CMemorySlot &slotAlt= _Memories[_SelectedMemoryDBalt].Slot[memorySlot]; if(!slotAlt.isPhrase()) @@ -1126,7 +1126,7 @@ void CSPhraseManager::buildPhraseDesc(ucstring &text, const CSPhraseCom &phrase, uint32 totalActionMalus= 0; CCDBNodeLeaf *actMalus = _TotalMalusEquipLeaf ? &*_TotalMalusEquipLeaf : &*(_TotalMalusEquipLeaf = NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:TOTAL_MALUS_EQUIP", false)); - + // root brick must not be Power or aura, because Action malus don't apply to them // (ie leave 0 ActionMalus for Aura or Powers if(actMalus && !rootBrick->isSpecialPower()) @@ -4519,7 +4519,7 @@ uint32 CSPhraseManager::getTotalActionMalus(const CSPhraseCom &phrase) const if (!rootBrick) nlerror("Invalid root sbrick in sphrase_com '%s'", phrase.Name.toUtf8().c_str()); else if (actMalus && !rootBrick->isSpecialPower()) - totalActionMalus = actMalus->getValue32(); + totalActionMalus = actMalus->getValue32(); } return totalActionMalus; } diff --git a/code/ryzom/client/src/interface_v3/view_radar.cpp b/code/ryzom/client/src/interface_v3/view_radar.cpp index 8c8cd1de8..5ebb7fd64 100644 --- a/code/ryzom/client/src/interface_v3/view_radar.cpp +++ b/code/ryzom/client/src/interface_v3/view_radar.cpp @@ -177,7 +177,7 @@ void CViewRadar::draw () // Select the icon to display and draw it uint spotId = CNPCIconCache::getInstance().getNPCIcon(entity).getSpotId(); CRadarSpotDesc spotDesc = _SpotDescriptions[spotId]; - + if (!_MissionIconsObs._displayMissionSpots) spotDesc = _SpotDescriptions[0]; diff --git a/code/ryzom/client/src/interfaces_manager/interf_script.cpp b/code/ryzom/client/src/interfaces_manager/interf_script.cpp index f083eda18..734b99098 100644 --- a/code/ryzom/client/src/interfaces_manager/interf_script.cpp +++ b/code/ryzom/client/src/interfaces_manager/interf_script.cpp @@ -37,7 +37,11 @@ float getFloat() char delimiter[] = "[] \t"; char *ptr = strtok(NULL, delimiter); if(ptr != NULL) - return (float) atof(ptr); + { + float val; + NLMISC::fromString(ptr, val); + return val; + } return 0.f; }// getFloat // @@ -94,7 +98,7 @@ std::vector getVectorOfFloat(uint8 nbCol) ptr = strtok(NULL, delimiter); if(ptr != NULL) { - val = (float)atof(ptr); + NLMISC::fromString(ptr, val); if (val != 0.0f) vect.push_back(val); } diff --git a/code/ryzom/client/src/login_patch.cpp b/code/ryzom/client/src/login_patch.cpp index 949527e82..7d620dc39 100644 --- a/code/ryzom/client/src/login_patch.cpp +++ b/code/ryzom/client/src/login_patch.cpp @@ -26,6 +26,10 @@ #include #endif +#ifdef NL_OS_MAC + #include "app_bundle_utils.h" +#endif + #include #include @@ -207,9 +211,18 @@ CPatchManager::CPatchManager() : State("t_state"), DataScanState("t_data_scan_st // **************************************************************************** void CPatchManager::setClientRootPath(const std::string& clientRootPath) { - ClientRootPath = clientRootPath; - ClientPatchPath = ClientRootPath + "unpack/"; - ClientDataPath = ClientRootPath + "data/"; + ClientRootPath = CPath::standardizePath(clientRootPath); + ClientPatchPath = CPath::standardizePath(ClientRootPath + "unpack"); + + WritableClientDataPath = CPath::standardizePath(ClientRootPath + "data"); + +#ifdef NL_OS_MAC + ReadableClientDataPath = CPath::standardizePath(getAppBundlePath() + "/Contents/Resources/data"); +#elif defined(NL_OS_UNIX) && defined(RYZOM_SHARE_PREFIX) + ReadableClientDataPath = CPath::standardizePath(std::string(RYZOM_SHARE_PREFIX) + "/data"); +#else + ReadableClientDataPath = WritableClientDataPath; +#endif } // **************************************************************************** @@ -253,7 +266,7 @@ void CPatchManager::init(const std::vector& patchURIs, const std::s DisplayedServerPath = ServerPath; NLMISC::CFile::createDirectory(ClientPatchPath); - NLMISC::CFile::createDirectory(ClientDataPath); + NLMISC::CFile::createDirectory(WritableClientDataPath); // try to read the version file from the server (that will replace the version number) @@ -787,7 +800,7 @@ void CPatchManager::createBatchFile(CProductDescriptionForClient &descFile, bool if (!result) { -//:TODO: handle exception? + // TODO: handle exception? string err = toString("Error unpacking %s", rFilename.c_str()); if (useBatchFile) @@ -913,7 +926,6 @@ void CPatchManager::createBatchFile(CProductDescriptionForClient &descFile, bool throw NLMISC::EWriteError(UpdateBatchFilename.c_str()); } } - } // **************************************************************************** @@ -1068,12 +1080,12 @@ float CPatchManager::getCurrentFileProgress() const } // **************************************************************************** -void CPatchManager::setRWAccess (const string &filename) +void CPatchManager::setRWAccess (const string &filename, bool bThrowException) { ucstring s = CI18N::get("uiSetAttrib") + " " + filename; setState(true, s); - if (!NLMISC::CFile::setRWAccess(filename)) + if (!NLMISC::CFile::setRWAccess(filename) && bThrowException) { s = CI18N::get("uiAttribErr") + " " + filename + " (" + toString(errno) + "," + strerror(errno) + ")"; setState(true, s); @@ -1351,7 +1363,7 @@ void CPatchManager::downloadFileWithCurl (const string &source, const string &de // create the local file if (NLMISC::CFile::fileExists(dest)) { - setRWAccess(dest); + setRWAccess(dest, false); NLMISC::CFile::deleteFile(dest.c_str()); } FILE *fp = fopen (dest.c_str(), "wb"); @@ -1492,7 +1504,7 @@ void CPatchManager::decompressFile (const string &filename) } string dest = filename.substr(0, filename.size ()-4); - setRWAccess(dest); + setRWAccess(dest, false); //if(isVerboseLog()) nlinfo("Calling fopen('%s','wb')", dest.c_str()); FILE *fp = fopen (dest.c_str(), "wb"); if (fp == NULL) @@ -1566,7 +1578,7 @@ void CPatchManager::applyDate (const string &sFilename, uint32 nDate) { // _utimbuf utb; // utb.actime = utb.modtime = nDate; - setRWAccess(sFilename); + setRWAccess(sFilename, false); ucstring s = CI18N::get("uiChangeDate") + " " + NLMISC::CFile::getFilename(sFilename) + " " + toString(NLMISC::CFile::getFileModificationDate (sFilename)) + " -> " + toString(nDate); setState(true,s); @@ -1616,9 +1628,25 @@ void CPatchManager::getPatchFromDesc(SFileToPatch &ftpOut, const CBNPFile &fIn, // Only look in data path if the file should not be unpack (otherwise it should only remains in the "unpack" directory) if (!needUnpack) { - if (sFilePath.empty() && NLMISC::CFile::fileExists(ClientDataPath + rFilename)) sFilePath = ClientDataPath + rFilename; + if (sFilePath.empty()) + { + if (NLMISC::CFile::fileExists(WritableClientDataPath + rFilename)) + { + // if file exists in writable directory, use it + sFilePath = WritableClientDataPath + rFilename; + } + else if (NLMISC::CFile::fileExists(ReadableClientDataPath + rFilename)) + { + // if file exists in readable directory, use it + sFilePath = ReadableClientDataPath + rFilename; + } + } + } + + if (sFilePath.empty() && NLMISC::CFile::fileExists(ClientPatchPath + rFilename)) + { + sFilePath = ClientPatchPath + rFilename; } - if (sFilePath.empty() && NLMISC::CFile::fileExists(ClientPatchPath + rFilename)) sFilePath = ClientPatchPath + rFilename; // following lines removed by Sadge to ensure that the correct file is patched // string sFilePath = CPath::lookup(rFilename, false, false); @@ -2046,7 +2074,8 @@ uint CPatchManager::applyScanDataResult() if(ScanDataThread) return 0; - uint numError= 0; + uint numError= 0; + { TSyncDataScanState::CAccessor ac(&DataScanState); CDataScanState &val= ac.value(); @@ -2064,7 +2093,8 @@ uint CPatchManager::applyScanDataResult() // get file path // following lines added by Sadge to ensure that the correct file gets patched string sFilePath; - if (NLMISC::CFile::fileExists(ClientDataPath + ftp.FileName)) sFilePath = ClientDataPath + ftp.FileName; + if (NLMISC::CFile::fileExists(WritableClientDataPath + ftp.FileName)) sFilePath = WritableClientDataPath + ftp.FileName; + if (sFilePath.empty() && NLMISC::CFile::fileExists(ReadableClientDataPath + ftp.FileName)) sFilePath = ReadableClientDataPath + ftp.FileName; if (sFilePath.empty() && NLMISC::CFile::fileExists(ClientPatchPath + ftp.FileName)) sFilePath = ClientPatchPath + ftp.FileName; // following lines removed by Sadge to ensure that the correct file gets patched @@ -2775,15 +2805,31 @@ public: void CPatchThread::processFile (CPatchManager::SFileToPatch &rFTP) { CPatchManager *pPM = CPatchManager::getInstance(); - // Source File Name + + // Source File Name (in writable or readable directory) string SourceName; + + // Destination File Name (in writable directory) + string DestinationName; + if (rFTP.ExtractPath.empty()) { + DestinationName = pPM->WritableClientDataPath + rFTP.FileName; + if (rFTP.LocalFileExists) { // following lines added by Sadge to ensure that the correct file gets patched SourceName.clear(); - if (NLMISC::CFile::fileExists(pPM->ClientDataPath + rFTP.FileName)) SourceName = pPM->ClientDataPath + rFTP.FileName; + + if (NLMISC::CFile::fileExists(pPM->WritableClientDataPath + rFTP.FileName)) + { + SourceName = pPM->WritableClientDataPath + rFTP.FileName; + } + else if (NLMISC::CFile::fileExists(pPM->ReadableClientDataPath + rFTP.FileName)) + { + SourceName = pPM->ReadableClientDataPath + rFTP.FileName; + } + // version from previous download if (SourceName.empty()) throw Exception (std::string("ERROR: Failed to find file: ")+rFTP.FileName); @@ -2795,12 +2841,13 @@ void CPatchThread::processFile (CPatchManager::SFileToPatch &rFTP) // note : if file was background downloaded, we have : // rFTP.LocalFileExists = false // rFTP.SrcFileName = "unpack/filename.bnp.tmp" - SourceName = pPM->ClientDataPath + rFTP.FileName; + SourceName = DestinationName; } } else { SourceName = pPM->ClientPatchPath + rFTP.FileName; + DestinationName = SourceName; } if (rFTP.LocalFileToDelete) @@ -2845,7 +2892,7 @@ void CPatchThread::processFile (CPatchManager::SFileToPatch &rFTP) for (uint i=0; ideleteFile(SourceName, false, false); // File can exists if bad BNP loading if (_CommitPatch) { - pPM->renameFile(OutFilename+".tmp", SourceName); + pPM->renameFile(OutFilename+".tmp", DestinationName); } } } - if (usePatchFile && !rFTP.Patches.empty()) + if (usePatchFile) { uint32 currentPatchedSize = 0; for (uint32 j = 0; j < rFTP.Patches.size(); ++j) @@ -2994,21 +3041,14 @@ void CPatchThread::processFile (CPatchManager::SFileToPatch &rFTP) SourceNameXD = SourceNameXD.substr(0, SourceNameXD.rfind('.')); SourceNameXD += "_.ref"; - std::string refPath; - if (_CommitPatch) - { - refPath = pPM->ClientDataPath; - } - else + if (!_CommitPatch) { // works - refPath = pPM->ClientPatchPath; std::string tmpRefFile = SourceNameXD + ".tmp"; if (!NLMISC::CFile::fileExists(pPM->ClientPatchPath + tmpRefFile)) { // Not found in the patch directory -> version in data directory should be good, or would have been // detected by the check thread else. - refPath = pPM->ClientDataPath; } else { @@ -3025,7 +3065,14 @@ void CPatchThread::processFile (CPatchManager::SFileToPatch &rFTP) // if (SourceNameXDFull.empty()) // SourceNameXDFull = pPM->ClientDataPath + SourceNameXD; // SourceNameXD = SourceNameXDFull; - SourceNameXD = pPM->ClientDataPath + SourceNameXD; + if (CFile::fileExists(pPM->WritableClientDataPath + SourceNameXD)) + { + SourceNameXD = pPM->WritableClientDataPath + SourceNameXD; + } + else if (CFile::fileExists(pPM->ReadableClientDataPath + SourceNameXD)) + { + SourceNameXD = pPM->ReadableClientDataPath + SourceNameXD; + } } PatchName = pPM->ClientPatchPath + PatchName; @@ -3049,7 +3096,8 @@ void CPatchThread::processFile (CPatchManager::SFileToPatch &rFTP) PatchSizeProgress += rFTP.PatcheSizes[j]; currentPatchedSize += rFTP.PatcheSizes[j]; } - if (tmpSourceName != SourceName) + + if (tmpSourceName != DestinationName) { pPM->deleteFile(SourceName, false, false); // File can exists if bad BNP loading if (!_CommitPatch) @@ -3059,7 +3107,7 @@ void CPatchThread::processFile (CPatchManager::SFileToPatch &rFTP) } else { - pPM->renameFile(tmpSourceName, SourceName); + pPM->renameFile(tmpSourceName, DestinationName); } } } @@ -3067,9 +3115,10 @@ void CPatchThread::processFile (CPatchManager::SFileToPatch &rFTP) { PatchSizeProgress += totalPatchSize; } + // If all patches applied with success so file size should be ok // We just have to change file date to match the last patch applied - pPM->applyDate(SourceName, rFTP.LastFileDate); + pPM->applyDate(DestinationName, rFTP.LastFileDate); //progress.progress(1.f); } @@ -3405,6 +3454,7 @@ bool CPatchManager::extract(const std::string& patchPath, ok = true; } } + if (!ok) { // nothing to extract @@ -3414,15 +3464,21 @@ bool CPatchManager::extract(const std::string& patchPath, // extract uint nblab = 0; pPM->deleteFile(updateBatchFilename, false, false); + FILE *fp = fopen (updateBatchFilename.c_str(), "wt"); + if (fp == 0) { string err = toString("Can't open file '%s' for writing: code=%d %s (error code 29)", updateBatchFilename.c_str(), errno, strerror(errno)); throw Exception (err); } + +#ifdef NL_OS_WINDOWS fprintf(fp, "@echo off\n"); fprintf(fp, "ping 127.0.0.1 -n 7 -w 1000 > nul\n"); // wait - +#else + // TODO: for Linux and OS X +#endif // Unpack files with category ExtractPath non empty for (uint32 j = 0; j < sourceFilename.size(); ++j) @@ -3449,21 +3505,32 @@ bool CPatchManager::extract(const std::string& patchPath, string DstPath = CPath::standardizeDosPath(extractPath[j]); string DstName = DstPath + vFilenames[fff]; NLMISC::CFile::createDirectoryTree(extractPath[j]); - // this file must be moved + // this file must be moved +#ifdef NL_OS_WINDOWS fprintf(fp, ":loop%u\n", nblab); fprintf(fp, "attrib -r -a -s -h %s\n", DstName.c_str()); fprintf(fp, "del %s\n", DstName.c_str()); fprintf(fp, "if exist %s goto loop%u\n", DstName.c_str(), nblab); fprintf(fp, "move %s %s\n", SrcName.c_str(), DstPath.c_str()); +#else + // TODO: for Linux and OS X +#endif + nblab++; + } } } } +#ifdef NL_OS_WINDOWS fprintf(fp, "start %s %%1 %%2 %%3\n", execName.c_str()); +#else + // TODO: for Linux and OS X +#endif + fclose(fp); if (stopFun) diff --git a/code/ryzom/client/src/login_patch.h b/code/ryzom/client/src/login_patch.h index de7351775..509a74f9a 100644 --- a/code/ryzom/client/src/login_patch.h +++ b/code/ryzom/client/src/login_patch.h @@ -302,7 +302,7 @@ private: /// Read the description of the highest client version file found void readClientVersionAndDescFile(); - void setRWAccess (const std::string &filename); + void setRWAccess (const std::string &filename, bool bThrowException=true); std::string deleteFile (const std::string &filename, bool bThrowException=true, bool bWarning=true); @@ -447,8 +447,9 @@ private: std::string UpdateBatchFilename; // Where the client get all delta and desc file - std::string ClientPatchPath; - std::string ClientDataPath; + std::string ClientPatchPath; // Temporary path + std::string ReadableClientDataPath; // Where original data can be found + std::string WritableClientDataPath; // Where data can be written /// Output useful information for debugging in the log file bool VerboseLog; diff --git a/code/ryzom/client/src/login_progress_post_thread.cpp b/code/ryzom/client/src/login_progress_post_thread.cpp index bc833fb04..76ce9c2e3 100644 --- a/code/ryzom/client/src/login_progress_post_thread.cpp +++ b/code/ryzom/client/src/login_progress_post_thread.cpp @@ -85,7 +85,7 @@ static std::string sizeToHumanStd(uint64 size) static std::string getVideoInfoDeviceName() { uint64 version; - std::string ret = ""; + std::string ret; bool ok = CSystemInfo::getVideoInfo(ret, version); if (ok) { diff --git a/code/ryzom/client/src/main_loop_debug.cpp b/code/ryzom/client/src/main_loop_debug.cpp index 19ea38414..992325c54 100644 --- a/code/ryzom/client/src/main_loop_debug.cpp +++ b/code/ryzom/client/src/main_loop_debug.cpp @@ -371,6 +371,9 @@ void displayDebug() // Current GameCycle TextContext->printfAt(1.f, line, "Ms per Cycle : %d", NetMngr.getMsPerTick()); line += lineStep; + // Smoothed Client Date + TextContext->printfAt(1.f, line, "Smoothed Client Date : %u %f", SmoothedClientDate.Day, SmoothedClientDate.Hour); + line += lineStep; // Packet Loss TextContext->printfAt(1.f, line, "Packet Loss : %.1f %%", NetMngr.getMeanPacketLoss()*100.0f); line += lineStep; diff --git a/code/ryzom/client/src/misc.cpp b/code/ryzom/client/src/misc.cpp index 9adf00a9a..7e018a576 100644 --- a/code/ryzom/client/src/misc.cpp +++ b/code/ryzom/client/src/misc.cpp @@ -920,7 +920,7 @@ std::string getStringCategory(const ucstring &src, ucstring &dest, bool alwaysAd std::string getStringCategoryIfAny(const ucstring &src, ucstring &dest) { - std::string colorCode = ""; + std::string colorCode; if (src.size() >= 3) { uint startPos = 0; diff --git a/code/ryzom/client/src/misc.h b/code/ryzom/client/src/misc.h index d74010c03..463f02b66 100644 --- a/code/ryzom/client/src/misc.h +++ b/code/ryzom/client/src/misc.h @@ -225,6 +225,7 @@ uint getCurrentColorDepth(); // get maximized bool isWindowMaximized(); +// get all supported video modes sint getRyzomModes(std::vector &videoModes, std::vector &stringModeList); #endif // CL_MISC_H diff --git a/code/ryzom/client/src/net_manager.cpp b/code/ryzom/client/src/net_manager.cpp index 4b37b698a..ecadce14e 100644 --- a/code/ryzom/client/src/net_manager.cpp +++ b/code/ryzom/client/src/net_manager.cpp @@ -879,7 +879,28 @@ void CInterfaceChatDisplayer::displayChat(TDataSetIndex compressedSenderIndex, c } // Log - pIM->log (finalString); + + string channel; + if (mode == CChatGroup::dyn_chat) + { + sint32 dbIndex = ChatMngr.getDynamicChannelDbIndexFromId(dynChatId); + clamp(dbIndex, (sint32)0 , (sint32)CChatGroup::MaxDynChanPerPlayer); + + channel = "dyn" + toString(dbIndex); + } + else + { + channel = CChatGroup::groupTypeToString(mode); + if (channel.empty()) + { + channel = "#" + toString((uint32)mode); + } + } + if (!stringCategory.empty() && NLMISC::toUpper(stringCategory) != "SYS") + { + channel = channel + "/" + stringCategory; + } + pIM->log (finalString, channel); } @@ -911,7 +932,7 @@ void CInterfaceChatDisplayer::displayTell(/*TDataSetIndex senderIndex, */const u colorizeSender(finalString, senderPart, prop.getRGBA()); PeopleInterraction.ChatInput.Tell.displayTellMessage(/*senderIndex, */finalString, goodSenderName, prop.getRGBA(), 2, &windowVisible); - CInterfaceManager::getInstance()->log(finalString); + CInterfaceManager::getInstance()->log(finalString, CChatGroup::groupTypeToString(CChatGroup::tell)); // Open the free teller window CChatGroupWindow *pCGW = PeopleInterraction.getChatGroupWindow(); @@ -4109,7 +4130,7 @@ void CNetManagerMulti::init( const std::string& cookie, const std::string& addr // uint32 ShardId = 0; -std::string WebServer = ""; +std::string WebServer; diff --git a/code/ryzom/client/src/network_connection.h b/code/ryzom/client/src/network_connection.h index 3eb5cd95b..da47f925e 100644 --- a/code/ryzom/client/src/network_connection.h +++ b/code/ryzom/client/src/network_connection.h @@ -776,16 +776,10 @@ protected: /// @name NLMISC::CEntityId handling (for gamedev) //@{ - class CHash + struct CHash { - public: - static const size_t bucket_size = 4; - static const size_t min_buckets = 8; - - CHash() {} - + enum { bucket_size = 4, min_buckets = 8, }; size_t operator () (const CLFECOMMON::TSheetId &id) const { return id; } - inline bool operator() (const CLFECOMMON::TSheetId &id1, const CLFECOMMON::TSheetId &id2) const { return (size_t)id1 < (size_t)id2; } }; diff --git a/code/ryzom/client/src/player_cl.cpp b/code/ryzom/client/src/player_cl.cpp index 4166dbec8..a050ac197 100644 --- a/code/ryzom/client/src/player_cl.cpp +++ b/code/ryzom/client/src/player_cl.cpp @@ -673,7 +673,7 @@ void CPlayerCL::updateVisualPropertyVpa(const NLMISC::TGameCycle &/* gameCycle * } // update title when gender changed - const ucstring replacement(STRING_MANAGER::CStringManagerClient::getTitleLocalizedName(_TitleRaw,_Gender == GSGENDER::female)); + const ucstring replacement(STRING_MANAGER::CStringManagerClient::getTitleLocalizedName(_TitleRaw, _Gender == GSGENDER::female)); if (!replacement.empty() || !ClientCfg.DebugStringManager) { // Get extended name diff --git a/code/ryzom/client/src/r2/displayer_visual_entity.cpp b/code/ryzom/client/src/r2/displayer_visual_entity.cpp index 37632f4d4..5bc8638f0 100644 --- a/code/ryzom/client/src/r2/displayer_visual_entity.cpp +++ b/code/ryzom/client/src/r2/displayer_visual_entity.cpp @@ -564,7 +564,7 @@ void CDisplayerVisualEntity::updateWorldMapPresence() _MapDeco.setDisplayedInstance(getDisplayedInstance(), true); // retrieve icon from the displayed object (lua code) CLuaState &ls = getEditor().getLua(); - std::string texName = ""; + std::string texName; { CLuaStackChecker lsc(&ls); if (getDisplayedInstance()->getLuaProjection().callMethodByNameNoThrow("getSelectBarIcon", 0, 1)) @@ -984,7 +984,7 @@ void CDisplayerVisualEntity::updateName() break; } } - std::string firstPart = ""; + std::string firstPart; if(actNb>0) firstPart = CI18N::get("uiR2EDDefaultActTitle").toString() + " " + NLMISC::toString(actNb); diff --git a/code/ryzom/client/src/r2/dmc/client_edition_module.cpp b/code/ryzom/client/src/r2/dmc/client_edition_module.cpp index 0a5f74cc5..5d00cdc2b 100644 --- a/code/ryzom/client/src/r2/dmc/client_edition_module.cpp +++ b/code/ryzom/client/src/r2/dmc/client_edition_module.cpp @@ -1116,12 +1116,12 @@ void CClientEditionModule::startingScenario(class NLNET::IModuleProxy * /* serve uint32 myUserId = NetMngr.getUserId(); - std::string connectionState = ""; + std::string connectionState; if (myUserId == (charId>>4) || ClientCfg.Local) { - std::string errorMsg = ""; + std::string errorMsg; CObject* hlScenario = _Scenario->getHighLevel(); hlData.setData(hlScenario); // clone before modify by translateFeatures @@ -1352,8 +1352,8 @@ bool CClientEditionModule::loadUserComponent(const std::string& filename, bool m } } - std::string sourceExtension = UserComponentsSourceExtension; - std::string componentExtension = UserComponentsComponentExtension; + std::string sourceExtension = UserComponentsSourceExtension.get(); + std::string componentExtension = UserComponentsComponentExtension.get(); uint32 uncompressedFileLength = 0; @@ -2425,10 +2425,10 @@ bool CClientEditionModule::addToLoadList( const std::string& filename, CScenario void CClientEditionModule::loadScenarioSucceded(const std::string& filename, const std::string& body, const CScenarioValidator::TValues& values) { //H_AUTO(R2_CClientEditionModule_loadScenarioSucceded) - string initialIsland="", initialEntryPoint="", initialSeason = ""; - string creatorMD5 = "", modifiedByMD5=""; - string name = ""; - string locked = ""; + string initialIsland, initialEntryPoint, initialSeason; + string creatorMD5, modifiedByMD5; + string name; + string locked; for(uint i=0; i& pair = values[i]; diff --git a/code/ryzom/client/src/r2/dmc/com_lua_module.cpp b/code/ryzom/client/src/r2/dmc/com_lua_module.cpp index c9b6a6df2..b73813786 100644 --- a/code/ryzom/client/src/r2/dmc/com_lua_module.cpp +++ b/code/ryzom/client/src/r2/dmc/com_lua_module.cpp @@ -834,7 +834,7 @@ sint CComLuaModule::luaRequestEraseNode(lua_State* state) if (args>2) { luaL_checknumber(state, 3); } std::string instanceId(lua_tostring(state, 1)); - std::string attrName = ""; + std::string attrName; sint position = -1; if (args>1){ attrName = lua_tostring(state, 2);} if (args>2){ position = static_cast(lua_tonumber(state, 3));} @@ -1255,7 +1255,7 @@ CObject* CComLuaModule::getObjectFromLua(lua_State* state, sint idx) lua_pushnil(state); while (lua_next(state, -2) != 0) { - std::string key = ""; + std::string key; if ( lua_type(state, -2) == LUA_TSTRING) { key = lua_tostring(state, -2); @@ -1285,7 +1285,7 @@ CObject* CComLuaModule::getObjectFromLua(lua_State* state, sint idx) CObject* CComLuaModule::loadLocal(const std::string& filename, const CScenarioValidator::TValues& values) { CScenarioValidator::TValues::const_iterator first(values.begin()), last(values.end()); - std::string name = ""; + std::string name; for (; first != last; ++first) { if (first->first == "Name" ) { name = first->second; } @@ -1347,7 +1347,7 @@ bool CComLuaModule::loadUserComponent(const std::string& filename) CObject* CComLuaModule::loadFromBuffer(const std::string& data, const std::string& filename, const CScenarioValidator::TValues& values) { CScenarioValidator::TValues::const_iterator first(values.begin()), last(values.end()); - std::string name = ""; + std::string name; for (; first != last; ++first) { if (first->first == "Name" ) { name = first->second; } diff --git a/code/ryzom/client/src/r2/dmc/dmc.cpp b/code/ryzom/client/src/r2/dmc/dmc.cpp index 4642dfa10..0659f0a56 100644 --- a/code/ryzom/client/src/r2/dmc/dmc.cpp +++ b/code/ryzom/client/src/r2/dmc/dmc.cpp @@ -267,7 +267,7 @@ void CDynamicMapClient::save(const std::string& /* filename */) void CDynamicMapClient::saveRtData(const std::string& filename) { //H_AUTO(R2_CDynamicMapClient_saveRtData) - std::string name = ""; + std::string name; name += filename; //std::ostringstream out2; std::string out2; diff --git a/code/ryzom/client/src/r2/editor.cpp b/code/ryzom/client/src/r2/editor.cpp index 2bceb4200..aa5995b05 100644 --- a/code/ryzom/client/src/r2/editor.cpp +++ b/code/ryzom/client/src/r2/editor.cpp @@ -5293,10 +5293,8 @@ void CEditor::onTestModeDisconnected(TSessionId sessionId, uint32 lastAct, TSce //H_AUTO(R2_CEditor_onTestModeDisconnected) CHECK_EDITOR _DMC->CDynamicMapClient::onTestModeDisconnected(sessionId, lastAct, sessionType); - } - // ********************************************************************************************************* void CEditor::nodeInserted(const std::string& instanceId, const std::string& attrName, sint32 position, const std::string& key, CObject* value) { @@ -6611,7 +6609,7 @@ NLMISC::CVectorD getVectorD(const CObject *obj) CObject *buildVector(const NLMISC::CVectorD &vector, const std::string &instanceId /*= ""*/) { CObject *table; - if (instanceId.empty() ) + if (instanceId.empty()) { table = getEditor().getDMC().newComponent("Position"); table->set("x", vector.x); diff --git a/code/ryzom/client/src/scene_parser.cpp b/code/ryzom/client/src/scene_parser.cpp index 1108f3a19..484c00129 100644 --- a/code/ryzom/client/src/scene_parser.cpp +++ b/code/ryzom/client/src/scene_parser.cpp @@ -123,7 +123,7 @@ void CSceneParser::load(const string &filename) char *ptr = strtok(tmpBuff, delimiter); if(ptr != NULL) - _FrameRate = atof(ptr); + NLMISC::fromString(ptr, _FrameRate); } // Close the speed file. @@ -1693,7 +1693,7 @@ void CSceneParser::loadScene(const string &filename) ptr = strtok(NULL, delimiter); if(ptr != NULL) { - seq.second = atof(ptr); + NLMISC::fromString(ptr, seq.second); _Scene.push_back(seq); } } diff --git a/code/ryzom/client/src/session_browser_impl.h b/code/ryzom/client/src/session_browser_impl.h index 6235128b0..302da2864 100644 --- a/code/ryzom/client/src/session_browser_impl.h +++ b/code/ryzom/client/src/session_browser_impl.h @@ -21,7 +21,6 @@ #include "session_browser.h" #include "game_share/ring_session_manager_itf.h" #include "nel/gui/lua_helper.h" -using namespace NLGUI; #include "far_tp.h" class CSessionBrowserImpl : public CSessionBrowser, @@ -37,7 +36,7 @@ public: * - RingAccessPoint:onConnectionClosed() * - RingAccessPoint:onConnectionFailed() */ - void init(CLuaState *ls); + void init(NLGUI::CLuaState *ls); // from CSessionBrowser virtual void on_connectionFailed(); virtual void on_connectionClosed(); @@ -99,17 +98,17 @@ public: static const std::string &getFrontEndAddress(); private: - CLuaState::TRefPtr _Lua; - static int luaGetRingSessionList(CLuaState &ls); - static int luaGetRingCharList(CLuaState &ls); - static int luaJoinRingSession(CLuaState &ls); - static int luaCheckRingAccess(CLuaState &ls); - static int luaGetFileHeader(CLuaState &ls); - static int luaGetRingStats(CLuaState &ls); - static int luaGetScenarioScores(CLuaState &ls); - static int luaUpdateScenarioScores(CLuaState &ls); - static int luaGetSessionAverageScores(CLuaState &ls); - static int luaGetScenarioAverageScores(CLuaState &ls); + NLGUI::CLuaState::TRefPtr _Lua; + static int luaGetRingSessionList(NLGUI::CLuaState &ls); + static int luaGetRingCharList(NLGUI::CLuaState &ls); + static int luaJoinRingSession(NLGUI::CLuaState &ls); + static int luaCheckRingAccess(NLGUI::CLuaState &ls); + static int luaGetFileHeader(NLGUI::CLuaState &ls); + static int luaGetRingStats(NLGUI::CLuaState &ls); + static int luaGetScenarioScores(NLGUI::CLuaState &ls); + static int luaUpdateScenarioScores(NLGUI::CLuaState &ls); + static int luaGetSessionAverageScores(NLGUI::CLuaState &ls); + static int luaGetScenarioAverageScores(NLGUI::CLuaState &ls); // Call a method inside the 'RingAccessPoint' lua table void callRingAccessPointMethod(const char *name, int numArg, int numResult); void callRingCharTrackingMethod(const char *name, int numArg, int numResult); diff --git a/code/ryzom/client/src/sky.cpp b/code/ryzom/client/src/sky.cpp index d5a9216ce..855ab3387 100644 --- a/code/ryzom/client/src/sky.cpp +++ b/code/ryzom/client/src/sky.cpp @@ -235,7 +235,7 @@ uint CSky::setup(const CClientDate &date, const CClientDate &animationDate, floa // animate objects if (_PlayListManager) { - double globalDate = ((double) _NumHourInDay * date.Day + (double) date.Hour) / _NumHourInDay; + double globalDate = (double)date.Hour / (double)_NumHourInDay; //nlinfo("global date = %f", (float) globalDate); _PlayListManager->animate(_AnimLengthInSeconds * globalDate); } diff --git a/code/ryzom/client/src/sound_manager.cpp b/code/ryzom/client/src/sound_manager.cpp index f87c6cdee..4a981366d 100644 --- a/code/ryzom/client/src/sound_manager.cpp +++ b/code/ryzom/client/src/sound_manager.cpp @@ -106,11 +106,11 @@ enum TFilterMapping // constructor //----------------------------------------------- CSoundManager::CSoundManager(IProgressCallback * /* progressCallBack */) -: _AudioMixer(NULL), +: _AudioMixer(NULL), _GroupControllerEffects(NULL), - _GroupControllerEffectsGame(NULL), - _EnvSoundRoot(NULL), - _Sources(NULL), + _GroupControllerEffectsGame(NULL), + _EnvSoundRoot(NULL), + _Sources(NULL), _UserEntitySoundLevel(1.0f) { _EnableBackgroundMusicAtTime= 0; diff --git a/code/ryzom/client/src/time_client.h b/code/ryzom/client/src/time_client.h index 9243a908d..b3327ee76 100644 --- a/code/ryzom/client/src/time_client.h +++ b/code/ryzom/client/src/time_client.h @@ -48,7 +48,7 @@ extern sint64 DT64; // Diff time with current and last frame in ms. extern float DT; // Diff time with current and last frame in sec. extern TTime TSend; // Next Time to send motions. extern TTime DTSend; // Delta of time to generate the next time to send motions. - extern double TimeInSec; // Time for the current frame in second. +extern double TimeInSec; // Time for the current frame in second. extern double FirstTimeInSec; // Game local origin time diff --git a/code/ryzom/client/src/user_agent.cpp b/code/ryzom/client/src/user_agent.cpp index af07e8b86..1452aa584 100644 --- a/code/ryzom/client/src/user_agent.cpp +++ b/code/ryzom/client/src/user_agent.cpp @@ -21,7 +21,7 @@ #include "game_share/ryzom_version.h" -#ifdef HAVE_REVISION_H +#if defined(RYZOM_COMPATIBILITY_VERSION) && defined(HAVE_REVISION_H) #include "revision.h" #endif @@ -45,6 +45,16 @@ #endif std::string getUserAgent() +{ + return getUserAgentName() + "/" + getUserAgentVersion(); +} + +std::string getUserAgentName() +{ + return "Ryzom"; +} + +std::string getUserAgentVersion() { static std::string s_userAgent; @@ -52,8 +62,9 @@ std::string getUserAgent() { char buffer[256]; -#ifdef REVISION - sprintf(buffer, "%s.%s-%s-%s", RYZOM_VERSION, REVISION, RYZOM_SYSTEM, RYZOM_ARCH); +#if defined(REVISION) && defined(RYZOM_COMPATIBILITY_VERSION) + // we don't need RYZOM_VERSION if we already have a numeric form a.b.c, we just need to append revision to it + sprintf(buffer, "%s.%s-%s-%s", RYZOM_COMPATIBILITY_VERSION, REVISION, RYZOM_SYSTEM, RYZOM_ARCH); #else sprintf(buffer, "%s-%s-%s", RYZOM_VERSION, RYZOM_SYSTEM, RYZOM_ARCH); #endif diff --git a/code/ryzom/client/src/user_agent.h b/code/ryzom/client/src/user_agent.h index e42635871..bc508273d 100644 --- a/code/ryzom/client/src/user_agent.h +++ b/code/ryzom/client/src/user_agent.h @@ -18,6 +18,8 @@ #define CL_USER_AGENT_H std::string getUserAgent(); +std::string getUserAgentName(); +std::string getUserAgentVersion(); #endif // CL_USER_AGENT_H diff --git a/code/ryzom/client/src/user_entity.cpp b/code/ryzom/client/src/user_entity.cpp index bb632cf4e..62d45f330 100644 --- a/code/ryzom/client/src/user_entity.cpp +++ b/code/ryzom/client/src/user_entity.cpp @@ -518,7 +518,7 @@ void CUserEntity::updateVisualPropertyName(const NLMISC::TGameCycle &gameCycle, html->browse("home"); } } -*/ +*/ }// updateVisualPropertyName // //----------------------------------------------- diff --git a/code/ryzom/common/data_common/r2/r2_misc.lua b/code/ryzom/common/data_common/r2/r2_misc.lua index 827e91579..d85744bd0 100644 --- a/code/ryzom/common/data_common/r2/r2_misc.lua +++ b/code/ryzom/common/data_common/r2/r2_misc.lua @@ -187,7 +187,7 @@ end function strify(str) return [["]] .. tostring(str) .. [["]] end - + ------------------------------------------------------------------------------------------------- -- enclose a string by double quotes function strifyXml(str) diff --git a/code/ryzom/common/data_leveldesign/leveldesign/world_editor_files/world_editor_classes.xml b/code/ryzom/common/data_leveldesign/leveldesign/world_editor_files/world_editor_classes.xml index de424f76f..d9aae794a 100644 --- a/code/ryzom/common/data_leveldesign/leveldesign/world_editor_files/world_editor_classes.xml +++ b/code/ryzom/common/data_leveldesign/leveldesign/world_editor_files/world_editor_classes.xml @@ -1112,7 +1112,7 @@ - + @@ -1126,7 +1126,7 @@ - + @@ -5023,13 +5023,13 @@ - + - + - + diff --git a/code/ryzom/common/src/game_share/_backup_service_interface_non_module.cpp b/code/ryzom/common/src/game_share/_backup_service_interface_non_module.cpp index 2e1d474b2..801d78433 100644 --- a/code/ryzom/common/src/game_share/_backup_service_interface_non_module.cpp +++ b/code/ryzom/common/src/game_share/_backup_service_interface_non_module.cpp @@ -381,7 +381,7 @@ void CBSIINonModule::activate() // setup the callback array CUnifiedNetwork::getInstance()->addCallbackArray( CbArray, sizeof(CbArray)/sizeof(CbArray[0]) ); - string host = BackupServiceIP; + string host = BackupServiceIP.get(); if(host.empty()) { nlwarning("Can't use backup because BSHost variable is empty"); diff --git a/code/ryzom/common/src/game_share/base_types.h b/code/ryzom/common/src/game_share/base_types.h index 250e5f5e4..f24daa69a 100644 --- a/code/ryzom/common/src/game_share/base_types.h +++ b/code/ryzom/common/src/game_share/base_types.h @@ -238,12 +238,11 @@ public: CHashCode() {} - static const size_t bucket_size = 4; - static const size_t min_buckets = 8; + enum { bucket_size = 4, min_buckets = 8, }; size_t operator () ( const TDataSetRow &index ) const { return index.getHashCode(); } - bool operator() (const TDataSetRow &index1, const TDataSetRow &index2) const { return index1.getHashCode() < index2.getHashCode(); } + bool operator() (const TDataSetRow &index1, const TDataSetRow &index2) const { return index1 < index2; } }; /// Warning: method to avoid (use it only when using rows as a static array) diff --git a/code/ryzom/common/src/game_share/brick_types.h b/code/ryzom/common/src/game_share/brick_types.h index fafdb2e4f..871a02cfb 100644 --- a/code/ryzom/common/src/game_share/brick_types.h +++ b/code/ryzom/common/src/game_share/brick_types.h @@ -43,7 +43,7 @@ namespace BRICK_TYPE TIMED_ACTION, BRICK_TYPE_COUNT, BONUS, - UNKNOWN + UNKNOWN // Warning: Shouldn't exceed 32 }; diff --git a/code/ryzom/common/src/game_share/crypt.cpp b/code/ryzom/common/src/game_share/crypt.cpp index 9a46281f7..1750d5d20 100644 --- a/code/ryzom/common/src/game_share/crypt.cpp +++ b/code/ryzom/common/src/game_share/crypt.cpp @@ -520,7 +520,7 @@ char * rz_crypt(register const char *key, register const char *setting, char *bu return buff; #endif - if (setting[0] == '$' && setting[1] == '6') { + if (strlen(setting) >= 2 && setting[0] == '$' && setting[1] == '6') { return __crypt_sha512(key, setting, buf); } diff --git a/code/ryzom/common/src/game_share/deployment_configuration.cpp b/code/ryzom/common/src/game_share/deployment_configuration.cpp index 52fc9087c..8957c89ac 100644 --- a/code/ryzom/common/src/game_share/deployment_configuration.cpp +++ b/code/ryzom/common/src/game_share/deployment_configuration.cpp @@ -313,13 +313,13 @@ namespace DEPCFG void CInfoBlock::addUseEntry(const NLMISC::CSString& entry,const NLMISC::CSString& context,uint32& errors) { - DROP_IF(_UseEntries.find(entry)!=_UseEntries.end(),context+"Ignoring duplicate refference to 'use' clause: "+entry,return); + DROP_IF(_UseEntries.find(entry) != _UseEntries.end(), context + "Ignoring duplicate refference to 'use' clause: " + entry.c_str(), return); _UseEntries.insert(entry); } void CInfoBlock::addDataEntry(const NLMISC::CSString& entry,const NLMISC::CSString& context,uint32& errors) { - DROP_IF(_DataEntries.find(entry)!=_DataEntries.end(),context+"Ignoring duplicate refference to 'data' clause: "+entry,return); + DROP_IF(_DataEntries.find(entry) != _DataEntries.end(), context + "Ignoring duplicate refference to 'data' clause: " + entry.c_str(), return); _DataEntries.insert(entry); } @@ -406,10 +406,10 @@ namespace DEPCFG // try to get a pointer to the refferenced info block... CInfoBlock* infoBlockPtr= container->getInfoBlock(theEntry); - DROP_IF(infoBlockPtr==NULL,"Failed to find block named '"+theEntry+"' while fixing up children of block: "+_Name, ++errors;continue); + DROP_IF(infoBlockPtr == NULL, "Failed to find block named '" + theEntry + "' while fixing up children of block: " + _Name.c_str(), ++errors; continue); // make sure that this block doesn't figure amongst the children of the refferenced info block (to avoid circular refs) - DROP_IF(_haveCircularRef(infoBlockPtr),"Circular dependency found between definitions of '"+_Name+"' and '"+theEntry+"'", ++errors;continue); + DROP_IF(_haveCircularRef(infoBlockPtr), "Circular dependency found between definitions of '" + _Name + "' and '" + theEntry.c_str() + "'", ++errors; continue); // add the info block to our children _Children.push_back(infoBlockPtr); @@ -431,7 +431,7 @@ namespace DEPCFG DROP_IF(!_ShardName.empty() && !theExe.ShardName.empty(), "more than one shard found in: "+theExe.FullName, ++errors ); DROP_IF(!_CmdLine.empty() && !theExe.CmdLine.empty(), "more than one cmdLine found in: "+theExe.FullName, ++errors ); DROP_IF(!_Host.empty() && !theExe.Host.empty(), "more than one host found in: "+theExe.FullName, ++errors ); - WARN_IF(!_UniqueName.empty() && !theExe.UniqueName.empty(), "replacing name '"+theExe.UniqueName+"' with '"+_UniqueName+"' in: "+theExe.FullName); + WARN_IF(!_UniqueName.empty() && !theExe.UniqueName.empty(), "replacing name '" + theExe.UniqueName + "' with '" + _UniqueName.c_str() + "' in: " + theExe.FullName.c_str()); // fill our own data into the exe record if (!_DomainName.empty()) theExe.DomainName = _DomainName; @@ -645,22 +645,22 @@ namespace DEPCFG // try to treat the keyword if (keyword=="include") { - DROP_IF(args.empty(),context+"No file name found following 'include': "+line, ++errors;continue); - DROP_IF(fileNameSet.find(args)!=fileNameSet.end(),context+"Warning: Duplicate 'include' block ignored: "+line, continue); + DROP_IF(args.empty(), context + "No file name found following 'include': " + line.c_str(), ++errors; continue); + DROP_IF(fileNameSet.find(args) != fileNameSet.end(), context + "Warning: Duplicate 'include' block ignored: " + line.c_str(), continue); fileNameSet.insert(args); _readFile(args.unquoteIfQuoted(),errors,fileNameSet); } else if (keyword=="define") { - DROP_IF(args.empty(),context+"No block name found following 'define': "+line, ++errors;continue); - DROP_IF(_InfoBlocks.find(args)!=_InfoBlocks.end(),context+"Duplicate 'define' block found: "+line, ++errors;continue); + DROP_IF(args.empty(), context + "No block name found following 'define': " + line.c_str(), ++errors; continue); + DROP_IF(_InfoBlocks.find(args) != _InfoBlocks.end(), context + "Duplicate 'define' block found: " + line.c_str(), ++errors; continue); // create a new info block and push it into our infoblock set _CurrentInfoBlock= new CInfoBlock(args); _InfoBlocks[args]= _CurrentInfoBlock; } else { - DROP_IF(_CurrentInfoBlock==NULL,context+"Expecting 'define ' but found: "+line, ++errors;continue); + DROP_IF(_CurrentInfoBlock == NULL, context + "Expecting 'define ' but found: " + line.c_str(), ++errors; continue); if (keyword=="domain") { _CurrentInfoBlock->setDomainName(args,context,errors); } else if (keyword=="shard") { _CurrentInfoBlock->setShardName(args,context,errors); } @@ -674,7 +674,7 @@ namespace DEPCFG else if (keyword=="cfgAfter") { _CurrentInfoBlock->addCfgEntryPost(rawArgs,context,errors); } else if (keyword=="cfgFile") { _CurrentInfoBlock->addCfgFile(args,context,errors); } else if (keyword=="cfgFileAfter") { _CurrentInfoBlock->addCfgFilePost(args,context,errors); } - else { DROP(context+"Unrecognised keyword: "+line, ++errors;continue); } + else { DROP(context + "Unrecognised keyword: " + line.c_str(), ++errors; continue); } } } } @@ -725,7 +725,7 @@ namespace DEPCFG // yell if the name already looks like a 'fixed up' name DROP_IF(name.right(3).left(1)=="_" && (name.right(2)=="00" || name.right(2).atoui()!=0),"Appending '_' to name ending in '_00' style format as this can clash with auto renumbering => "+name+'_',name+='_') // compose a second version of the name with the shard name added - NLMISC::CSString name_with_shard= name+'_'+it2->ShardName; + NLMISC::CSString name_with_shard = name + '_' + it2->ShardName.c_str(); // insert both versions of the name into the unique name counter ++nameCounts[name]; ++nameCounts[name_with_shard]; @@ -1123,7 +1123,7 @@ namespace DEPCFG result.CfgFile= "// Auto generated config file\n" "// Use with commandline: "+theApp.CmdLine+"\n" - "AESAliasName= \""+appName+"\";\n" + "AESAliasName= \"" + appName.c_str() + "\";\n" "\n"; // copy the cfg set to the result record (the cfgAfter set should have been merged in already) diff --git a/code/ryzom/common/src/game_share/fame.cpp b/code/ryzom/common/src/game_share/fame.cpp index b453bca4e..ca226ecdc 100644 --- a/code/ryzom/common/src/game_share/fame.cpp +++ b/code/ryzom/common/src/game_share/fame.cpp @@ -479,10 +479,9 @@ void CStaticFames::loadStaticFame( const string& filename ) else NLMISC::fromString(s.substr(sep+1, s.size()-sep-1), factor); // Fames in file are in [-600;600] so don't forget 1000 factor - sint32 fame; float fameFloat; NLMISC::fromString(s.substr(0, sep), fameFloat); - fame = (sint32)(fameFloat * 1000.f); + sint32 fame = (sint32)(fameFloat * 1000.f); _FameTable[iFaction*_FameTableSize + jFaction] = fame; _PropagationFactorTable[iFaction*_FameTableSize + jFaction] = factor; diff --git a/code/ryzom/common/src/game_share/people_pd.h b/code/ryzom/common/src/game_share/people_pd.h index 379a09378..ffcf8732f 100644 --- a/code/ryzom/common/src/game_share/people_pd.h +++ b/code/ryzom/common/src/game_share/people_pd.h @@ -51,6 +51,7 @@ public: enum TPeople { + Undefined = -1, Humanoid = 0, Playable = 0, Fyros = 0, diff --git a/code/ryzom/common/src/game_share/persistent_data_inline.h b/code/ryzom/common/src/game_share/persistent_data_inline.h index 72ef3fc9d..a2d575eef 100644 --- a/code/ryzom/common/src/game_share/persistent_data_inline.h +++ b/code/ryzom/common/src/game_share/persistent_data_inline.h @@ -706,7 +706,12 @@ inline float CPersistentDataRecord::CArg::asFloat() const case UINT64: return (float)(uint64)_Value.i64; case FLOAT32: return (float)_Value.f32; case FLOAT64: return (float)_Value.f64; - case STRING: return (float)atof(_String.c_str()); + case STRING: + { + float val; + NLMISC::fromString(_String, val); + return val; + } case FLAG: return 1.0f; case EXTEND_TYPE: switch(_Value.ExType) @@ -733,7 +738,12 @@ inline double CPersistentDataRecord::CArg::asDouble() const case UINT64: return (double)(uint64)_Value.i64; case FLOAT32: return (double)_Value.f32; case FLOAT64: return (double)_Value.f64; - case STRING: return (double)atof(_String.c_str()); + case STRING: + { + double val; + NLMISC::fromString(_String, val); + return val; + } case FLAG: return 1.0; case EXTEND_TYPE: switch(_Value.ExType) diff --git a/code/ryzom/common/src/game_share/persistent_data_tree.cpp b/code/ryzom/common/src/game_share/persistent_data_tree.cpp index 63252a70c..feefbad1c 100644 --- a/code/ryzom/common/src/game_share/persistent_data_tree.cpp +++ b/code/ryzom/common/src/game_share/persistent_data_tree.cpp @@ -139,10 +139,10 @@ bool CPersistentDataTreeNode::attachToParent(CPersistentDataTreeNode* parent) bool CPersistentDataTreeNode::attachToParent(CPersistentDataTreeNode* parent,uint32 idx) { // check value of 'idx' - BOMB_IF(parent!=NULL && idx>1024*1024,"Implausibly high number of children requested ("+NLMISC::toString("%d",idx)+") for persistent data tree node: "+parent->getNodeName(),return false); + BOMB_IF(parent != NULL && idx>1024 * 1024, "Implausibly high number of children requested (" + NLMISC::toString("%d", idx) + ") for persistent data tree node: " + parent->getNodeName().c_str(), return false); // check for attachment to previous parent - BOMB_IF(_Parent!=NULL,"Attempting to attach a persistent data node to parent '"+(parent==NULL?"NULL":parent->getNodeName())+"' when it's already attached to another parent as: "+getNodeName(),return false); + BOMB_IF(_Parent != NULL, "Attempting to attach a persistent data node to parent '" + (parent == NULL ? "NULL" : parent->getNodeName()) + "' when it's already attached to another parent as: " + getNodeName().c_str(), return false); // split the name into its component parts CSString mapIndex= _Name; @@ -159,7 +159,7 @@ bool CPersistentDataTreeNode::attachToParent(CPersistentDataTreeNode* parent,uin if (parent!=NULL) { // check parent isn't a value - BOMB_IF(parent->_IsValue,"Attempting to attach a persistent data node to parent that has a value '"+parent->getNodeName()+"' = "+parent->_Value,return false); + BOMB_IF(parent->_IsValue, "Attempting to attach a persistent data node to parent that has a value '" + parent->getNodeName() + "' = " + parent->_Value.c_str(), return false); if (hasExplicitIndex) { @@ -179,7 +179,7 @@ bool CPersistentDataTreeNode::attachToParent(CPersistentDataTreeNode* parent,uin } // ensure that there isn't already a node with the same '#' value attached to the same parent - DROP_IF(parent->_ChildIndex.find(nameBase+'#'+mapIndex)!=parent->_ChildIndex.end(),"Failed to add child '"+_Name+"' to parent '"+parent->getNodeName()+"' because another child of same name already exists",return false); + DROP_IF(parent->_ChildIndex.find(nameBase + '#' + mapIndex.c_str()) != parent->_ChildIndex.end(), "Failed to add child '" + _Name + "' to parent '" + parent->getNodeName().c_str() + "' because another child of same name already exists", return false); } } if (!hasExplicitIndex) @@ -190,7 +190,7 @@ bool CPersistentDataTreeNode::attachToParent(CPersistentDataTreeNode* parent,uin } // construct our cleaned up name from its constituent parts - _Name= nameBase+'#'+mapIndex; + _Name = nameBase + '#' + mapIndex.c_str(); // setup own _Parent property and ensure that there are no trailing spaces round the _Name _Parent= parent; @@ -205,7 +205,7 @@ bool CPersistentDataTreeNode::attachToParent(CPersistentDataTreeNode* parent,uin } // ensure that there isn't another child already assigned to this parent slot - BOMB_IF(_Parent->_Children[idx]!=NULL,"Ignoring attempt to add second child to same slot ("+NLMISC::toString("%d",idx)+") in persistent data tree node's children: "+_Parent->getNodeName(),return false); + BOMB_IF(_Parent->_Children[idx] != NULL, "Ignoring attempt to add second child to same slot (" + NLMISC::toString("%d", idx) + ") in persistent data tree node's children: " + _Parent->getNodeName().c_str(), return false); // write own pointer into parent's _Children vector _Parent->_Children[idx]= this; @@ -239,7 +239,7 @@ bool CPersistentDataTreeNode::readFromPdr(CPersistentDataRecord& pdr) return false; // pop the end of block token for the block we just finished processing - DROP_IF(pdr.peekNextToken()!=token,"ERROR: End of "+pdr.lookupString(token)+" block expected but not found at: "+getNodeName(),return false); + DROP_IF(pdr.peekNextToken() != token, "ERROR: End of " + pdr.lookupString(token) + " block expected but not found at: " + getNodeName().c_str(), return false); pdr.popStructEnd(token); } else if (pdr.isEndOfStruct()) @@ -259,7 +259,7 @@ bool CPersistentDataTreeNode::readFromPdr(CPersistentDataRecord& pdr) // extract the map key and ensure that it's followed by a valid __Val__ entry CSString mapKey; pdr.pop(mapKeyToken,mapKey); - DROP_IF(pdr.isEndOfData() || pdr.peekNextToken()!=mapValToken,"ERROR: Ignoring map key (__Key__) because __Val__ token expected but not found at: "+getNodeName()+":"+mapKey,continue); + DROP_IF(pdr.isEndOfData() || pdr.peekNextToken() != mapValToken, "ERROR: Ignoring map key (__Key__) because __Val__ token expected but not found at: " + getNodeName() + ":" + mapKey.c_str(), continue); if (needsQuotes(mapKey)) mapKey=mapKey.quote(); @@ -278,7 +278,7 @@ bool CPersistentDataTreeNode::readFromPdr(CPersistentDataRecord& pdr) return false; // pop the end of struct marker - DROP_IF(pdr.peekNextToken()!=mapValToken,"ERROR: End of __Val__ block expected but not found at: "+getNodeName()+":"+mapKey,return false); + DROP_IF(pdr.peekNextToken() != mapValToken, "ERROR: End of __Val__ block expected but not found at: " + getNodeName() + ":" + mapKey.c_str(), return false); pdr.popStructEnd(mapValToken); } else @@ -419,9 +419,9 @@ bool CPersistentDataTreeNode::writeToBuffer(NLMISC::CSString& buffer) const { // write a value if (needsQuotes(_Value)) - buffer+= getNodeName()+"=="+_Value.quote()+"\n"; + buffer += getNodeName() + "==" + _Value.quote().c_str() + "\n"; else - buffer+= getNodeName()+"="+_Value+"\n"; + buffer += getNodeName() + "=" + _Value.c_str() + "\n"; } else { @@ -468,8 +468,8 @@ CSString CPersistentDataTreeNode::getNodeName() const // return one of name, parentName.name and parentName:name if (parentName.empty()) return name; - if (isMapEntry()) return parentName+":"+name; - else return parentName+"."+name; + if (isMapEntry()) return parentName + ":" + name.c_str(); + else return parentName + "." + name.c_str(); } void CPersistentDataTreeNode::setValue(const TValue& value) @@ -507,7 +507,7 @@ bool CPersistentDataTreeNode::isMapEntry() const bool CPersistentDataTreeNode::flagAsMap() { - DROP_IF(_IsValue,"ERROR: Failed to flag persistent data tree node '"+getNodeName()+"' as a map as it already has a value: "+_Value,return false); + DROP_IF(_IsValue, "ERROR: Failed to flag persistent data tree node '" + getNodeName() + "' as a map as it already has a value: " + _Value.c_str(), return false); if (_IsMap) return true; diff --git a/code/ryzom/common/src/game_share/ryzom_mirror_properties.h b/code/ryzom/common/src/game_share/ryzom_mirror_properties.h index 55d8b9bbb..134ebe38b 100644 --- a/code/ryzom/common/src/game_share/ryzom_mirror_properties.h +++ b/code/ryzom/common/src/game_share/ryzom_mirror_properties.h @@ -138,7 +138,7 @@ void initRyzomVisualPropertyIndices( CMirroredDataSet& dataset ); #define TYPE_BOT_TRADE_SELECTOR2 uint64 #define TYPE_EVENT_FACTION_ID uint32 -#define TYPE_PVP_MODE uint32 +#define TYPE_PVP_MODE uint16 #define TYPE_PVP_CLAN uint32 #define TYPE_FUEL bool diff --git a/code/ryzom/common/src/game_share/ryzom_version.h b/code/ryzom/common/src/game_share/ryzom_version.h index f398c989f..9c9cdb504 100644 --- a/code/ryzom/common/src/game_share/ryzom_version.h +++ b/code/ryzom/common/src/game_share/ryzom_version.h @@ -17,8 +17,9 @@ #ifndef RYZOM_VERSION_H #define RYZOM_VERSION_H -#define RYZOM_VERSION "ryzomcore/" \ - "v0.11.1" \ +#define RYZOM_VERSION "ryzomcore" \ + "/" \ + "v0.12.0" \ "-dev" #endif // RYZOM_VERSION_H diff --git a/code/ryzom/common/src/game_share/server_animation_module.cpp b/code/ryzom/common/src/game_share/server_animation_module.cpp index 51d7ce19e..3d3548d54 100644 --- a/code/ryzom/common/src/game_share/server_animation_module.cpp +++ b/code/ryzom/common/src/game_share/server_animation_module.cpp @@ -1017,7 +1017,7 @@ IPrimitive* CServerAnimationModule::getAction(CObject* action, const std::string } if(result.size()>=2) - result[1] = "DSS_"+toString(scenarioId)+" "+result[1]; + result[1] = "DSS_"+toString(scenarioId)+" "+result[1].c_str(); if(result.size()>=3) { for(uint32 i=2;i - + - + diff --git a/code/ryzom/server/src/CMakeLists.txt b/code/ryzom/server/src/CMakeLists.txt index 29c11be09..08731a4ca 100644 --- a/code/ryzom/server/src/CMakeLists.txt +++ b/code/ryzom/server/src/CMakeLists.txt @@ -1,4 +1,3 @@ - # Supporting modules and libraries. # Need servershare for build packed collision tool # Need aishare for build wmap tool diff --git a/code/ryzom/server/src/admin_modules/CMakeLists.txt b/code/ryzom/server/src/admin_modules/CMakeLists.txt index ea8d8a5ff..9809b2f29 100644 --- a/code/ryzom/server/src/admin_modules/CMakeLists.txt +++ b/code/ryzom/server/src/admin_modules/CMakeLists.txt @@ -11,4 +11,8 @@ NL_ADD_LIB_SUFFIX(ryzom_adminmodules) ADD_DEFINITIONS(${LIBXML2_DEFINITIONS}) +IF(WITH_PCH) + ADD_NATIVE_PRECOMPILED_HEADER(ryzom_adminmodules ${CMAKE_CURRENT_SOURCE_DIR}/stdpch.h ${CMAKE_CURRENT_SOURCE_DIR}/stdpch.cpp) +ENDIF(WITH_PCH) + INSTALL(TARGETS ryzom_adminmodules LIBRARY DESTINATION ${RYZOM_LIB_PREFIX} ARCHIVE DESTINATION ${RYZOM_LIB_PREFIX} COMPONENT libraries) diff --git a/code/ryzom/server/src/admin_modules/admin_modules_itf.cpp b/code/ryzom/server/src/admin_modules/admin_modules_itf.cpp index 258409d16..39dfc6948 100644 --- a/code/ryzom/server/src/admin_modules/admin_modules_itf.cpp +++ b/code/ryzom/server/src/admin_modules/admin_modules_itf.cpp @@ -18,6 +18,7 @@ // WARNING : this is a generated file, don't change it ! ///////////////////////////////////////////////////////////////// +#include "stdpch.h" #include "admin_modules_itf.h" namespace ADMIN diff --git a/code/ryzom/server/src/admin_modules/aes_client_module.cpp b/code/ryzom/server/src/admin_modules/aes_client_module.cpp index e2b9ca390..7cb85f5a4 100644 --- a/code/ryzom/server/src/admin_modules/aes_client_module.cpp +++ b/code/ryzom/server/src/admin_modules/aes_client_module.cpp @@ -15,6 +15,7 @@ // along with this program. If not, see . +#include "stdpch.h" #include "nel/misc/singleton.h" #include "nel/net/module.h" #include "nel/net/module_builder_parts.h" @@ -259,7 +260,7 @@ namespace ADMIN gs.HighRezTimeStamp = timer; IVariable *var = dynamic_cast(ICommand::getCommand(gvi.VarName)); if (var != NULL) - gs.SampleValue = atof(var->toString().c_str()); + NLMISC::fromString(var->toString(), gs.SampleValue); } } } @@ -305,7 +306,11 @@ namespace ADMIN // no sample collected yet, just ask a new one IVariable *var = dynamic_cast(ICommand::getCommand(gvi.VarName)); if (var != NULL) - gd.setValue(atof(var->toString().c_str())); + { + float val; + NLMISC::fromString(var->toString(), val); + gd.setValue(val); + } } else { diff --git a/code/ryzom/server/src/admin_modules/aes_module.cpp b/code/ryzom/server/src/admin_modules/aes_module.cpp index c4faf5c47..734dfff64 100644 --- a/code/ryzom/server/src/admin_modules/aes_module.cpp +++ b/code/ryzom/server/src/admin_modules/aes_module.cpp @@ -15,6 +15,7 @@ // along with this program. If not, see . +#include "stdpch.h" #include "nel/misc/singleton.h" #include #include "nel/misc/path.h" @@ -573,7 +574,7 @@ namespace ADMIN time_t t = now; fprintf(fp, "AESReportDate=%s", ::ctime(&t)); - fprintf(fp, "NBService=%u\n", _ServiceStates.size()); + fprintf(fp, "NBService=%u\n", (uint)_ServiceStates.size()); // output state of each service TServiceStates::iterator first(_ServiceStates.begin()), last(_ServiceStates.end()); for (; first != last; ++first) diff --git a/code/ryzom/server/src/admin_modules/as_module.cpp b/code/ryzom/server/src/admin_modules/as_module.cpp index cbe1b2818..9717da358 100644 --- a/code/ryzom/server/src/admin_modules/as_module.cpp +++ b/code/ryzom/server/src/admin_modules/as_module.cpp @@ -14,6 +14,7 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . +#include "stdpch.h" #include "nel/misc/types_nl.h" #include #include "nel/misc/file.h" diff --git a/code/ryzom/server/src/admin_modules/stdpch.cpp b/code/ryzom/server/src/admin_modules/stdpch.cpp new file mode 100644 index 000000000..a3d45576c --- /dev/null +++ b/code/ryzom/server/src/admin_modules/stdpch.cpp @@ -0,0 +1,17 @@ +// Ryzom - MMORPG Framework +// 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 . + +#include "stdpch.h" diff --git a/code/ryzom/server/src/admin_modules/stdpch.h b/code/ryzom/server/src/admin_modules/stdpch.h new file mode 100644 index 000000000..be01e5019 --- /dev/null +++ b/code/ryzom/server/src/admin_modules/stdpch.h @@ -0,0 +1,45 @@ +// Ryzom - MMORPG Framework +// 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 . + +#ifndef ADMIN_MODULES_STDPCH_H +#define ADMIN_MODULES_STDPCH_H + +#include +#include + +#include "nel/misc/types_nl.h" + +#include "nel/misc/file.h" +#include "nel/misc/hierarchical_timer.h" +#include "nel/misc/mutable_container.h" +#include "nel/misc/path.h" +#include "nel/misc/singleton.h" +#include "nel/misc/sstring.h" +#include "nel/misc/string_conversion.h" +#include "nel/misc/time_nl.h" +#include "nel/net/message.h" +#include "nel/net/module.h" +#include "nel/net/module_builder_parts.h" +#include "nel/net/module_gateway.h" +#include "nel/net/module_manager.h" +#include "nel/net/module_message.h" +#include "nel/net/service.h" +#include "nel/net/unified_network.h" + +#include "game_share/callback_adaptor.h" +#include "game_share/utils.h" + +#endif diff --git a/code/ryzom/server/src/ags_test/commands.cpp b/code/ryzom/server/src/ags_test/commands.cpp index 7b2e6c2a8..4fa955401 100644 --- a/code/ryzom/server/src/ags_test/commands.cpp +++ b/code/ryzom/server/src/ags_test/commands.cpp @@ -586,7 +586,10 @@ NLMISC_COMMAND(actorSetOrientation,"Add one or more static actors"," if (i<(sizeof(angleNames)/sizeof(angleNames[0]))) theta=3.14159265359f*2.0f*(float)i/(float)(sizeof(angleNames)/sizeof(angleNames[0])); else - theta=(float)atof(args[0].c_str())/360.0f*2.0f*3.14159265359f; + { + NLMISC::fromString(args[0], theta); + theta = theta / 360.0f*2.0f*3.14159265359f; + } if (args.size()==1) { @@ -620,11 +623,13 @@ NLMISC_COMMAND(actorSetMagnetRange,"Set the magnet properties for wandering beha if(args.size() <1) return false; COMMAND_MACRO_RECORD_TEST - float range=(float)atof(args[0].c_str()); + float range; + NLMISC::fromString(args[0], range); if (range<=0.0f) return false; unsigned start; - float decay=(float)atof(args[0].c_str()); + float decay; + NLMISC::fromString(args[0], decay); if (decay<0.0f) return false; if (decay==0.0f) { @@ -664,7 +669,8 @@ NLMISC_COMMAND(actorSetAttackDistance,"set actor attack distance"," [< if(args.size() <1) return false; COMMAND_MACRO_RECORD_TEST - float distance=(float)atof(args[0].c_str()); + float distance; + NLMISC::fromString(args[0], distance); // if (distance<=0.0f) return false; if (args.size()<2) @@ -781,11 +787,13 @@ NLMISC_COMMAND(actorSetRespawnDelay,"set actor respawn delay"," [ filters; diff --git a/code/ryzom/server/src/ai_data_service/pacs_scan.cpp b/code/ryzom/server/src/ai_data_service/pacs_scan.cpp index 28e55559c..e52b97573 100644 --- a/code/ryzom/server/src/ai_data_service/pacs_scan.cpp +++ b/code/ryzom/server/src/ai_data_service/pacs_scan.cpp @@ -1651,7 +1651,7 @@ public: first.flags = (topNode.isInWater() ? 1 : 0) + (topNode.isInNogo() ? 2 : 0); // push first position - stacks[first.flags].insert(make_pair(first.flags, stwp)); + stacks[first.flags].insert(std::pair(first.flags, stwp)); while (true) { @@ -1750,11 +1750,11 @@ public: } if (tmp.getTopologyNode().Id == topNode.Id) { - stacks[0].insert(make_pair(ndist, tmp)); + stacks[0].insert(std::pair(ndist, tmp)); } else { - stacks[tmpflags+1].insert(make_pair(ndist, tmp)); + stacks[tmpflags + 1].insert(std::pair(ndist, tmp)); } } } @@ -2465,9 +2465,17 @@ NLMISC_COMMAND(setDefaultStart,"Set the default start point for all continents", CVectorD startPoint; - startPoint.x = atof(args[0].c_str()); - startPoint.y = atof(args[1].c_str()); - startPoint.z = (args.size() < 3 ? 0.0 : atof(args[2].c_str())); + NLMISC::fromString(args[0], startPoint.x); + NLMISC::fromString(args[1], startPoint.y); + + if (args.size() > 2) + { + NLMISC::fromString(args[2], startPoint.z); + } + else + { + startPoint.z = 0.0; + } DefaultStartPoint = startPoint; @@ -2921,13 +2929,15 @@ NLMISC_COMMAND(testPacsMove, "test a pacs move", " " if (args.size() != 5) return false; - CPacsCruncher pc; + CPacsCruncher pc; + + string name = args[0]; - string name = args[0]; - double x = atof(args[1].c_str()); - double y = atof(args[2].c_str()); - double dx = atof(args[3].c_str()); - double dy = atof(args[4].c_str()); + double x, y, dx, dy; + NLMISC::fromString(args[1], x); + NLMISC::fromString(args[2], y); + NLMISC::fromString(args[3], dx); + NLMISC::fromString(args[4], dy); pc.init(name); diff --git a/code/ryzom/server/src/ai_service/ai.cpp b/code/ryzom/server/src/ai_service/ai.cpp index 587e5ac0c..49144fa9d 100644 --- a/code/ryzom/server/src/ai_service/ai.cpp +++ b/code/ryzom/server/src/ai_service/ai.cpp @@ -224,7 +224,7 @@ uint32 CAIS::getEmotNumber(const std::string &name) { std::map::iterator it(_EmotNames.find(name)); if (it==_EmotNames.end()) - return ~0; + return std::numeric_limits::max(); return it->second; } @@ -280,7 +280,7 @@ uint32 CAIS::createAIInstance(const std::string &continentName, uint32 instanceN continue; nlwarning("CAIS::createAIInstance: instance number %u is already in use, can't create new instance.", instanceNumber); - return ~0; + return std::numeric_limits::max(); } CAIInstance *aii = _AIInstances.addChild(new CAIInstance(this)); diff --git a/code/ryzom/server/src/ai_service/ai.h b/code/ryzom/server/src/ai_service/ai.h index 4f9a7d802..57ff524ec 100644 --- a/code/ryzom/server/src/ai_service/ai.h +++ b/code/ryzom/server/src/ai_service/ai.h @@ -104,7 +104,7 @@ public: // classic init(), update() and release() /** create an AI instance, return the instance index in the AIList - * Return ~0 if the instance number is already in use. + * Return std::numeric_limits::max() if the instance number is already in use. */ uint32 createAIInstance(const std::string &continentName, uint32 instanceNumber); /** destroy an AI Instance (useful for ring creation / destruction of session) @@ -205,7 +205,7 @@ public: /// Time warp managment. This method is called when time as warped more than 600ms bool advanceUserTimer(uint32 nbTicks); - /// Retreive emot number given it's name, return ~0 if not found + /// Retreive emot number given it's name, return std::numeric_limits::max() if not found uint32 getEmotNumber(const std::string &name); CCont &AIList () { return _AIInstances; } @@ -243,7 +243,7 @@ public: class CCounter { public: - CCounter(const uint32 max=~0):_Total(0),_Max(max) + CCounter(const uint32 max=std::numeric_limits::max()):_Total(0),_Max(max) {} virtual ~CCounter() {} diff --git a/code/ryzom/server/src/ai_service/ai_bot_npc.cpp b/code/ryzom/server/src/ai_service/ai_bot_npc.cpp index cb183850e..201cc517c 100644 --- a/code/ryzom/server/src/ai_service/ai_bot_npc.cpp +++ b/code/ryzom/server/src/ai_service/ai_bot_npc.cpp @@ -714,9 +714,12 @@ void CBotNpc::sendVPA() // alternate VPA void CBotNpc::sendVisualProperties() // VisualPropertyA, B, C { - CMirrors::setVisualPropertyA( getSpawn()->dataSetRow(), _VisualPropertyA ); - CMirrors::setVisualPropertyB( getSpawn()->dataSetRow(), _VisualPropertyB ); - CMirrors::setVisualPropertyC( getSpawn()->dataSetRow(), _VisualPropertyC ); + if (getSpawn()) + { + CMirrors::setVisualPropertyA( getSpawn()->dataSetRow(), _VisualPropertyA ); + CMirrors::setVisualPropertyB( getSpawn()->dataSetRow(), _VisualPropertyB ); + CMirrors::setVisualPropertyC( getSpawn()->dataSetRow(), _VisualPropertyC ); + } } bool CBotNpc::reSpawn(bool sendMessage) @@ -875,9 +878,9 @@ Colors are something like that: 2: VERT CITRON VERT CITRON GREEN 3: VERT VERT TURQUOISE 4: BLEU BLEU BLUE -5: ROUGE fonce ROUGE (tout court) CRIMSON +5: ROUGE dark ROUGE (normal) CRIMSON 6: BLANC JAUNE WHITE -7: NOIR BLEU tres fonce BLACK +7: NOIR BLEU very dark BLACK 3D column is (probably) used for equipment */ diff --git a/code/ryzom/server/src/ai_service/ai_generic_fight.cpp b/code/ryzom/server/src/ai_service/ai_generic_fight.cpp index a19f747c3..f4c9a5cb0 100644 --- a/code/ryzom/server/src/ai_service/ai_generic_fight.cpp +++ b/code/ryzom/server/src/ai_service/ai_generic_fight.cpp @@ -571,7 +571,7 @@ bool CFightOrganizer::reorganizeIteration(CBot* bot) ennemy=entity; } } - entity->_ChooseLastTime=~0; + entity->_ChooseLastTime = std::numeric_limits::max(); } if (fleeEnnemy==NULL && !spawnBot->getUnreachableTarget().isNULL()) diff --git a/code/ryzom/server/src/ai_service/ai_grp_fauna.cpp b/code/ryzom/server/src/ai_service/ai_grp_fauna.cpp index 2bab5200d..6cd657ff2 100644 --- a/code/ryzom/server/src/ai_service/ai_grp_fauna.cpp +++ b/code/ryzom/server/src/ai_service/ai_grp_fauna.cpp @@ -220,7 +220,7 @@ void CSpawnGroupFauna::update() getPersistent().updateStateInstance(); - if (_CurrentCycle==~0) + if (_CurrentCycle==std::numeric_limits::max()) return; // Respawn @@ -606,9 +606,9 @@ CGrpFauna::CGrpFauna(CMgrFauna* mgr, CAIAliasDescriptionNode* aliasTree, RYAI_MA // state - _CurPopulation = ~0u; + _CurPopulation = std::numeric_limits::max(); - _CurrentCycle = ~0; + _CurrentCycle = std::numeric_limits::max(); // default values. setTimer(EAT_TIME, refTimer(EAT_TIME)); @@ -699,9 +699,9 @@ CAliasTreeOwner* CGrpFauna::createChild(IAliasCont* cont, CAIAliasDescriptionNod CAIPlaceXYRFauna *faunaPlace = new CAIPlaceXYRFauna(this, aliasTree); child = faunaPlace; uint placeIndex = faunaPlace->setupFromOldName(name); - nlassert(placeIndex!=~0); + nlassert(placeIndex!=std::numeric_limits::max()); - if (placeIndex!=~0) + if (placeIndex!=std::numeric_limits::max()) cont->addAliasChild(child, placeIndex); return child; @@ -769,7 +769,7 @@ bool CGrpFauna::spawn() return false; setStartState(getStartState()); // stateInstance. - return spawnPop(~0); + return spawnPop(std::numeric_limits::max()); } bool CGrpFauna::timeAllowSpawn(uint32 popVersion) const @@ -841,7 +841,7 @@ bool CGrpFauna::spawnPop(uint popVersion) } // check the validity of the input parameter - if (popVersion!=~0 && popVersion>=_Populations.size()) + if (popVersion!=std::numeric_limits::max() && popVersion>=_Populations.size()) { nlwarning("CGrpFauna::spawn(idx) FAILED for group %s because idx (%d) >= _Populations.size() (%d)",this->CGroup::getFullName().c_str(),popVersion,_Populations.size()); return false; diff --git a/code/ryzom/server/src/ai_service/ai_vector_mirror.h b/code/ryzom/server/src/ai_service/ai_vector_mirror.h index 0464de4fb..da229b4c3 100644 --- a/code/ryzom/server/src/ai_service/ai_vector_mirror.h +++ b/code/ryzom/server/src/ai_service/ai_vector_mirror.h @@ -95,7 +95,7 @@ public: // Methods. inline double distTo(const CAIVectorMirror &dest) const; inline double distSqTo(const CAIVectorMirror &dest) const; inline double quickDistTo(const CAIVectorMirror &dest) const; - + protected: inline void setX(const CAICoord &x) { _x=x; } inline void setY(const CAICoord &y) { _y=y; } diff --git a/code/ryzom/server/src/ai_service/child_container.h b/code/ryzom/server/src/ai_service/child_container.h index ab98d93af..0b5c79c4e 100644 --- a/code/ryzom/server/src/ai_service/child_container.h +++ b/code/ryzom/server/src/ai_service/child_container.h @@ -495,7 +495,7 @@ uint32 CAliasCont::getChildIndexByAlias(uint32 alias) const if (child!=NULL && child->getAlias()==alias) return (uint32)i; } - return ~0; + return std::numeric_limits::max(); } template diff --git a/code/ryzom/server/src/ai_service/commands.cpp b/code/ryzom/server/src/ai_service/commands.cpp index d257d0492..641503b70 100644 --- a/code/ryzom/server/src/ai_service/commands.cpp +++ b/code/ryzom/server/src/ai_service/commands.cpp @@ -229,8 +229,9 @@ NLMISC_COMMAND(eventCreateNpcGroup, "create an event npc group", " return true; } - double x = atof(args[3].c_str()); - double y = atof(args[4].c_str()); + double x, y; + NLMISC::fromString(args[3], x); + NLMISC::fromString(args[4], y); double dispersionRadius = 10.; if (args.size()>5) @@ -577,10 +578,10 @@ NLMISC_COMMAND(createStaticAIInstance, "Create a new static AIInstance for a giv CUsedContinent &uc = CUsedContinent::instance(); const uint32 in = uc.getInstanceForContinent(args[0]); - if (in == ~0) + if (in == INVALID_AI_INSTANCE) { nlwarning("The continent '%s' is unknow or not active. Can't create instance, FATAL", args[0].c_str()); - nlassert(in != ~0); + nlassert(in != INVALID_AI_INSTANCE); // nlassertex(in != ~0, ("The continent '%s' is unknow or not active. Can't create instance, FATAL", args[0].c_str())); } @@ -1969,9 +1970,13 @@ NLMISC_COMMAND(displayVision3x3,"display 3x3 cell vision centred on a given coor } } + double dx, dy; + NLMISC::fromString(args[1], dx); + NLMISC::fromString(args[2], dy); + CAICoord x, y; - x=atof(args[1].c_str()); - y=atof(args[2].c_str()); + x = dx; + y = dy; log.displayNL("3x3 Vision around (%.3f,%.3f)", x.asDouble(), y.asDouble()); uint32 botCount=0; diff --git a/code/ryzom/server/src/ai_service/continent_inline.h b/code/ryzom/server/src/ai_service/continent_inline.h index 49c21248e..4ddf09c18 100644 --- a/code/ryzom/server/src/ai_service/continent_inline.h +++ b/code/ryzom/server/src/ai_service/continent_inline.h @@ -695,7 +695,7 @@ static CAIVector randomPos(double dispersionRadius) { return CAIVector(0., 0.); } - uint32 const maxLimit=((uint32)~0U)>>1; + uint32 const maxLimit=(std::numeric_limits::max())>>1; double rval = (double)CAIS::rand32(maxLimit)/(double)maxLimit; // [0-1[ double r = dispersionRadius*sqrt(rval); rval = (double)CAIS::rand32(maxLimit)/(double)maxLimit; // [0-1[ diff --git a/code/ryzom/server/src/ai_service/event_manager.h b/code/ryzom/server/src/ai_service/event_manager.h index ab49b8d68..731539051 100644 --- a/code/ryzom/server/src/ai_service/event_manager.h +++ b/code/ryzom/server/src/ai_service/event_manager.h @@ -17,6 +17,8 @@ #ifndef RYAI_EVENT_MANAGER_H #define RYAI_EVENT_MANAGER_H +#include + #include "event_reaction.h" #include "states.h" diff --git a/code/ryzom/server/src/ai_service/family_behavior.h b/code/ryzom/server/src/ai_service/family_behavior.h index 893282ae0..52d534e1c 100644 --- a/code/ryzom/server/src/ai_service/family_behavior.h +++ b/code/ryzom/server/src/ai_service/family_behavior.h @@ -210,7 +210,7 @@ class CFamilyBehavior void spawnBoss(NLMISC::TStringId outpostName); - uint32 energyScale (uint32 levelIndex=~0) const; + uint32 energyScale (uint32 levelIndex=std::numeric_limits::max()) const; void setModifier (const float &value, const uint32 &index) { diff --git a/code/ryzom/server/src/ai_service/generic_logic_action.cpp b/code/ryzom/server/src/ai_service/generic_logic_action.cpp index afd0f9b3c..e2c761619 100644 --- a/code/ryzom/server/src/ai_service/generic_logic_action.cpp +++ b/code/ryzom/server/src/ai_service/generic_logic_action.cpp @@ -1407,13 +1407,12 @@ public: return false; } - // check if its a number or a var. - //TODO: et les variables negatives? + // check if it's a number or a var. + //TODO: and negative values ? if ((str[0]<='9' && str[0]>='0')||(str[0]=='-')) // its a number { var.Type = constant; - double val = atof(str.c_str()); - var.Value = float(val); + NLMISC::fromString(str, var.Value); return true; } diff --git a/code/ryzom/server/src/ai_service/nf_helpers.h b/code/ryzom/server/src/ai_service/nf_helpers.h index 2b8ead4e6..dc9c7c345 100644 --- a/code/ryzom/server/src/ai_service/nf_helpers.h +++ b/code/ryzom/server/src/ai_service/nf_helpers.h @@ -161,7 +161,7 @@ public: if (_value==-1) // not for affectation. return; - if (_index==~0) // all indexs ? + if (_index==std::numeric_limits::max()) // all indexs ? { for (uint32 nrjIndex=0;nrjIndex<4;nrjIndex++) fb->setModifier (_value, nrjIndex); diff --git a/code/ryzom/server/src/ai_service/path_behaviors.h b/code/ryzom/server/src/ai_service/path_behaviors.h index 8c509ae9d..6684b2db3 100644 --- a/code/ryzom/server/src/ai_service/path_behaviors.h +++ b/code/ryzom/server/src/ai_service/path_behaviors.h @@ -168,11 +168,11 @@ public: // - This method adds the new object to the top of the CFollowPath singleton's context stack // parameters: // - contextName : an arbitrary string naming the context - // - maxSearchDepth : the value that the path finder search depth should be limitted to (default to ~0u meaning no limit) + // - maxSearchDepth : the value that the path finder search depth should be limitted to (default to std::numeric_limits::max() meaning no limit) // - forceMaxDepth : set this flag true to override previous limit with larger value // example: - // - ... Before we begin ... CFollowPath::_MaxSearchDepth = ~0u - // - CFollowPathContext context1("tata") : CFollowPath::_MaxSearchDepth => ~0u + // - ... Before we begin ... CFollowPath::_MaxSearchDepth = std::numeric_limits::max() + // - CFollowPathContext context1("tata") : CFollowPath::_MaxSearchDepth => std::numeric_limits::max() // - CFollowPathContext context2("tete",456) : CFollowPath::_MaxSearchDepth => 456 // - CFollowPathContext context3("titi",123) : CFollowPath::_MaxSearchDepth => 123 // - CFollowPathContext context4("toto",456) : CFollowPath::_MaxSearchDepth => 123 @@ -182,9 +182,9 @@ public: // - CFollowPathContext context5.~CFollowPathContext() : CFollowPath::_MaxSearchDepth => 123 // - CFollowPathContext context4.~CFollowPathContext() : CFollowPath::_MaxSearchDepth => 123 // - CFollowPathContext context3.~CFollowPathContext() : CFollowPath::_MaxSearchDepth => 456 - // - CFollowPathContext context2.~CFollowPathContext() : CFollowPath::_MaxSearchDepth => ~0u - // - CFollowPathContext context1.~CFollowPathContext() : CFollowPath::_MaxSearchDepth => ~0u - CFollowPathContext(const char* contextName, uint32 maxSearchDepth=~0u, bool forceMaxDepth=false); + // - CFollowPathContext context2.~CFollowPathContext() : CFollowPath::_MaxSearchDepth => std::numeric_limits::max() + // - CFollowPathContext context1.~CFollowPathContext() : CFollowPath::_MaxSearchDepth => std::numeric_limits::max() + CFollowPathContext(const char* contextName, uint32 maxSearchDepth=std::numeric_limits::max(), bool forceMaxDepth=false); // dtor // - This method removes the destroyed object from the CFollowPath singleton's context stack @@ -270,7 +270,7 @@ private: friend class CFollowPathContext; CFollowPathContext* _TopFollowPathContext; public: - uint32 getMaxSearchDepth() const { return (_TopFollowPathContext==NULL)? ~0u: _TopFollowPathContext->getMaxSearchDepth(); } + uint32 getMaxSearchDepth() const { return (_TopFollowPathContext==NULL)? std::numeric_limits::max(): _TopFollowPathContext->getMaxSearchDepth(); } const char* getContextName() const; }; diff --git a/code/ryzom/server/src/ai_service/state_instance.h b/code/ryzom/server/src/ai_service/state_instance.h index 94755c143..3ad6e6d55 100644 --- a/code/ryzom/server/src/ai_service/state_instance.h +++ b/code/ryzom/server/src/ai_service/state_instance.h @@ -185,7 +185,7 @@ protected: CAITimerExtended _StateTimeout; /// current state (index into manager's state vector) CAIState* _state; - /// variable set to request a state change (~0 otherwise) + /// variable set to request a state change (std::numeric_limits::max() otherwise) CAIState* _NextState; /// timer for timing punctual states diff --git a/code/ryzom/server/src/ai_share/16x16_layer.cpp b/code/ryzom/server/src/ai_share/16x16_layer.cpp index c820e4f7b..4e78cf54e 100644 --- a/code/ryzom/server/src/ai_share/16x16_layer.cpp +++ b/code/ryzom/server/src/ai_share/16x16_layer.cpp @@ -100,7 +100,7 @@ I16x16Layer *I16x16Layer::compress(I16x16Layer *layer, sint32 blank) map::iterator it = count.find(val); if (it == count.end()) - count.insert(make_pair(val, 1)); + count.insert(std::pair(val, 1)); else ++((*it).second); } diff --git a/code/ryzom/server/src/ai_share/aids_messages.h b/code/ryzom/server/src/ai_share/aids_messages.h index 7ef43817b..734acbec3 100644 --- a/code/ryzom/server/src/ai_share/aids_messages.h +++ b/code/ryzom/server/src/ai_share/aids_messages.h @@ -97,16 +97,16 @@ class CMsgAIFeedback : public NLNET::CTransportClass public: std::string Message; - CMsgAIFeedback() + CMsgAIFeedback() { } - CMsgAIFeedback(std::string message) + CMsgAIFeedback(const std::string &message) { Message=message; } - CMsgAIFeedback(char *msgStr) + CMsgAIFeedback(const char *msgStr) { Message=std::string(msgStr); } @@ -120,6 +120,5 @@ public: virtual void callback (const std::string &name, NLNET::TServiceId id); }; - #endif diff --git a/code/ryzom/server/src/ai_share/primitive_parser.cpp b/code/ryzom/server/src/ai_share/primitive_parser.cpp index 892120902..dd52b4d7a 100644 --- a/code/ryzom/server/src/ai_share/primitive_parser.cpp +++ b/code/ryzom/server/src/ai_share/primitive_parser.cpp @@ -4176,7 +4176,7 @@ NLMISC_COMMAND(loadMap,"load a complete set of primitive files","") // check that the continent is active CUsedContinent &uc = CUsedContinent::instance(); uint32 in = uc.getInstanceForContinent(continentName); - if (in == ~0) + if (in == INVALID_AI_INSTANCE) { log.displayNL("loadMap : while loading map '%s', can't load primitive '%s' coz continent '%s' is not active", args[0].c_str(), @@ -4216,7 +4216,7 @@ NLMISC_COMMAND(unloadMap,"unload a complete set of primitive files","" // check that the continent is active CUsedContinent &uc = CUsedContinent::instance(); uint32 in = uc.getInstanceForContinent(continentName); - if (in == ~0) + if (in == INVALID_AI_INSTANCE) { log.displayNL("unloadMap : while loading map '%s', can't load primitive '%s' coz continent '%s' is not active", args[0].c_str(), diff --git a/code/ryzom/server/src/ai_share/world_map.cpp b/code/ryzom/server/src/ai_share/world_map.cpp index eae84acbf..f468c1144 100644 --- a/code/ryzom/server/src/ai_share/world_map.cpp +++ b/code/ryzom/server/src/ai_share/world_map.cpp @@ -1469,7 +1469,7 @@ bool CWorldMap::findAStarPath(CWorldPosition const& start, CWorldPosition const& uint father = (uint)nodes.size()-1; // Add start topology to visited nodes (father holds start topo node index for the moment) - visited.insert(make_pair(startTopo, father)); + visited.insert(std::pair(startTopo, father)); // Push start node in the heap with a zero cost heap.push(0.0f, father); @@ -1562,7 +1562,7 @@ bool CWorldMap::findAStarPath(CWorldPosition const& start, CWorldPosition const& // Add node to heap with a computed f(n)=g(n)+h(n) heap.push(distance + heuristic, child); // Add node to visited - visited.insert(make_pair(next, child)); + visited.insert(std::pair(next, child)); } } @@ -1633,7 +1633,7 @@ bool CWorldMap::findAStarPath(const CTopology::TTopologyId &start, const CTopolo uint father = (uint)nodes.size()-1; // add current to visited nodes - visited.insert(make_pair(startTopo, father)); + visited.insert(std::pair(startTopo, father)); heap.push(0.0f, father); bool found=false; @@ -1699,7 +1699,7 @@ bool CWorldMap::findAStarPath(const CTopology::TTopologyId &start, const CTopolo // add node to visited and to heap heap.push(heuristic, child); - visited.insert(make_pair(next, child)); + visited.insert(std::pair(next, child)); } } @@ -1767,7 +1767,7 @@ bool CWorldMap::findInsideAStarPath(CWorldPosition const& start, CWorldPosition uint father = (uint)nodes.size()-1; // Add start node to visited nodes (father holds start node index for the moment) - visited.insert(make_pair(startNode, father)); + visited.insert(std::pair(startNode, father)); // Push start node in the heap with a zero cost heap.push(0.0f, father); @@ -1854,7 +1854,7 @@ bool CWorldMap::findInsideAStarPath(CWorldPosition const& start, CWorldPosition // Add node to heap with a computed f(n)=g(n)+h(n) heap.push(distance + heuristic, child); // Add node to visited - visited.insert(make_pair(next, child)); + visited.insert(std::pair(next, child)); } } diff --git a/code/ryzom/server/src/backup_service/backup_service.cpp b/code/ryzom/server/src/backup_service/backup_service.cpp index aed50a32c..95c11d07a 100644 --- a/code/ryzom/server/src/backup_service/backup_service.cpp +++ b/code/ryzom/server/src/backup_service/backup_service.cpp @@ -718,7 +718,7 @@ void CBackupService::init() BSIsSlave = true; FileManager.forbidStall(); // I'm a slave, try to contact master - string host = MasterBSHost; + string host = MasterBSHost.get(); if (host.find (":") == string::npos) host += ":49990"; diff --git a/code/ryzom/server/src/backup_service/web_connection.cpp b/code/ryzom/server/src/backup_service/web_connection.cpp index 86a62902d..6afa8f885 100644 --- a/code/ryzom/server/src/backup_service/web_connection.cpp +++ b/code/ryzom/server/src/backup_service/web_connection.cpp @@ -209,10 +209,10 @@ void cbGetSaveList(CMemStream &msgin, TSockId host) explode(str, string("%%"), params, true); - string incrementalDir = IncrementalBackupDirectory; - string saveShardRoot = SaveShardRoot; - string templatePath = SaveTemplatePath; - string extList = SaveExtList; + string incrementalDir = IncrementalBackupDirectory.get(); + string saveShardRoot = SaveShardRoot.get(); + string templatePath = SaveTemplatePath.get(); + string extList = SaveExtList.get(); string shard; string userid; @@ -293,8 +293,8 @@ void cbRestoreSave(CMemStream &msgin, TSockId host) explode(str, string("%%"), params, true); - string saveShardRoot = SaveShardRoot; - string templatePath = SaveTemplatePath; + string saveShardRoot = SaveShardRoot.get(); + string templatePath = SaveTemplatePath.get(); string shard; string userid; @@ -368,9 +368,9 @@ void cbCopyOverSave(CMemStream &msgin, TSockId host) explode(str, string("%%"), params, true); - string saveShardRoot = SaveShardRoot; - string templatePath = SaveTemplatePath; - string extList = SaveExtList; + string saveShardRoot = SaveShardRoot.get(); + string templatePath = SaveTemplatePath.get(); + string extList = SaveExtList.get(); string shard; string userid; diff --git a/code/ryzom/server/src/dynamic_scenario_service/service.cpp b/code/ryzom/server/src/dynamic_scenario_service/service.cpp index 342a05c23..07c454566 100644 --- a/code/ryzom/server/src/dynamic_scenario_service/service.cpp +++ b/code/ryzom/server/src/dynamic_scenario_service/service.cpp @@ -56,8 +56,6 @@ namespace R2 // The ligo config NLLIGO::CLigoConfig* LigoConfigPtr; CR2LigoConfig R2LigoConfig; - - } diff --git a/code/ryzom/server/src/entities_game_service/admin.cpp b/code/ryzom/server/src/entities_game_service/admin.cpp index 20941e77f..22254c64b 100644 --- a/code/ryzom/server/src/entities_game_service/admin.cpp +++ b/code/ryzom/server/src/entities_game_service/admin.cpp @@ -420,7 +420,7 @@ bool getAIInstanceFromGroupName(string& groupName, uint32& instanceNumber) { string continent = groupName.substr(0, groupName.find('@')); uint32 nr = CUsedContinent::instance().getInstanceForContinent(continent); - if (nr == ~0) + if (nr == INVALID_AI_INSTANCE) { return false; } @@ -4821,9 +4821,9 @@ NLMISC_COMMAND (webExecCommand, "Execute a web command", " getSlotCount(); ++ i) { const CGameItemPtr itemPtr = inventory->getItem(i); - if( itemPtr != NULL ) + if ( itemPtr != NULL ) { - if( (itemPtr->getSheetId() == sheetId) && (itemPtr->quality() == quality) ) + if ( (itemPtr->getSheetId() == sheetId) && (itemPtr->quality() == quality) ) { numberItem += itemPtr->getStackSize(); } @@ -4841,9 +4841,9 @@ NLMISC_COMMAND (webExecCommand, "Execute a web command", " getSlotCount(); ++ i) { const CGameItemPtr itemPtr = inventory->getItem(i); - if( itemPtr != NULL ) + if ( itemPtr != NULL ) { - if( (itemPtr->getSheetId() == sheetId) && (itemPtr->quality() == quality) ) + if ( (itemPtr->getSheetId() == sheetId) && (itemPtr->quality() == quality) ) { numberItem -= inventory->deleteStackItem(i, quantity); if(numberItem == 0) @@ -5053,7 +5053,8 @@ NLMISC_COMMAND (webExecCommand, "Execute a web command", " getType()) + + if (creature == NULL || creatureSheetId == CSheetId::Unknown || creatureSheetId != creature->getType()) { if (send_url) c->sendUrl(web_app_url+"&player_eid="+c->getId().toString()+"&event=failed&desc=bad_sheet", getSalt()); @@ -5686,7 +5687,7 @@ NLMISC_COMMAND (webExecCommand, "Execute a web command", " getHomeMainlandSessionId(), value)); - if (entityBase == 0) + if (entityBase == NULL) { // try to find the bot name vector aliases; @@ -5711,7 +5712,7 @@ NLMISC_COMMAND (webExecCommand, "Execute a web command", " getState().X + sint32 (cos (entityBase->getState ().Heading) * 2000); y = entityBase->getState().Y + sint32 (sin (entityBase->getState ().Heading) * 2000); diff --git a/code/ryzom/server/src/entities_game_service/database_plr.cpp b/code/ryzom/server/src/entities_game_service/database_plr.cpp index 7cf0d2108..4b5fa84fd 100644 --- a/code/ryzom/server/src/entities_game_service/database_plr.cpp +++ b/code/ryzom/server/src/entities_game_service/database_plr.cpp @@ -1,3 +1,18 @@ +// Ryzom - MMORPG Framework +// 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 . ///////////////////////////////////////////////////////////////// // WARNING : this is a generated file, don't change it ! @@ -347,7 +362,7 @@ void CBankAccessor_PLR::TUSER::init(ICDBStructNode *parent) node = parent->getNode( ICDBStructNode::CTextId("IS_INVISIBLE"), false ); nlassert(node != NULL); _IS_INVISIBLE = node; - + node = parent->getNode( ICDBStructNode::CTextId("COUNTER"), false ); nlassert(node != NULL); _COUNTER = node; @@ -3124,11 +3139,10 @@ void CBankAccessor_PLR::TPACK_ANIMAL::TBEAST::init(ICDBStructNode *parent, uint node = parent->getNode( ICDBStructNode::CTextId("DESPAWN"), false ); nlassert(node != NULL); _DESPAWN = node; - + node = parent->getNode( ICDBStructNode::CTextId("NAME"), false ); nlassert(node != NULL); _NAME = node; - // branch init diff --git a/code/ryzom/server/src/entities_game_service/database_plr.h b/code/ryzom/server/src/entities_game_service/database_plr.h index 38a394c88..67e0f7798 100644 --- a/code/ryzom/server/src/entities_game_service/database_plr.h +++ b/code/ryzom/server/src/entities_game_service/database_plr.h @@ -1,3 +1,18 @@ +// Ryzom - MMORPG Framework +// 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 . #ifndef INCLUDED_DATABASE_PLR_H @@ -941,8 +956,6 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C void setIS_INVISIBLE(CCDBSynchronised &dbGroup, bool value, bool forceSending = false) { - - _setProp(dbGroup, _IS_INVISIBLE, value, forceSending); } @@ -958,7 +971,7 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C { return _IS_INVISIBLE; } - + void setCOUNTER(CCDBSynchronised &dbGroup, uint8 value, bool forceSending = false) { @@ -1300,13 +1313,14 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C { return _DODGE; } - TBRICK_TICK_RANGE &getBRICK_TICK_RANGE() + + TBRICK_TICK_RANGE &getBRICK_TICK_RANGE() { return _BRICK_TICK_RANGE; } - + }; - + class TTARGET { public: @@ -3457,8 +3471,6 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C void setMONEY(CCDBSynchronised &dbGroup, uint64 value, bool forceSending = false) { - - _setProp(dbGroup, _MONEY, value, forceSending); } @@ -4560,8 +4572,6 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C void setMONEY(CCDBSynchronised &dbGroup, uint64 value, bool forceSending = false) { - - _setProp(dbGroup, _MONEY, value, forceSending); } @@ -4572,14 +4582,12 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C return value; } - + ICDBStructNode *getMONEYCDBNode() { return _MONEY; } - }; - private: ICDBStructNode *_BranchNode; @@ -4602,11 +4610,8 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C return _BranchNode; } - void setMONEY(CCDBSynchronised &dbGroup, uint64 value, bool forceSending = false) { - - _setProp(dbGroup, _MONEY, value, forceSending); } @@ -6000,8 +6005,6 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C void setMONEY_SHEET(CCDBSynchronised &dbGroup, NLMISC::CSheetId value, bool forceSending = false) { - - _setProp(dbGroup, _MONEY_SHEET, value, forceSending); } @@ -8858,7 +8861,6 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C ICDBStructNode *_HUNGER; ICDBStructNode *_DESPAWN; ICDBStructNode *_NAME; - public: void init(ICDBStructNode *parent, uint index); @@ -9047,11 +9049,9 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C { return _DESPAWN; } - + void setNAME(CCDBSynchronised &dbGroup, uint32 value, bool forceSending = false) { - - _setProp(dbGroup, _NAME, value, forceSending); } @@ -9062,12 +9062,11 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C return value; } - + ICDBStructNode *getNAMECDBNode() { return _NAME; } - }; diff --git a/code/ryzom/server/src/entities_game_service/deposit.cpp b/code/ryzom/server/src/entities_game_service/deposit.cpp index 7d8000f4d..d4cd560ad 100644 --- a/code/ryzom/server/src/entities_game_service/deposit.cpp +++ b/code/ryzom/server/src/entities_game_service/deposit.cpp @@ -16,6 +16,7 @@ #include "stdpch.h" +#include #include "deposit.h" #include "player_manager/character.h" #include "player_manager/player_manager.h" diff --git a/code/ryzom/server/src/entities_game_service/dyn_chat_egs.cpp b/code/ryzom/server/src/entities_game_service/dyn_chat_egs.cpp index 90d41820f..98ec86a75 100644 --- a/code/ryzom/server/src/entities_game_service/dyn_chat_egs.cpp +++ b/code/ryzom/server/src/entities_game_service/dyn_chat_egs.cpp @@ -507,7 +507,7 @@ void CDynChatEGS::iosSetHideBubble(TChanID chan, bool hideBubble) void CDynChatEGS::iosSetUniversalChannel(TChanID chan, bool universalChannel) { CMessage msg("DYN_CHAT:SET_UNIVERSAL_CHANNEL"); - msg.serial(chan); + msg.serial(chan); msg.serial(universalChannel); sendMessageViaMirror( "IOS", msg); } diff --git a/code/ryzom/server/src/entities_game_service/fame_pd.cpp b/code/ryzom/server/src/entities_game_service/fame_pd.cpp index db2104c5d..2e201412a 100644 --- a/code/ryzom/server/src/entities_game_service/fame_pd.cpp +++ b/code/ryzom/server/src/entities_game_service/fame_pd.cpp @@ -516,7 +516,7 @@ void CFameContainerPD::pds__fetch(RY_PDS::CPData &data) if (rowIndex == RY_PDS::INVALID_ROW_INDEX || tableIndex == RY_PDS::INVALID_TABLE_INDEX) break; NLMISC::CSheetId __k; data.serial(__k); - _Entries.insert(std::make_pair(__k, CFameContainerEntryPD())); + _Entries.insert(std::pair(__k, CFameContainerEntryPD())); CFameContainerEntryPD* __o = &(_Entries[__k]); PDSLib.setRowIndex(rowIndex, __o); __o->pds__fetch(data); diff --git a/code/ryzom/server/src/entities_game_service/game_event_manager.cpp b/code/ryzom/server/src/entities_game_service/game_event_manager.cpp index 5346809a3..b95fb1ad4 100644 --- a/code/ryzom/server/src/entities_game_service/game_event_manager.cpp +++ b/code/ryzom/server/src/entities_game_service/game_event_manager.cpp @@ -59,7 +59,7 @@ CGameEventManager::CGameEventManager() // ---------------------------------------------------------------------------- void CGameEventManager::init() { - string sFilename = GameEventFile; + string sFilename = GameEventFile.get(); sFilename = CPath::standardizePath(IService::getInstance()->WriteFilesDirectory) + sFilename; if (CFile::fileExists(sFilename)) @@ -302,7 +302,7 @@ void CGameEventManager::saveGameEventFile() { if( _InitOk ) { - string sFilename = GameEventFile; + string sFilename = GameEventFile.get(); sFilename = CPath::standardizePath(IService::getInstance()->WriteFilesDirectory) + sFilename; static CPersistentDataRecordRyzomStore pdr; diff --git a/code/ryzom/server/src/entities_game_service/game_item_manager/game_item.cpp b/code/ryzom/server/src/entities_game_service/game_item_manager/game_item.cpp index 30ff4acae..e36a4382e 100644 --- a/code/ryzom/server/src/entities_game_service/game_item_manager/game_item.cpp +++ b/code/ryzom/server/src/entities_game_service/game_item_manager/game_item.cpp @@ -242,11 +242,11 @@ float CItemCraftParameters::getCraftParameterValue( RM_FABER_STAT_TYPE::TRMStatT case RM_FABER_STAT_TYPE::ShockWaveProtection: case RM_FABER_STAT_TYPE::PoisonProtection: case RM_FABER_STAT_TYPE::ElectricityProtection: - if (Protection1 == statType) + if (Protection1 == (PROTECTION_TYPE::TProtectionType)statType) return Protection1Factor; - else if (Protection2 == statType) + else if (Protection2 == (PROTECTION_TYPE::TProtectionType)statType) return Protection2Factor; - else if (Protection3 == statType) + else if (Protection3 == (PROTECTION_TYPE::TProtectionType)statType) return Protection3Factor; else return 0.0f; case RM_FABER_STAT_TYPE::DesertResistance: diff --git a/code/ryzom/server/src/entities_game_service/guild_container_pd.cpp b/code/ryzom/server/src/entities_game_service/guild_container_pd.cpp index dea4e2a1d..7e025acdf 100644 --- a/code/ryzom/server/src/entities_game_service/guild_container_pd.cpp +++ b/code/ryzom/server/src/entities_game_service/guild_container_pd.cpp @@ -298,7 +298,7 @@ void CGuildContainerPD::pds__fetch(RY_PDS::CPData &data) TGuildId __k; data.serial(__k); CGuildPD* __o = static_cast(PDSLib.create(tableIndex)); - _Guilds.insert(std::make_pair(__k, __o)); + _Guilds.insert(std::pair(__k, __o)); PDSLib.setRowIndex(rowIndex, __o); __o->pds__fetch(data); __o->pds__setParentUnnotified(this); diff --git a/code/ryzom/server/src/entities_game_service/guild_manager/guild_member_module.cpp b/code/ryzom/server/src/entities_game_service/guild_manager/guild_member_module.cpp index 03a105445..c04347c08 100644 --- a/code/ryzom/server/src/entities_game_service/guild_manager/guild_member_module.cpp +++ b/code/ryzom/server/src/entities_game_service/guild_manager/guild_member_module.cpp @@ -559,7 +559,8 @@ void CGuildMemberModule::kickMember( uint16 index,uint8 session )const } // if the user is online reset its guild id CGuildMemberModule * module = NULL; - if ( member->getReferencingModule( module ) ) + + if (member->getReferencingModule(module)) { module->clearOnlineGuildProperties(); } @@ -568,7 +569,7 @@ void CGuildMemberModule::kickMember( uint16 index,uint8 session )const params[0].setEIdAIAlias( proxy.getId(), CAIAliasTranslator::getInstance()->getAIAlias(proxy.getId()) ); params[1].StringId = CEntityIdTranslator::getInstance()->getEntityNameStringId(member->getIngameEId()); sendMessageToGuildMembers("GUILD_KICK_MEMBER",params); - + guild->deleteMember( member ); } diff --git a/code/ryzom/server/src/entities_game_service/guild_pd.cpp b/code/ryzom/server/src/entities_game_service/guild_pd.cpp index 819ae72ad..1da40c221 100644 --- a/code/ryzom/server/src/entities_game_service/guild_pd.cpp +++ b/code/ryzom/server/src/entities_game_service/guild_pd.cpp @@ -470,7 +470,7 @@ void CGuildPD::pds__fetch(RY_PDS::CPData &data) TCharacterId __k; data.serial(__k); CGuildMemberPD* __o = static_cast(PDSLib.create(tableIndex)); - _Members.insert(std::make_pair(__k, __o)); + _Members.insert(std::pair(__k, __o)); PDSLib.setRowIndex(rowIndex, __o); __o->pds__fetch(data); __o->pds__setParentUnnotified(this); diff --git a/code/ryzom/server/src/entities_game_service/mission_client_callbacks.cpp b/code/ryzom/server/src/entities_game_service/mission_client_callbacks.cpp index 7cc0bf32a..98d784e11 100644 --- a/code/ryzom/server/src/entities_game_service/mission_client_callbacks.cpp +++ b/code/ryzom/server/src/entities_game_service/mission_client_callbacks.cpp @@ -236,6 +236,7 @@ void cbClientGroupAbandonMission( NLNET::CMessage& msgin, const std::string &ser MISLOG("user:%s cbClientGroupAbandonMission : Invalid team", userId.toString().c_str()); return; } + if ( team->getLeader() != userId ) { CCharacter::sendDynamicSystemMessage( user->getEntityRowId(), "REQ_LEADER_TO_ABANDON_MISSION" ); diff --git a/code/ryzom/server/src/entities_game_service/mission_manager/mission_action.cpp b/code/ryzom/server/src/entities_game_service/mission_manager/mission_action.cpp index 941b31afa..d967e6971 100644 --- a/code/ryzom/server/src/entities_game_service/mission_manager/mission_action.cpp +++ b/code/ryzom/server/src/entities_game_service/mission_manager/mission_action.cpp @@ -767,7 +767,7 @@ class CMissionActionRecvItem : public IMissionAction freeSlotcount -= invTemp->getUsedSlotCount(); maxBulk -= invTemp->getInventoryBulk(); } - + if( (neededSlotCount <= freeSlotcount) && ( neededBulk + invBag->getInventoryBulk() <= maxBulk) ) { fail = false; @@ -862,7 +862,7 @@ class CMissionActionRecvItem : public IMissionAction } params[2].Int = _Item.getQuality(); } - + params[0].SheetId = _SheetId; params[1].Int = _Quantity; PHRASE_UTILITIES::sendDynamicSystemMessage(user->getEntityRowId(),"MIS_RECV_ITEM", params); @@ -1050,7 +1050,7 @@ class CMissionActionRecvNamedItem : public IMissionAction sint16 neededSlotCount = (sint16) ceil( (float)_Quantity / itemTmp->getMaxStackSize() ); uint32 neededBulk = _Quantity * itemTmp->getStackBulk(); itemTmp.deleteItem(); - + bool fail = true; for ( uint i = 0; i < entities.size(); i++ ) { @@ -1067,15 +1067,15 @@ class CMissionActionRecvNamedItem : public IMissionAction freeSlotcount -= invTemp->getUsedSlotCount(); maxBulk -= invTemp->getInventoryBulk(); } - + if( (neededSlotCount <= freeSlotcount) && ( neededBulk + invBag->getInventoryBulk() <= maxBulk) ) { fail = false; break; } } - } + if( fail ) { CMissionTemplate * templ = CMissionManager::getInstance()->getTemplate( instance->getTemplateId() ); @@ -1274,7 +1274,6 @@ class CMissionActionDestroyItem : // If the "guild" parameter is not set, we destroy the items for the users if (!_Guild) { - for ( uint i = 0; i < entities.size(); i++ ) { CCharacter * user = PlayerManager.getChar( entities[i] ); @@ -1303,7 +1302,6 @@ class CMissionActionDestroyItem : PHRASE_UTILITIES::sendDynamicSystemMessage(user->getEntityRowId(),"MIS_DESTROY_ITEM", params); } } - } // We destroy the item in the guild else @@ -1909,7 +1907,6 @@ class CMissionActionRecvMoney : public IMissionAction // If the guild parameter is not set we just divide the money and give it to each entity if (!_Guild) { - uint amount = _Amount / (uint)entities.size(); if ( amount == 0 || _Amount % entities.size() ) amount++; @@ -1924,7 +1921,6 @@ class CMissionActionRecvMoney : public IMissionAction PHRASE_UTILITIES::sendDynamicSystemMessage(user->getEntityRowId(),"MIS_RECV_MONEY",params); } } - } // Else we give the money to the guild else @@ -2026,7 +2022,6 @@ class CMissionActionRecvFame : public IMissionAction // If there is no "guild" parameter we give the fame to every user if (!_Guild) { - for ( uint i = 0; i < entities.size(); i++ ) { CEntityId eid = TheDataset.getEntityId(entities[i]); @@ -2037,12 +2032,10 @@ class CMissionActionRecvFame : public IMissionAction if (character) character->sendEventForMissionAvailabilityCheck(); } - } // Else we just give it to the guild else { - if (entities.size() == 0) return; @@ -2072,7 +2065,6 @@ class CMissionActionRecvFame : public IMissionAction if (character) character->sendEventForMissionAvailabilityCheck(); } - } }; diff --git a/code/ryzom/server/src/entities_game_service/mission_manager/mission_queue_manager.cpp b/code/ryzom/server/src/entities_game_service/mission_manager/mission_queue_manager.cpp index bab69042a..a821eef45 100644 --- a/code/ryzom/server/src/entities_game_service/mission_manager/mission_queue_manager.cpp +++ b/code/ryzom/server/src/entities_game_service/mission_manager/mission_queue_manager.cpp @@ -48,7 +48,7 @@ CMissionQueueManager::CMissionQueueManager() // ---------------------------------------------------------------------------- void CMissionQueueManager::init() { - string sFilename = MissionQueueFile; + string sFilename = MissionQueueFile.get(); sFilename = Bsi.getLocalPath() + sFilename; if (CFile::fileExists(sFilename)) @@ -141,7 +141,7 @@ void CMissionQueueManager::saveToFile() if( _InitOk ) { - string sFilename = MissionQueueFile; + string sFilename = MissionQueueFile.get(); // save file via Backup Service (BS) try diff --git a/code/ryzom/server/src/entities_game_service/mission_manager/mission_step_template.cpp b/code/ryzom/server/src/entities_game_service/mission_manager/mission_step_template.cpp index 7e99059b9..1caefb340 100644 --- a/code/ryzom/server/src/entities_game_service/mission_manager/mission_step_template.cpp +++ b/code/ryzom/server/src/entities_game_service/mission_manager/mission_step_template.cpp @@ -170,7 +170,6 @@ uint32 IMissionStepTemplate::sendStepText(CCharacter * user,const std::vector(__k, CActiveStepStatePD())); + _States.insert(std::pair(__k, CActiveStepStatePD())); CActiveStepStatePD* __o = &(_States[__k]); PDSLib.setRowIndex(rowIndex, __o); __o->pds__fetch(data); @@ -2353,7 +2353,7 @@ void CMissionPD::pds__fetch(RY_PDS::CPData &data) if (rowIndex == RY_PDS::INVALID_ROW_INDEX || tableIndex == RY_PDS::INVALID_TABLE_INDEX) break; uint32 __k; data.serial(__k); - _Steps.insert(std::make_pair(__k, CActiveStepPD())); + _Steps.insert(std::pair(__k, CActiveStepPD())); CActiveStepPD* __o = &(_Steps[__k]); PDSLib.setRowIndex(rowIndex, __o); __o->pds__fetch(data); @@ -2367,7 +2367,7 @@ void CMissionPD::pds__fetch(RY_PDS::CPData &data) if (rowIndex == RY_PDS::INVALID_ROW_INDEX || tableIndex == RY_PDS::INVALID_TABLE_INDEX) break; uint32 __k; data.serial(__k); - _Compass.insert(std::make_pair(__k, CMissionCompassPD())); + _Compass.insert(std::pair(__k, CMissionCompassPD())); CMissionCompassPD* __o = &(_Compass[__k]); PDSLib.setRowIndex(rowIndex, __o); __o->pds__fetch(data); @@ -2381,7 +2381,7 @@ void CMissionPD::pds__fetch(RY_PDS::CPData &data) if (rowIndex == RY_PDS::INVALID_ROW_INDEX || tableIndex == RY_PDS::INVALID_TABLE_INDEX) break; uint32 __k; data.serial(__k); - _StepsDone.insert(std::make_pair(__k, CDoneStepPD())); + _StepsDone.insert(std::pair(__k, CDoneStepPD())); CDoneStepPD* __o = &(_StepsDone[__k]); PDSLib.setRowIndex(rowIndex, __o); __o->pds__fetch(data); @@ -2395,7 +2395,7 @@ void CMissionPD::pds__fetch(RY_PDS::CPData &data) if (rowIndex == RY_PDS::INVALID_ROW_INDEX || tableIndex == RY_PDS::INVALID_TABLE_INDEX) break; uint32 __k; data.serial(__k); - _Teleports.insert(std::make_pair(__k, CMissionTeleportPD())); + _Teleports.insert(std::pair(__k, CMissionTeleportPD())); CMissionTeleportPD* __o = &(_Teleports[__k]); PDSLib.setRowIndex(rowIndex, __o); __o->pds__fetch(data); @@ -2409,7 +2409,7 @@ void CMissionPD::pds__fetch(RY_PDS::CPData &data) if (rowIndex == RY_PDS::INVALID_ROW_INDEX || tableIndex == RY_PDS::INVALID_TABLE_INDEX) break; uint32 __k; data.serial(__k); - _InsidePlaces.insert(std::make_pair(__k, CMissionInsidePlacePD())); + _InsidePlaces.insert(std::pair(__k, CMissionInsidePlacePD())); CMissionInsidePlacePD* __o = &(_InsidePlaces[__k]); PDSLib.setRowIndex(rowIndex, __o); __o->pds__fetch(data); @@ -2423,7 +2423,7 @@ void CMissionPD::pds__fetch(RY_PDS::CPData &data) if (rowIndex == RY_PDS::INVALID_ROW_INDEX || tableIndex == RY_PDS::INVALID_TABLE_INDEX) break; uint32 __k; data.serial(__k); - _OutsidePlaces.insert(std::make_pair(__k, CMissionOutsidePlacePD())); + _OutsidePlaces.insert(std::pair(__k, CMissionOutsidePlacePD())); CMissionOutsidePlacePD* __o = &(_OutsidePlaces[__k]); PDSLib.setRowIndex(rowIndex, __o); __o->pds__fetch(data); @@ -2437,7 +2437,7 @@ void CMissionPD::pds__fetch(RY_PDS::CPData &data) if (rowIndex == RY_PDS::INVALID_ROW_INDEX || tableIndex == RY_PDS::INVALID_TABLE_INDEX) break; uint32 __k; data.serial(__k); - _HandledAIGroups.insert(std::make_pair(__k, CHandledAIGroupPD())); + _HandledAIGroups.insert(std::pair(__k, CHandledAIGroupPD())); CHandledAIGroupPD* __o = &(_HandledAIGroups[__k]); PDSLib.setRowIndex(rowIndex, __o); __o->pds__fetch(data); @@ -3276,7 +3276,7 @@ void CMissionContainerPD::pds__fetch(RY_PDS::CPData &data) uint32 __k; data.serial(__k); CMissionPD* __o = static_cast(PDSLib.create(tableIndex)); - _Missions.insert(std::make_pair(__k, __o)); + _Missions.insert(std::pair(__k, __o)); PDSLib.setRowIndex(rowIndex, __o); __o->pds__fetch(data); __o->pds__setParentUnnotified(this); diff --git a/code/ryzom/server/src/entities_game_service/phrase_manager/faber_action.cpp b/code/ryzom/server/src/entities_game_service/phrase_manager/faber_action.cpp index 50a069b5e..c49a45429 100644 --- a/code/ryzom/server/src/entities_game_service/phrase_manager/faber_action.cpp +++ b/code/ryzom/server/src/entities_game_service/phrase_manager/faber_action.cpp @@ -388,7 +388,7 @@ protected: // compute success factor sint deltaLvl; float successFactor = CFaberActionCommon::getSuccessFactor( character, phrase, deltaLvl ); - + // final item quality, depending of recommended skill of action used and lower quality of raw materials used and success factor of action uint16 finalItemQuality = max( (uint16)1, (uint16) (min(phrase->getLowerRmQuality(),(uint16)phrase->getRecommendedSkill()) * successFactor) ); diff --git a/code/ryzom/server/src/entities_game_service/phrase_manager/fg_prospection_phrase.cpp b/code/ryzom/server/src/entities_game_service/phrase_manager/fg_prospection_phrase.cpp index f2fc03eb0..7721bad0c 100644 --- a/code/ryzom/server/src/entities_game_service/phrase_manager/fg_prospection_phrase.cpp +++ b/code/ryzom/server/src/entities_game_service/phrase_manager/fg_prospection_phrase.cpp @@ -17,6 +17,7 @@ #include "stdpch.h" +#include #include "fg_prospection_phrase.h" #include "nel/misc/common.h" #include "nel/misc/fast_floor.h" diff --git a/code/ryzom/server/src/entities_game_service/player_manager/cdb_branch.cpp b/code/ryzom/server/src/entities_game_service/player_manager/cdb_branch.cpp index d54dbd694..44205d02a 100644 --- a/code/ryzom/server/src/entities_game_service/player_manager/cdb_branch.cpp +++ b/code/ryzom/server/src/entities_game_service/player_manager/cdb_branch.cpp @@ -284,7 +284,7 @@ void CCDBStructNodeBranch::init( xmlNodePtr node, NLMISC::IProgressCallback &pro { // dealing with an array of entries uint countAsInt; - NLMISC::fromString(count, countAsInt); + NLMISC::fromString(count.str(), countAsInt); nlassert((const char *) count != NULL); for (uint i=0;i 0 ) { CSString skillValue = s; diff --git a/code/ryzom/server/src/entities_game_service/player_manager/character_version_adapter.cpp b/code/ryzom/server/src/entities_game_service/player_manager/character_version_adapter.cpp index 1cf7940c6..adc281dda 100644 --- a/code/ryzom/server/src/entities_game_service/player_manager/character_version_adapter.cpp +++ b/code/ryzom/server/src/entities_game_service/player_manager/character_version_adapter.cpp @@ -652,7 +652,9 @@ void CCharacterVersionAdapter::adaptToVersion11(CCharacter &character) const case EGSPD::CPeople::Zorai : mission = CAIAliasTranslator::getInstance()->getMissionUniqueIdFromName( "ZORAI_NEWB_WELCOME_SHENG_WO_1" ); CAIAliasTranslator::getInstance()->getNPCAliasesFromName("welcomer_sheng_wo_1", bots); - break; + break; + default: + break; } } // other give him a rite intro mission diff --git a/code/ryzom/server/src/entities_game_service/player_manager/db_string_updater.h b/code/ryzom/server/src/entities_game_service/player_manager/db_string_updater.h index 059e7d765..e9296b0ef 100644 --- a/code/ryzom/server/src/entities_game_service/player_manager/db_string_updater.h +++ b/code/ryzom/server/src/entities_game_service/player_manager/db_string_updater.h @@ -48,15 +48,29 @@ class CDBStringUpdater : public NLMISC::CSingleton { return ClientDB == other.ClientDB && Node == other.Node; } + + bool operator <(const TBDStringLeaf &other) const + { + if (ClientDB != other.ClientDB) + return ClientDB < other.ClientDB; + if (Node != other.Node) + return Node < other.Node; + return false; + } }; // hasher for the identifier struct THashDBStringLeaf { + enum { bucket_size = 4, min_buckets = 8, }; size_t operator()(const TBDStringLeaf &stringLeaf) const { return ((size_t)stringLeaf.ClientDB>>4) ^ ((size_t)stringLeaf.Node>>4); } + bool operator()(const TBDStringLeaf &left, const TBDStringLeaf &right) const + { + return left < right; + } }; // info for each string leaf diff --git a/code/ryzom/server/src/entities_game_service/player_manager/player_manager.h b/code/ryzom/server/src/entities_game_service/player_manager/player_manager.h index 9f1643e84..5e68af4d2 100644 --- a/code/ryzom/server/src/entities_game_service/player_manager/player_manager.h +++ b/code/ryzom/server/src/entities_game_service/player_manager/player_manager.h @@ -48,10 +48,11 @@ namespace NLNET extern CGenericXmlMsgHeaderManager GenericMsgManager; -class CServiceIdHash +struct CServiceIdHash { -public: + enum { bucket_size = 4, min_buckets = 8, }; size_t operator () ( const NLNET::TServiceId &sid ) const { return sid.get(); } + bool operator()(const NLNET::TServiceId &left, const NLNET::TServiceId &right) const { return left < right; } }; class CCharIdReplaced diff --git a/code/ryzom/server/src/entities_game_service/player_manager/player_manager_interface.h b/code/ryzom/server/src/entities_game_service/player_manager/player_manager_interface.h index a18e1645a..2ebf3d50e 100644 --- a/code/ryzom/server/src/entities_game_service/player_manager/player_manager_interface.h +++ b/code/ryzom/server/src/entities_game_service/player_manager/player_manager_interface.h @@ -41,10 +41,11 @@ public: }; - class CUint32Hash + struct CUint32Hash { - public: - size_t operator () ( const uint32 &i ) const { return i; } + enum { bucket_size = 4, min_buckets = 8, }; + size_t operator () (const uint32 &i) const { return i; } + bool operator()(const uint32 left, const uint32 right) const { return left < right; } }; typedef uint32 TUserId; diff --git a/code/ryzom/server/src/entities_game_service/progression/progression_pve.h b/code/ryzom/server/src/entities_game_service/progression/progression_pve.h index 11d538ea4..2c9e9aba2 100644 --- a/code/ryzom/server/src/entities_game_service/progression/progression_pve.h +++ b/code/ryzom/server/src/entities_game_service/progression/progression_pve.h @@ -279,7 +279,6 @@ struct CCreatureTakenDamage { if ( PlayerInflictedDamage[i].TotalDamage > maxDmg ) { - nlinfo("set damage by player"); maxDmg = PlayerInflictedDamage[i].TotalDamage; index = (sint16)i; } diff --git a/code/ryzom/server/src/entities_game_service/pvp_manager/pvp_faction_reward_manager/pvp_faction_reward_manager.cpp b/code/ryzom/server/src/entities_game_service/pvp_manager/pvp_faction_reward_manager/pvp_faction_reward_manager.cpp index 85579dcf8..50b039522 100644 --- a/code/ryzom/server/src/entities_game_service/pvp_manager/pvp_faction_reward_manager/pvp_faction_reward_manager.cpp +++ b/code/ryzom/server/src/entities_game_service/pvp_manager/pvp_faction_reward_manager/pvp_faction_reward_manager.cpp @@ -1058,8 +1058,9 @@ NLMISC_COMMAND(getEffects, "get effects of a spire"," " ) return false; else { - float x = (float)atof(args[0].c_str()); - float y = (float)atof(args[1].c_str()); + float x, y; + NLMISC::fromString(args[0], x); + NLMISC::fromString(args[1], y); NLMISC::CVector vec( x, y, 0.0f ); @@ -1101,8 +1102,9 @@ NLMISC_COMMAND(buildSpirePos, "build a spire"," ") return true; } - float x = (float)atof(args[1].c_str()); - float y = (float)atof(args[2].c_str()); + float x, y; + NLMISC::fromString(args[1], x); + NLMISC::fromString(args[2], y); NLMISC::CVector vec( x, y, 0.0f ); @@ -1138,8 +1140,9 @@ NLMISC_COMMAND(destroySpirePos, "destroy a spire"," ") return false; else { - float x = (float)atof(args[0].c_str()); - float y = (float)atof(args[1].c_str()); + float x, y; + NLMISC::fromString(args[0], x); + NLMISC::fromString(args[1], y); NLMISC::CVector vec( x, y, 0.0f ); @@ -1178,8 +1181,9 @@ NLMISC_COMMAND(getEffectsPos, "get effects of a spire"," " ) return true; } - float x = (float)atof(args[1].c_str()); - float y = (float)atof(args[2].c_str()); + float x, y; + NLMISC::fromString(args[1], x); + NLMISC::fromString(args[2], y); NLMISC::CVector vec( x, y, 0.0f ); @@ -1265,8 +1269,9 @@ NLMISC_COMMAND(getRegionOwner, "display the faction which currently owns the reg return false; else { - float x = (float)atof(args[0].c_str()); - float y = (float)atof(args[1].c_str()); + float x, y; + NLMISC::fromString(args[0], x); + NLMISC::fromString(args[1], y); NLMISC::CVector vec( x, y, 0.0f ); @@ -1294,8 +1299,9 @@ NLMISC_COMMAND(getSpireStats, "display the status of spire in region correspondi return false; else { - float x = (float)atof(args[0].c_str()); - float y = (float)atof(args[1].c_str()); + float x, y; + NLMISC::fromString(args[0], x); + NLMISC::fromString(args[1], y); NLMISC::CVector vec( x, y, 0.0f ); diff --git a/code/ryzom/server/src/entities_game_service/pvp_manager/pvp_manager_2.cpp b/code/ryzom/server/src/entities_game_service/pvp_manager/pvp_manager_2.cpp index 6beb7b1b2..7f42a671c 100644 --- a/code/ryzom/server/src/entities_game_service/pvp_manager/pvp_manager_2.cpp +++ b/code/ryzom/server/src/entities_game_service/pvp_manager/pvp_manager_2.cpp @@ -211,13 +211,16 @@ std::vector CPVPManager2::getCharacterChannels(CCharacter * user) result.clear(); // Add lang channel, should be first. - if (!user->getLangChannel().empty()) { + if (!user->getLangChannel().empty()) + { TMAPExtraFactionChannel::iterator it = _ExtraFactionChannel.find(user->getLangChannel()); if (it != _ExtraFactionChannel.end()) { result.push_back((*it).second); } - } else { + } + else + { TMAPExtraFactionChannel::iterator it = _ExtraFactionChannel.find("en"); if (it != _ExtraFactionChannel.end()) { diff --git a/code/ryzom/server/src/entities_game_service/shop_type/character_shopping_list.cpp b/code/ryzom/server/src/entities_game_service/shop_type/character_shopping_list.cpp index d23945d25..e024334c2 100644 --- a/code/ryzom/server/src/entities_game_service/shop_type/character_shopping_list.cpp +++ b/code/ryzom/server/src/entities_game_service/shop_type/character_shopping_list.cpp @@ -460,9 +460,9 @@ void CCharacterShoppingList::initPageToUpdate( uint32 nbSlotPerPage ) void CCharacterShoppingList::fillTradePage( uint16 session ) { /* -- Ajout de TRADING:*:PRICE_RETIRE (utile que si SELLER_TYPE == User ou ResaleAndUser). Note: Prix UNITAIRE (si MP, Ammo etc..) -- Si SELLER_TYPE==User seulement: Si PRICE==-1, alors cela veut dire " Item Sold " (pour afficher la liste des items vendus les plus récents) -- Note: TRADING:*:PRICE reste un Prix UNITAIRE (si MP, Ammo etc..) (cela devait déja être le cas) +- Added TRADING:*:PRICE_RETIRE (only useful if SELLER_TYPE == User or ResaleAndUser). Note: UNIT price (if Raw Mats, Ammo, etc..) +- If SELLER_TYPE==User only: if PRICE==-1, then it means " Item Sold " (to display list of more recent sold items) +- Note: TRADING:*:PRICE is wtill a UNIT price (if Raw Mats, Ammo, etc..) (it should already be the case) */ // get page to update if any diff --git a/code/ryzom/server/src/entities_game_service/zone_manager.cpp b/code/ryzom/server/src/entities_game_service/zone_manager.cpp index dd9e817b1..f55222dca 100644 --- a/code/ryzom/server/src/entities_game_service/zone_manager.cpp +++ b/code/ryzom/server/src/entities_game_service/zone_manager.cpp @@ -201,7 +201,7 @@ bool CTpSpawnZone::build(const NLLIGO::CPrimPoint * point) nlwarning(" : no z in CTpSpawnZone '%s'",_Name.c_str() ); return false; } - Point.z = ( float ) atof( value.c_str() ); + NLMISC::fromString(value, Point.z); Point.z = float( sint32 (1000.0f* Point.z) ); } else diff --git a/code/ryzom/server/src/frontend_service/client_entity_id_translator.h b/code/ryzom/server/src/frontend_service/client_entity_id_translator.h index 0f18698c5..f80fbe983 100644 --- a/code/ryzom/server/src/frontend_service/client_entity_id_translator.h +++ b/code/ryzom/server/src/frontend_service/client_entity_id_translator.h @@ -89,10 +89,11 @@ public: private: - class CHash + struct CHash { - public: - size_t operator () ( const TEntityIndex& index ) const { return index.getIndex(); } + enum { bucket_size = 4, min_buckets = 8, }; + size_t operator () (const TEntityIndex& index) const { return index.getIndex(); } + bool operator() (const TEntityIndex& left, const TEntityIndex& right) { return left < right; } }; // table to map CEntityId to TCLEntityId diff --git a/code/ryzom/server/src/frontend_service/client_id_lookup.h b/code/ryzom/server/src/frontend_service/client_id_lookup.h index 3d6db560e..9c63a60a6 100644 --- a/code/ryzom/server/src/frontend_service/client_id_lookup.h +++ b/code/ryzom/server/src/frontend_service/client_id_lookup.h @@ -114,11 +114,11 @@ private: typedef std::vector TEntityIndexToClient; - class CIdHash + struct CIdHash { - public: - - size_t operator () ( NLMISC::CEntityId id ) const { return (uint32)id.getShortId(); } + enum { bucket_size = 4, min_buckets = 8, }; + size_t operator () (NLMISC::CEntityId id) const { return (uint32)id.getShortId(); } + bool operator() (const NLMISC::CEntityId& left, const NLMISC::CEntityId& right) { return left < right; } }; typedef CHashMap TIdToClientMap; diff --git a/code/ryzom/server/src/frontend_service/fe_types.h b/code/ryzom/server/src/frontend_service/fe_types.h index 747fd6f9e..d63ef1e42 100644 --- a/code/ryzom/server/src/frontend_service/fe_types.h +++ b/code/ryzom/server/src/frontend_service/fe_types.h @@ -69,16 +69,15 @@ typedef uint32 TUid; /** * CInetAddress hash function */ -class CInetAddressHashMapTraits +struct CInetAddressHashMapTraits { -public: - static const size_t bucket_size = 4; - static const size_t min_buckets = 8; + enum { bucket_size = 4, min_buckets = 8, }; inline size_t operator() ( const NLNET::CInetAddress& x ) const { //return x.port(); return x.internalIPAddress(); } + bool operator() (const NLNET::CInetAddress& left, const NLNET::CInetAddress& right) { return left < right; } // bool operator() (const NLNET::CInetAddress &x1, const NLNET::CInetAddress &x2) const // { // return classId1 < classId2; diff --git a/code/ryzom/server/src/frontend_service/frontend_service.cpp b/code/ryzom/server/src/frontend_service/frontend_service.cpp index cbf4a5610..c973ebcfd 100644 --- a/code/ryzom/server/src/frontend_service/frontend_service.cpp +++ b/code/ryzom/server/src/frontend_service/frontend_service.cpp @@ -1862,7 +1862,7 @@ NLMISC_COMMAND( dumpImpulseStats, "Dump Impulse stat to XML log", " [[- if (reverse) comp = -comp; - result.push_back(std::make_pair(comp, client)); + result.push_back(std::pair(comp, client)); } if (ucriterion != 0 && !result.empty()) diff --git a/code/ryzom/server/src/frontend_service/vision_provider.h b/code/ryzom/server/src/frontend_service/vision_provider.h index 39d84fb2f..aaca90869 100644 --- a/code/ryzom/server/src/frontend_service/vision_provider.h +++ b/code/ryzom/server/src/frontend_service/vision_provider.h @@ -84,6 +84,8 @@ class CClientIdLookup; // Hash function: ClientId * 256 + CeId struct CHash { + static const size_t bucket_size = 4; + static const size_t min_buckets = 8; size_t operator() ( TPairClientSlot pair ) const { return (pair.ClientId << 8) + pair.Slot; } }; diff --git a/code/ryzom/server/src/gpm_service/commands.cpp b/code/ryzom/server/src/gpm_service/commands.cpp index 127074856..8e5c8d1b8 100644 --- a/code/ryzom/server/src/gpm_service/commands.cpp +++ b/code/ryzom/server/src/gpm_service/commands.cpp @@ -179,8 +179,8 @@ NLMISC_COMMAND(getPatatEntryIndex, "Get the patat entry index at a pos", "x, y") CVector pos; - pos.x = (float)atof(args[0].c_str()); - pos.y = (float)atof(args[1].c_str()); + NLMISC::fromString(args[0], pos.x); + NLMISC::fromString(args[1], pos.y); pos.z = 0; nlinfo("entryIndex(%.1f, %.1f) = %d", pos.x, pos.y, CWorldPositionManager::getEntryIndex(pos)); diff --git a/code/ryzom/server/src/gpm_service/world_position_manager.cpp b/code/ryzom/server/src/gpm_service/world_position_manager.cpp index 2c10878a6..9674541fc 100644 --- a/code/ryzom/server/src/gpm_service/world_position_manager.cpp +++ b/code/ryzom/server/src/gpm_service/world_position_manager.cpp @@ -504,7 +504,7 @@ void CWorldPositionManager::triggerSubscribe(NLNET::TServiceId serviceId, const STOP_IF(IsRingShard,"Illegal use of CWorldPositionManager on ring shard"); if (_PatatSubscribeManager.exist(name)) { - _PatatSubscribeManager.subscribe(serviceId, make_pair(name, id)); + _PatatSubscribeManager.subscribe(serviceId, std::pair(name, id)); } } @@ -2113,7 +2113,7 @@ void CWorldPositionManager::movePlayer(CWorldEntity *entity, sint32 x, sint32 y, { if (entity->PlayerInfos->DistanceHistory.size() >= 20) entity->PlayerInfos->DistanceHistory.pop_back(); - entity->PlayerInfos->DistanceHistory.push_front(make_pair(CVectorD(x*0.001, y*0.001, z*0.001), tick)); + entity->PlayerInfos->DistanceHistory.push_front(std::pair(CVectorD(x*0.001, y*0.001, z*0.001), tick)); } #endif @@ -3227,7 +3227,7 @@ void CWorldPositionManager::visionRequest(sint32 x, sint32 y, sint32 range, vect if (abs(x - entity->X) < range && abs(y - entity->Y) < range && (rrange = sqrt(sqr((x - entity->X)*0.001) + sqr((y - entity->Y)*0.001))) < frange) { - entities.push_back(make_pair(entity->Id, (sint32)(rrange*1000))); + entities.push_back(std::pair(entity->Id, (sint32)(rrange * 1000))); } } @@ -3240,7 +3240,7 @@ void CWorldPositionManager::visionRequest(sint32 x, sint32 y, sint32 range, vect if (abs(x - entity->X) < range && abs(y - entity->Y) < range && (rrange = sqrt(sqr((x - entity->X)*0.001) + sqr((y - entity->Y)*0.001))) < frange) { - entities.push_back(make_pair(entity->Id, (sint32)(rrange*1000))); + entities.push_back(std::pair(entity->Id, (sint32)(rrange * 1000))); } } } diff --git a/code/ryzom/server/src/gpm_service/world_position_manager.h b/code/ryzom/server/src/gpm_service/world_position_manager.h index 75ea9ead5..81209357c 100644 --- a/code/ryzom/server/src/gpm_service/world_position_manager.h +++ b/code/ryzom/server/src/gpm_service/world_position_manager.h @@ -137,10 +137,11 @@ public: //friend void CWorldEntity::createPrimitive(NLPACS::UMoveContainer *pMoveContainer, uint8 worldImage); friend void CWorldEntity::removePrimitive(); - class CEntityIdHash + struct CEntityIdHash { - public: - size_t operator () ( const NLMISC::CEntityId &id ) const { return (uint32)id.getShortId(); } + enum { bucket_size = 4, min_buckets = 8, }; + size_t operator () (const NLMISC::CEntityId &id) const { return (uint32)id.getShortId(); } + size_t operator () (const NLMISC::CEntityId &left, const NLMISC::CEntityId &right) const { return left < right; } }; /// Container of entities (all entities are referenced by this container diff --git a/code/ryzom/server/src/input_output_service/chat_manager.cpp b/code/ryzom/server/src/input_output_service/chat_manager.cpp index fbc38ead5..aedfa063f 100644 --- a/code/ryzom/server/src/input_output_service/chat_manager.cpp +++ b/code/ryzom/server/src/input_output_service/chat_manager.cpp @@ -94,21 +94,21 @@ void CChatManager::onServiceDown(const std::string &serviceShortName) switch (cg.Type) { - case CChatGroup::universe: - case CChatGroup::say: - case CChatGroup::shout: - continue; - case CChatGroup::team: - case CChatGroup::guild: - case CChatGroup::civilization: - case CChatGroup::territory: - case CChatGroup::tell: - case CChatGroup::arround: - case CChatGroup::system: - case CChatGroup::region: - case CChatGroup::dyn_chat: - groupToRemove.push_back(gid); - break; + case CChatGroup::universe: + case CChatGroup::say: + case CChatGroup::shout: + continue; + case CChatGroup::team: + case CChatGroup::guild: + case CChatGroup::civilization: + case CChatGroup::territory: + case CChatGroup::tell: + case CChatGroup::arround: + case CChatGroup::system: + case CChatGroup::region: + case CChatGroup::dyn_chat: + groupToRemove.push_back(gid); + break; } } @@ -121,7 +121,7 @@ void CChatManager::onServiceDown(const std::string &serviceShortName) // clear muted players table _MutedUsers.clear(); - + // clear the dyn chats _DynChat.removeAllChannels(); } @@ -151,9 +151,11 @@ bool CChatManager::checkClient( const TDataSetRow& id ) void CChatManager::addClient( const TDataSetRow& id ) { if (VerboseChatManagement) - nldebug("IOSCM: addClient : adding client %s:%x into chat manager and universe group.", + { + nldebug("IOSCM: addClient : adding client %s:%x into chat manager and universe group.", TheDataset.getEntityId(id).toString().c_str(), id.getIndex()); + } if(id.getIndex() == 0xffffff) { @@ -197,10 +199,11 @@ void CChatManager::addClient( const TDataSetRow& id ) void CChatManager::removeClient( const TDataSetRow& id ) { if (VerboseChatManagement) - nldebug("IOSCM: removeClient : removing the client %s:%x from chat manager !", + { + nldebug("IOSCM: removeClient : removing the client %s:%x from chat manager !", TheDataset.getEntityId(id).toString().c_str(), id.getIndex()); - + } TClientInfoCont::iterator itCl = _Clients.find( id ); if( itCl != _Clients.end() ) @@ -214,7 +217,7 @@ void CChatManager::removeClient( const TDataSetRow& id ) } else { - nlwarning("CChatManager::removeClient : The client %s:%x is unknown !", + nlwarning("CChatManager::removeClient : The client %s:%x is unknown !", TheDataset.getEntityId(id).toString().c_str(), id.getIndex()); } @@ -233,7 +236,7 @@ CChatClient& CChatManager::getClient( const TDataSetRow& id ) TClientInfoCont::iterator itCl = _Clients.find( id ); if( itCl != _Clients.end() ) { - return *(itCl->second); + return *(itCl->second); } else { @@ -259,15 +262,15 @@ void CChatManager::addGroup( TGroupId gId, CChatGroup::TGroupType gType, const s { if (!groupName.empty()) nldebug("IOSCM: addGroup : adding %s named chat group %s as '%s'", - CChatGroup::groupTypeToString(gType).c_str(), + CChatGroup::groupTypeToString(gType).c_str(), gId.toString().c_str(), groupName.c_str()); else nldebug("IOSCM: addGroup : adding %s anonymous chat group %s", - CChatGroup::groupTypeToString(gType).c_str(), + CChatGroup::groupTypeToString(gType).c_str(), gId.toString().c_str()); } - + map< TGroupId, CChatGroup >::iterator itGrp = _Groups.find( gId ); if( itGrp == _Groups.end() ) { @@ -290,7 +293,7 @@ void CChatManager::addGroup( TGroupId gId, CChatGroup::TGroupType gType, const s { nlwarning("CChatManager::addGroup : the group %s already exists", gId.toString().c_str()); } - + } // addGroup // @@ -302,8 +305,10 @@ void CChatManager::addGroup( TGroupId gId, CChatGroup::TGroupType gType, const s void CChatManager::removeGroup( TGroupId gId ) { if (VerboseChatManagement) + { nldebug("IOSCM: removeGroup : removing group %s", gId.toString().c_str()); + } map< TGroupId, CChatGroup >::iterator itGrp = _Groups.find( gId ); if( itGrp != _Groups.end() ) @@ -338,10 +343,12 @@ void CChatManager::removeGroup( TGroupId gId ) void CChatManager::addToGroup( TGroupId gId, const TDataSetRow &charId ) { if (VerboseChatManagement) + { nldebug("IOSCM: addtoGroup : adding player %s:%x to group %s", TheDataset.getEntityId(charId).toString().c_str(), charId.getIndex(), gId.toString().c_str()); + } map< TGroupId, CChatGroup >::iterator itGrp = _Groups.find( gId ); if( itGrp != _Groups.end() ) @@ -372,7 +379,7 @@ void CChatManager::addToGroup( TGroupId gId, const TDataSetRow &charId ) } else { - nlwarning("CChatManager::addToGroup : client %s:%x is unknown", + nlwarning("CChatManager::addToGroup : client %s:%x is unknown", TheDataset.getEntityId(charId).toString().c_str(), charId.getIndex()); // remove it from the group (don't leave bad client...) @@ -396,10 +403,12 @@ void CChatManager::addToGroup( TGroupId gId, const TDataSetRow &charId ) void CChatManager::removeFromGroup( TGroupId gId, const TDataSetRow &charId ) { if (VerboseChatManagement) + { nldebug("IOSCM: removeFromGroup : removing player %s:%x from group %s", TheDataset.getEntityId(charId).toString().c_str(), - charId.getIndex(), + charId.getIndex(), gId.toString().c_str()); + } map< TGroupId, CChatGroup >::iterator itGrp = _Groups.find( gId ); if( itGrp != _Groups.end() ) @@ -443,7 +452,7 @@ void CChatManager::removeFromGroup( TGroupId gId, const TDataSetRow &charId ) } // removeFromGroup // - + //----------------------------------------------- @@ -486,7 +495,7 @@ void CChatManager::chat( const TDataSetRow& sender, const ucstring& ucstr ) } // CEntityId eid = TheDataset.getEntityId(sender); - // Get the char info + // Get the char info //WARNING: can be NULL CCharacterInfos *ci = IOS->getCharInfos(eid); @@ -525,7 +534,7 @@ void CChatManager::chat( const TDataSetRow& sender, const ucstring& ucstr ) // clean up container _DestUsers.clear(); - + switch( itCl->second->getChatMode() ) { // dynamic group @@ -533,7 +542,7 @@ void CChatManager::chat( const TDataSetRow& sender, const ucstring& ucstr ) case CChatGroup::say : { CChatGroup::TMemberCont::iterator itA; - for( itA = itCl->second->getAudience().Members.begin(); + for( itA = itCl->second->getAudience().Members.begin(); itA != itCl->second->getAudience().Members.end(); ++itA ) { @@ -566,7 +575,7 @@ void CChatManager::chat( const TDataSetRow& sender, const ucstring& ucstr ) // so even after teleporting in a remote region the previous around people were still receiving // the messages. - TGroupId grpId = itCl->second->getRegionChatGroup(); + TGroupId grpId = itCl->second->getRegionChatGroup(); _DestUsers.push_back(grpId); _Log.displayNL("'%s' (%s) : \t\"%s\"", senderName.c_str(), groupNames[itCl->second->getChatMode()], ucstr.toString().c_str() ); @@ -599,7 +608,7 @@ void CChatManager::chat( const TDataSetRow& sender, const ucstring& ucstr ) // } // } - TGroupId grpId = CEntityId(RYZOMID::chatGroup,0); + TGroupId grpId = CEntityId(RYZOMID::chatGroup, 0); _Log.displayNL("'%s' (%s) : \t\"%s\"", senderName.c_str(), groupNames[itCl->second->getChatMode()], ucstr.toString().c_str() ); _DestUsers.push_back(grpId); @@ -621,15 +630,15 @@ void CChatManager::chat( const TDataSetRow& sender, const ucstring& ucstr ) TGroupId grpId = itCl->second->getGuildChatGroup(); _DestUsers.push_back(grpId); - _Log.displayNL("'%s' (%s) : \t\"%s\"", - senderName.c_str(), - groupNames[itCl->second->getChatMode()], + _Log.displayNL("'%s' (%s) : \t\"%s\"", + senderName.c_str(), + groupNames[itCl->second->getChatMode()], ucstr.toString().c_str() ); chatInGroup( grpId, ucstr, sender ); } break; case CChatGroup::dyn_chat: - { + { TChanID chanID = itCl->second->getDynChatChan(); CDynChatSession *session = _DynChat.getSession(chanID, sender); if (session) // player must have a session in that channel @@ -650,7 +659,7 @@ void CChatManager::chat( const TDataSetRow& sender, const ucstring& ucstr ) if (!session->getChan()->getDontBroadcastPlayerInputs()) { - // add msg to the historic + // add msg to the historic CDynChatChan::CHistoricEntry entry; entry.String = ucstr; if (ci != NULL) @@ -671,15 +680,15 @@ void CChatManager::chat( const TDataSetRow& sender, const ucstring& ucstr ) ucstring tmp("{no_bubble}"); if (ucstr.find(tmp) == ucstring::npos) { - tmp += ucstr; + tmp += ucstr; content.swap(tmp); } else { content = ucstr; } - } - + } + // broadcast to other client in the channel CDynChatSession *dcc = session->getChan()->getFirstSession(); @@ -687,7 +696,7 @@ void CChatManager::chat( const TDataSetRow& sender, const ucstring& ucstr ) { sendChat(itCl->second->getChatMode(), dcc->getClient()->getID(), content, sender, chanID); dcc = dcc->getNextChannelSession(); // next session in this channel - } + } } else { @@ -702,11 +711,11 @@ void CChatManager::chat( const TDataSetRow& sender, const ucstring& ucstr ) TPlayerInputForward pif; pif.ChanID = chanID; pif.Sender = sender; - pif.Content = ucstr; + pif.Content = ucstr; CMessage msgout( "DYN_CHAT:FORWARD"); msgout.serial(pif); - + CUnifiedNetwork::getInstance()->send(serviceId, msgout); } if (session->getChan()->getUnifiedChannel()) @@ -716,19 +725,19 @@ void CChatManager::chat( const TDataSetRow& sender, const ucstring& ucstr ) IChatUnifierClient::getInstance()->sendUnifiedDynChat(session->getChan()->getID(), senderName, ucstr); } } - } + } } break; // static group default : nlwarning(" client %u chat in %s ! don't know how to handle it.", - sender.getIndex(), + sender.getIndex(), groupNames[itCl->second->getChatMode()]); /* { TGroupId grpId = itCl->second.getChatGroup(); _Log.displayNL("'%s' (%s) : \t\"%s\"", senderName.c_str(), groupNames[itCl->second.getChatMode()], ucstr.toString().c_str() ); - + chatInGroup( grpId, ucstr, sender ); } */ } @@ -736,8 +745,8 @@ void CChatManager::chat( const TDataSetRow& sender, const ucstring& ucstr ) // log chat to PDS system // IOSPD::logChat(ucstr, itCl->second->getId(), _DestUsers); log_Chat_Chat(CChatGroup::groupTypeToString(itCl->second->getChatMode()), - TheDataset.getEntityId(sender), - ucstr.toUtf8(), + TheDataset.getEntityId(sender), + ucstr.toUtf8(), _DestUsers); } @@ -770,7 +779,7 @@ void CChatManager::chatInGroup( TGroupId& grpId, const ucstring& ucstr, const TD CMirrorPropValueRO instanceId( TheDataset, *itM, DSPropertyAI_INSTANCE ); // check the ai instance for region chat - if (chatGrp.Type != CChatGroup::region + if (chatGrp.Type != CChatGroup::region || instanceId == senderInstanceId) { // check homeSessionId for universe @@ -795,7 +804,7 @@ void CChatManager::chatInGroup( TGroupId& grpId, const ucstring& ucstr, const TD _DestUsers.push_back(TheDataset.getEntityId(*itM)); } } - } + } if (chatGrp.Type == CChatGroup::guild) { @@ -855,7 +864,7 @@ void CChatManager::farChatInGroup(TGroupId &grpId, uint32 homeSessionId, const u continue; } sendFarChat( itGrp->second.Type, *itM, text, senderName ); - } + } } else { @@ -885,7 +894,7 @@ void CChatManager::chat2( const TDataSetRow& sender, const std::string &phraseId case CChatGroup::shout : { CChatGroup::TMemberCont::iterator itA; - for( itA = itCl->second->getAudience().Members.begin(); + for( itA = itCl->second->getAudience().Members.begin(); itA != itCl->second->getAudience().Members.end(); ++itA ) { @@ -900,7 +909,7 @@ void CChatManager::chat2( const TDataSetRow& sender, const std::string &phraseId chatInGroup2( grpId, phraseId, sender ); } break; - + case CChatGroup::universe: { @@ -937,7 +946,7 @@ void CChatManager::chat2( const TDataSetRow& sender, const std::string &phraseId { nlwarning(" client %s:%x chat in mode %u ! don't know how to handle it.", TheDataset.getEntityId(sender).toString().c_str(), - sender.getIndex(), + sender.getIndex(), itCl->second->getChatMode()); } } @@ -973,7 +982,7 @@ void CChatManager::chatParam( const TDataSetRow& sender, const std::string &phra case CChatGroup::shout : { CChatGroup::TMemberCont::iterator itA; - for( itA = itCl->second->getAudience().Members.begin(); + for( itA = itCl->second->getAudience().Members.begin(); itA != itCl->second->getAudience().Members.end(); ++itA ) { @@ -988,7 +997,7 @@ void CChatManager::chatParam( const TDataSetRow& sender, const std::string &phra chatParamInGroup( grpId, phraseId, params, sender ); } break; - + case CChatGroup::universe: { @@ -1025,7 +1034,7 @@ void CChatManager::chatParam( const TDataSetRow& sender, const std::string &phra { nlwarning(" client %s:%x chat in mode %u ! don't know how to handle it.", TheDataset.getEntityId(sender).toString().c_str(), - sender.getIndex(), + sender.getIndex(), itCl->second->getChatMode()); } } @@ -1049,7 +1058,7 @@ void CChatManager::chat2Ex( const TDataSetRow& sender, uint32 phraseId) CEntityId eid = TheDataset.getEntityId(sender); if(_MutedUsers.find( eid ) != _MutedUsers.end()) { - nldebug("IOSCM: chat2Ex The player %s:%x is muted", + nldebug("IOSCM: chat2Ex The player %s:%x is muted", TheDataset.getEntityId(sender).toString().c_str(), sender.getIndex()); return; @@ -1061,7 +1070,7 @@ void CChatManager::chat2Ex( const TDataSetRow& sender, uint32 phraseId) case CChatGroup::shout : { CChatGroup::TMemberCont::iterator itA; - for( itA = itCl->second->getAudience().Members.begin(); + for( itA = itCl->second->getAudience().Members.begin(); itA != itCl->second->getAudience().Members.end(); ++itA ) { @@ -1076,7 +1085,7 @@ void CChatManager::chat2Ex( const TDataSetRow& sender, uint32 phraseId) chatInGroup2Ex( grpId, phraseId, sender ); } break; - + case CChatGroup::universe: { CEntityId eid = TheDataset.getEntityId(sender); @@ -1098,21 +1107,21 @@ void CChatManager::chat2Ex( const TDataSetRow& sender, uint32 phraseId) chatInGroup2Ex( grpId, phraseId, sender ); } break; - + case CChatGroup::guild: { TGroupId grpId = itCl->second->getGuildChatGroup(); chatInGroup2Ex( grpId, phraseId, sender ); } break; - - + + // static group default : { nlwarning(" client %s:%x chat in mode %u ! don't know how to handle it.", TheDataset.getEntityId(sender).toString().c_str(), - sender.getIndex(), + sender.getIndex(), itCl->second->getChatMode()); // TGroupId grpId = (*itCl).second.getChatGroup(); // chatInGroup2( grpId, phraseId, sender ); @@ -1141,7 +1150,7 @@ void CChatManager::chatInGroup2Ex( TGroupId& grpId, uint32 phraseId, const TData { CMirrorPropValueRO instanceId( TheDataset, *itM, DSPropertyAI_INSTANCE ); - if (chatGrp.Type != CChatGroup::region + if (chatGrp.Type != CChatGroup::region || instanceId == senderInstanceId) { const CEntityId &eid = TheDataset.getEntityId(*itM); @@ -1184,14 +1193,14 @@ void CChatManager::chatInGroup2( TGroupId& grpId, const std::string & phraseId, CMirrorPropValueRO instanceId( TheDataset, *itM, DSPropertyAI_INSTANCE ); // check the ai instance for region chat - if (chatGrp.Type != CChatGroup::region + if (chatGrp.Type != CChatGroup::region || instanceId == senderInstanceId) { const CEntityId &eid = TheDataset.getEntityId(*itM); if (eid.getType() == RYZOMID::player && std::find( excluded.begin(), excluded.end(), *itM ) == excluded.end() ) sendChat2( (*itGrp ).second.Type, *itM, phraseId, sender ); } - } + } if (chatGrp.Type == CChatGroup::guild) { CCharacterInfos *charInfos = IOS->getCharInfos(TheDataset.getEntityId(sender)); @@ -1232,7 +1241,7 @@ void CChatManager::chatParamInGroup( TGroupId& grpId, const std::string & phrase if (eid.getType() == RYZOMID::player && std::find( excluded.begin(), excluded.end(), *itM ) == excluded.end() ) sendChat2( (*itGrp ).second.Type, *itM, phraseId, sender ); } - } + } if (chatGrp.Type == CChatGroup::guild) { CCharacterInfos *charInfos = IOS->getCharInfos(TheDataset.getEntityId(sender)); @@ -1278,10 +1287,10 @@ void CChatManager::sendEmoteTextToAudience( const TDataSetRow& sender,const std TChanID oldChan = itCl->second->getDynChatChan(); itCl->second->setChatMode(CChatGroup::say); itCl->second->updateAudience(); - + // get audience around the emoting player CChatGroup::TMemberCont::iterator itA; - for( itA = itCl->second->getAudience().Members.begin(); + for( itA = itCl->second->getAudience().Members.begin(); itA != itCl->second->getAudience().Members.end(); ++itA ) { @@ -1329,10 +1338,10 @@ void CChatManager::sendEmoteCustomTextToAll( const TDataSetRow& sender, const uc TChanID oldChan = itCl->second->getDynChatChan(); itCl->second->setChatMode(CChatGroup::say); itCl->second->updateAudience(); - + // get audience around the emoting player CChatGroup::TMemberCont::iterator itA; - for( itA = itCl->second->getAudience().Members.begin(); + for( itA = itCl->second->getAudience().Members.begin(); itA != itCl->second->getAudience().Members.end(); ++itA ) { @@ -1347,7 +1356,7 @@ void CChatManager::sendEmoteCustomTextToAll( const TDataSetRow& sender, const uc TheDataset.getEntityId(sender).toString().c_str(), sender.getIndex()); } - + } @@ -1386,7 +1395,7 @@ void CChatManager::sendEmoteCustomTextToAll( const TDataSetRow& sender, const uc // bms.serial( index ); // bms.serial( infos->Str ); // } -// +// //// nldebug(" sending association [%s,%d] to %s",infos->Str.c_str(),index,receiver.toString().c_str()); // msgout.serialBufferWithSize((uint8*)bms.buffer(), bms.length()); // sendMessageViaMirror(frontendId, msgout); @@ -1406,7 +1415,7 @@ void CChatManager::sendEmoteCustomTextToAll( const TDataSetRow& sender, const uc // //----------------------------------------------- void CChatManager::sendChat( CChatGroup::TGroupType senderChatMode, const TDataSetRow &receiver, const ucstring& ucstr, const TDataSetRow &sender, TChanID chanID, const ucstring &senderName) -{ +{ //if( receiver != sender ) { CCharacterInfos * charInfos = NULL; @@ -1440,14 +1449,14 @@ void CChatManager::sendChat( CChatGroup::TGroupType senderChatMode, const TDataS } uint32 senderNameIndex; - // if the sender exists + // if the sender exists if( charInfos ) { senderNameIndex = charInfos->NameIndex; } else { - // if no sender, we use a special name + // if no sender, we use a special name ucstring senderName(""); senderNameIndex = SM->storeString( senderName ); } @@ -1466,14 +1475,14 @@ void CChatManager::sendChat( CChatGroup::TGroupType senderChatMode, const TDataS msgout.serial( channel ); CBitMemStream bms; GenericXmlMsgHeaderMngr.pushNameToStream( "STRING:CHAT", bms ); - + CChatMsg chatMsg; chatMsg.CompressedIndex = sender.getCompressedIndex(); chatMsg.SenderNameId = senderNameIndex; chatMsg.ChatMode = (uint8) senderChatMode; if (senderChatMode == CChatGroup::dyn_chat) - { - chatMsg.DynChatChanID = chanID; + { + chatMsg.DynChatChanID = chanID; } chatMsg.Content = ucstr; bms.serial( chatMsg ); @@ -1483,7 +1492,7 @@ void CChatManager::sendChat( CChatGroup::TGroupType senderChatMode, const TDataS chatMsg.Sender, receiver.toString().c_str(), chatMsg.ChatMode); - */ + */ msgout.serialBufferWithSize((uint8*)bms.buffer(), bms.length()); sendMessageViaMirror(TServiceId(receiverInfos->EntityId.getDynamicId()), msgout); } @@ -1500,7 +1509,7 @@ void CChatManager::sendChat( CChatGroup::TGroupType senderChatMode, const TDataS nlwarning(" The character %s:%x is unknown, no chat msg sent", TheDataset.getEntityId(receiver).toString().c_str(), receiver.getIndex()); - } + } } } // sendChat // @@ -1526,14 +1535,14 @@ void CChatManager::sendFarChat( CChatGroup::TGroupType senderChatMode, const TDa msgout.serial( channel ); CBitMemStream bms; GenericXmlMsgHeaderMngr.pushNameToStream( "STRING:CHAT", bms ); - + CChatMsg chatMsg; chatMsg.CompressedIndex = 0xFFFFF; chatMsg.SenderNameId = senderNameIndex; chatMsg.ChatMode = (uint8) senderChatMode; if (senderChatMode == CChatGroup::dyn_chat) - { - chatMsg.DynChatChanID = chanID; + { + chatMsg.DynChatChanID = chanID; } chatMsg.Content = ucstr; bms.serial( chatMsg ); @@ -1554,7 +1563,7 @@ void CChatManager::sendFarChat( CChatGroup::TGroupType senderChatMode, const TDa nlwarning(" The character %s:%x is unknown, no chat msg sent", TheDataset.getEntityId(receiver).toString().c_str(), receiver.getIndex()); - } + } } @@ -1584,7 +1593,7 @@ void CChatManager::sendChatParam( CChatGroup::TGroupType senderChatMode, const T { TVectorParamCheck params2; params2.resize( params.size() + 1); - // send the chat phrase to the client + // send the chat phrase to the client params2[0].Type = STRING_MANAGER::bot; params2[0].setEId( TheDataset.getEntityId(sender) ); uint32 first = 0, last = (uint32)params.size(); @@ -1643,7 +1652,7 @@ void CChatManager::sendChat2Ex( CChatGroup::TGroupType senderChatMode, const TDa msgout.serial( channel ); CBitMemStream bms; GenericXmlMsgHeaderMngr.pushNameToStream( "STRING:CHAT2", bms ); - + CChatMsg2 chatMsg; chatMsg.CompressedIndex = sender.getCompressedIndex(); chatMsg.SenderNameId = charInfos ? charInfos->NameIndex : 0; // empty string if there is no sender @@ -1651,7 +1660,7 @@ void CChatManager::sendChat2Ex( CChatGroup::TGroupType senderChatMode, const TDa chatMsg.PhraseId = phraseId; chatMsg.CustomTxt = customTxt; bms.serial( chatMsg ); - + msgout.serialBufferWithSize((uint8*)bms.buffer(), bms.length()); CUnifiedNetwork::getInstance()->send(TServiceId(receiverInfos->EntityId.getDynamicId()), msgout); } @@ -1677,9 +1686,9 @@ void CChatManager::sendChat2Ex( CChatGroup::TGroupType senderChatMode, const TDa // //----------------------------------------------- void CChatManager::sendChatCustomEmote( const TDataSetRow &sender, const TDataSetRow &receiver, const ucstring& ucstr ) -{ +{ TDataSetRow senderFake = TDataSetRow::createFromRawIndex( INVALID_DATASET_ROW ); - + CCharacterInfos * receiverInfos = IOS->getCharInfos( TheDataset.getEntityId(receiver) ); CCharacterInfos * senderInfos = IOS->getCharInfos( TheDataset.getEntityId(sender) ); if( receiverInfos ) @@ -1698,7 +1707,7 @@ void CChatManager::sendChatCustomEmote( const TDataSetRow &sender, const TDataSe { return; } - + // send the string to FE CMessage msgout( "IMPULS_CH_ID" ); uint8 channel = 1; @@ -1707,7 +1716,7 @@ void CChatManager::sendChatCustomEmote( const TDataSetRow &sender, const TDataSe msgout.serial( channel ); CBitMemStream bms; GenericXmlMsgHeaderMngr.pushNameToStream( "STRING:CHAT", bms ); - + CChatMsg chatMsg; chatMsg.CompressedIndex = senderFake.getCompressedIndex(); chatMsg.SenderNameId = 0; @@ -1785,7 +1794,7 @@ void CChatManager::tell2( const TDataSetRow& sender, const TDataSetRow& receiver TheDataset.getEntityId(receiver).toString().c_str() ); return; } - + // check if the sender is CSR or is not in the ignore list of the receiver if(senderInfos->HavePrivilege || !itCl->second->isInIgnoreList(sender) ) { @@ -1802,10 +1811,10 @@ void CChatManager::tell2( const TDataSetRow& sender, const TDataSetRow& receiver msgout.serial( channel ); CBitMemStream bms; GenericXmlMsgHeaderMngr.pushNameToStream( "STRING:TELL2", bms); - + bms.serial( senderInfos->NameIndex ); bms.serial( id); - + msgout.serialBufferWithSize((uint8*)bms.buffer(), bms.length()); CUnifiedNetwork::getInstance()->send(TServiceId(receiverInfos->EntityId.getDynamicId()), msgout); } @@ -1938,8 +1947,8 @@ void CChatManager::tell( const TDataSetRow& sender, const string& receiverIn, co */ _Log.displayNL("'%s' to '%s' (%s) : \t\"%s\"", senderName.c_str(), receiverName.c_str(), "tell", ucstr.toString().c_str() ); - - + + // if the client doesn't know this dynamic string(name of sender), we send it to him // send the string to FE CMessage msgout( "IMPULS_CH_ID" ); @@ -1948,12 +1957,12 @@ void CChatManager::tell( const TDataSetRow& sender, const string& receiverIn, co msgout.serial( channel ); CBitMemStream bms; GenericXmlMsgHeaderMngr.pushNameToStream( "STRING:TELL", bms); - + TDataSetIndex dsi = senderInfos->DataSetIndex.getCompressedIndex(); bms.serial( dsi ); bms.serial( senderInfos->NameIndex ); bms.serial( const_cast(ucstr) ); - + msgout.serialBufferWithSize((uint8*)bms.buffer(), bms.length()); sendMessageViaMirror(TServiceId(receiverInfos->EntityId.getDynamicId()), msgout); @@ -2088,8 +2097,8 @@ void CChatManager::farTell( const NLMISC::CEntityId &senderCharId, const ucstrin string receiverName = receiverInfos->Name.toString(); _Log.displayNL("'%s' to '%s' (%s) : \t\"%s\"", senderName.toUtf8().c_str(), receiverName.c_str(), "tell", ucstr.toString().c_str() ); - - + + // if the client doesn't know this dynamic string(name of sender), we send it to him // send the string to FE CMessage msgout( "IMPULS_CH_ID" ); @@ -2103,7 +2112,7 @@ void CChatManager::farTell( const NLMISC::CEntityId &senderCharId, const ucstrin ftm.SenderName = senderName; ftm.Text = ucstr; ftm.serial(bms); - + msgout.serialBufferWithSize((uint8*)bms.buffer(), bms.length()); sendMessageViaMirror(TServiceId(receiverInfos->EntityId.getDynamicId()), msgout); @@ -2134,19 +2143,19 @@ void CChatManager::displayChatClients(NLMISC::CLog &log) if (ci != NULL) { if (ci->EntityId.getType() == RYZOMID::player) - log.displayNL("'%s' %s:%x %s mode '%s'", - ci->Name.toString().c_str(), - ci->EntityId.toString().c_str(), - im->first.getIndex(), - im->second->isMuted()?"(muted)":"", + log.displayNL("'%s' %s:%x %s mode '%s'", + ci->Name.toString().c_str(), + ci->EntityId.toString().c_str(), + im->first.getIndex(), + im->second->isMuted()?"(muted)":"", CChatGroup::groupTypeToString(im->second->getChatMode()).c_str() ); } else { - log.displayNL("*no name* %s:%x %s mode '%s'", - ci->EntityId.toString().c_str(), - im->first.getIndex(), - im->second->isMuted()?"(muted)":"", + log.displayNL("*no name* %s:%x %s mode '%s'", + ci->EntityId.toString().c_str(), + im->first.getIndex(), + im->second->isMuted()?"(muted)":"", CChatGroup::groupTypeToString(im->second->getChatMode()).c_str() ); } } @@ -2157,17 +2166,17 @@ void CChatManager::displayChatGroup(NLMISC::CLog &log, TGroupId gid, CChatGroup { if (chatGroup.GroupName == CStringMapper::emptyId()) { - log.displayNL("Group : anonym (%s), %s : %u clients :", + log.displayNL("Group : anonym (%s), %s : %u clients :", gid.toString().c_str(), - CChatGroup::groupTypeToString(chatGroup.Type).c_str(), + CChatGroup::groupTypeToString(chatGroup.Type).c_str(), chatGroup.Members.size()); } else { - log.displayNL("Group : '%s' (%s), %s : %u clients :", + log.displayNL("Group : '%s' (%s), %s : %u clients :", CStringMapper::unmap(chatGroup.GroupName).c_str(), - gid.toString().c_str(), - CChatGroup::groupTypeToString(chatGroup.Type).c_str(), + gid.toString().c_str(), + CChatGroup::groupTypeToString(chatGroup.Type).c_str(), chatGroup.Members.size()); } @@ -2179,12 +2188,12 @@ void CChatManager::displayChatGroup(NLMISC::CLog &log, TGroupId gid, CChatGroup { CCharacterInfos *ci = IOS->getCharInfos(TheDataset.getEntityId(*first)); if (ci != NULL) - log.displayNL(" '%s' %s:%x", - ci->Name.toString().c_str(), + log.displayNL(" '%s' %s:%x", + ci->Name.toString().c_str(), ci->EntityId.toString().c_str(), first->getIndex()); else - log.displayNL(" *unknow* %s:%x", + log.displayNL(" *unknow* %s:%x", eid.toString().c_str(), first->getIndex()); } @@ -2262,13 +2271,13 @@ void CChatManager::displayChatAudience(NLMISC::CLog &log, const CEntityId &eid, { CCharacterInfos *ci = IOS->getCharInfos(TheDataset.getEntityId(*first)); if (ci != NULL) - log.displayNL(" '%s' %s:%x", - ci->Name.toString().c_str(), + log.displayNL(" '%s' %s:%x", + ci->Name.toString().c_str(), TheDataset.getEntityId(*first).toString().c_str(), first->getIndex()); - + else - log.displayNL(" *unknow* %s:%x", + log.displayNL(" *unknow* %s:%x", TheDataset.getEntityId(*first).toString().c_str(), first->getIndex()); } @@ -2301,9 +2310,9 @@ ucstring CChatManager::filterClientInputColorCode(ucstring &text) { ucstring result; result.reserve(text.size()); - + ucstring::size_type pos = 0; - + for (; pos < text.size(); ++pos) { if (text[pos] == '@' && pos < text.size()-1 && text[pos+1] == '{') @@ -2316,7 +2325,7 @@ ucstring CChatManager::filterClientInputColorCode(ucstring &text) result += text[pos]; } } - + return result; } @@ -2340,7 +2349,7 @@ ucstring CChatManager::filterClientInput(ucstring &text) bool lastIsWhite = false; for (; pos < text.size(); ++pos) { - bool currentIsWhite = (text[pos] == ' ' || text[pos] == '\t'); + bool currentIsWhite = (text[pos] == ' ' || text[pos] == '\t'); if (!(lastIsWhite && currentIsWhite)) { // any double white skipped @@ -2353,7 +2362,7 @@ ucstring CChatManager::filterClientInput(ucstring &text) hasBrackets = (text[pos-1] == '>') && (text[pos-5] == '<'); } - // Filter out '&' at the first non-whitespace position to remove + // Filter out '&' at the first non-whitespace position to remove // system color code (like '&SYS&' ) bool disallowAmpersand = (result.size() == 0) || hasBrackets; if (disallowAmpersand) diff --git a/code/ryzom/server/src/input_output_service/chat_manager.h b/code/ryzom/server/src/input_output_service/chat_manager.h index 9e2d20e8c..544dbfa2c 100644 --- a/code/ryzom/server/src/input_output_service/chat_manager.h +++ b/code/ryzom/server/src/input_output_service/chat_manager.h @@ -42,14 +42,14 @@ - + /** * CChatManager * \author Stephane Coutelas * \author Nevrax France * \date 2002 */ -class CChatManager +class CChatManager { public : @@ -72,7 +72,7 @@ public : */ void init( /*const std::string& staticDBFileName, const std::string& dynDBFileName*/ ); - /** A service has gone down + /** A service has gone down */ void onServiceDown(const std::string &serviceShortName); @@ -80,7 +80,7 @@ public : * Reset ChatLog management */ void resetChatLog(); - + /** * Check if the client is already registered in the chat manager. */ @@ -102,7 +102,7 @@ public : * \param id is the client character id */ CChatClient& getClient( const TDataSetRow& id ); //throw (EChatClient); - + /** * Return a reference on the static database */ @@ -195,7 +195,7 @@ public : void chat2( const TDataSetRow& sender, const std::string &phraseId ); - + /** * Transmit a chat message * \param sender is the id of the talking char @@ -334,7 +334,7 @@ public : private : - + typedef std::map< TDataSetRow, CChatClient*> TClientInfoCont; /// client infos TClientInfoCont _Clients; @@ -377,7 +377,7 @@ protected: friend void cbNpcTellEx( NLNET::CMessage& msgin, const std::string &serviceName, NLNET::TServiceId serviceId ); friend void cbDynChatServiceChat( NLNET::CMessage& msgin, const std::string &serviceName, NLNET::TServiceId serviceId ); friend void cbDynChatServiceTell( NLNET::CMessage& msgin, const std::string &serviceName, NLNET::TServiceId serviceId ); - + public: /** * Send a chat message @@ -389,7 +389,7 @@ public: * \param senderName Can be used to replace the sender name with a specific string */ void sendChat( CChatGroup::TGroupType senderChatMode, const TDataSetRow &receiver, const ucstring& ucstr, const TDataSetRow &sender = TDataSetRow(), TChanID chanID = NLMISC::CEntityId::Unknown, const ucstring &senderName = ucstring()); - + /** * Send a far chat message diff --git a/code/ryzom/server/src/input_output_service/string_manager_parser.cpp b/code/ryzom/server/src/input_output_service/string_manager_parser.cpp index 67ce62f10..2aa3c896b 100644 --- a/code/ryzom/server/src/input_output_service/string_manager_parser.cpp +++ b/code/ryzom/server/src/input_output_service/string_manager_parser.cpp @@ -650,7 +650,7 @@ bool CStringManager::parseBlock(const ucstring &block, CPhrase &phrase) && (first - clause.String.begin()) == (sint) clause.Replacements[repCount].InsertPlace) { // check parameter type - char *subst; + const char *subst; uint paramIndex = clause.Replacements[repCount].ParamIndex; TParamId ¶mId = phrase.Params[paramIndex]->ParamId; @@ -1356,7 +1356,7 @@ void CStringManager::mergeEntityWords(CEntityWords& dest, const CEntityWords& so std::map::const_iterator iti; for (iti=source._ColumnInfo.begin(); iti!=source._ColumnInfo.end(); ++iti) if (dest._ColumnInfo.find((*iti).first) == dest._ColumnInfo.end()) - extraColumns.push_back(std::make_pair((*iti).first, osz+(uint32)extraColumns.size())); + extraColumns.push_back(std::pair((*iti).first, osz + (uint32)extraColumns.size())); for (iti=source._RowInfo.begin(); iti!=source._RowInfo.end(); ++iti) if (dest._RowInfo.find((*iti).first) == dest._RowInfo.end()) diff --git a/code/ryzom/server/src/monitor_service/client.cpp b/code/ryzom/server/src/monitor_service/client.cpp index 6d761ba3e..ce2fdc5dc 100644 --- a/code/ryzom/server/src/monitor_service/client.cpp +++ b/code/ryzom/server/src/monitor_service/client.cpp @@ -273,7 +273,7 @@ void CMonitorClient::update () TYPE_NAME_STRING_ID id = Str[i]; std::map::iterator ite = StringMap.find (id); nlassert (ite != StringMap.end()); - strToSend.push_back( make_pair(id, &((*ite).second)) ); + strToSend.push_back(std::pair(id, &((*ite).second))); strTotalSize += 4+4+(uint)(*ite).second.size(); } diff --git a/code/ryzom/server/src/monitor_service/service_main.cpp b/code/ryzom/server/src/monitor_service/service_main.cpp index 84bbcbe86..bf092bbae 100644 --- a/code/ryzom/server/src/monitor_service/service_main.cpp +++ b/code/ryzom/server/src/monitor_service/service_main.cpp @@ -418,7 +418,9 @@ void clientAuthentication(CMessage &msgin, TSockId from, CCallbackNetBase &netba // fail the authentication // Do not send result immediatly to avoid a potential hacker // to try a dictionnary or that dort of things - BadLoginClients.insert(std::make_pair(NLMISC::CTime::getLocalTime() + LOGIN_RETRY_DELAY_IN_MILLISECONDS, Clients[i])); + BadLoginClients.insert(std::pair >( + NLMISC::CTime::getLocalTime() + LOGIN_RETRY_DELAY_IN_MILLISECONDS, + (NLMISC::CRefPtr)Clients[i])); Clients[i]->BadLogin =true; return; } diff --git a/code/ryzom/server/src/pd_lib/db_description_parser.cpp b/code/ryzom/server/src/pd_lib/db_description_parser.cpp index 175000cf2..55eb4a3d6 100644 --- a/code/ryzom/server/src/pd_lib/db_description_parser.cpp +++ b/code/ryzom/server/src/pd_lib/db_description_parser.cpp @@ -260,7 +260,7 @@ bool CDBDescriptionParser::loadType(xmlNodePtr node) return false; } - typeNode.EnumValues.push_back(make_pair(name, value)); + typeNode.EnumValues.push_back(std::pair(name, value)); if (typeNode.Dimension <= value) typeNode.Dimension = value; diff --git a/code/ryzom/server/src/pd_lib/pd_lib.cpp b/code/ryzom/server/src/pd_lib/pd_lib.cpp index f57a4be62..1a2cda9ba 100644 --- a/code/ryzom/server/src/pd_lib/pd_lib.cpp +++ b/code/ryzom/server/src/pd_lib/pd_lib.cpp @@ -571,7 +571,7 @@ void CPDSLib::update() CMessage* msgupd = new CMessage("PD_UPDATE"); msgupd->serial(_DatabaseId); msgupd->serial(_UpdateId); - _QueuedMessages.push_back(make_pair(_UpdateId, msgupd)); + _QueuedMessages.push_back(std::pair(_UpdateId, msgupd)); ++_UpdateId; // serial queue diff --git a/code/ryzom/server/src/pd_lib/pd_messages.cpp b/code/ryzom/server/src/pd_lib/pd_messages.cpp index 253855d46..b5e731d95 100644 --- a/code/ryzom/server/src/pd_lib/pd_messages.cpp +++ b/code/ryzom/server/src/pd_lib/pd_messages.cpp @@ -504,7 +504,7 @@ bool CUpdateLog::selectMessages(const CDBDescriptionParser& description, const N if (message.getType() == CDbMessage::PushContext) { - contextsStart.push_back(std::make_pair(msg, false)); + contextsStart.push_back(std::pair(msg, false)); } else if (message.getType() == CDbMessage::PopContext) { @@ -561,7 +561,7 @@ bool CUpdateLog::selectMessages(const CDBDescriptionParser& description, const s if (message.getType() == CDbMessage::PushContext) { - contextsStart.push_back(std::make_pair(msg, false)); + contextsStart.push_back(std::pair(msg, false)); } else if (message.getType() == CDbMessage::PopContext) { @@ -644,7 +644,7 @@ bool CUpdateLog::selectMessages(const CDBDescriptionParser& description, const N if (message.getType() == CDbMessage::PushContext) { - contextsStart.push_back(std::make_pair(msg, false)); + contextsStart.push_back(std::pair(msg, false)); } else if (message.getType() == CDbMessage::PopContext) { diff --git a/code/ryzom/server/src/pd_lib/pd_string_mapper.cpp b/code/ryzom/server/src/pd_lib/pd_string_mapper.cpp index 184d4bb7f..7a326dc67 100644 --- a/code/ryzom/server/src/pd_lib/pd_string_mapper.cpp +++ b/code/ryzom/server/src/pd_lib/pd_string_mapper.cpp @@ -64,7 +64,7 @@ void CPDStringMapper::setMapping(const std::string& str, uint32 id) return; } - its = _StringMap.insert(std::make_pair(lowMapStr, id)).first; + its = _StringMap.insert(std::pair(lowMapStr, id)).first; _IdMap[id] = its; } diff --git a/code/ryzom/server/src/pd_lib/pd_utils.h b/code/ryzom/server/src/pd_lib/pd_utils.h index 73a0268d8..85a183753 100644 --- a/code/ryzom/server/src/pd_lib/pd_utils.h +++ b/code/ryzom/server/src/pd_lib/pd_utils.h @@ -490,13 +490,16 @@ typedef std::vector TIndexList; struct CColumnIndexHashMapTraits { - static const size_t bucket_size = 4; - static const size_t min_buckets = 8; + enum { bucket_size = 4, min_buckets = 8, }; CColumnIndexHashMapTraits() { } size_t operator() (const CColumnIndex &id) const - { - return id.hash(); - } + { + return id.hash(); + } + bool operator()(const CColumnIndex &left, const CColumnIndex &right) + { + return left < right; + } }; class CSetMap diff --git a/code/ryzom/server/src/pd_support_service/stat_user_file_list_builders.cpp b/code/ryzom/server/src/pd_support_service/stat_user_file_list_builders.cpp index 8f4f1e07f..45c172384 100644 --- a/code/ryzom/server/src/pd_support_service/stat_user_file_list_builders.cpp +++ b/code/ryzom/server/src/pd_support_service/stat_user_file_list_builders.cpp @@ -20,6 +20,7 @@ //------------------------------------------------------------------------------------------------- #include +#include #include "game_share/utils.h" #include "stat_file_list_builder_factory.h" #include "stat_globals.h" @@ -522,7 +523,7 @@ FILE_LIST_BUILDER(NewestFile,"remove all but the latest file for each account (a uint32 accountId= accountIds[i]; uint32& bestTime= bestTimes[accountId]; uint32 timeStamp= fdc[i].FileTimeStamp; - if (bestTime!=timeStamp || bestTime==~0u) + if (bestTime!=timeStamp || bestTime==std::numeric_limits::max()) { fdc.removeFile(i); continue; diff --git a/code/ryzom/server/src/persistant_data_service/db_manager.cpp b/code/ryzom/server/src/persistant_data_service/db_manager.cpp index 6acdf687c..1f853a729 100644 --- a/code/ryzom/server/src/persistant_data_service/db_manager.cpp +++ b/code/ryzom/server/src/persistant_data_service/db_manager.cpp @@ -785,7 +785,7 @@ NLNET::CMessage& CDbManager::addTask(const std::string& msg, ITaskEventListener* // add listener to task listeners if (listener != NULL) - _TaskListeners[id] = std::make_pair(listener, arg); + _TaskListeners[id] = std::pair(listener, arg); return *msgrbs; } diff --git a/code/ryzom/server/src/persistant_data_service/pds_database.cpp b/code/ryzom/server/src/persistant_data_service/pds_database.cpp index 66b272d5c..84148220b 100644 --- a/code/ryzom/server/src/persistant_data_service/pds_database.cpp +++ b/code/ryzom/server/src/persistant_data_service/pds_database.cpp @@ -905,14 +905,16 @@ bool CDatabase::set(RY_PDS::TTableIndex table, RY_PDS::TRowIndex row, RY_PDS::TC case PDS_float: { - float data = (float)atof(value.c_str()); + float data; + NLMISC::fromString(value, data); return set(table, row, column, sizeof(data), &data); } break; case PDS_double: { - double data = (double)atof(value.c_str()); + double data; + NLMISC::fromString(value, data); return set(table, row, column, sizeof(data), &data); } break; diff --git a/code/ryzom/server/src/ryzom_welcome_service/ryzom_welcome_service.cpp b/code/ryzom/server/src/ryzom_welcome_service/ryzom_welcome_service.cpp index 1656f34c1..1de6677cb 100644 --- a/code/ryzom/server/src/ryzom_welcome_service/ryzom_welcome_service.cpp +++ b/code/ryzom/server/src/ryzom_welcome_service/ryzom_welcome_service.cpp @@ -21,6 +21,7 @@ #include #include +#include #include "nel/misc/debug.h" #include "nel/misc/config_file.h" @@ -912,7 +913,7 @@ void cbLSChooseShard (CMessage &msgin, const std::string &serviceName, TServiceI } - string ret = lsChooseShard(userName, cookie, userPriv, userExtended, WS::TUserRole::ur_player, 0xffffffff, ~0); + string ret = lsChooseShard(userName, cookie, userPriv, userExtended, WS::TUserRole::ur_player, 0xffffffff, std::numeric_limits::max()); if (!ret.empty()) { diff --git a/code/ryzom/server/src/server_share/continent_container.h b/code/ryzom/server/src/server_share/continent_container.h index 7edfb0c96..6e65b3dc4 100644 --- a/code/ryzom/server/src/server_share/continent_container.h +++ b/code/ryzom/server/src/server_share/continent_container.h @@ -162,7 +162,7 @@ public: /// Init whole continent container void init(uint gridWidth, uint gridHeight, double primitiveMaxSize, uint nbWorldImages, const std::string &packedSheetsDirectory, double cellSize=0.0, bool loadPacsPrims = true); - + /// Build sheets void buildSheets(const std::string &packedSheetsDirectory); diff --git a/code/ryzom/server/src/server_share/logger_service_client.cpp b/code/ryzom/server/src/server_share/logger_service_client.cpp index e8174e0cd..d94834d12 100644 --- a/code/ryzom/server/src/server_share/logger_service_client.cpp +++ b/code/ryzom/server/src/server_share/logger_service_client.cpp @@ -238,8 +238,8 @@ namespace LGS // create the log context closing _LogInfos.push_back(TLogInfo()); _LogInfos.back().setLogName(contextName); - // tag as 'closing' with ~0 - _LogInfos.back().setTimeStamp(~0); + // tag as 'closing' with std::numeric_limits::max() + _LogInfos.back().setTimeStamp(std::numeric_limits::max()); } --_NbOpenContext; if (VerboseLogger) diff --git a/code/ryzom/server/src/server_share/msg_ai_service.h b/code/ryzom/server/src/server_share/msg_ai_service.h index bd4115f4a..13c6a3423 100644 --- a/code/ryzom/server/src/server_share/msg_ai_service.h +++ b/code/ryzom/server/src/server_share/msg_ai_service.h @@ -88,7 +88,7 @@ public: virtual void description () { className ("CUserEventMsg"); - property ("InstanceNumber", PropUInt32, uint32(~0), InstanceNumber); + property ("InstanceNumber", PropUInt32, std::numeric_limits::max(), InstanceNumber); property ("GrpAlias", PropUInt32, uint32(0xffffffff), GrpAlias); property ("EventId", PropUInt8, uint8(0xff), EventId); propertyCont ("Params", PropString, Params); @@ -133,7 +133,7 @@ public: virtual void description () { className ("CSetEscortTeamId"); - property ("InstanceNumber", PropUInt32, uint32(~0), InstanceNumber); + property ("InstanceNumber", PropUInt32, std::numeric_limits::max(), InstanceNumber); propertyCont ("Groups", PropUInt32, Groups); property ("TeamId", PropUInt16, CTEAM::InvalidTeamId, TeamId); } diff --git a/code/ryzom/server/src/server_share/mysql_wrapper.cpp b/code/ryzom/server/src/server_share/mysql_wrapper.cpp index 5b993b56e..3bb343314 100644 --- a/code/ryzom/server/src/server_share/mysql_wrapper.cpp +++ b/code/ryzom/server/src/server_share/mysql_wrapper.cpp @@ -116,7 +116,7 @@ namespace MSW if (MSWAutoReconnect) { addOption(MYSQL_OPT_RECONNECT, "1"); - } + } return _connect(); } diff --git a/code/ryzom/server/src/server_share/pet_interface_msg.h b/code/ryzom/server/src/server_share/pet_interface_msg.h index d2f9e64a2..f404a76ef 100644 --- a/code/ryzom/server/src/server_share/pet_interface_msg.h +++ b/code/ryzom/server/src/server_share/pet_interface_msg.h @@ -25,6 +25,7 @@ #include "game_share/synchronised_message.h" #include "game_share/mirror.h" +#include // Pet interface message class for AIS / EGS communication @@ -47,7 +48,7 @@ public: virtual void description () { className ("CPetSpawnMsg"); - property ("AIInstanceId", PropUInt32, (uint32)~0, AIInstanceId); + property ("AIInstanceId", PropUInt32, std::numeric_limits::max(), AIInstanceId); property ("SpawnMode", PropUInt16, (uint16)NEAR_PLAYER, SpawnMode); property ("CharacterMirrorRow", PropDataSetRow, TDataSetRow(), CharacterMirrorRow); property ("PetSheetId", PropSheetId, NLMISC::CSheetId::Unknown, PetSheetId); diff --git a/code/ryzom/server/src/server_share/r2_vision.cpp b/code/ryzom/server/src/server_share/r2_vision.cpp index 7433e9026..dd4b2a25d 100644 --- a/code/ryzom/server/src/server_share/r2_vision.cpp +++ b/code/ryzom/server/src/server_share/r2_vision.cpp @@ -147,8 +147,8 @@ namespace R2_VISION void CUniverse::createInstance(uint32 aiInstance, uint32 groupId) { - // just ignore attempts to create the ~0u instance - if (aiInstance==~0u) + // just ignore attempts to create the std::numeric_limits::max() instance + if (aiInstance==std::numeric_limits::max()) { return; } @@ -172,8 +172,8 @@ namespace R2_VISION void CUniverse::removeInstance(uint32 aiInstance) { - // just ignore attempts to remove the ~0u instance - if (aiInstance==~0u) + // just ignore attempts to remove the std::numeric_limits::max() instance + if (aiInstance==std::numeric_limits::max()) { return; } @@ -227,7 +227,7 @@ namespace R2_VISION SUniverseEntity& theEntity= _Entities[row]; // if the entity was already allocated then remove it - if (theEntity.AIInstance == ~0u) { return; } + if (theEntity.AIInstance == std::numeric_limits::max()) { return; } if ( theEntity.ViewerRecord) { @@ -325,8 +325,8 @@ namespace R2_VISION BOMB_IF(row>=_Entities.size(),NLMISC::toString("Ignoring attempt to set entity position with invalid row value: %d",row),return); // ensure that the new AIInstance exists - BOMB_IF(aiInstance!=~0u && (aiInstance>=_Instances.size() || _Instances[aiInstance]==NULL), - NLMISC::toString("ERROR: Failed to add entity %d to un-initialised instance: %d",row,aiInstance),aiInstance=~0u); + BOMB_IF(aiInstance!=std::numeric_limits::max() && (aiInstance>=_Instances.size() || _Instances[aiInstance]==NULL), + NLMISC::toString("ERROR: Failed to add entity %d to un-initialised instance: %d",row,aiInstance),aiInstance=std::numeric_limits::max()); // delegate to workhorse routine (converting y coordinate to +ve axis) _teleportEntity(dataSetRow,aiInstance,x,-y,invisibilityLevel); @@ -429,7 +429,7 @@ namespace R2_VISION SUniverseEntity& theEntity= _Entities[row]; // if the entity was already allocated then remove it - if (theEntity.AIInstance!=~0u) + if (theEntity.AIInstance!=std::numeric_limits::max()) { _removeEntity(dataSetRow); } @@ -455,7 +455,7 @@ namespace R2_VISION { // detach the entity from the instance it's currently in _Instances[theEntity.AIInstance]->removeEntity(theEntity); - theEntity.AIInstance= ~0u; + theEntity.AIInstance= std::numeric_limits::max(); theEntity.ViewerRecord= NULL; } } @@ -466,8 +466,8 @@ namespace R2_VISION SUniverseEntity& theEntity= _Entities[dataSetRow.getIndex()]; #ifdef NL_DEBUG - nlassert(theEntity.AIInstance==~0u || theEntity.AIInstance<_Instances.size()); - nlassert(theEntity.AIInstance==~0u || _Instances[theEntity.AIInstance]!=NULL); + nlassert(theEntity.AIInstance==std::numeric_limits::max() || theEntity.AIInstance<_Instances.size()); + nlassert(theEntity.AIInstance==std::numeric_limits::max() || _Instances[theEntity.AIInstance]!=NULL); #endif // if the entity is a viewer then move the view coordinates @@ -477,7 +477,7 @@ namespace R2_VISION } // if the entity is not currently in an AIInstance then stop here - if (theEntity.AIInstance==~0u) + if (theEntity.AIInstance==std::numeric_limits::max()) return; // set the instance entity record position @@ -498,10 +498,10 @@ namespace R2_VISION // set the new AIInstance value for the entity theEntity.AIInstance= aiInstance; - // if the aiInstance is set to ~0u (a reserved value) then we stop here - if (aiInstance==~0u) + // if the aiInstance is set to std::numeric_limits::max() (a reserved value) then we stop here + if (aiInstance==std::numeric_limits::max()) { - // clear out the vision for an entity in aiInstance ~0u + // clear out the vision for an entity in aiInstance std::numeric_limits::max() if (getEntity(dataSetRow)->ViewerRecord!=NULL) { TVision emptyVision(2); @@ -785,7 +785,7 @@ namespace R2_VISION // locate the old vision group (the one we're allocated to before isolation) uint32 visionId= viewerRecord->VisionId; NLMISC::CSmartPtr& oldVisionGroup= _VisionGroups[visionId]; - BOMB_IF(visionId>=_VisionGroups.size() ||oldVisionGroup==NULL,"Trying to remove entity from vision group with unknown vision id",viewerRecord->VisionId=~0u;return); + BOMB_IF(visionId>=_VisionGroups.size() ||oldVisionGroup==NULL,"Trying to remove entity from vision group with unknown vision id",viewerRecord->VisionId=std::numeric_limits::max();return); // if we're the only viewer then already isolated so just return if (oldVisionGroup->numViewers()==1) @@ -830,7 +830,7 @@ namespace R2_VISION if (viewerRecord!=NULL) { uint32 visionId= viewerRecord->VisionId; - BOMB_IF(visionId>=_VisionGroups.size() ||_VisionGroups[visionId]==NULL,"Trying to remove entity with unknown vision id",viewerRecord->VisionId=~0u;return); + BOMB_IF(visionId>=_VisionGroups.size() ||_VisionGroups[visionId]==NULL,"Trying to remove entity with unknown vision id",viewerRecord->VisionId=std::numeric_limits::max();return); _VisionGroups[visionId]->removeViewer(viewerRecord); } @@ -847,8 +847,8 @@ namespace R2_VISION _Entities.pop_back(); // invalidate the InstanceIndex value for the entity we just removed - entity.InstanceIndex=~0u; - entity.AIInstance=~0u; + entity.InstanceIndex=std::numeric_limits::max(); + entity.AIInstance=std::numeric_limits::max(); } void CInstance::release() @@ -899,11 +899,11 @@ namespace R2_VISION CVisionGroup::CVisionGroup() { - _XMin=~0u; + _XMin=std::numeric_limits::max(); _XMax=0; - _YMin=~0u; + _YMin=std::numeric_limits::max(); _YMax=0; - _VisionId=~0u; + _VisionId=std::numeric_limits::max(); // setup the dummy entry in the vision buffer _Vision.reserve(AllocatedVisionVectorSize); vectAppend(_Vision).DataSetRow= ZeroDataSetRow; @@ -923,8 +923,8 @@ namespace R2_VISION // ensure that the viewer wasn't aleady attached to another vision group #ifdef NL_DEBUG nlassert(viewer!=NULL); - nlassert(viewer->VisionId==~0u); - nlassert(viewer->VisionIndex==~0u); + nlassert(viewer->VisionId==std::numeric_limits::max()); + nlassert(viewer->VisionIndex==std::numeric_limits::max()); #endif TEST(("add viewer %d to grp %d",viewer->getViewerId().getIndex(),_VisionId)); @@ -961,8 +961,8 @@ namespace R2_VISION // pop the back entry off the vector and flag oursleves as unused _Viewers.pop_back(); - viewer->VisionId= ~0u; - viewer->VisionIndex= ~0u; + viewer->VisionId= std::numeric_limits::max(); + viewer->VisionIndex= std::numeric_limits::max(); // NOTE: after this the boundary may be out of date - this will be recalculated at the next // vision update so we don't take time to do it here @@ -1171,8 +1171,8 @@ namespace R2_VISION return; // calculate the bouding box for our viewers - uint32 xmin= ~0u; - uint32 ymin= ~0u; + uint32 xmin= std::numeric_limits::max(); + uint32 ymin= std::numeric_limits::max(); uint32 xmax= 0; uint32 ymax= 0; for (uint32 i=(uint32)_Viewers.size();i--;) @@ -1247,7 +1247,7 @@ namespace R2_VISION // reset the vision vector and add in the dummy entry with DataSetRow=0 _Vision.resize(AllocatedVisionVectorSize); _Vision[0].DataSetRow= ZeroDataSetRow; - _Vision[0].VisionSlot= ~0u; + _Vision[0].VisionSlot= std::numeric_limits::max(); // setup a vision slot iterator for filling in the vision buffer (=1 to skip passed the dummy entry) uint32 nextVisionSlot=1; @@ -1380,8 +1380,8 @@ namespace R2_VISION CViewer::CViewer() { - VisionId=~0u; - VisionIndex=~0u; + VisionId=std::numeric_limits::max(); + VisionIndex=std::numeric_limits::max(); _VisionResetCount= 0; } @@ -1399,7 +1399,7 @@ namespace R2_VISION // setup the dummy entry with DataSetRow=0 _Vision[0].DataSetRow= ZeroDataSetRow; - _Vision[0].VisionSlot= ~0u; + _Vision[0].VisionSlot= std::numeric_limits::max(); // setup the vision slots in reverse order from 254..0 (because they're popped from the back) _FreeVisionSlots.clear(); diff --git a/code/ryzom/server/src/server_share/r2_vision.h b/code/ryzom/server/src/server_share/r2_vision.h index 9bf3f7689..9872e606a 100644 --- a/code/ryzom/server/src/server_share/r2_vision.h +++ b/code/ryzom/server/src/server_share/r2_vision.h @@ -140,7 +140,7 @@ namespace R2_VISION // ctor SViewedEntity() { - VisionSlot=~0u; + VisionSlot=std::numeric_limits::max(); } }; @@ -196,15 +196,15 @@ namespace R2_VISION struct SUniverseEntity { TDataSetRow DataSetRow; // the complete data set row for the entity - uint32 AIInstance; // the id of the instance that we're currently in (~0u by default) + uint32 AIInstance; // the id of the instance that we're currently in (std::numeric_limits::max() by default) mutable uint32 InstanceIndex; // the index within the instance's _Entities vector NLMISC::CSmartPtr ViewerRecord; // pointer to the CViewer record for viewers (or NULL) // ctor SUniverseEntity() { - AIInstance=~0u; - InstanceIndex=~0u; + AIInstance=std::numeric_limits::max(); + InstanceIndex=std::numeric_limits::max(); } }; diff --git a/code/ryzom/server/src/server_share/used_continent.cpp b/code/ryzom/server/src/server_share/used_continent.cpp index 01ab2beda..9d2b48f0d 100644 --- a/code/ryzom/server/src/server_share/used_continent.cpp +++ b/code/ryzom/server/src/server_share/used_continent.cpp @@ -17,8 +17,9 @@ #include "stdpch.h" -#include #include "used_continent.h" +#include "nel/net/service.h" + using namespace std; using namespace NLMISC; @@ -105,7 +106,7 @@ uint32 CUsedContinent::getInstanceForContinent(const std::string &continentName) if (it != _Continents.end()) return it->ContinentInstance; else - return ~0; + return INVALID_AI_INSTANCE; } uint32 CUsedContinent::getInstanceForContinent(CONTINENT::TContinent continentEnum) const @@ -115,7 +116,7 @@ uint32 CUsedContinent::getInstanceForContinent(CONTINENT::TContinent continentEn if (it != _Continents.end()) return it->ContinentInstance; else - return ~0; + return INVALID_AI_INSTANCE; } const std::string &CUsedContinent::getContinentForInstance(uint32 instanceNumber) const diff --git a/code/ryzom/server/src/server_share/used_continent.h b/code/ryzom/server/src/server_share/used_continent.h index 150b6342c..412c133e3 100644 --- a/code/ryzom/server/src/server_share/used_continent.h +++ b/code/ryzom/server/src/server_share/used_continent.h @@ -21,6 +21,7 @@ #include "nel/misc/types_nl.h" #include "nel/net/service.h" #include "game_share/continent.h" +#include "game_share/misc_const.h" #include @@ -60,12 +61,12 @@ public: bool isContinentUsed(const std::string &continentName) const; /** Return the static instance number associated with a continent name. - * If the continent name is unknow, return ~0 + * If the continent name is unknow, return std::numeric_limits::max() */ uint32 getInstanceForContinent(const std::string &continentName) const; /** Return the static instance number associated with a continent enum value - * If the continent name is unknow, return ~0 + * If the continent name is unknow, return std::numeric_limits::max() */ uint32 getInstanceForContinent(CONTINENT::TContinent continentEnum) const; diff --git a/code/ryzom/server/src/shard_unifier_service/character_sync.cpp b/code/ryzom/server/src/shard_unifier_service/character_sync.cpp index 3b1a8b995..29b404567 100644 --- a/code/ryzom/server/src/shard_unifier_service/character_sync.cpp +++ b/code/ryzom/server/src/shard_unifier_service/character_sync.cpp @@ -365,7 +365,7 @@ namespace CHARSYNC for (; first != last; ++first) { // default to no limit - uint32 limit=~0u; + uint32 limit=std::numeric_limits::max(); // if there's a limit in the limis map then use it instead... if (limitsMap.find(first->first)!=limitsMap.end()) diff --git a/code/ryzom/server/src/shard_unifier_service/name_manager.cpp b/code/ryzom/server/src/shard_unifier_service/name_manager.cpp index 5b50f6359..17b500f92 100644 --- a/code/ryzom/server/src/shard_unifier_service/name_manager.cpp +++ b/code/ryzom/server/src/shard_unifier_service/name_manager.cpp @@ -1138,7 +1138,7 @@ bool CNameManager::loadGuildsNamesFromTxt() // merge the first words until we have only 3 words while (words.size() > 3) { - words[0] += words[1]; + words[0] += " " + words[1]; words.erase(words.begin()+1); } BOMB_IF (words.size()!=3,"Invalid line "< +// 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 . ///////////////////////////////////////////////////////////////// // WARNING : this is a generated file, don't change it ! @@ -303,7 +318,7 @@ namespace RSMGR } else if (cmd == NOPE::cc_instance_count) { - return _ObjectCache.size(); + return (uint32)_ObjectCache.size(); } // default return value @@ -321,7 +336,7 @@ namespace RSMGR TReleasedObject::iterator first(_ReleasedObject.begin()), last(_ReleasedObject.end()); for (; first != last; ++first) { - nbReleased += first->second.size(); + nbReleased += (uint32)first->second.size(); } nlinfo(" There are %u object instances in cache not referenced (waiting deletion or re-use))", nbReleased); @@ -781,7 +796,7 @@ namespace RSMGR } else if (cmd == NOPE::cc_instance_count) { - return _ObjectCache.size(); + return (uint32)_ObjectCache.size(); } // default return value @@ -799,7 +814,7 @@ namespace RSMGR TReleasedObject::iterator first(_ReleasedObject.begin()), last(_ReleasedObject.end()); for (; first != last; ++first) { - nbReleased += first->second.size(); + nbReleased += (uint32)first->second.size(); } nlinfo(" There are %u object instances in cache not referenced (waiting deletion or re-use))", nbReleased); diff --git a/code/ryzom/server/src/shard_unifier_service/nel_database_mapping.h b/code/ryzom/server/src/shard_unifier_service/nel_database_mapping.h index 50ef8e823..c33e4fe15 100644 --- a/code/ryzom/server/src/shard_unifier_service/nel_database_mapping.h +++ b/code/ryzom/server/src/shard_unifier_service/nel_database_mapping.h @@ -1,3 +1,18 @@ +// Ryzom - MMORPG Framework +// 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 . ///////////////////////////////////////////////////////////////// // WARNING : this is a generated file, don't change it ! @@ -610,7 +625,7 @@ namespace RSMGR }; - ///////////////////////////////////////////////////////////////// + ///////////////////////////////////////////////////////////////// // WARNING : this is a generated file, don't change it ! ///////////////////////////////////////////////////////////////// class CNelPermission @@ -661,7 +676,6 @@ namespace RSMGR setPersistentState(NOPE::os_dirty); _DomainId = value; - } } diff --git a/code/ryzom/server/src/tick_service/range_mirror_manager.cpp b/code/ryzom/server/src/tick_service/range_mirror_manager.cpp index f988ac054..2c92c738f 100644 --- a/code/ryzom/server/src/tick_service/range_mirror_manager.cpp +++ b/code/ryzom/server/src/tick_service/range_mirror_manager.cpp @@ -472,7 +472,7 @@ void CRangeList::acquireFirstRow() */ bool CRangeList::acquireRange( NLNET::TServiceId ownerServiceId, NLNET::TServiceId mirrorServiceId, sint32 nbRows, TDataSetIndex *first, TDataSetIndex *last ) { - TDataSetIndex prevlast(~0); + TDataSetIndex prevlast(std::numeric_limits::max()); TRangeList::iterator irl = _RangeList.begin(); // Find a compatible range diff --git a/code/ryzom/server/src/tick_service/range_mirror_manager.h b/code/ryzom/server/src/tick_service/range_mirror_manager.h index 6615a1c6a..ed12f706b 100644 --- a/code/ryzom/server/src/tick_service/range_mirror_manager.h +++ b/code/ryzom/server/src/tick_service/range_mirror_manager.h @@ -28,6 +28,7 @@ #include #include #include +#include namespace NLNET { @@ -46,7 +47,7 @@ class CRangeList public: /// Default constructor - CRangeList() : _TotalMaxRows(~0) { acquireFirstRow(); } + CRangeList() : _TotalMaxRows(std::numeric_limits::max()) { acquireFirstRow(); } /// Constructor CRangeList( sint32 totalMaxRows ) : _TotalMaxRows( totalMaxRows ) { acquireFirstRow(); } diff --git a/code/ryzom/server/src/tick_service/tick_service.cpp b/code/ryzom/server/src/tick_service/tick_service.cpp index 95f609571..4a64fdd7c 100644 --- a/code/ryzom/server/src/tick_service/tick_service.cpp +++ b/code/ryzom/server/src/tick_service/tick_service.cpp @@ -825,7 +825,7 @@ bool CTickService::loadGameCycle() /* * */ -CTickServiceGameCycleTimeMeasure::CTickServiceGameCycleTimeMeasure() : HistoryMain( CTickService::getInstance()->getServiceId(), NLNET::TServiceId(~0), false ) {} +CTickServiceGameCycleTimeMeasure::CTickServiceGameCycleTimeMeasure() : HistoryMain( CTickService::getInstance()->getServiceId(), NLNET::TServiceId(std::numeric_limits::max()), false ) {} /* @@ -904,7 +904,7 @@ void CTickServiceGameCycleTimeMeasure::displayStat( NLMISC::CLog *log, TTimeMeas uint divideBy = (HistoryMain.NbMeasures==0) ? 0 : ((stat==MHTSum) ? HistoryMain.NbMeasures : 1); HistoryMain.Stats[stat].displayStat( log, TickServiceTimeMeasureTypeToCString, divideBy ); { - CMirrorTimeMeasure gatheredStats [NbTimeMeasureHistoryStats] = { 0, ~0, 0 }; + CMirrorTimeMeasure gatheredStats [NbTimeMeasureHistoryStats] = { 0, std::numeric_limits::max(), 0 }; for ( std::vector::const_iterator ihm=HistoryByMirror.begin(); ihm!=HistoryByMirror.end(); ++ihm ) { log->displayRawNL( "\tMS-%hu, %u measures:", (*ihm).ServiceId.get(), (*ihm).NbMeasures ); @@ -921,7 +921,7 @@ void CTickServiceGameCycleTimeMeasure::displayStat( NLMISC::CLog *log, TTimeMeas } } { - CServiceTimeMeasure gatheredStats [NbTimeMeasureHistoryStats] = { 0, ~0, 0 }; + CServiceTimeMeasure gatheredStats [NbTimeMeasureHistoryStats] = { 0, std::numeric_limits::max(), 0 }; for ( std::vector::const_iterator ihs=HistoryByService.begin(); ihs!=HistoryByService.end(); ++ihs ) { log->displayRawNL( "\t%s (on MS-%hu), %u measures:", CUnifiedNetwork::getInstance()->getServiceUnifiedName( (*ihs).ServiceId ).c_str(), (*ihs).ParentServiceId.get(), (*ihs).NbMeasures ); diff --git a/code/ryzom/server/src/tick_service/tick_service.h b/code/ryzom/server/src/tick_service/tick_service.h index 5b07793a3..9abe079bc 100644 --- a/code/ryzom/server/src/tick_service/tick_service.h +++ b/code/ryzom/server/src/tick_service/tick_service.h @@ -113,7 +113,7 @@ public: NbMeasures = 0; Stats.resize( NbTimeMeasureHistoryStats ); Stats[MHTSum] = 0; - Stats[MHTMin] = ~0; + Stats[MHTMin] = std::numeric_limits::max(); Stats[MHTMax] = 0; } } diff --git a/code/ryzom/tools/client/CMakeLists.txt b/code/ryzom/tools/client/CMakeLists.txt index aabc3142c..0c42233cb 100644 --- a/code/ryzom/tools/client/CMakeLists.txt +++ b/code/ryzom/tools/client/CMakeLists.txt @@ -1,10 +1,9 @@ - IF(WITH_RYZOM_CLIENT) - ADD_SUBDIRECTORY( client_patcher ) - - IF( WITH_QT ) - ADD_SUBDIRECTORY( client_config_qt ) - ENDIF( WITH_QT ) -ENDIF(WITH_RYZOM_CLIENT) + ADD_SUBDIRECTORY(client_patcher) + + IF(WITH_QT) + ADD_SUBDIRECTORY(client_config_qt) + ENDIF() +ENDIF() -ADD_SUBDIRECTORY( r2_islands_textures ) +ADD_SUBDIRECTORY(r2_islands_textures) diff --git a/code/ryzom/tools/client/client_patcher/CMakeLists.txt b/code/ryzom/tools/client/client_patcher/CMakeLists.txt index 69b14e5a1..51f572d9c 100644 --- a/code/ryzom/tools/client/client_patcher/CMakeLists.txt +++ b/code/ryzom/tools/client/client_patcher/CMakeLists.txt @@ -12,6 +12,7 @@ ADD_EXECUTABLE(ryzom_client_patcher ${SRC}) INCLUDE_DIRECTORIES( ${LIBXML2_INCLUDE_DIR} ${CURL_INCLUDE_DIRS} + ${ZLIB_INCLUDE_DIR} ${CMAKE_SOURCE_DIR}/ryzom/client/src ) @@ -20,6 +21,7 @@ TARGET_LINK_LIBRARIES(ryzom_client_patcher nelnet ryzom_gameshare nel_sevenzip + ${ZLIB_LIBRARIES} ${CURL_LIBRARIES}) IF(APPLE) diff --git a/code/ryzom/tools/client/r2_islands_textures/screenshot_islands.cpp b/code/ryzom/tools/client/r2_islands_textures/screenshot_islands.cpp index d678c0b17..cc5673e31 100644 --- a/code/ryzom/tools/client/r2_islands_textures/screenshot_islands.cpp +++ b/code/ryzom/tools/client/r2_islands_textures/screenshot_islands.cpp @@ -1540,7 +1540,6 @@ void CScreenshotIslands::buildIslandsTextures() CIFile proxFS(proxFileName.c_str()); proxBitmap.load(proxFS); - // resize proximity bitmap CBitmap tempBitmap; int newWidth = islandBitmap.getWidth(); @@ -1568,7 +1567,7 @@ void CScreenshotIslands::buildIslandsTextures() // swap them proxBitmap.resize(newWidth, newHeight, proxBitmap.PixelFormat); proxBitmap.swap(tempBitmap); - + //proxBitmap.resample(newWidth, newHeight); diff --git a/code/ryzom/tools/leveldesign/CMakeLists.txt b/code/ryzom/tools/leveldesign/CMakeLists.txt index 9a56a2fac..399a71deb 100644 --- a/code/ryzom/tools/leveldesign/CMakeLists.txt +++ b/code/ryzom/tools/leveldesign/CMakeLists.txt @@ -1,4 +1,3 @@ - ADD_SUBDIRECTORY(uni_conv) ADD_SUBDIRECTORY(csv_transform) ADD_SUBDIRECTORY(icon_search) diff --git a/code/ryzom/tools/leveldesign/georges_convert/type_unit_double.cpp b/code/ryzom/tools/leveldesign/georges_convert/type_unit_double.cpp index 6244c0f4a..674f77cd6 100644 --- a/code/ryzom/tools/leveldesign/georges_convert/type_unit_double.cpp +++ b/code/ryzom/tools/leveldesign/georges_convert/type_unit_double.cpp @@ -203,7 +203,7 @@ void CTypeUnitDouble::SetLowLimit( const CStringEx _sxll ) void CTypeUnitDouble::SetHighLimit( const CStringEx _sxhl ) { sxhighlimit = _sxhl; - dhighlimit = atof( sxhighlimit.c_str() ); + NLMISC::fromString(sxhighlimit, dhighlimit); } } diff --git a/code/ryzom/tools/leveldesign/georges_editor_qt/src/configuration.cpp b/code/ryzom/tools/leveldesign/georges_editor_qt/src/configuration.cpp index 6af950eae..cd937688a 100644 --- a/code/ryzom/tools/leveldesign/georges_editor_qt/src/configuration.cpp +++ b/code/ryzom/tools/leveldesign/georges_editor_qt/src/configuration.cpp @@ -53,7 +53,8 @@ namespace NLQT { { // load config QFile file(NLQT_CONFIG_FILE); - if (!file.exists()) { + if (!file.exists()) + { file.open( QIODevice::WriteOnly | QIODevice::Text ); file.write("GraphicsDrivers = { \"OpenGL\", \"Direct3D\" };"); file.write("\nSearchPaths = {\"\"};"); @@ -64,9 +65,12 @@ namespace NLQT { file.close(); } - try { + try + { ConfigFile.load(NLQT_CONFIG_FILE); - } catch(...) { + } + catch(...) + { } addLeveldesignPath(); @@ -213,16 +217,17 @@ namespace NLQT { uint listsize = tmpList->size(); for (uint i = 0; i < listsize; ++i) { - if(_progressCB) { - _progressCB->DisplayString = tmpList->at(i); - CPath::addSearchPath(tmpList->at(i), true, false, _progressCB); + if(_progressCB) + { + _progressCB->DisplayString = tmpList->at(i); + CPath::addSearchPath(tmpList->at(i), true, false, _progressCB); } else { - CProgressDialog pcb; - pcb.DisplayString = tmpList->at(i); - pcb.show(); - CPath::addSearchPath(tmpList->at(i), true, false, &pcb); + CProgressDialog pcb; + pcb.DisplayString = tmpList->at(i); + pcb.show(); + CPath::addSearchPath(tmpList->at(i), true, false, &pcb); } } if (!list) diff --git a/code/ryzom/tools/leveldesign/georges_editor_qt/src/formdelegate.cpp b/code/ryzom/tools/leveldesign/georges_editor_qt/src/formdelegate.cpp index bb91f8b62..25b8a1490 100644 --- a/code/ryzom/tools/leveldesign/georges_editor_qt/src/formdelegate.cpp +++ b/code/ryzom/tools/leveldesign/georges_editor_qt/src/formdelegate.cpp @@ -60,7 +60,8 @@ namespace NLQT CFormItem* curItem = m->getItem(mp->mapToSource(index)); NLGEORGES::UFormElm *curElm = curItem->getFormElm(); - if (!curElm) { + if (!curElm) + { // TODO: create new Element return 0; } diff --git a/code/ryzom/tools/leveldesign/georges_editor_qt/src/georges_treeview_dialog.cpp b/code/ryzom/tools/leveldesign/georges_editor_qt/src/georges_treeview_dialog.cpp index b5ab13ba3..f06bb537e 100644 --- a/code/ryzom/tools/leveldesign/georges_editor_qt/src/georges_treeview_dialog.cpp +++ b/code/ryzom/tools/leveldesign/georges_editor_qt/src/georges_treeview_dialog.cpp @@ -377,7 +377,8 @@ namespace NLQT nlinfo("CGeorgesTreeViewDialog::filterRows"); CGeorgesFormProxyModel * mp = dynamic_cast(_ui.treeView->model()); CGeorgesFormModel *m = dynamic_cast(mp->sourceModel()); - if (m) { + if (m) + { m->setShowParents(_ui.checkBoxParent->isChecked()); m->setShowDefaults(_ui.checkBoxDefaults->isChecked()); } diff --git a/code/ryzom/tools/leveldesign/georges_editor_qt/src/georgesform_model.cpp b/code/ryzom/tools/leveldesign/georges_editor_qt/src/georgesform_model.cpp index 89cba843c..98c7b59e2 100644 --- a/code/ryzom/tools/leveldesign/georges_editor_qt/src/georgesform_model.cpp +++ b/code/ryzom/tools/leveldesign/georges_editor_qt/src/georgesform_model.cpp @@ -352,7 +352,8 @@ namespace NLQT /******************************************************************************/ - void CGeorgesFormModel::loadFormData(UFormElm *root, CFormItem *parent) { + void CGeorgesFormModel::loadFormData(UFormElm *root, CFormItem *parent) + { if (!root) return; @@ -390,7 +391,8 @@ namespace NLQT elmtType = "Array"; if (elmt->isStruct()) elmtType = "Struct"; - if (elmt->isAtom()) { + if (elmt->isAtom()) + { elmtType = "Atom"; uint numDefinitions = 0; const UType *type = elmt->getType(); @@ -433,7 +435,8 @@ namespace NLQT tmpValue = v.c_str(); if (type->getType() == UType::SignedInt) { - if (QString("%1").arg(value.c_str()).toDouble() == tmpValue.toDouble()) { + if (QString("%1").arg(value.c_str()).toDouble() == tmpValue.toDouble()) + { value = l; break; } @@ -482,7 +485,8 @@ namespace NLQT } columnData << QString(elmName.c_str()) << QString(value.c_str()) << "" << elmtType; parent->appendChild(new CFormItem(elmt, columnData, parent, *whereV, *whereN)); - //if (parents.last()->childCount() > 0) { + //if (parents.last()->childCount() > 0) + //{ // parents << parents.last()->child(parents.last()->childCount()-1); //} loadFormData(elmt, parent->child(parent->childCount()-1)); @@ -549,7 +553,8 @@ namespace NLQT { if (elmt->isArray()) elmtType = "Array"; - if (elmt->isStruct()) { + if (elmt->isStruct()) + { elmtType = "Struct"; } if (elmt->isAtom()) @@ -593,28 +598,35 @@ namespace NLQT CFormItem *fi_dep = new CFormItem(_rootElm, QList() << "dependencies", _rootItem); _rootItem->appendChild(fi_dep); - if (!dfns.isEmpty()) { - CFormItem *fi_dfn = new CFormItem(_rootElm, QList() << "dfn", fi_dep); - fi_dep->appendChild(fi_dfn); - foreach(QString str, dfns) { - fi_dfn->appendChild(new CFormItem(_rootElm, QList() << str, fi_dfn)); - } - } - if (!typs.isEmpty()) { - CFormItem *fi_typ = new CFormItem(_rootElm, QList() << "typ", fi_dep); - fi_dep->appendChild(fi_typ); - foreach(QString str, typs) { - fi_typ->appendChild(new CFormItem(_rootElm, QList() << str, fi_typ)); - } - } - if (!_dependencies.isEmpty()) { - CFormItem *fi_other = new CFormItem(_rootElm, QList() << "other", fi_dep); - fi_dep->appendChild(fi_other); - foreach(QStringList list, _dependencies) { - foreach(QString str, list) { - fi_other->appendChild(new CFormItem(_rootElm, QList() << str, fi_other)); + if (!dfns.isEmpty()) + { + CFormItem *fi_dfn = new CFormItem(_rootElm, QList() << "dfn", fi_dep); + fi_dep->appendChild(fi_dfn); + foreach(QString str, dfns) + { + fi_dfn->appendChild(new CFormItem(_rootElm, QList() << str, fi_dfn)); + } } + if (!typs.isEmpty()) + { + CFormItem *fi_typ = new CFormItem(_rootElm, QList() << "typ", fi_dep); + fi_dep->appendChild(fi_typ); + foreach(QString str, typs) + { + fi_typ->appendChild(new CFormItem(_rootElm, QList() << str, fi_typ)); + } } + if (!_dependencies.isEmpty()) + { + CFormItem *fi_other = new CFormItem(_rootElm, QList() << "other", fi_dep); + fi_dep->appendChild(fi_other); + foreach(QStringList list, _dependencies) + { + foreach(QString str, list) + { + fi_other->appendChild(new CFormItem(_rootElm, QList() << str, fi_other)); + } + } }*/ } diff --git a/code/ryzom/tools/leveldesign/georges_editor_qt/src/main_window.cpp b/code/ryzom/tools/leveldesign/georges_editor_qt/src/main_window.cpp index ef40f4dbc..8dbc2c18b 100644 --- a/code/ryzom/tools/leveldesign/georges_editor_qt/src/main_window.cpp +++ b/code/ryzom/tools/leveldesign/georges_editor_qt/src/main_window.cpp @@ -338,7 +338,8 @@ namespace NLQT _aboutQtAction->setStatusTip(tr("Show the Qt library's About box")); connect(_aboutQtAction, SIGNAL(triggered()), qApp, SLOT(aboutQt())); - for (int i = 0; i < MaxRecentFiles; ++i) { + for (int i = 0; i < MaxRecentFiles; ++i) + { recentFileActs[i] = new QAction(this); recentFileActs[i]->setVisible(false); connect(recentFileActs[i], SIGNAL(triggered()), diff --git a/code/ryzom/tools/leveldesign/georges_editor_qt/src/new_dialog.cpp b/code/ryzom/tools/leveldesign/georges_editor_qt/src/new_dialog.cpp index 499b06d94..f0a1fe351 100644 --- a/code/ryzom/tools/leveldesign/georges_editor_qt/src/new_dialog.cpp +++ b/code/ryzom/tools/leveldesign/georges_editor_qt/src/new_dialog.cpp @@ -333,7 +333,8 @@ namespace NLQT return -1; } - void CGeorgesNewDialog::validateParentCombo() { + void CGeorgesNewDialog::validateParentCombo() + { // TODO: clear if no valid text //if (!_filelist.contains(_ui.parentLineEdit->text())) // _ui.parentLineEdit->clear(); diff --git a/code/ryzom/tools/leveldesign/georges_editor_qt/src/objectviewer_dialog.cpp b/code/ryzom/tools/leveldesign/georges_editor_qt/src/objectviewer_dialog.cpp index a47395cf6..e3c3d24e2 100644 --- a/code/ryzom/tools/leveldesign/georges_editor_qt/src/objectviewer_dialog.cpp +++ b/code/ryzom/tools/leveldesign/georges_editor_qt/src/objectviewer_dialog.cpp @@ -77,7 +77,8 @@ namespace NLQT } } - void CObjectViewerDialog::topLevelChanged ( bool topLevel ) { + void CObjectViewerDialog::topLevelChanged ( bool topLevel ) + { //nldebug("topLevel:%d",topLevel); //_georges->init(); } @@ -100,7 +101,8 @@ namespace NLQT { //nldebug("%d %d",_nlw->width(), _nlw->height()); QDockWidget::resizeEvent(resizeEvent); - if (Modules::objViewInt()) { + if (Modules::objViewInt()) + { if (Modules::objViewInt()->getDriver()) Modules::objViewInt()->setSizeViewport(resizeEvent->size().width(), resizeEvent->size().height()); } diff --git a/code/ryzom/tools/leveldesign/georges_editor_qt/src/qt_displayer.cpp b/code/ryzom/tools/leveldesign/georges_editor_qt/src/qt_displayer.cpp index 07b338009..7c94e4fb0 100644 --- a/code/ryzom/tools/leveldesign/georges_editor_qt/src/qt_displayer.cpp +++ b/code/ryzom/tools/leveldesign/georges_editor_qt/src/qt_displayer.cpp @@ -39,8 +39,8 @@ namespace NLQT ; } - CQtDisplayer::~CQtDisplayer() { - ; + CQtDisplayer::~CQtDisplayer() + { } void CQtDisplayer::setParam (QPlainTextEdit *dlgDebug, bool eraseLastLog) @@ -59,7 +59,8 @@ namespace NLQT QTextCharFormat format; - if (args.Date != 0 && !_Raw) { + if (args.Date != 0 && !_Raw) + { str += dateToHumanString(args.Date); needSpace = true; } @@ -76,27 +77,31 @@ namespace NLQT } // Write thread identifier - /*if ( args.ThreadId != 0 && !_Raw) { - if (needSpace) { str += " "; needSpace = false; } - str += NLMISC::toString(args.ThreadId); - needSpace = true; + /*if ( args.ThreadId != 0 && !_Raw) + { + if (needSpace) { str += " "; needSpace = false; } + str += NLMISC::toString(args.ThreadId); + needSpace = true; }*/ - /*if (!args.ProcessName.empty() && !_Raw) { - if (needSpace) { str += " "; needSpace = false; } - str += args.ProcessName; - needSpace = true; + /*if (!args.ProcessName.empty() && !_Raw) + { + if (needSpace) { str += " "; needSpace = false; } + str += args.ProcessName; + needSpace = true; }*/ - //if (args.FileName != NULL && !_Raw) { + //if (args.FileName != NULL && !_Raw) + //{ // if (needSpace) { str += " "; needSpace = false; } // str += NLMISC::CFile::getFilename(args.FileName); // needSpace = true; //} - /*if (args.Line != -1 && !_Raw) { - if (needSpace) { str += " "; needSpace = false; } - str += NLMISC::toString(args.Line); - needSpace = true; + /*if (args.Line != -1 && !_Raw) + { + if (needSpace) { str += " "; needSpace = false; } + str += NLMISC::toString(args.Line); + needSpace = true; }*/ if (args.FuncName != NULL && !_Raw) diff --git a/code/ryzom/tools/leveldesign/mp_generator/utils.h b/code/ryzom/tools/leveldesign/mp_generator/utils.h index 63148f61f..efa42149d 100644 --- a/code/ryzom/tools/leveldesign/mp_generator/utils.h +++ b/code/ryzom/tools/leveldesign/mp_generator/utils.h @@ -17,6 +17,7 @@ #ifndef UTILS_H_ #define UTILS_H_ +#include // DtName must be the 1st one enum TDataCol { DtName, DtTitle, DtRMFamily, DtGroup, DtEcosystem, DtLevelZone, DtStatQuality, DtProp, DtCreature, DtCreaTitle, DtCraftSlotName, DtCraftCivSpec, DtColor, DtAverageEnergy, DtMaxLevel, DtCustomizedProperties, DtNbCols }; @@ -55,17 +56,17 @@ public: * Display the item as a row of a HTML table. * If (key!=previousKey) and (name==previousName), the row will not be displayed entirely to save space * - * \param keyColumn If not ~0, column used for sorting => this column displays only the field matching the key + * \param keyColumn If not std::numeric_limits::max(), column used for sorting => this column displays only the field matching the key * \param key The key used for sorting (see keyColumn) * \param previousKey Previous key - * \param nameColumn If not ~0, column used for the unique name (column must have exaclty one element) + * \param nameColumn If not std::numeric_limits::max(), column used for the unique name (column must have exaclty one element) * \param previousName Previous name */ - std::string toHTMLRow( uint32 keyColumn=~0, const string& key=string(), const string& previousKey=string(), - uint32 nameColumn=~0, const string& previousName=string() ) const + std::string toHTMLRow( uint32 keyColumn=std::numeric_limits::max(), const string& key=string(), const string& previousKey=string(), + uint32 nameColumn=std::numeric_limits::max(), const string& previousName=string() ) const { std::string s = ""; - bool lightMode = (nameColumn == ~0) ? false : ((key != previousKey) && (Fields[nameColumn][0] == previousName)); + bool lightMode = (nameColumn == std::numeric_limits::max()) ? false : ((key != previousKey) && (Fields[nameColumn][0] == previousName)); for ( uint32 c=0; c!=NC; ++c ) { s += ""; @@ -86,11 +87,11 @@ public: /// - std::string toCSVLine( char columnSeparator=',', string internalSeparator=" - ", uint32 keyColumn=~0, const string& key=string(), const string& previousKey=string(), - uint32 nameColumn=~0, const string& previousName=string() ) const + std::string toCSVLine( char columnSeparator=',', string internalSeparator=" - ", uint32 keyColumn=std::numeric_limits::max(), const string& key=string(), const string& previousKey=string(), + uint32 nameColumn=std::numeric_limits::max(), const string& previousName=string() ) const { std::string s; - bool lightMode = (nameColumn == ~0) ? false : ((key != previousKey) && (Fields[nameColumn][0] == previousName)); + bool lightMode = (nameColumn == std::numeric_limits::max()) ? false : ((key != previousKey) && (Fields[nameColumn][0] == previousName)); for ( uint32 c=0; c!=NC; ++c ) { if ( c == keyColumn ) diff --git a/code/ryzom/tools/leveldesign/prim_export/main.cpp b/code/ryzom/tools/leveldesign/prim_export/main.cpp index 86aeafa62..f9c33d953 100644 --- a/code/ryzom/tools/leveldesign/prim_export/main.cpp +++ b/code/ryzom/tools/leveldesign/prim_export/main.cpp @@ -629,7 +629,7 @@ void addPointPrimitive (CLandscape &landscape, const char *primFilename, uint32 string scaleText; float scale = 1; if (point->getPropertyByName ("scale", scaleText)) - scale = (float) atof (scaleText.c_str ()); + NLMISC::fromString(scaleText, scale); // Get zone coordinates sint x = (sint)floor (position.x / options.CellSize); @@ -654,7 +654,7 @@ void addPointPrimitive (CLandscape &landscape, const char *primFilename, uint32 // Get height if (!snap && point->getPropertyByName ("height", text)) - position.z = (float)atof(text.c_str()); + NLMISC::fromString(text, position.z); // *** Add the instance diff --git a/code/ryzom/tools/leveldesign/world_editor/land_export_lib/export.cpp b/code/ryzom/tools/leveldesign/world_editor/land_export_lib/export.cpp index e99b0eceb..279578293 100644 --- a/code/ryzom/tools/leveldesign/world_editor/land_export_lib/export.cpp +++ b/code/ryzom/tools/leveldesign/world_editor/land_export_lib/export.cpp @@ -2595,8 +2595,8 @@ void CExport::transformAdditionnalIG (const std::string &name, const NLMISC::CMa inStream.close(); if (_ExportCB != NULL) { - _ExportCB->dispWarning("Error while reading " + igName); - _ExportCB->dispWarning(e.what()); + _ExportCB->dispWarning("Error while reading " + igName); + _ExportCB->dispWarning(e.what()); } } } diff --git a/code/ryzom/tools/make_anim_melee_impact/main.cpp b/code/ryzom/tools/make_anim_melee_impact/main.cpp index 10fdeb0ed..3f67edd5e 100644 --- a/code/ryzom/tools/make_anim_melee_impact/main.cpp +++ b/code/ryzom/tools/make_anim_melee_impact/main.cpp @@ -79,7 +79,7 @@ void CAnimCombatState::build(const string &line) { StateCode= line.substr(4, 2); string time= line.substr(10, 5); - MeanAnimTime= (float)atof(time.c_str()); + NLMISC::fromString(time, MeanAnimTime); } diff --git a/code/ryzom/tools/patch_gen/patch_gen_common.cpp b/code/ryzom/tools/patch_gen/patch_gen_common.cpp index 127be5053..c9c02da66 100644 --- a/code/ryzom/tools/patch_gen/patch_gen_common.cpp +++ b/code/ryzom/tools/patch_gen/patch_gen_common.cpp @@ -19,6 +19,7 @@ //----------------------------------------------------------------------------- #include +#include #include "game_share/bnp_patch.h" #include "nel/misc/path.h" @@ -149,7 +150,7 @@ CPackageDescription::CPackageDescription() void CPackageDescription::clear() { - _NextVersionNumber= ~0u; + _NextVersionNumber= std::numeric_limits::max(); _VersionNumberReserved = false; _Categories.clear(); _IndexFileName.clear(); @@ -345,8 +346,7 @@ void CPackageDescription::generatePatches(CBNPFileSet& packageIndex) const if (packageIndex.getFile(i).versionCount()==1) { prevVersionFileName= _RootDirectory + "empty"; - NLMISC::COFile tmpFile(prevVersionFileName); - tmpFile.close(); + CFile::createEmptyFile(prevVersionFileName); usingTemporaryFile = true; deleteRefAfterDelta= false; } diff --git a/code/ryzom/tools/pd_parser/parser.cpp b/code/ryzom/tools/pd_parser/parser.cpp index 733bad4df..4b5e9f5c1 100644 --- a/code/ryzom/tools/pd_parser/parser.cpp +++ b/code/ryzom/tools/pd_parser/parser.cpp @@ -1189,7 +1189,7 @@ bool CEnumSimpleValueNode::prolog() uint i; for (i=0; iValues.push_back(make_pair(Names[i], CurrentValue)); + CurrentEnumNode->Values.push_back(std::pair(Names[i], CurrentValue)); } if (parent != NULL) ++(parent->CurrentValue); @@ -1214,7 +1214,7 @@ bool CEnumRangeNode::prolog() CurrentValue = 0; } - CurrentEnumNode->Values.push_back(make_pair(Name, CurrentValue)); + CurrentEnumNode->Values.push_back(std::pair(Name, CurrentValue)); return true; } @@ -1238,7 +1238,7 @@ bool CEnumRangeNode::epilog() if (!EndRange.empty()) { - CurrentEnumNode->Values.push_back(make_pair(EndRange, CurrentValue)); + CurrentEnumNode->Values.push_back(std::pair(EndRange, CurrentValue)); } return true; @@ -4709,7 +4709,7 @@ void CLogMsgNode::generateContent() CClassNode *cnd; if ( (tnd = getTypeNode(type, false)) ) { - pair::iterator, bool> res = params.insert(make_pair(name, tnd)); + pair::iterator, bool> res = params.insert(std::pair(name, tnd)); if (!res.second) error("log parameter '"+name+"' already defined"); @@ -4723,7 +4723,7 @@ void CLogMsgNode::generateContent() } else if ( (cnd = getClassNode(type, false)) ) { - pair::iterator, bool> res = params.insert(make_pair(name, cnd)); + pair::iterator, bool> res = params.insert(std::pair(name, cnd)); if (!res.second) error("log parameter '"+name+"' already defined"); @@ -4739,7 +4739,7 @@ void CLogMsgNode::generateContent() { CExtLogTypeNode* extnd = new CExtLogTypeNode(); extnd->ExtLogType = "string"; - pair::iterator, bool> res = params.insert(make_pair(name, extnd)); + pair::iterator, bool> res = params.insert(std::pair(name, extnd)); if (!res.second) error("log parameter '"+name+"' already defined"); diff --git a/code/ryzom/tools/server/CMakeLists.txt b/code/ryzom/tools/server/CMakeLists.txt index 982c47718..1f215ae94 100644 --- a/code/ryzom/tools/server/CMakeLists.txt +++ b/code/ryzom/tools/server/CMakeLists.txt @@ -1,4 +1,3 @@ - IF(WITH_LIGO) ADD_SUBDIRECTORY(ai_build_wmap) ENDIF(WITH_LIGO) diff --git a/code/ryzom/tools/server/ai_build_wmap/build_proximity_maps.cpp b/code/ryzom/tools/server/ai_build_wmap/build_proximity_maps.cpp index a15f8c6d3..f5b6af644 100644 --- a/code/ryzom/tools/server/ai_build_wmap/build_proximity_maps.cpp +++ b/code/ryzom/tools/server/ai_build_wmap/build_proximity_maps.cpp @@ -32,6 +32,8 @@ // AI share #include "ai_share/world_map.h" +// STL +#include //------------------------------------------------------------------------------------------------- // using namespaces... @@ -237,8 +239,8 @@ CProximityZone::CProximityZone(uint32 scanWidth,uint32 scanHeight,sint32 xOffset _MaxOffset = scanWidth * scanHeight -1; - _XMin = ~0u; - _YMin = ~0u; + _XMin = std::numeric_limits::max(); + _YMin = std::numeric_limits::max(); _XMax = 0; _YMax = 0; } @@ -386,7 +388,7 @@ void CProximityMapBuffer::load(const std::string& name) } } // setup the next pixel in the output buffers... - _Buffer[y*_ScanWidth+x]= (isAccessible? 0: (TBufferEntry)~0u); + _Buffer[y*_ScanWidth+x]= (isAccessible? 0: (TBufferEntry)std::numeric_limits::max()); } } } @@ -471,7 +473,7 @@ void CProximityMapBuffer::_prepareBufferForZoneProximityMap(const CProximityZone uint32 zoneWidth= zone.getZoneWidth(); uint32 zoneHeight= zone.getZoneHeight(); zoneBuffer.clear(); - zoneBuffer.resize(zoneWidth*zoneHeight,(TBufferEntry)~0u); + zoneBuffer.resize(zoneWidth*zoneHeight,(TBufferEntry)std::numeric_limits::max()); // setup the buffer's accessible points and prime vects[0] with the set of accessible points in the zone buffer for (uint32 i=0;i &islands, float camSpeed texturedMaterial.setDoubleSided(true); texturedMaterial.setZFunc(CMaterial::lessequal); // - uint currWorldIndex = ~0; + uint currWorldIndex = std::numeric_limits::max(); bool newPosWanted = true; // std::vector zones; diff --git a/code/ryzom/tools/server/ryzom_ams/drupal_module/ryzommanage/ams_lib/ingame_templates/settings.tpl b/code/ryzom/tools/server/ryzom_ams/drupal_module/ryzommanage/ams_lib/ingame_templates/settings.tpl index 4e94e633c..50d47d680 100644 --- a/code/ryzom/tools/server/ryzom_ams/drupal_module/ryzommanage/ams_lib/ingame_templates/settings.tpl +++ b/code/ryzom/tools/server/ryzom_ams/drupal_module/ryzommanage/ams_lib/ingame_templates/settings.tpl @@ -1,161 +1,161 @@ -{block name=content} - - - - - - - - -
- - - - -
- - - - - {if isset($isAdmin) and $isAdmin eq 'TRUE' and $target_id neq 1} - {if $userPermission eq 1} - - - {else if $userPermission eq 2 } - - - {else if $userPermission eq 3 } - - - {/if} - {/if} - -
Browse UserSend TicketMake ModeratorMake AdminDemote to UserMake AdminDemote to UserDemote to Moderator
-
-
- - - - - - - - - - - - -

Change Settings of {$target_username}

- - - - - - - - - - - - -
- - -
-
- - - -
- - -
- - -
- -

Change Password

- -
- - {if !isset($changesOther) or $changesOther eq "FALSE"} - - - -

- - {/if} - - - -
- Current Password: - - - {if isset($MATCH_ERROR) and $MATCH_ERROR eq "TRUE"}The password is incorrect{/if} -
- New Password: - - - {if isset($NEWPASSWORD_ERROR) and $NEWPASSWORD_ERROR eq "TRUE"}{$newpass_error_message}{/if} -
- Confirm New Password: - - - {if isset($CNEWPASSWORD_ERROR) and $CNEWPASSWORD_ERROR eq "TRUE"}{$confirmnewpass_error_message}{/if} -
- {if isset($SUCCESS_PASS) and $SUCCESS_PASS eq "OK"} -

- The password has been changed! -

- {/if} - - - - - -

- -
- -
-
-
- - -
- - -
-

Change Email

- -
- - -
- New Email: - - - {if isset($EMAIL_ERROR) and $EMAIL_ERROR eq "TRUE"}{$EMAIL}{/if} -
- {if isset($SUCCESS_MAIL) and $SUCCESS_MAIL eq "OK"} -

- The email has been changed! -

- {/if} - - - -

- -

- -
-
-
-
- - - -{/block} - +{block name=content} + + + + + + + + +
+ + + + +
+ + + + + {if isset($isAdmin) and $isAdmin eq 'TRUE' and $target_id neq 1} + {if $userPermission eq 1} + + + {else if $userPermission eq 2 } + + + {else if $userPermission eq 3 } + + + {/if} + {/if} + +
Browse UserSend TicketMake ModeratorMake AdminDemote to UserMake AdminDemote to UserDemote to Moderator
+
+
+ + + + + + + + + + + + +

Change Settings of {$target_username}

+ + + + + + + + + + + + +
+ + +
+
+ + + +
+ + +
+ + +
+ +

Change Password

+ +
+ + {if !isset($changesOther) or $changesOther eq "FALSE"} + + + +

+ + {/if} + + + +
+ Current Password: + + + {if isset($MATCH_ERROR) and $MATCH_ERROR eq "TRUE"}The password is incorrect{/if} +
+ New Password: + + + {if isset($NEWPASSWORD_ERROR) and $NEWPASSWORD_ERROR eq "TRUE"}{$newpass_error_message}{/if} +
+ Confirm New Password: + + + {if isset($CNEWPASSWORD_ERROR) and $CNEWPASSWORD_ERROR eq "TRUE"}{$confirmnewpass_error_message}{/if} +
+ {if isset($SUCCESS_PASS) and $SUCCESS_PASS eq "OK"} +

+ The password has been changed! +

+ {/if} + + + + + +

+ +
+ +
+
+
+ + +
+ + +
+

Change Email

+ +
+ + +
+ New Email: + + + {if isset($EMAIL_ERROR) and $EMAIL_ERROR eq "TRUE"}{$EMAIL}{/if} +
+ {if isset($SUCCESS_MAIL) and $SUCCESS_MAIL eq "OK"} +

+ The email has been changed! +

+ {/if} + + + +

+ +

+ +
+
+
+
+ + + +{/block} + diff --git a/code/ryzom/tools/translation_tools/main.cpp b/code/ryzom/tools/translation_tools/main.cpp index 9eba8c8da..30054ffbd 100644 --- a/code/ryzom/tools/translation_tools/main.cpp +++ b/code/ryzom/tools/translation_tools/main.cpp @@ -95,16 +95,6 @@ const std::string historyDir("history/"); string diffVersion; -#ifndef NL_OS_WINDOWS -char* itoa(int val, char *buffer, int base){ - static char buf[32] = {0}; - int i = 30; - for(; val && i ; --i, val /= base) - buf[i] = "0123456789abcdef"[val % base]; - return &buf[i+1]; -} -#endif // NL_OS_WINDOWS - #ifdef NL_DEBUG # define LOG nldebug #else @@ -969,7 +959,6 @@ public: void onChanged(uint addIndex, uint refIndex, TPhraseDiffContext &context) { ucstring chg; - char temp[1024]; // check what is changed. if (context.Addition[addIndex].Parameters != context.Reference[refIndex].Parameters) chg += "// Parameter list changed." + nl; @@ -980,11 +969,11 @@ public: for (uint i=0; i tempV; tempV.push_back(context.Reference[refIndex]); ucstring tempT = preparePhraseFile(tempV, false); CI18N::removeCComment(tempT); - phrase.Comments = ucstring(temp) + nl + phrase.Comments; + phrase.Comments = ucstring("// DIFF CHANGED ") + toString(addIndex) + nl + phrase.Comments; phrase.Comments = phrase.Comments + ucstring("/* OLD VALUE : ["+nl) + tabLines(1, tempT) +nl + "] */" + nl; phrase.Comments = phrase.Comments + chg; @@ -2682,7 +2669,6 @@ void CMakePhraseDiff2::onRemove(uint addIndex, uint refIndex, TPhraseDiffContext void CMakePhraseDiff2::onChanged(uint addIndex, uint refIndex, TPhraseDiffContext &context) { ucstring chg; - char temp[1024]; // check what is changed. if (context.Addition[addIndex].Parameters != context.Reference[refIndex].Parameters) chg += "// Parameter list changed." + nl; @@ -2693,11 +2679,11 @@ void CMakePhraseDiff2::onChanged(uint addIndex, uint refIndex, TPhraseDiffContex for (uint i=0; i tempV; tempV.push_back(context.Reference[refIndex]); ucstring tempT = preparePhraseFile(tempV, false); CI18N::removeCComment(tempT); - phrase.Comments = ucstring(temp) + nl + phrase.Comments; + phrase.Comments = ucstring("// DIFF CHANGED ") + toString(addIndex) + nl + phrase.Comments; phrase.Comments = phrase.Comments + ucstring("/* OLD VALUE : ["+nl) + tabLines(1, tempT) +nl + "] */" + nl; phrase.Comments = phrase.Comments + chg; diff --git a/code/snowballs2/client/src/snowballs_client.cpp b/code/snowballs2/client/src/snowballs_client.cpp index 3b8babd29..a28e5b502 100644 --- a/code/snowballs2/client/src/snowballs_client.cpp +++ b/code/snowballs2/client/src/snowballs_client.cpp @@ -1264,6 +1264,7 @@ sint main(int argc, char **argv) { // use log.log if NEL_LOG_IN_FILE and SBCLIENT_USE_LOG_LOG defined as 1 createDebug(NULL, SBCLIENT_USE_LOG_LOG, false); + INelContext::getInstance().setWindowedApplication(true); #if SBCLIENT_USE_LOG // create snowballs_client.log diff --git a/code/studio/CMakeLists.txt b/code/studio/CMakeLists.txt index bf9ee062c..c10f2ea59 100644 --- a/code/studio/CMakeLists.txt +++ b/code/studio/CMakeLists.txt @@ -10,15 +10,18 @@ IF(WIN32) SET(OVQT_PLUGIN_SPECS_DIR "plugins") SET(OVQT_PLUGIN_DIR "plugins") SET(OVQT_DATA_DIR ".") + SET(OVQT_IMP_DATA_DIR "${OVQT_DATA_DIR}") ELSEIF(APPLE) # TODO: under Mac OS X, don't install but copy files in application package SET(OVQT_PLUGIN_SPECS_DIR "plugins") SET(OVQT_PLUGIN_DIR "plugins") SET(OVQT_DATA_DIR ".") + SET(OVQT_IMP_DATA_DIR "${OVQT_DATA_DIR}") ELSE(WIN32) SET(OVQT_PLUGIN_SPECS_DIR ${NL_SHARE_PREFIX}/studio/plugins) SET(OVQT_PLUGIN_DIR ${NL_LIB_PREFIX}/studio) SET(OVQT_DATA_DIR ${NL_SHARE_PREFIX}/studio/data) + SET(OVQT_IMP_DATA_DIR "${CMAKE_INSTALL_PREFIX}/${OVQT_DATA_DIR}") CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/ovqt_config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/ovqt_config.h) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}) diff --git a/code/studio/src/CMakeLists.txt b/code/studio/src/CMakeLists.txt index 9bc071bf2..510f0f93b 100644 --- a/code/studio/src/CMakeLists.txt +++ b/code/studio/src/CMakeLists.txt @@ -11,7 +11,7 @@ FILE(GLOB STUDIO_SRC extension_system/*.h SET(STUDIO_HDR extension_system/iplugin_manager.h extension_system/plugin_manager.h - settings_dialog.h + startup_settings_dlg.h splash_screen.h pm_watcher.h ) @@ -22,7 +22,7 @@ SET(STUDIO_TS translations/object_viewer_qt_en.ts translations/object_viewer_qt_de.ts translations/object_viewer_qt_ru.ts) -SET(STUDIO_PLUGIN_UIS settings_dialog.ui ) +SET(STUDIO_PLUGIN_UIS startup_settings_dlg.ui ) SET(QT_USE_QTGUI TRUE) SET(QT_USE_QTOPENGL TRUE) diff --git a/code/studio/src/main.cpp b/code/studio/src/main.cpp index e758037c0..e126e258a 100644 --- a/code/studio/src/main.cpp +++ b/code/studio/src/main.cpp @@ -41,7 +41,7 @@ #include #include -#include "settings_dialog.h" +#include "startup_settings_dlg.h" #include "splash_screen.h" #include "pm_watcher.h" @@ -120,6 +120,7 @@ int main(int argc, char **argv) { // use log.log if NEL_LOG_IN_FILE and NLQT_USE_LOG_LOG defined as 1 NLMISC::createDebug(NULL, NLQT_USE_LOG_LOG, false); + NLMISC::INelContext::getInstance().setWindowedApplication(true); #if NLQT_USE_LOG // create NLQT_LOG_FILE // filedisplayer only deletes the 001 etc @@ -160,7 +161,7 @@ int main(int argc, char **argv) { settings->setValue( "FirstRun", false ); - SettingsDialog sd; + StartupSettingsDlg sd; sd.setSettings( settings ); sd.load(); sd.exec(); diff --git a/code/studio/src/plugins/core/CMakeLists.txt b/code/studio/src/plugins/core/CMakeLists.txt index 2c21c9b58..db99b807c 100644 --- a/code/studio/src/plugins/core/CMakeLists.txt +++ b/code/studio/src/plugins/core/CMakeLists.txt @@ -38,6 +38,10 @@ SET(OVQT_CORE_PLUGIN_UIS settings_dialog.ui SET(OVQT_CORE_PLUGIN_RCS core.qrc) +IF(NOT WIN32) +CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/core_config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/core_config.h) +ENDIF(NOT WIN32) + SET(QT_USE_QTGUI TRUE) SET(QT_USE_QTOPENGL TRUE) diff --git a/code/studio/src/plugins/core/core_config.h.cmake b/code/studio/src/plugins/core/core_config.h.cmake new file mode 100644 index 000000000..1aab54c12 --- /dev/null +++ b/code/studio/src/plugins/core/core_config.h.cmake @@ -0,0 +1,7 @@ +#ifndef CORE_CONFIG_H +#define CORE_CONFIG_H + +#define STUDIO_DATA_DIR "${OVQT_IMP_DATA_DIR}" + +#endif + diff --git a/code/studio/src/plugins/core/search_paths_settings_page.cpp b/code/studio/src/plugins/core/search_paths_settings_page.cpp index e76d6c796..516d3d3f3 100644 --- a/code/studio/src/plugins/core/search_paths_settings_page.cpp +++ b/code/studio/src/plugins/core/search_paths_settings_page.cpp @@ -28,6 +28,10 @@ #include #include +#if !defined NL_OS_WINDOWS +#include "core_config.h" +#endif + namespace Core { @@ -118,6 +122,10 @@ void SearchPathsSettingsPage::applySearchPaths() for (int i = 1; i < remapExt.size(); i += 2) NLMISC::CPath::remapExtension(remapExt.at(i - 1).toUtf8().constData(), remapExt.at(i).toUtf8().constData(), true); +#if !defined NL_OS_WINDOWS + NLMISC::CPath::addSearchPath(std::string(STUDIO_DATA_DIR), false, false); +#endif + Q_FOREACH(QString path, paths) { NLMISC::CPath::addSearchPath(path.toUtf8().constData(), m_recurse, false); @@ -216,4 +224,4 @@ void SearchPathsSettingsPage::checkEnabledButton() m_ui.downToolButton->setEnabled(bEnabled); } -} /* namespace Core */ \ No newline at end of file +} /* namespace Core */ diff --git a/code/studio/src/plugins/core/settings_dialog.cpp b/code/studio/src/plugins/core/settings_dialog.cpp index 0b38e4e80..b1027212c 100644 --- a/code/studio/src/plugins/core/settings_dialog.cpp +++ b/code/studio/src/plugins/core/settings_dialog.cpp @@ -145,11 +145,17 @@ void SettingsDialog::pageSelected() void SettingsDialog::accept() { m_applied = true; + + setCursor( Qt::WaitCursor ); + Q_FOREACH(IOptionsPage *page, m_pages) { page->apply(); page->finish(); } + + setCursor( Qt::ArrowCursor ); + done(QDialog::Accepted); } @@ -162,8 +168,13 @@ void SettingsDialog::reject() void SettingsDialog::apply() { + setCursor( Qt::WaitCursor ); + Q_FOREACH(IOptionsPage *page, m_pages) page->apply(); + + setCursor( Qt::ArrowCursor ); + m_applied = true; } diff --git a/code/studio/src/plugins/core/settings_dialog.h b/code/studio/src/plugins/core/settings_dialog.h index a90f88b18..9e1c86444 100644 --- a/code/studio/src/plugins/core/settings_dialog.h +++ b/code/studio/src/plugins/core/settings_dialog.h @@ -19,7 +19,7 @@ #ifndef SETTINGS_DIALOG_H #define SETTINGS_DIALOG_H -#include "../core/ui_settings_dialog.h" +#include "ui_settings_dialog.h" // Qt includes #include diff --git a/code/studio/src/plugins/gui_editor/CMakeLists.txt b/code/studio/src/plugins/gui_editor/CMakeLists.txt index e1e8b38be..f2f5bfcb1 100644 --- a/code/studio/src/plugins/gui_editor/CMakeLists.txt +++ b/code/studio/src/plugins/gui_editor/CMakeLists.txt @@ -4,6 +4,8 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR} ${QT_INCLUDES} ${LUA_INCLUDE_DIR}) +CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/gui_editor_config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/gui_editor_config.h) + FILE(GLOB SRC *.cpp *.h) SET(OVQT_EXT_SYS_SRC ${CMAKE_CURRENT_SOURCE_DIR}/../../extension_system/iplugin.h @@ -112,3 +114,11 @@ ELSE(WIN32) ENDIF(WIN32) INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/studio_plugin_gui_editor.xml DESTINATION ${OVQT_PLUGIN_SPECS_DIR} COMPONENT tools3d) + +FILE(GLOB widgets "${CMAKE_CURRENT_SOURCE_DIR}/widgets/*.xml") +FILE(GLOB expressions "${CMAKE_CURRENT_SOURCE_DIR}/expressions/*.xml") + +INSTALL(FILES ${widgets} DESTINATION "${OVQT_DATA_DIR}/widgets" COMPONENT tools3d) +INSTALL(FILES ${expressions} DESTINATION "${OVQT_DATA_DIR}/expressions" COMPONENT tools3d) + +INSTALL(DIRECTORY fonts/ DESTINATION ${OVQT_DATA_DIR} COMPONENT data) diff --git a/code/studio/src/plugins/gui_editor/expression_store.cpp b/code/studio/src/plugins/gui_editor/expression_store.cpp index 9f2218b4e..0016374d3 100644 --- a/code/studio/src/plugins/gui_editor/expression_store.cpp +++ b/code/studio/src/plugins/gui_editor/expression_store.cpp @@ -21,6 +21,7 @@ #include "expression_loader.h" #include #include +#include "gui_editor_config.h" class ExpressionStorePvt { @@ -50,7 +51,7 @@ ExpressionStore::~ExpressionStore() bool ExpressionStore::load() { - QDir d( "expressions" ); + QDir d( EXPRESSIONS_DIR ); if( !d.exists() ) return false; diff --git a/code/studio/src/plugins/gui_editor/fonts/ryzom.ttf b/code/studio/src/plugins/gui_editor/fonts/ryzom.ttf new file mode 100644 index 000000000..c1b19d870 Binary files /dev/null and b/code/studio/src/plugins/gui_editor/fonts/ryzom.ttf differ diff --git a/code/studio/src/plugins/gui_editor/gui_editor_config.h.cmake b/code/studio/src/plugins/gui_editor/gui_editor_config.h.cmake new file mode 100644 index 000000000..0e36dcb79 --- /dev/null +++ b/code/studio/src/plugins/gui_editor/gui_editor_config.h.cmake @@ -0,0 +1,8 @@ +#ifndef GUI_EDITOR_CONFIG_H +#define GUI_EDITOR_CONFIG_H + +#define WIDGETS_DIR "${OVQT_IMP_DATA_DIR}/widgets" +#define EXPRESSIONS_DIR "${OVQT_IMP_DATA_DIR}/expressions" + +#endif + diff --git a/code/studio/src/plugins/gui_editor/nelgui_ctrl.cpp b/code/studio/src/plugins/gui_editor/nelgui_ctrl.cpp index e9712ce4e..4852b227f 100644 --- a/code/studio/src/plugins/gui_editor/nelgui_ctrl.cpp +++ b/code/studio/src/plugins/gui_editor/nelgui_ctrl.cpp @@ -188,7 +188,7 @@ namespace GUIEditor void NelGUICtrl::onGUILoaded() { - timerID = startTimer( 200 ); + timerID = startTimer( 25 ); guiLoaded = true; Q_EMIT guiLoadComplete(); diff --git a/code/studio/src/plugins/gui_editor/new_gui_dlg.cpp b/code/studio/src/plugins/gui_editor/new_gui_dlg.cpp index 3c9208dfc..43faabf79 100644 --- a/code/studio/src/plugins/gui_editor/new_gui_dlg.cpp +++ b/code/studio/src/plugins/gui_editor/new_gui_dlg.cpp @@ -25,6 +25,9 @@ QDialog( parent ) { m_ui.setupUi( this ); + // Login texture map - temporaty measure until we add default textures for widgets to use + m_ui.mapList->addItem( "texture_interfaces_v3_login.tga" ); + connect( m_ui.okButton, SIGNAL( clicked( bool ) ), this, SLOT( onOKClicked() ) ); connect( m_ui.cancelButton, SIGNAL( clicked( bool ) ), this, SLOT( onCancelClicked() ) ); connect( m_ui.projectDirTB, SIGNAL( clicked( bool ) ), this, SLOT( onProjectDirTBClicked() ) ); diff --git a/code/studio/src/plugins/gui_editor/widget_hierarchy.cpp b/code/studio/src/plugins/gui_editor/widget_hierarchy.cpp index 343d8efd8..17e7f6e57 100644 --- a/code/studio/src/plugins/gui_editor/widget_hierarchy.cpp +++ b/code/studio/src/plugins/gui_editor/widget_hierarchy.cpp @@ -166,6 +166,9 @@ namespace GUIEditor std::vector< CCtrlBase* >::const_iterator citr; for( citr = controls.begin(); citr != controls.end(); ++citr ) { + if( !(*citr)->isEditorSelectable() ) + continue; + QTreeWidgetItem *subItem = new QTreeWidgetItem( item ); subItem->setText( 0, makeNodeName( (*citr)->getId() ).c_str() ); widgetHierarchyMap[ (*citr)->getId() ] = subItem; @@ -176,6 +179,9 @@ namespace GUIEditor std::vector< CViewBase* >::const_iterator vitr; for( vitr = views.begin(); vitr != views.end(); ++vitr ) { + if( !(*vitr)->isEditorSelectable() ) + continue; + QTreeWidgetItem *subItem = new QTreeWidgetItem( item ); subItem->setText( 0, makeNodeName( (*vitr)->getId() ).c_str() ); widgetHierarchyMap[ (*vitr)->getId() ] = subItem; diff --git a/code/studio/src/plugins/gui_editor/widget_info_tree_node.h b/code/studio/src/plugins/gui_editor/widget_info_tree_node.h index 0de9e6977..8aefe6f0f 100644 --- a/code/studio/src/plugins/gui_editor/widget_info_tree_node.h +++ b/code/studio/src/plugins/gui_editor/widget_info_tree_node.h @@ -75,6 +75,10 @@ namespace GUIEditor // copy the properties to the child, since they inherit them for( std::vector< SPropEntry >::const_iterator itr = this->info.props.begin(); itr != this->info.props.end(); ++itr ) { + // Don't add property if already exists, since it's an override. + if( node->hasProperty( itr->propName ) ) + continue; + node->addProperty( *itr ); } } diff --git a/code/studio/src/plugins/gui_editor/widget_properties_parser.cpp b/code/studio/src/plugins/gui_editor/widget_properties_parser.cpp index e0f346fc9..fd74dcae4 100644 --- a/code/studio/src/plugins/gui_editor/widget_properties_parser.cpp +++ b/code/studio/src/plugins/gui_editor/widget_properties_parser.cpp @@ -20,6 +20,7 @@ #include #include "nel/misc/debug.h" #include "widget_info_tree.h" +#include "gui_editor_config.h" using namespace NLMISC; @@ -36,7 +37,7 @@ namespace GUIEditor void CWidgetPropParser::parseGUIWidgets() { - QDir d( "widgets" ); + QDir d( WIDGETS_DIR ); if( !d.exists() ) { nlwarning( "GUI widgets directory doesn't exist!" ); @@ -55,7 +56,7 @@ namespace GUIEditor QStringListIterator itr( files ); while( itr.hasNext() ) - parseGUIWidget( "widgets/" + itr.next() ); + parseGUIWidget( QString( WIDGETS_DIR ) + QString( "/" ) + itr.next() ); buildWidgetInfoTree(); diff --git a/code/studio/src/plugins/gui_editor/widgets/CtrlButton.xml b/code/studio/src/plugins/gui_editor/widgets/CtrlButton.xml index c081f3dae..2454f7035 100644 --- a/code/studio/src/plugins/gui_editor/widgets/CtrlButton.xml +++ b/code/studio/src/plugins/gui_editor/widgets/CtrlButton.xml @@ -11,18 +11,18 @@ tx_normal - string - + texture + tp_quit.tga tx_pushed - string - + texture + tp_quit.tga tx_over - string - + texture + tp_quit.tga scale diff --git a/code/studio/src/plugins/gui_editor/widgets/DBViewNumber.xml b/code/studio/src/plugins/gui_editor/widgets/DBViewNumber.xml index 36a7d23ce..99cc153ce 100644 --- a/code/studio/src/plugins/gui_editor/widgets/DBViewNumber.xml +++ b/code/studio/src/plugins/gui_editor/widgets/DBViewNumber.xml @@ -9,6 +9,11 @@ + + hardtext + string + 0 + value string diff --git a/code/studio/src/plugins/gui_editor/widgets/GroupEditBoxDecor.xml b/code/studio/src/plugins/gui_editor/widgets/GroupEditBoxDecor.xml new file mode 100644 index 000000000..67865e707 --- /dev/null +++ b/code/studio/src/plugins/gui_editor/widgets/GroupEditBoxDecor.xml @@ -0,0 +1,68 @@ + +
+ GroupEditBoxDecor + CGroupEditBoxDecor + edit_box_decor + GroupEditBox + + false + +
+ + + w + int + 150 + + + h + int + 25 + + + tx_tl + texture + log_eb_tl.tga + + + tx_tm + texture + log_eb_t.tga + + + tx_tr + texture + log_eb_tr.tga + + + tx_bl + texture + log_eb_bl.tga + + + tx_bm + texture + log_eb_b.tga + + + tx_br + texture + log_eb_br.tga + + + tx_l + texture + log_eb_l.tga + + + tx_r + texture + log_eb_r.tga + + + tx_bg + texture + log_eb_m.tga + + +
diff --git a/code/studio/src/plugins/gui_editor/widgets/ViewBitmap.xml b/code/studio/src/plugins/gui_editor/widgets/ViewBitmap.xml index 7d78f6c40..1c22d67cd 100644 --- a/code/studio/src/plugins/gui_editor/widgets/ViewBitmap.xml +++ b/code/studio/src/plugins/gui_editor/widgets/ViewBitmap.xml @@ -37,7 +37,7 @@ texture texture - + log_kami.tga scale diff --git a/code/studio/src/plugins/object_viewer/object_viewer_plugin.cpp b/code/studio/src/plugins/object_viewer/object_viewer_plugin.cpp index dce7ad08f..a4c948140 100644 --- a/code/studio/src/plugins/object_viewer/object_viewer_plugin.cpp +++ b/code/studio/src/plugins/object_viewer/object_viewer_plugin.cpp @@ -8,6 +8,7 @@ // NeL includes #include "nel/misc/debug.h" +#include "nel/3d/init_3d.h" // Qt includes #include @@ -32,6 +33,8 @@ bool ObjectViewerPlugin::initialize(ExtensionSystem::IPluginManager *pluginManag { Q_UNUSED(errorString); _plugMan = pluginManager; + + NL3D::init3d(); Modules::init(); addAutoReleasedObject(new CObjectViewerContext()); addAutoReleasedObject(new GraphicsSettingsPage()); diff --git a/code/studio/src/plugins/tile_editor/CMakeLists.txt b/code/studio/src/plugins/tile_editor/CMakeLists.txt index 78cc5ef49..bfb9f3440 100644 --- a/code/studio/src/plugins/tile_editor/CMakeLists.txt +++ b/code/studio/src/plugins/tile_editor/CMakeLists.txt @@ -46,5 +46,18 @@ NL_ADD_LIB_SUFFIX(studio_plugin_tile_editor) ADD_DEFINITIONS(${LIBXML2_DEFINITIONS} -DQT_PLUGIN -DQT_SHARED ${QT_DEFINITIONS}) -INSTALL(TARGETS studio_plugin_tile_editor LIBRARY DESTINATION lib RUNTIME DESTINATION bin ARCHIVE DESTINATION lib COMPONENT tools3d) +IF(WIN32) + IF(WITH_INSTALL_LIBRARIES) + INSTALL(TARGETS studio_plugin_tile_editor LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) + ELSE(WITH_INSTALL_LIBRARIES) + INSTALL(TARGETS studio_plugin_tile_editor LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) + ENDIF(WITH_INSTALL_LIBRARIES) +ELSE(WIN32) + IF(WITH_INSTALL_LIBRARIES) + INSTALL(TARGETS studio_plugin_tile_editor LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) + ELSE(WITH_INSTALL_LIBRARIES) + INSTALL(TARGETS studio_plugin_tile_editor LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) + ENDIF(WITH_INSTALL_LIBRARIES) +ENDIF(WIN32) + INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/studio_plugin_tile_editor.xml DESTINATION ${OVQT_PLUGIN_SPECS_DIR} COMPONENT tools3d) diff --git a/code/studio/src/plugins/world_editor/world_editor_misc.cpp b/code/studio/src/plugins/world_editor/world_editor_misc.cpp index 5d6b7f94e..a2736b1c5 100644 --- a/code/studio/src/plugins/world_editor/world_editor_misc.cpp +++ b/code/studio/src/plugins/world_editor/world_editor_misc.cpp @@ -59,6 +59,8 @@ bool loadWorldEditFile(const std::string &fileName, WorldEditList &worldEditList lastError = ""; + std::string p = NLMISC::CFile::getPath( fileName ); + // Load the document NLMISC::CIFile file; if (file.open(fileName)) @@ -122,6 +124,8 @@ bool loadWorldEditFile(const std::string &fileName, WorldEditList &worldEditList { std::string dataDir; NLMISC::CIXml::getPropertyString(dataDir, node, "VALUE"); + + dataDir = NLMISC::CPath::makePathAbsolute( dataDir, p ); worldEditList.push_back(WorldEditItem(DataDirectoryType, dataDir)); } @@ -149,6 +153,9 @@ bool loadWorldEditFile(const std::string &fileName, WorldEditList &worldEditList std::string filenameChild; if ( NLMISC::CIXml::getPropertyString(filenameChild, node, "FILENAME")) { + + filenameChild = NLMISC::CPath::makePathAbsolute( filenameChild, p ); + // Is it a landscape ? if (type == "landscape") { diff --git a/code/studio/src/plugins/world_editor/world_editor_settings_page.cpp b/code/studio/src/plugins/world_editor/world_editor_settings_page.cpp index bb8ef2a00..d3b8bb849 100644 --- a/code/studio/src/plugins/world_editor/world_editor_settings_page.cpp +++ b/code/studio/src/plugins/world_editor/world_editor_settings_page.cpp @@ -17,9 +17,11 @@ // Project includes #include "world_editor_settings_page.h" #include "world_editor_constants.h" +#include "../core/icore.h" // Qt includes #include +#include // NeL includes @@ -61,11 +63,31 @@ QWidget *WorldEditorSettingsPage::createPage(QWidget *parent) { m_currentPage = new QWidget(parent); m_ui.setupUi(m_currentPage); + readSettings(); + return m_currentPage; } +void WorldEditorSettingsPage::readSettings() +{ + QSettings *settings = Core::ICore::instance()->settings(); + settings->beginGroup(Constants::WORLD_EDITOR_SECTION); + bool b = false; + + b = settings->value( Constants::WORLD_EDITOR_USE_OPENGL, true ).toBool(); + m_ui.glCB->setChecked( b ); + + settings->endGroup(); +} + void WorldEditorSettingsPage::apply() { + QSettings *settings = Core::ICore::instance()->settings(); + settings->beginGroup(Constants::WORLD_EDITOR_SECTION); + bool b = false; + b = m_ui.glCB->isChecked(); + settings->setValue( Constants::WORLD_EDITOR_USE_OPENGL, b ); + settings->endGroup(); } } /* namespace WorldEditor */ \ No newline at end of file diff --git a/code/studio/src/plugins/world_editor/world_editor_settings_page.h b/code/studio/src/plugins/world_editor/world_editor_settings_page.h index aa7677b9f..7eeb30e1d 100644 --- a/code/studio/src/plugins/world_editor/world_editor_settings_page.h +++ b/code/studio/src/plugins/world_editor/world_editor_settings_page.h @@ -46,6 +46,7 @@ public: QIcon categoryIcon() const; virtual QWidget *createPage(QWidget *parent); + virtual void readSettings(); virtual void apply(); virtual void finish() {} diff --git a/code/studio/src/plugins/world_editor/world_editor_settings_page.ui b/code/studio/src/plugins/world_editor/world_editor_settings_page.ui index 9219da6c4..a5cb12559 100644 --- a/code/studio/src/plugins/world_editor/world_editor_settings_page.ui +++ b/code/studio/src/plugins/world_editor/world_editor_settings_page.ui @@ -3,7 +3,7 @@ WorldEditorSettingsPage - false + true @@ -25,6 +25,9 @@ + + true + Workspace @@ -37,10 +40,18 @@ - + + + false + + - + + + false + + @@ -50,15 +61,32 @@ - + + + false + + - + + + false + + - + + + true + - Use OpenGL + Use OpenGL ( requires restart ) + + + true + + + false @@ -79,7 +107,11 @@ - + + + false + + @@ -89,7 +121,11 @@ - + + + false + + @@ -101,10 +137,17 @@ - + + + false + + + + false + ... diff --git a/code/studio/src/plugins/world_editor/world_editor_window.cpp b/code/studio/src/plugins/world_editor/world_editor_window.cpp index cec3baee1..6dbd07a8a 100644 --- a/code/studio/src/plugins/world_editor/world_editor_window.cpp +++ b/code/studio/src/plugins/world_editor/world_editor_window.cpp @@ -436,6 +436,7 @@ void WorldEditorWindow::writeSettings() settings->beginGroup(Constants::WORLD_EDITOR_SECTION); settings->setValue(Constants::WORLD_WINDOW_STATE, saveState()); settings->setValue(Constants::WORLD_WINDOW_GEOMETRY, saveGeometry()); + settings->setValue(Constants::WORLD_EDITOR_USE_OPENGL, settings->value(Constants::WORLD_EDITOR_USE_OPENGL)); settings->endGroup(); settings->sync(); } diff --git a/code/studio/src/settings_dialog.cpp b/code/studio/src/startup_settings_dlg.cpp similarity index 83% rename from code/studio/src/settings_dialog.cpp rename to code/studio/src/startup_settings_dlg.cpp index 78773a666..645df7040 100644 --- a/code/studio/src/settings_dialog.cpp +++ b/code/studio/src/startup_settings_dlg.cpp @@ -15,7 +15,7 @@ // along with this program. If not, see . -#include "settings_dialog.h" +#include "startup_settings_dlg.h" #include #include #include @@ -32,7 +32,7 @@ int findListItem( QListWidget *l, const QString &s ) return -1; } -SettingsDialog::SettingsDialog( QDialog *parent ) : +StartupSettingsDlg::StartupSettingsDlg( QDialog *parent ) : QDialog( parent ) { setupUi( this ); @@ -40,11 +40,11 @@ QDialog( parent ) settings = NULL; } -SettingsDialog::~SettingsDialog() +StartupSettingsDlg::~StartupSettingsDlg() { } -void SettingsDialog::load() +void StartupSettingsDlg::load() { pluginsLE->setText( settings->value( "PluginPath" ).toString() ); @@ -82,7 +82,7 @@ void SettingsDialog::load() settings->endGroup(); } -void SettingsDialog::saveSearchPaths() +void StartupSettingsDlg::saveSearchPaths() { QStringList l; for( int i = 0; i < searchLW->count(); i++ ) @@ -93,7 +93,7 @@ void SettingsDialog::saveSearchPaths() settings->setValue( "SearchPaths", l ); } -void SettingsDialog::saveRecursivePaths() +void StartupSettingsDlg::saveRecursivePaths() { QStringList l; for( int i = 0; i < recursiveLW->count(); i++ ) @@ -104,7 +104,7 @@ void SettingsDialog::saveRecursivePaths() settings->setValue( "RecursiveSearchPathes", l ); } -void SettingsDialog::save() +void StartupSettingsDlg::save() { settings->setValue( "PluginPath", pluginsLE->text() ); @@ -123,58 +123,59 @@ void SettingsDialog::save() settings->sync(); } -void SettingsDialog::accept() +void StartupSettingsDlg::accept() { save(); QDialog::accept(); } -void SettingsDialog::reject() +void StartupSettingsDlg::reject() { QDialog::reject(); } -void SettingsDialog::onOKClicked() +void StartupSettingsDlg::onOKClicked() { accept(); } -void SettingsDialog::onCancelClicked() +void StartupSettingsDlg::onCancelClicked() { reject(); } -void SettingsDialog::onPluginBClicked() +void StartupSettingsDlg::onPluginBClicked() { QString p = QFileDialog::getExistingDirectory( this, tr( "Plugins directory" ), "" ); pluginsLE->setText( p ); } -void SettingsDialog::onSheetsBClicked() +void StartupSettingsDlg::onSheetsBClicked() { QString p = QFileDialog::getExistingDirectory( this, tr( "Sheets directory" ), "" ); sheetsLE->setText( p ); } -void SettingsDialog::onAssetsBClicked() +void StartupSettingsDlg::onAssetsBClicked() { QString p = QFileDialog::getExistingDirectory( this, tr( "Assets directory" ), "" ); assetsLE->setText( p ); } -void SettingsDialog::onPrimitivesBClicked() +void StartupSettingsDlg::onPrimitivesBClicked() { QString p = QFileDialog::getExistingDirectory( this, tr( "Primitives directory" ), "" ); primitivesLE->setText( p ); } -void SettingsDialog::onLigoBClicked() +void StartupSettingsDlg::onLigoBClicked() { - QString p = QFileDialog::getExistingDirectory( this, tr( "LIGO directory" ), "" ); + QString p; + p = QFileDialog::getOpenFileName( this, tr( "LIGO config file" ), "" ); ligoLE->setText( p ); } -void SettingsDialog::onPathAddClicked() +void StartupSettingsDlg::onPathAddClicked() { QString p = QFileDialog::getExistingDirectory( this, tr( "Search path" ), "" ); if( p.isEmpty() ) @@ -186,7 +187,7 @@ void SettingsDialog::onPathAddClicked() searchLW->addItem( p ); } -void SettingsDialog::onPathRemoveClicked() +void StartupSettingsDlg::onPathRemoveClicked() { QListWidgetItem *i = searchLW->currentItem(); if( i == NULL ) @@ -195,7 +196,7 @@ void SettingsDialog::onPathRemoveClicked() delete i; } -void SettingsDialog::onRecursiveAddClicked() +void StartupSettingsDlg::onRecursiveAddClicked() { QString p = QFileDialog::getExistingDirectory( this, tr( "Recursive search path" ), "" ); if( p.isEmpty() ) @@ -207,7 +208,7 @@ void SettingsDialog::onRecursiveAddClicked() recursiveLW->addItem( p ); } -void SettingsDialog::onRecursiveRemoveClicked() +void StartupSettingsDlg::onRecursiveRemoveClicked() { QListWidgetItem *i = recursiveLW->currentItem(); if( i == NULL ) @@ -217,7 +218,7 @@ void SettingsDialog::onRecursiveRemoveClicked() } -void SettingsDialog::setupConnections() +void StartupSettingsDlg::setupConnections() { connect( bb, SIGNAL( accepted() ), this, SLOT( onOKClicked() ) ); connect( bb, SIGNAL( rejected() ), this, SLOT( onCancelClicked() ) ); diff --git a/code/studio/src/settings_dialog.h b/code/studio/src/startup_settings_dlg.h similarity index 84% rename from code/studio/src/settings_dialog.h rename to code/studio/src/startup_settings_dlg.h index 173ba37d4..49dd01ef7 100644 --- a/code/studio/src/settings_dialog.h +++ b/code/studio/src/startup_settings_dlg.h @@ -14,19 +14,19 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -#ifndef SETTINGS_DIALOG_H -#define SETTINGS_DIALOG_H +#ifndef STARTUP_SETTINGS_DIALOG_H +#define STARTUP_SETTINGS_DIALOG_H -#include "ui_settings_dialog.h" +#include "ui_startup_settings_dlg.h" class QSettings; -class SettingsDialog : public QDialog, public Ui::SettingsDialog +class StartupSettingsDlg : public QDialog, public Ui::StartupSettingsDlg { Q_OBJECT public: - SettingsDialog( QDialog *parent = NULL ); - ~SettingsDialog(); + StartupSettingsDlg( QDialog *parent = NULL ); + ~StartupSettingsDlg(); void setSettings( QSettings *s ){ settings = s; } diff --git a/code/studio/src/settings_dialog.ui b/code/studio/src/startup_settings_dlg.ui similarity index 95% rename from code/studio/src/settings_dialog.ui rename to code/studio/src/startup_settings_dlg.ui index 2fb6151d3..5f125ed14 100644 --- a/code/studio/src/settings_dialog.ui +++ b/code/studio/src/startup_settings_dlg.ui @@ -1,7 +1,7 @@ - SettingsDialog - + StartupSettingsDlg + Qt::ApplicationModal diff --git a/code/tool/increment_version/increment_version.py b/code/tool/increment_version/increment_version.py new file mode 100644 index 000000000..3b1d61ad9 --- /dev/null +++ b/code/tool/increment_version/increment_version.py @@ -0,0 +1,162 @@ +# +# Copyright (c) 2015 Jan Boon +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# * Redistributions of source code must retain the above copyright notice, this +# list of conditions and the following disclaimer. +# +# * Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions and the following disclaimer in the documentation +# and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# + +import fileinput +import os + +os.chdir('../../') +RootDir = os.getcwd(); + +MajorVersion = 0 +MinorVersion = 12 +PatchVersion = 0 +Revision = 0 + +VersionString = str(MajorVersion) + "." + str(MinorVersion) + "." + str(PatchVersion) +VersionComma = str(MajorVersion) + ", " + str(MinorVersion) + ", " + str(PatchVersion) + ", " + str(Revision) + +for line in fileinput.input("CMakeLists.txt", inplace = True): + if ("# Version" in line): + print "# Version: " + VersionString + elif ("SET(NL_VERSION_MAJOR" in line): + print "SET(NL_VERSION_MAJOR " + str(MajorVersion) + ")" + elif ("SET(NL_VERSION_MINOR" in line): + print "SET(NL_VERSION_MINOR " + str(MinorVersion) + ")" + elif ("SET(NL_VERSION_PATCH" in line): + print "SET(NL_VERSION_PATCH " + str(PatchVersion) + ")" + else: + print line.rstrip() + +os.chdir(RootDir) +os.chdir("web/public_php/ams/templates/") + +for line in fileinput.input("layout.tpl", inplace = True): + if (" Powered by: " in line): + print "\t\t\t{if $permission > 1}

AMS " + VersionString + " Powered by: Charisma

{/if}" + else: + print line.rstrip() + +os.chdir(RootDir) +os.chdir("ryzom/common/src/game_share/") + +for line in fileinput.input("ryzom_version.h", inplace = True): + if (("\"v" in line) and (" \\" in line)): + print "\t\"v" + VersionString + "\" \\" + else: + print line.rstrip() + +os.chdir(RootDir) +os.chdir("nel/tools/3d/plugin_max/") +os.chdir("nel_export") + +for line in fileinput.input("nel_export.rc", inplace = True): + if ("FILEVERSION" in line): + print " FILEVERSION " + VersionComma + elif ("PRODUCTVERSION" in line): + print " PRODUCTVERSION " + VersionComma + elif (("FileVersion" in line) and ("VALUE" in line)): + print " VALUE \"FileVersion\", \"" + VersionString + "\\0\"" + elif (("ProductVersion" in line) and ("VALUE" in line)): + print " VALUE \"ProductVersion\", \"" + VersionString + "\\0\"" + else: + print line.rstrip() + +os.chdir("..") +os.chdir("nel_patch_converter") + +for line in fileinput.input("nel_patch_converter.rc", inplace = True): + if ("FILEVERSION" in line): + print " FILEVERSION " + VersionComma + elif ("PRODUCTVERSION" in line): + print " PRODUCTVERSION " + VersionComma + elif (("FileVersion" in line) and ("VALUE" in line)): + print " VALUE \"FileVersion\", \"" + VersionString + "\"" + elif (("ProductVersion" in line) and ("VALUE" in line)): + print " VALUE \"ProductVersion\", \"" + VersionString + "\"" + else: + print line.rstrip() + +os.chdir("..") +os.chdir("nel_patch_edit") + +for line in fileinput.input("mods.rc", inplace = True): + if ("FILEVERSION" in line): + print " FILEVERSION " + VersionComma + elif ("PRODUCTVERSION" in line): + print " PRODUCTVERSION " + VersionComma + elif (("FileVersion" in line) and ("VALUE" in line)): + print " VALUE \"FileVersion\", \"" + VersionString + "\"" + elif (("ProductVersion" in line) and ("VALUE" in line)): + print " VALUE \"ProductVersion\", \"" + VersionString + "\"" + else: + print line.rstrip() + +os.chdir("..") +os.chdir("nel_patch_paint") + +for line in fileinput.input("nel_patch_paint.rc", inplace = True): + if ("FILEVERSION" in line): + print " FILEVERSION " + VersionComma + elif ("PRODUCTVERSION" in line): + print " PRODUCTVERSION " + VersionComma + elif (("FileVersion" in line) and ("VALUE" in line)): + print " VALUE \"FileVersion\", \"" + VersionString + "\\0\"" + elif (("ProductVersion" in line) and ("VALUE" in line)): + print " VALUE \"ProductVersion\", \"" + VersionString + "\\0\"" + else: + print line.rstrip() + +os.chdir("..") +os.chdir("nel_vertex_tree_paint") + +for line in fileinput.input("vertex_tree_paint.rc", inplace = True): + if ("FILEVERSION" in line): + print " FILEVERSION " + VersionComma + elif ("PRODUCTVERSION" in line): + print " PRODUCTVERSION " + VersionComma + elif (("FileVersion" in line) and ("VALUE" in line)): + print " VALUE \"FileVersion\", \"" + VersionString + "\\0\"" + elif (("ProductVersion" in line) and ("VALUE" in line)): + print " VALUE \"ProductVersion\", \"" + VersionString + "\\0\"" + else: + print line.rstrip() + +os.chdir("..") +os.chdir("tile_utility") + +for line in fileinput.input("tile_utility.rc", inplace = True): + if ("FILEVERSION" in line): + print " FILEVERSION " + VersionComma + elif ("PRODUCTVERSION" in line): + print " PRODUCTVERSION " + VersionComma + elif (("FileVersion" in line) and ("VALUE" in line)): + print " VALUE \"FileVersion\", \"" + VersionString + "\\0\"" + elif (("ProductVersion" in line) and ("VALUE" in line)): + print " VALUE \"ProductVersion\", \"" + VersionString + "\\0\"" + else: + print line.rstrip() + +# end of file diff --git a/code/web/private_php/ams/autoload/ticket_user.php b/code/web/private_php/ams/autoload/ticket_user.php index 6de69ccdd..a52ffaec8 100644 --- a/code/web/private_php/ams/autoload/ticket_user.php +++ b/code/web/private_php/ams/autoload/ticket_user.php @@ -20,8 +20,18 @@ class Ticket_User{ * @param $permission the permission that will be given to the user. 1=user, 2=mod, 3=admin */ public static function createTicketUser( $extern_id, $permission) { - $dbl = new DBLayer("lib"); - $dbl->insert("ticket_user",array('TUserId' => $extern_id, 'Permission' => $permission, 'ExternId' => $extern_id)); + try { + //make connection with and put into db + $dbl = new DBLayer("lib"); + $dbl->insert("ticket_user",array('TUserId' => $extern_id, 'Permission' => $permission, 'ExternId' => $extern_id)); + } + catch (PDOException $e) { + //oh noooz... + //error_log(print_r($e, true)); + //print_r($e); + echo "Problem creating user in database!"; + } + } diff --git a/code/web/private_php/ams/ingame_templates/register.tpl b/code/web/private_php/ams/ingame_templates/register.tpl index 7f34e8639..0f1d683a8 100644 --- a/code/web/private_php/ams/ingame_templates/register.tpl +++ b/code/web/private_php/ams/ingame_templates/register.tpl @@ -1,118 +1,118 @@ -{config_load file="ams_lib.conf" section="setup"} -
- {$title} -
- -
- {$welcome_message} -
- - {if $userRegistration == '0'|| $userRegistration == '1'} - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {if isset($TAC_ERROR) && $TAC_ERROR eq "TRUE"}{/if} - - -
{$username_tag} - - {if isset($USERNAME_ERROR) && $USERNAME_ERROR eq "TRUE"}{$USERNAME}{/if}
{$password_tag} - - {if isset($PASSWORD_ERROR) && $PASSWORD_ERROR eq "TRUE"}{$PASSWORD}{/if}
{$cpassword_tag} - {if isset($CPASSWORD_ERROR) && $CPASSWORD_ERROR eq "TRUE"}{$CPASSWORD}{/if}
{$email_tag} - - {if isset($EMAIL_ERROR) && $EMAIL_ERROR eq "TRUE"}{$EMAIL}{/if}
{$tac_tag}{$tac_message}
-
- -
- -
- - {/if} - -
- -
- {$username_tooltip} -
- - -
- {$password_message} -
- -
- {$cpassword_message} -
- -
- {$email_message} -
- -
+{config_load file="ams_lib.conf" section="setup"} +
+ {$title} +
+ +
+ {$welcome_message} +
+ + {if $userRegistration == '0'|| $userRegistration == '1'} + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {if isset($TAC_ERROR) && $TAC_ERROR eq "TRUE"}{/if} + + +
{$username_tag} + + {if isset($USERNAME_ERROR) && $USERNAME_ERROR eq "TRUE"}{$USERNAME}{/if}
{$password_tag} + + {if isset($PASSWORD_ERROR) && $PASSWORD_ERROR eq "TRUE"}{$PASSWORD}{/if}
{$cpassword_tag} + {if isset($CPASSWORD_ERROR) && $CPASSWORD_ERROR eq "TRUE"}{$CPASSWORD}{/if}
{$email_tag} + + {if isset($EMAIL_ERROR) && $EMAIL_ERROR eq "TRUE"}{$EMAIL}{/if}
{$tac_tag}{$tac_message}
+
+ +
+ +
+ + {/if} + +
+ +
+ {$username_tooltip} +
+ + +
+ {$password_message} +
+ +
+ {$cpassword_message} +
+ +
+ {$email_message} +
+ +
diff --git a/code/web/private_php/ams/ingame_templates/settings.tpl b/code/web/private_php/ams/ingame_templates/settings.tpl index e256e4429..6049bddba 100644 --- a/code/web/private_php/ams/ingame_templates/settings.tpl +++ b/code/web/private_php/ams/ingame_templates/settings.tpl @@ -1,247 +1,247 @@ -{block name=content} - - - - - - - - -
- - - - -
- - - - - {if isset($isAdmin) and $isAdmin eq 'TRUE' and $target_id neq 1} - {if $userPermission eq 1} - - - {else if $userPermission eq 2 } - - - {else if $userPermission eq 3 } - - - {/if} - {/if} - -
Browse UserSend TicketMake ModeratorMake AdminDemote to UserMake AdminDemote to UserDemote to Moderator
-
-
- - - - - - - - - - - - -

Change Settings of {$target_username}

- - - - - - - - - - - - -
- - -
-
- - - - - -
- - -
- - -
- -

Change Password

- -
- - {if !isset($changesOther) or $changesOther eq "FALSE"} - - - -

- - {/if} - - - -
- Current Password: - - - {if isset($MATCH_ERROR) and $MATCH_ERROR eq "TRUE"}The password is incorrect{/if} -
- New Password: - - - {if isset($NEWPASSWORD_ERROR) and $NEWPASSWORD_ERROR eq "TRUE"}{$newpass_error_message}{/if} -
- Confirm New Password: - - - {if isset($CNEWPASSWORD_ERROR) and $CNEWPASSWORD_ERROR eq "TRUE"}{$confirmnewpass_error_message}{/if} -
- {if isset($SUCCESS_PASS) and $SUCCESS_PASS eq "OK"} -

- The password has been changed! -

- {/if} - - - - - -

- -
- -
-
-
- - -
- - -
-

Change Email

- -
- - -
- New Email: - - - {if isset($EMAIL_ERROR) and $EMAIL_ERROR eq "TRUE"}{$EMAIL}{/if} -
- {if isset($SUCCESS_MAIL) and $SUCCESS_MAIL eq "OK"} -

- The email has been changed! -

- {/if} - - - -

- -

- -
-
-
- - -
- - -
-

Change Info

-
- - - - - - - - - - - - - - - - - - - - -
Firstname:
Lastname:
Country:
Gender -
- {if isset($info_updated) and $info_updated eq "OK"} -

- The Info has been updated! -

- {/if} - - - - -

- -

-
- -
-
-
- - -
- - -
-

Ticket-Update Mail Settings

-
- - -
- Receive ticket updates - - -
- - - -

- -

-
- -
-
-
-
- - - -{/block} - +{block name=content} + + + + + + + + +
+ + + + +
+ + + + + {if isset($isAdmin) and $isAdmin eq 'TRUE' and $target_id neq 1} + {if $userPermission eq 1} + + + {else if $userPermission eq 2 } + + + {else if $userPermission eq 3 } + + + {/if} + {/if} + +
Browse UserSend TicketMake ModeratorMake AdminDemote to UserMake AdminDemote to UserDemote to Moderator
+
+
+ + + + + + + + + + + + +

Change Settings of {$target_username}

+ + + + + + + + + + + + +
+ + +
+
+ + + + + +
+ + +
+ + +
+ +

Change Password

+ +
+ + {if !isset($changesOther) or $changesOther eq "FALSE"} + + + +

+ + {/if} + + + +
+ Current Password: + + + {if isset($MATCH_ERROR) and $MATCH_ERROR eq "TRUE"}The password is incorrect{/if} +
+ New Password: + + + {if isset($NEWPASSWORD_ERROR) and $NEWPASSWORD_ERROR eq "TRUE"}{$newpass_error_message}{/if} +
+ Confirm New Password: + + + {if isset($CNEWPASSWORD_ERROR) and $CNEWPASSWORD_ERROR eq "TRUE"}{$confirmnewpass_error_message}{/if} +
+ {if isset($SUCCESS_PASS) and $SUCCESS_PASS eq "OK"} +

+ The password has been changed! +

+ {/if} + + + + + +

+ +
+ +
+
+
+ + +
+ + +
+

Change Email

+ +
+ + +
+ New Email: + + + {if isset($EMAIL_ERROR) and $EMAIL_ERROR eq "TRUE"}{$EMAIL}{/if} +
+ {if isset($SUCCESS_MAIL) and $SUCCESS_MAIL eq "OK"} +

+ The email has been changed! +

+ {/if} + + + +

+ +

+ +
+
+
+ + +
+ + +
+

Change Info

+
+ + + + + + + + + + + + + + + + + + + + +
Firstname:
Lastname:
Country:
Gender +
+ {if isset($info_updated) and $info_updated eq "OK"} +

+ The Info has been updated! +

+ {/if} + + + + +

+ +

+
+ +
+
+
+ + +
+ + +
+

Ticket-Update Mail Settings

+
+ + +
+ Receive ticket updates + + +
+ + + +

+ +

+
+ +
+
+
+
+ + + +{/block} + diff --git a/code/web/private_php/setup/sql/nel_ams_lib_00007.sql b/code/web/private_php/setup/sql/nel_ams_lib_00007.sql new file mode 100644 index 000000000..748793e66 --- /dev/null +++ b/code/web/private_php/setup/sql/nel_ams_lib_00007.sql @@ -0,0 +1,2 @@ +INSERT INTO `settings` (`idSettings`, `Setting`, `Value`) VALUES +(2, 'Domain_Auto_Add', '1'); \ No newline at end of file diff --git a/code/web/public_php/admin/templates/default/index_login.tpl b/code/web/public_php/admin/templates/default/index_login.tpl index f62a03998..7b18df28e 100644 --- a/code/web/public_php/admin/templates/default/index_login.tpl +++ b/code/web/public_php/admin/templates/default/index_login.tpl @@ -1,25 +1,25 @@ - -{include file="page_header_light.tpl"} - -

Shard Administration Website

- -

Use login: guest and password: guest to login.

- - - - - - - - - - - - - - - -
Login:
Password:
  -
- -{include file="page_footer_light.tpl"} + +{include file="page_header_light.tpl"} + +

Shard Administration Website

+ +

Use login: guest and password: guest to login.

+ + + + + + + + + + + + + + + +
Login:
Password:
  +
+ +{include file="page_footer_light.tpl"} diff --git a/code/web/public_php/admin/templates/default/tool_actions.tpl b/code/web/public_php/admin/templates/default/tool_actions.tpl index a8c9e614a..3ceacb946 100644 --- a/code/web/public_php/admin/templates/default/tool_actions.tpl +++ b/code/web/public_php/admin/templates/default/tool_actions.tpl @@ -1,6 +1,6 @@ - -{include file="page_header.tpl"} - - - -{include file="page_footer.tpl"} + +{include file="page_header.tpl"} + + + +{include file="page_footer.tpl"} diff --git a/code/web/public_php/admin/templates/default/tool_administration_applications.tpl b/code/web/public_php/admin/templates/default/tool_administration_applications.tpl index 824d34325..45dc12839 100644 --- a/code/web/public_php/admin/templates/default/tool_administration_applications.tpl +++ b/code/web/public_php/admin/templates/default/tool_administration_applications.tpl @@ -1,115 +1,115 @@ - -{include file="page_header.tpl"} - - - - - - -
{$tool_alert_message} - - - {section name=onemenu loop=$tool_menu} - - {/section} - -
{$tool_menu[onemenu].title}
-
- -
- - - - - - - - - -
- - - - - - - - - - - - - -{section name=application loop=$tool_application_list} -{cycle assign="trclass" values="row1,row0"} - - - - - - - - - -{/section} -
Applications
IDNameURIRestrictionIconOrderVisible
{$tool_application_list[application].application_id}{$tool_application_list[application].application_name}{$tool_application_list[application].application_uri}{$tool_application_list[application].application_restriction}{$tool_application_list[application].application_icon}{$tool_application_list[application].application_order}{if $tool_application_list[application].application_visible == 1}Yes{else}No{/if}
-
- - - - - -{if $tool_application_edit_data.application_id} - - - - -{/if} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Applications Details
Id :
Name :
URI :
Restriction :
Icon :
Order :
Visible : - -
  - -{if $tool_application_edit_data.application_id} - - -{else} - - -{/if} - -
-
- -{include file="page_footer.tpl"} + +{include file="page_header.tpl"} + + + + + + +
{$tool_alert_message} + + + {section name=onemenu loop=$tool_menu} + + {/section} + +
{$tool_menu[onemenu].title}
+
+ +
+ + + + + + + + + +
+ + + + + + + + + + + + + +{section name=application loop=$tool_application_list} +{cycle assign="trclass" values="row1,row0"} + + + + + + + + + +{/section} +
Applications
IDNameURIRestrictionIconOrderVisible
{$tool_application_list[application].application_id}{$tool_application_list[application].application_name}{$tool_application_list[application].application_uri}{$tool_application_list[application].application_restriction}{$tool_application_list[application].application_icon}{$tool_application_list[application].application_order}{if $tool_application_list[application].application_visible == 1}Yes{else}No{/if}
+
+ + + + + +{if $tool_application_edit_data.application_id} + + + + +{/if} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Applications Details
Id :
Name :
URI :
Restriction :
Icon :
Order :
Visible : + +
  + +{if $tool_application_edit_data.application_id} + + +{else} + + +{/if} + +
+
+ +{include file="page_footer.tpl"} diff --git a/code/web/public_php/admin/templates/default/tool_administration_domains.tpl b/code/web/public_php/admin/templates/default/tool_administration_domains.tpl index 3262aee9d..fa61386a5 100644 --- a/code/web/public_php/admin/templates/default/tool_administration_domains.tpl +++ b/code/web/public_php/admin/templates/default/tool_administration_domains.tpl @@ -1,185 +1,185 @@ - -{include file="page_header.tpl"} - - - - - - -
{$tool_alert_message} - - - {section name=onemenu loop=$tool_menu} - - {/section} - -
{$tool_menu[onemenu].title}
-
- -
- - - - - - - - - -
- - - - - - - - - - - - - - - - - - -{section name=domain loop=$tool_domain_list} -{cycle assign="trclass" values="row1,row0"} - - - - - - - - - - - - - - -{/section} -
Domains
IDNameApplicationAS HostAS PortMFS WebRRD PathLAS Admin PathLAS Local PathRing DBCS DBHD Check
{$tool_domain_list[domain].domain_id}{$tool_domain_list[domain].domain_name}{$tool_domain_list[domain].domain_application}{$tool_domain_list[domain].domain_as_host}{$tool_domain_list[domain].domain_as_port}{$tool_domain_list[domain].domain_mfs_web}{$tool_domain_list[domain].domain_rrd_path}{$tool_domain_list[domain].domain_las_admin_path}{$tool_domain_list[domain].domain_las_local_path}{if $tool_domain_list[domain].domain_sql_string != ''}True{else}False{/if}{if $tool_domain_list[domain].domain_cs_sql_string != ''}True{else}False{/if}{if $tool_domain_list[domain].domain_hd_check == 1}Yes{else}No{/if}
-
- - - - - -{if $tool_domain_edit_data.domain_id} - - - - -{/if} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Domain Details
Id :
Name :
Application :
AS Host :
AS Port :
MFS Web :
RRD Path :
LAS Admin Path :
LAS Local Path :
Ring DB String :
CS DB String :
HD Check : - -
  - -{if $tool_domain_edit_data.domain_id} - - -{else} - - -{/if} - -
- -{if $tool_domain_nel_data} -
- - - - - - - - - - - - - - - - - - - - - - - -
Domain Data
ID :
Name :
Status : -
  - - -
-{/if} - -
- -{include file="page_footer.tpl"} + +{include file="page_header.tpl"} + + + + + + +
{$tool_alert_message} + + + {section name=onemenu loop=$tool_menu} + + {/section} + +
{$tool_menu[onemenu].title}
+
+ +
+ + + + + + + + + +
+ + + + + + + + + + + + + + + + + + +{section name=domain loop=$tool_domain_list} +{cycle assign="trclass" values="row1,row0"} + + + + + + + + + + + + + + +{/section} +
Domains
IDNameApplicationAS HostAS PortMFS WebRRD PathLAS Admin PathLAS Local PathRing DBCS DBHD Check
{$tool_domain_list[domain].domain_id}{$tool_domain_list[domain].domain_name}{$tool_domain_list[domain].domain_application}{$tool_domain_list[domain].domain_as_host}{$tool_domain_list[domain].domain_as_port}{$tool_domain_list[domain].domain_mfs_web}{$tool_domain_list[domain].domain_rrd_path}{$tool_domain_list[domain].domain_las_admin_path}{$tool_domain_list[domain].domain_las_local_path}{if $tool_domain_list[domain].domain_sql_string != ''}True{else}False{/if}{if $tool_domain_list[domain].domain_cs_sql_string != ''}True{else}False{/if}{if $tool_domain_list[domain].domain_hd_check == 1}Yes{else}No{/if}
+
+ + + + + +{if $tool_domain_edit_data.domain_id} + + + + +{/if} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Domain Details
Id :
Name :
Application :
AS Host :
AS Port :
MFS Web :
RRD Path :
LAS Admin Path :
LAS Local Path :
Ring DB String :
CS DB String :
HD Check : + +
  + +{if $tool_domain_edit_data.domain_id} + + +{else} + + +{/if} + +
+ +{if $tool_domain_nel_data} +
+ + + + + + + + + + + + + + + + + + + + + + + +
Domain Data
ID :
Name :
Status : +
  + + +
+{/if} + +
+ +{include file="page_footer.tpl"} diff --git a/code/web/public_php/admin/templates/default/tool_administration_groups.tpl b/code/web/public_php/admin/templates/default/tool_administration_groups.tpl index 3dedf7067..be7235734 100644 --- a/code/web/public_php/admin/templates/default/tool_administration_groups.tpl +++ b/code/web/public_php/admin/templates/default/tool_administration_groups.tpl @@ -1,334 +1,334 @@ - -{include file="page_header.tpl"} - - - - - - -
{$tool_alert_message} - - - {section name=onemenu loop=$tool_menu} - - {/section} - -
{$tool_menu[onemenu].title}
-
- -
- - - - - - - - - -
- - - - - - - - - - - -{section name=group loop=$tool_group_list} -{cycle assign="trclass" values="row1,row0"} - - - - - - - -{/section} -
Groups
IDNameLevelDefaultActive
{$tool_group_list[group].group_id}{$tool_group_list[group].group_name}{$tool_group_list[group].group_level_name}{if $tool_group_list[group].group_default == 1}Yes{else}No{/if}{if $tool_group_list[group].group_active == 1}Yes{else}No{/if}
- -{if $tool_group_user_list} -
- - - - - - - - - - - - - -{section name=user loop=$tool_group_user_list} -{cycle assign="trclass2" values="row1,row0"} - - - - -{if $tool_group_user_list[user].user_logged_last > 0} - -{else} - -{/if} - - - -{/section} -
Accounts
IDLoginCreatedLast LoggedNum LogsActive
{$tool_group_user_list[user].user_id}{$tool_group_user_list[user].user_name}{$tool_group_user_list[user].user_created|date_format:"%Y/%m/%d %H:%M:%S"}{$tool_group_user_list[user].user_logged_last|date_format:"%Y/%m/%d %H:%M:%S"}never{$tool_group_user_list[user].user_logged_count}{if $tool_group_user_list[user].user_active == 1}Yes{else}No{/if}
-{/if} - -
- - - - - -{if $tool_group_edit_data.group_id} - - - - -{/if} - - - - - - - - - - - - - - - - - - - - - -
Group Details
Id :
Name :
Level : - -
Default : - -
Active : - -
  - -{if $tool_group_edit_data.group_id} - - -{else} - - -{/if} - -
- -{if $tool_group_edit_data.group_id} - -
- - - - - - - - - - - - - - -
Default Domain
Domains : - -
  - - -
- -{if $tool_group_edit_data.group_default_domain_id > 0} -
- - - - - - - - - - - - - - -
Default Shard
Shards : - -
  - - -
-{/if} - -
- - - - - - - - - - - - - - -
Default Application
Application : - -
  - - -
- -
- - - - - - - - - - - - - - -
Application Access
Applications : - -
  - - -
- -
- - - - - - - - - - - - - - -
Domain Access
Domains : - -
  - - -
- -
- - - - - - - - - - - - - - -
Shard Access
Shards : - -
  - - -
- -{/if} - -
- -{include file="page_footer.tpl"} + +{include file="page_header.tpl"} + + + + + + +
{$tool_alert_message} + + + {section name=onemenu loop=$tool_menu} + + {/section} + +
{$tool_menu[onemenu].title}
+
+ +
+ + + + + + + + + +
+ + + + + + + + + + + +{section name=group loop=$tool_group_list} +{cycle assign="trclass" values="row1,row0"} + + + + + + + +{/section} +
Groups
IDNameLevelDefaultActive
{$tool_group_list[group].group_id}{$tool_group_list[group].group_name}{$tool_group_list[group].group_level_name}{if $tool_group_list[group].group_default == 1}Yes{else}No{/if}{if $tool_group_list[group].group_active == 1}Yes{else}No{/if}
+ +{if $tool_group_user_list} +
+ + + + + + + + + + + + + +{section name=user loop=$tool_group_user_list} +{cycle assign="trclass2" values="row1,row0"} + + + + +{if $tool_group_user_list[user].user_logged_last > 0} + +{else} + +{/if} + + + +{/section} +
Accounts
IDLoginCreatedLast LoggedNum LogsActive
{$tool_group_user_list[user].user_id}{$tool_group_user_list[user].user_name}{$tool_group_user_list[user].user_created|date_format:"%Y/%m/%d %H:%M:%S"}{$tool_group_user_list[user].user_logged_last|date_format:"%Y/%m/%d %H:%M:%S"}never{$tool_group_user_list[user].user_logged_count}{if $tool_group_user_list[user].user_active == 1}Yes{else}No{/if}
+{/if} + +
+ + + + + +{if $tool_group_edit_data.group_id} + + + + +{/if} + + + + + + + + + + + + + + + + + + + + + +
Group Details
Id :
Name :
Level : + +
Default : + +
Active : + +
  + +{if $tool_group_edit_data.group_id} + + +{else} + + +{/if} + +
+ +{if $tool_group_edit_data.group_id} + +
+ + + + + + + + + + + + + + +
Default Domain
Domains : + +
  + + +
+ +{if $tool_group_edit_data.group_default_domain_id > 0} +
+ + + + + + + + + + + + + + +
Default Shard
Shards : + +
  + + +
+{/if} + +
+ + + + + + + + + + + + + + +
Default Application
Application : + +
  + + +
+ +
+ + + + + + + + + + + + + + +
Application Access
Applications : + +
  + + +
+ +
+ + + + + + + + + + + + + + +
Domain Access
Domains : + +
  + + +
+ +
+ + + + + + + + + + + + + + +
Shard Access
Shards : + +
  + + +
+ +{/if} + +
+ +{include file="page_footer.tpl"} diff --git a/code/web/public_php/admin/templates/default/tool_administration_logs.tpl b/code/web/public_php/admin/templates/default/tool_administration_logs.tpl index a2f537a8e..b44d3719b 100644 --- a/code/web/public_php/admin/templates/default/tool_administration_logs.tpl +++ b/code/web/public_php/admin/templates/default/tool_administration_logs.tpl @@ -1,56 +1,56 @@ - -{include file="page_header.tpl"} - - - - - - -
{$tool_alert_message} - - - {section name=onemenu loop=$tool_menu} - - {/section} - -
{$tool_menu[onemenu].title}
-
- -
- - - - - -
- - - - - - - - - - -{section name=log loop=$tool_log_list} - - - - - - -{/section} - - - -
Logs
IDUserDateAction
{$tool_log_list[log].logs_id}{$tool_log_list[log].logs_user_name}{$tool_log_list[log].logs_date|date_format:"%Y/%m/%d %H:%M:%S"}{$tool_log_list[log].logs_data}
-|<    -<    -Page {$tool_log_page_current} / {$tool_log_page_total}    ->    ->| -
-
- -{include file="page_footer.tpl"} + +{include file="page_header.tpl"} + + + + + + +
{$tool_alert_message} + + + {section name=onemenu loop=$tool_menu} + + {/section} + +
{$tool_menu[onemenu].title}
+
+ +
+ + + + + +
+ + + + + + + + + + +{section name=log loop=$tool_log_list} + + + + + + +{/section} + + + +
Logs
IDUserDateAction
{$tool_log_list[log].logs_id}{$tool_log_list[log].logs_user_name}{$tool_log_list[log].logs_date|date_format:"%Y/%m/%d %H:%M:%S"}{$tool_log_list[log].logs_data}
+|<    +<    +Page {$tool_log_page_current} / {$tool_log_page_total}    +>    +>| +
+
+ +{include file="page_footer.tpl"} diff --git a/code/web/public_php/admin/templates/default/tool_administration_restarts.tpl b/code/web/public_php/admin/templates/default/tool_administration_restarts.tpl index 37e856f09..d31e4a65e 100644 --- a/code/web/public_php/admin/templates/default/tool_administration_restarts.tpl +++ b/code/web/public_php/admin/templates/default/tool_administration_restarts.tpl @@ -1,172 +1,172 @@ - -{include file="page_header.tpl"} - - - - - - -
{$tool_alert_message} - - - {section name=onemenu loop=$tool_menu} - - {/section} - -
{$tool_menu[onemenu].title}
-
- -
- - - - - - - - - -
- - - - - - - - - - -{section name=restart loop=$tool_restart_list} -{cycle assign="trclass" values="row1,row0"} - - - - - - -{/section} -
Restart Groups
IDNameListOrder
{$tool_restart_list[restart].restart_group_id}{$tool_restart_list[restart].restart_group_name}{$tool_restart_list[restart].restart_group_list}{$tool_restart_list[restart].restart_group_order}
-
- - - - - -{if $tool_restart_edit_data.restart_group_id} - - - - -{/if} - - - - - - - - - - - - - - - - - -
Restart Group Details
Id :
Name :
Services :
Order :
  - -{if $tool_restart_edit_data.restart_group_id} - - -{else} - - -{/if} - -
-
- -
- - - - - - - - - -
- - - - - - - - - - -{section name=msg loop=$tool_message_list} -{cycle assign="trclass" values="row1,row0"} - - - - - - -{/section} -
Restart Messages
IDLanguageNameValue
{$tool_message_list[msg].restart_message_id}{$tool_message_list[msg].restart_message_lang}{$tool_message_list[msg].restart_message_name}{$tool_message_list[msg].restart_message_value}
-
- - - - - -{if $tool_message_edit_data.restart_message_id} - - - - -{/if} - - - - - - - - - - - - - - - - - -
Restart Message Details
Id :
Name :
Value :
Language : - -
  - -{if $tool_message_edit_data.restart_message_id } - - -{else} - - -{/if} - -
-
- - -{include file="page_footer.tpl"} + +{include file="page_header.tpl"} + + + + + + +
{$tool_alert_message} + + + {section name=onemenu loop=$tool_menu} + + {/section} + +
{$tool_menu[onemenu].title}
+
+ +
+ + + + + + + + + +
+ + + + + + + + + + +{section name=restart loop=$tool_restart_list} +{cycle assign="trclass" values="row1,row0"} + + + + + + +{/section} +
Restart Groups
IDNameListOrder
{$tool_restart_list[restart].restart_group_id}{$tool_restart_list[restart].restart_group_name}{$tool_restart_list[restart].restart_group_list}{$tool_restart_list[restart].restart_group_order}
+
+ + + + + +{if $tool_restart_edit_data.restart_group_id} + + + + +{/if} + + + + + + + + + + + + + + + + + +
Restart Group Details
Id :
Name :
Services :
Order :
  + +{if $tool_restart_edit_data.restart_group_id} + + +{else} + + +{/if} + +
+
+ +
+ + + + + + + + + +
+ + + + + + + + + + +{section name=msg loop=$tool_message_list} +{cycle assign="trclass" values="row1,row0"} + + + + + + +{/section} +
Restart Messages
IDLanguageNameValue
{$tool_message_list[msg].restart_message_id}{$tool_message_list[msg].restart_message_lang}{$tool_message_list[msg].restart_message_name}{$tool_message_list[msg].restart_message_value}
+
+ + + + + +{if $tool_message_edit_data.restart_message_id} + + + + +{/if} + + + + + + + + + + + + + + + + + +
Restart Message Details
Id :
Name :
Value :
Language : + +
  + +{if $tool_message_edit_data.restart_message_id } + + +{else} + + +{/if} + +
+
+ + +{include file="page_footer.tpl"} diff --git a/code/web/public_php/admin/templates/default/tool_administration_shards.tpl b/code/web/public_php/admin/templates/default/tool_administration_shards.tpl index c5ebdc00f..03ceb06b9 100644 --- a/code/web/public_php/admin/templates/default/tool_administration_shards.tpl +++ b/code/web/public_php/admin/templates/default/tool_administration_shards.tpl @@ -1,110 +1,110 @@ - -{include file="page_header.tpl"} - - - - - - -
{$tool_alert_message} - - - {section name=onemenu loop=$tool_menu} - - {/section} - -
{$tool_menu[onemenu].title}
-
- -
- - - - - - - - - -
- - - - - - - - - - - -{section name=shard loop=$tool_shard_list} -{cycle assign="trclass" values="row1,row0"} - - - - - - - -{/section} -
Shards
IDNameShard IDDomainLanguage
{$tool_shard_list[shard].shard_id}{$tool_shard_list[shard].shard_name}{$tool_shard_list[shard].shard_as_id}{$tool_shard_list[shard].domain_name}{$tool_shard_list[shard].shard_lang}
-
- - - - - -{if $tool_shard_edit_data.shard_id} - - - - -{/if} - - - - - - - - - - - - - - - - - - - - - -
Shard Details
Id :
Name :
Shard ID :
Domain : - -
Language : - -
  - -{if $tool_shard_edit_data.shard_id} - - -{else} - - -{/if} - -
-
- -{include file="page_footer.tpl"} + +{include file="page_header.tpl"} + + + + + + +
{$tool_alert_message} + + + {section name=onemenu loop=$tool_menu} + + {/section} + +
{$tool_menu[onemenu].title}
+
+ +
+ + + + + + + + + +
+ + + + + + + + + + + +{section name=shard loop=$tool_shard_list} +{cycle assign="trclass" values="row1,row0"} + + + + + + + +{/section} +
Shards
IDNameShard IDDomainLanguage
{$tool_shard_list[shard].shard_id}{$tool_shard_list[shard].shard_name}{$tool_shard_list[shard].shard_as_id}{$tool_shard_list[shard].domain_name}{$tool_shard_list[shard].shard_lang}
+
+ + + + + +{if $tool_shard_edit_data.shard_id} + + + + +{/if} + + + + + + + + + + + + + + + + + + + + + +
Shard Details
Id :
Name :
Shard ID :
Domain : + +
Language : + +
  + +{if $tool_shard_edit_data.shard_id} + + +{else} + + +{/if} + +
+
+ +{include file="page_footer.tpl"} diff --git a/code/web/public_php/admin/templates/default/tool_administration_users.tpl b/code/web/public_php/admin/templates/default/tool_administration_users.tpl index d2d81a85b..5950d21ca 100644 --- a/code/web/public_php/admin/templates/default/tool_administration_users.tpl +++ b/code/web/public_php/admin/templates/default/tool_administration_users.tpl @@ -1,207 +1,207 @@ - -{include file="page_header.tpl"} - - - - - - -
{$tool_alert_message} - - - {section name=onemenu loop=$tool_menu} - - {/section} - -
{$tool_menu[onemenu].title}
-
- -
- - - - - - - - - -
- - - - - - - - - - - - - -{section name=user loop=$tool_user_list} -{cycle assign="trclass" values="row1,row0"} - - - - - -{if $tool_user_list[user].user_logged_last > 0} - -{else} - -{/if} - - - -{/section} -
Accounts
IDLoginGroupCreatedLast LoggedNum LogsActive
{$tool_user_list[user].user_id}{$tool_user_list[user].user_name}{$tool_user_list[user].user_group_name}{$tool_user_list[user].user_created|date_format:"%Y/%m/%d %H:%M:%S"}{$tool_user_list[user].user_logged_last|date_format:"%Y/%m/%d %H:%M:%S"}never{$tool_user_list[user].user_logged_count}{if $tool_user_list[user].user_active == 1}Yes{else}No{/if}
-
- - - - - -{if $tool_user_edit_data.user_id} - - - - -{/if} - - - - - - - - - - - - - - - - - - - - - -
Account Details
Id :
Name :
Password :
Group : - -
Active : - -
  - -{if $tool_user_edit_data.user_id} - - -{else} - - -{/if} - -
- -{if $tool_user_edit_data.user_id} - -
- - - - - - - - - - - - - - -
Application Access
Applications : - -
  - - -
- -
- - - - - - - - - - - - - - -
Domain Access
Domains : - -
  - - -
- -
- - - - - - - - - - - - - - -
Shard Access {if $tool_domain_list[domain].domain_disabled}(group){/if}
Shards : - -
  - - {* *} - -
- -{/if} - -
- -{include file="page_footer.tpl"} + +{include file="page_header.tpl"} + + + + + + +
{$tool_alert_message} + + + {section name=onemenu loop=$tool_menu} + + {/section} + +
{$tool_menu[onemenu].title}
+
+ +
+ + + + + + + + + +
+ + + + + + + + + + + + + +{section name=user loop=$tool_user_list} +{cycle assign="trclass" values="row1,row0"} + + + + + +{if $tool_user_list[user].user_logged_last > 0} + +{else} + +{/if} + + + +{/section} +
Accounts
IDLoginGroupCreatedLast LoggedNum LogsActive
{$tool_user_list[user].user_id}{$tool_user_list[user].user_name}{$tool_user_list[user].user_group_name}{$tool_user_list[user].user_created|date_format:"%Y/%m/%d %H:%M:%S"}{$tool_user_list[user].user_logged_last|date_format:"%Y/%m/%d %H:%M:%S"}never{$tool_user_list[user].user_logged_count}{if $tool_user_list[user].user_active == 1}Yes{else}No{/if}
+
+ + + + + +{if $tool_user_edit_data.user_id} + + + + +{/if} + + + + + + + + + + + + + + + + + + + + + +
Account Details
Id :
Name :
Password :
Group : + +
Active : + +
  + +{if $tool_user_edit_data.user_id} + + +{else} + + +{/if} + +
+ +{if $tool_user_edit_data.user_id} + +
+ + + + + + + + + + + + + + +
Application Access
Applications : + +
  + + +
+ +
+ + + + + + + + + + + + + + +
Domain Access
Domains : + +
  + + +
+ +
+ + + + + + + + + + + + + + +
Shard Access {if $tool_domain_list[domain].domain_disabled}(group){/if}
Shards : + +
  + + {* *} + +
+ +{/if} + +
+ +{include file="page_footer.tpl"} diff --git a/code/web/public_php/admin/templates/default/tool_graphs.tpl b/code/web/public_php/admin/templates/default/tool_graphs.tpl index 24e2d4eaa..9dcd896a5 100644 --- a/code/web/public_php/admin/templates/default/tool_graphs.tpl +++ b/code/web/public_php/admin/templates/default/tool_graphs.tpl @@ -1,274 +1,274 @@ - -{include file="page_header.tpl"} - -{literal} - -{/literal} - - - - - -
- - - {section name=onemenu loop=$tool_menu} - - {/section} - -
{$tool_menu[onemenu].title}
-
- -
- - - - - - - - - -
- -{if $tool_domain_selected && $tool_shard_selected} - - - - - - - - -{if $tool_refresh_rate > 0} - - - -{/if} - -
Refresh
- -
- - -
-
-{/if} - - - - - -{section name=domain loop=$tool_domain_list} - - - -{/section} -
Domains
{$tool_domain_list[domain].domain_name}
- -{if $tool_domain_selected} -
- - - - -{section name=shard loop=$tool_shard_list} -{if $tool_domain_selected == $tool_shard_list[shard].shard_domain_id} - - - -{/if} -{/section} -
Shards
{$tool_shard_list[shard].shard_name}
- -{if $tool_frame_list} - -{/if} - -{if $tool_graph_list} -
- - - - -{section name=gvar loop=$tool_graph_variables} - - - - - -{assign var="var_name" value=$tool_graph_variables[gvar]} -{section name=gdata loop=$tool_graph_datas.$var_name} - - - - - -{/section} -{/section} -
Graphs
{$tool_graph_variables[gvar]}High
{$tool_graph_datas.$var_name[gdata].service}{if $tool_graph_datas.$var_name[gdata].high_file != ''}Yes{else}No{/if}
-{/if} - -{/if} - -
  - -{if $tool_domain_error} - - - - -
{$tool_domain_error}
-{elseif !$tool_domain_selected} - - - - -
You need to select a domain.
-{else} -{if $tool_as_error} - - - - -
{$tool_as_error}
-
-{/if} - - - - - -
-{if $tool_rrd_output} -{section name=rrd loop=$tool_rrd_output} - {$tool_rrd_output[rrd].desc}
-
-{/section} -{/if} -
-{if $tool_rrd_high_output} -{section name=rrd loop=$tool_rrd_high_output} - {$tool_rrd_high_output[rrd].desc}
-{if $tool_rrd_high_output[rrd].img != ''} -
-{/if} -{/section} -{/if} -
-{/if} - -
- - -{include file="page_footer.tpl"} + +{include file="page_header.tpl"} + +{literal} + +{/literal} + + + + + +
+ + + {section name=onemenu loop=$tool_menu} + + {/section} + +
{$tool_menu[onemenu].title}
+
+ +
+ + + + + + + + + +
+ +{if $tool_domain_selected && $tool_shard_selected} + + + + + + + + +{if $tool_refresh_rate > 0} + + + +{/if} + +
Refresh
+ +
+ + +
+
+{/if} + + + + + +{section name=domain loop=$tool_domain_list} + + + +{/section} +
Domains
{$tool_domain_list[domain].domain_name}
+ +{if $tool_domain_selected} +
+ + + + +{section name=shard loop=$tool_shard_list} +{if $tool_domain_selected == $tool_shard_list[shard].shard_domain_id} + + + +{/if} +{/section} +
Shards
{$tool_shard_list[shard].shard_name}
+ +{if $tool_frame_list} + +{/if} + +{if $tool_graph_list} +
+ + + + +{section name=gvar loop=$tool_graph_variables} + + + + + +{assign var="var_name" value=$tool_graph_variables[gvar]} +{section name=gdata loop=$tool_graph_datas.$var_name} + + + + + +{/section} +{/section} +
Graphs
{$tool_graph_variables[gvar]}High
{$tool_graph_datas.$var_name[gdata].service}{if $tool_graph_datas.$var_name[gdata].high_file != ''}Yes{else}No{/if}
+{/if} + +{/if} + +
  + +{if $tool_domain_error} + + + + +
{$tool_domain_error}
+{elseif !$tool_domain_selected} + + + + +
You need to select a domain.
+{else} +{if $tool_as_error} + + + + +
{$tool_as_error}
+
+{/if} + + + + + +
+{if $tool_rrd_output} +{section name=rrd loop=$tool_rrd_output} + {$tool_rrd_output[rrd].desc}
+
+{/section} +{/if} +
+{if $tool_rrd_high_output} +{section name=rrd loop=$tool_rrd_high_output} + {$tool_rrd_high_output[rrd].desc}
+{if $tool_rrd_high_output[rrd].img != ''} +
+{/if} +{/section} +{/if} +
+{/if} + +
+ + +{include file="page_footer.tpl"} diff --git a/code/web/public_php/admin/templates/default/tool_graphs_ccu.tpl b/code/web/public_php/admin/templates/default/tool_graphs_ccu.tpl index db9051058..2a9cf3f21 100644 --- a/code/web/public_php/admin/templates/default/tool_graphs_ccu.tpl +++ b/code/web/public_php/admin/templates/default/tool_graphs_ccu.tpl @@ -1,230 +1,230 @@ - -{include file="page_header.tpl"} - -{literal} - -{/literal} - - - - - -
- - - {section name=onemenu loop=$tool_menu} - - {/section} - -
{$tool_menu[onemenu].title}
-
- -
- - - - - - - - - -
- -{if $tool_domain_selected && $tool_frame_selected} - - - - - - - - -{if $tool_refresh_rate > 0} - - - -{/if} - -
Refresh
- -
- - -
-
-{/if} - - - - - -{section name=domain loop=$tool_domain_list} - - - -{/section} -
Domains
{$tool_domain_list[domain].domain_name}
- -{if $tool_domain_selected} -
- - - - -{section name=frame loop=$tool_frame_list} - - - -{/section} -
Time Frame
{$tool_frame_list[frame].title}
- -{/if} - -
  - -{if $tool_domain_error} - - - - -
{$tool_domain_error}
-{elseif !$tool_domain_selected} - - - - -
You need to select a domain.
-{elseif !$tool_frame_selected} - - - - -
You need to select a time frame.
-{else} -{if $tool_as_error} - - - - -
{$tool_as_error}
-
-{/if} - - - - -
-{if $tool_rrd_output} -{section name=rrd loop=$tool_rrd_output} - {$tool_rrd_output[rrd].desc}
-
-{/section} -{/if} -
-{/if} - -
- - -{include file="page_footer.tpl"} + +{include file="page_header.tpl"} + +{literal} + +{/literal} + + + + + +
+ + + {section name=onemenu loop=$tool_menu} + + {/section} + +
{$tool_menu[onemenu].title}
+
+ +
+ + + + + + + + + +
+ +{if $tool_domain_selected && $tool_frame_selected} + + + + + + + + +{if $tool_refresh_rate > 0} + + + +{/if} + +
Refresh
+ +
+ + +
+
+{/if} + + + + + +{section name=domain loop=$tool_domain_list} + + + +{/section} +
Domains
{$tool_domain_list[domain].domain_name}
+ +{if $tool_domain_selected} +
+ + + + +{section name=frame loop=$tool_frame_list} + + + +{/section} +
Time Frame
{$tool_frame_list[frame].title}
+ +{/if} + +
  + +{if $tool_domain_error} + + + + +
{$tool_domain_error}
+{elseif !$tool_domain_selected} + + + + +
You need to select a domain.
+{elseif !$tool_frame_selected} + + + + +
You need to select a time frame.
+{else} +{if $tool_as_error} + + + + +
{$tool_as_error}
+
+{/if} + + + + +
+{if $tool_rrd_output} +{section name=rrd loop=$tool_rrd_output} + {$tool_rrd_output[rrd].desc}
+
+{/section} +{/if} +
+{/if} + +
+ + +{include file="page_footer.tpl"} diff --git a/code/web/public_php/admin/templates/default/tool_graphs_hires.tpl b/code/web/public_php/admin/templates/default/tool_graphs_hires.tpl index 67288ac95..54d784934 100644 --- a/code/web/public_php/admin/templates/default/tool_graphs_hires.tpl +++ b/code/web/public_php/admin/templates/default/tool_graphs_hires.tpl @@ -1,252 +1,252 @@ - -{include file="page_header.tpl"} - -{literal} - -{/literal} - - - - - -
- - - {section name=onemenu loop=$tool_menu} - - {/section} - -
{$tool_menu[onemenu].title}
-
- -
- - - - - - - - - -
- -{if $tool_domain_selected && $tool_shard_selected && $tool_frame_selected} - - - - - - - - -{if $tool_refresh_rate > 0} - - - -{/if} - -
Refresh
- -
- - -
-
-{/if} - - - - - -{section name=domain loop=$tool_domain_list} - - - -{/section} -
Domains
{$tool_domain_list[domain].domain_name}
- -{if $tool_domain_selected} -
- - - - -{section name=shard loop=$tool_shard_list} -{if $tool_domain_selected == $tool_shard_list[shard].shard_domain_id} - - - -{/if} -{/section} -
Shards
{$tool_shard_list[shard].shard_name}
- -
- - - - -{section name=frame loop=$tool_frame_list} - - - -{/section} -
Time Frame
{$tool_frame_list[frame].title}
- -{/if} - -
  - -{if $tool_domain_error} - - - - -
{$tool_domain_error}
-{elseif !$tool_domain_selected} - - - - -
You need to select a domain.
-{elseif !$tool_shard_selected} - - - - -
You need to select a shard.
-{elseif !$tool_frame_selected} - - - - -
You need to select a time frame.
-{else} -{if $tool_as_error} - - - - -
{$tool_as_error}
-
-{/if} - - - - -
-{if $tool_rrd_high_output} -{section name=rrd loop=$tool_rrd_high_output} - {$tool_rrd_high_output[rrd].desc}
-{if $tool_rrd_high_output[rrd].img != ''} -
-{/if} -{/section} -{/if} -
-{/if} - -
- - -{include file="page_footer.tpl"} + +{include file="page_header.tpl"} + +{literal} + +{/literal} + + + + + +
+ + + {section name=onemenu loop=$tool_menu} + + {/section} + +
{$tool_menu[onemenu].title}
+
+ +
+ + + + + + + + + +
+ +{if $tool_domain_selected && $tool_shard_selected && $tool_frame_selected} + + + + + + + + +{if $tool_refresh_rate > 0} + + + +{/if} + +
Refresh
+ +
+ + +
+
+{/if} + + + + + +{section name=domain loop=$tool_domain_list} + + + +{/section} +
Domains
{$tool_domain_list[domain].domain_name}
+ +{if $tool_domain_selected} +
+ + + + +{section name=shard loop=$tool_shard_list} +{if $tool_domain_selected == $tool_shard_list[shard].shard_domain_id} + + + +{/if} +{/section} +
Shards
{$tool_shard_list[shard].shard_name}
+ +
+ + + + +{section name=frame loop=$tool_frame_list} + + + +{/section} +
Time Frame
{$tool_frame_list[frame].title}
+ +{/if} + +
  + +{if $tool_domain_error} + + + + +
{$tool_domain_error}
+{elseif !$tool_domain_selected} + + + + +
You need to select a domain.
+{elseif !$tool_shard_selected} + + + + +
You need to select a shard.
+{elseif !$tool_frame_selected} + + + + +
You need to select a time frame.
+{else} +{if $tool_as_error} + + + + +
{$tool_as_error}
+
+{/if} + + + + +
+{if $tool_rrd_high_output} +{section name=rrd loop=$tool_rrd_high_output} + {$tool_rrd_high_output[rrd].desc}
+{if $tool_rrd_high_output[rrd].img != ''} +
+{/if} +{/section} +{/if} +
+{/if} + +
+ + +{include file="page_footer.tpl"} diff --git a/code/web/public_php/admin/templates/default/tool_graphs_tech.tpl b/code/web/public_php/admin/templates/default/tool_graphs_tech.tpl index c1c96d189..79299b7ab 100644 --- a/code/web/public_php/admin/templates/default/tool_graphs_tech.tpl +++ b/code/web/public_php/admin/templates/default/tool_graphs_tech.tpl @@ -1,250 +1,250 @@ - -{include file="page_header.tpl"} - -{literal} - -{/literal} - - - - - -
- - - {section name=onemenu loop=$tool_menu} - - {/section} - -
{$tool_menu[onemenu].title}
-
- -
- - - - - - - - - -
- -{if $tool_domain_selected && $tool_shard_selected && $tool_frame_selected} - - - - - - - - -{if $tool_refresh_rate > 0} - - - -{/if} - -
Refresh
- -
- - -
-
-{/if} - - - - - -{section name=domain loop=$tool_domain_list} - - - -{/section} -
Domains
{$tool_domain_list[domain].domain_name}
- -{if $tool_domain_selected} -
- - - - -{section name=shard loop=$tool_shard_list} -{if $tool_domain_selected == $tool_shard_list[shard].shard_domain_id} - - - -{/if} -{/section} -
Shards
{$tool_shard_list[shard].shard_name}
- -
- - - - -{section name=frame loop=$tool_frame_list} - - - -{/section} -
Time Frame
{$tool_frame_list[frame].title}
- -{/if} - -
  - -{if $tool_domain_error} - - - - -
{$tool_domain_error}
-{elseif !$tool_domain_selected} - - - - -
You need to select a domain.
-{elseif !$tool_shard_selected} - - - - -
You need to select a shard.
-{elseif !$tool_frame_selected} - - - - -
You need to select a time frame.
-{else} -{if $tool_as_error} - - - - -
{$tool_as_error}
-
-{/if} - - - - -
-{if $tool_rrd_output} -{section name=rrd loop=$tool_rrd_output} - {$tool_rrd_output[rrd].desc}
-
-{/section} -{/if} -
-{/if} - -
- - -{include file="page_footer.tpl"} + +{include file="page_header.tpl"} + +{literal} + +{/literal} + + + + + +
+ + + {section name=onemenu loop=$tool_menu} + + {/section} + +
{$tool_menu[onemenu].title}
+
+ +
+ + + + + + + + + +
+ +{if $tool_domain_selected && $tool_shard_selected && $tool_frame_selected} + + + + + + + + +{if $tool_refresh_rate > 0} + + + +{/if} + +
Refresh
+ +
+ + +
+
+{/if} + + + + + +{section name=domain loop=$tool_domain_list} + + + +{/section} +
Domains
{$tool_domain_list[domain].domain_name}
+ +{if $tool_domain_selected} +
+ + + + +{section name=shard loop=$tool_shard_list} +{if $tool_domain_selected == $tool_shard_list[shard].shard_domain_id} + + + +{/if} +{/section} +
Shards
{$tool_shard_list[shard].shard_name}
+ +
+ + + + +{section name=frame loop=$tool_frame_list} + + + +{/section} +
Time Frame
{$tool_frame_list[frame].title}
+ +{/if} + +
  + +{if $tool_domain_error} + + + + +
{$tool_domain_error}
+{elseif !$tool_domain_selected} + + + + +
You need to select a domain.
+{elseif !$tool_shard_selected} + + + + +
You need to select a shard.
+{elseif !$tool_frame_selected} + + + + +
You need to select a time frame.
+{else} +{if $tool_as_error} + + + + +
{$tool_as_error}
+
+{/if} + + + + +
+{if $tool_rrd_output} +{section name=rrd loop=$tool_rrd_output} + {$tool_rrd_output[rrd].desc}
+
+{/section} +{/if} +
+{/if} + +
+ + +{include file="page_footer.tpl"} diff --git a/code/web/public_php/admin/templates/default/tool_notes.tpl b/code/web/public_php/admin/templates/default/tool_notes.tpl index 56a35c4cf..e0e04106d 100644 --- a/code/web/public_php/admin/templates/default/tool_notes.tpl +++ b/code/web/public_php/admin/templates/default/tool_notes.tpl @@ -1,164 +1,164 @@ - -{include file="page_header.tpl"} - -{literal} - - - -{/literal} - - - - - -
{$tool_alert_message}
- -
- - - - - - - - - - -
- - - - - - - - - - -{if $restriction_tool_notes_global} - -{/if} - - {section name=note loop=$tool_note_list} - - - - - - -{if $restriction_tool_notes_global} - -{/if} - - {/section} -
Notes
IDTitleModeLast UpdateActiveGlobal
{$tool_note_list[note].note_id}{$tool_note_list[note].note_title}{if $tool_note_list[note].note_mode == 0}Text{else}Popup{/if}{$tool_note_list[note].note_date|date_format:"%Y/%m/%d %H:%M:%S"}{if $tool_note_list[note].note_active == 1}Yes{else}No{/if}{if $tool_note_list[note].note_global == 1}Yes{else}No{/if}
-
  - - - - - -{if $tool_note_edit_data.note_id} - - - - -{/if} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -{if $restriction_tool_notes_global} - - - - -{/if} - - - - - -
Notes Details
Id :
Title :
Mode :
Text :
URI :
Restriction :
Active : - -
Global : - -
  - -{if $tool_note_edit_data.note_id} - - -{else} - - -{/if} - -
-
- - -{include file="page_footer.tpl"} + +{include file="page_header.tpl"} + +{literal} + + + +{/literal} + + + + + +
{$tool_alert_message}
+ +
+ + + + + + + + + + +
+ + + + + + + + + + +{if $restriction_tool_notes_global} + +{/if} + + {section name=note loop=$tool_note_list} + + + + + + +{if $restriction_tool_notes_global} + +{/if} + + {/section} +
Notes
IDTitleModeLast UpdateActiveGlobal
{$tool_note_list[note].note_id}{$tool_note_list[note].note_title}{if $tool_note_list[note].note_mode == 0}Text{else}Popup{/if}{$tool_note_list[note].note_date|date_format:"%Y/%m/%d %H:%M:%S"}{if $tool_note_list[note].note_active == 1}Yes{else}No{/if}{if $tool_note_list[note].note_global == 1}Yes{else}No{/if}
+
  + + + + + +{if $tool_note_edit_data.note_id} + + + + +{/if} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +{if $restriction_tool_notes_global} + + + + +{/if} + + + + + +
Notes Details
Id :
Title :
Mode :
Text :
URI :
Restriction :
Active : + +
Global : + +
  + +{if $tool_note_edit_data.note_id} + + +{else} + + +{/if} + +
+
+ + +{include file="page_footer.tpl"} diff --git a/code/web/public_php/ams/templates/forgot_password.tpl b/code/web/public_php/ams/templates/forgot_password.tpl index 80bea346b..f6fae04d1 100644 --- a/code/web/public_php/ams/templates/forgot_password.tpl +++ b/code/web/public_php/ams/templates/forgot_password.tpl @@ -1,54 +1,54 @@ -{extends file="layout.tpl"} -{block name=content} - -
- -
- -
- -
-{/block} - - +{extends file="layout.tpl"} +{block name=content} + +
+ +
+ +
+ +
+{/block} + + diff --git a/code/web/public_php/ams/templates/layout.tpl b/code/web/public_php/ams/templates/layout.tpl index 33dbf3be0..7720ca65c 100644 --- a/code/web/public_php/ams/templates/layout.tpl +++ b/code/web/public_php/ams/templates/layout.tpl @@ -140,7 +140,7 @@ {if isset($smarty.get.page) and $smarty.get.page eq 'layout_plugin' and $smarty.get.name eq $arrkey} {include file=$hook_info[$smarty.get.name]['TemplatePath']} {/if} - {/foreach} + {/foreach} {/if} @@ -167,7 +167,7 @@
- {if $permission > 1}

AMS 0.11.0 Powered by: Charisma

{/if} + {if $permission > 1}

AMS 0.12.0 Powered by: Charisma

{/if}
{/if} diff --git a/code/web/public_php/ams/templates/register.tpl b/code/web/public_php/ams/templates/register.tpl index 24aac42a2..f14ef9a6c 100644 --- a/code/web/public_php/ams/templates/register.tpl +++ b/code/web/public_php/ams/templates/register.tpl @@ -1,124 +1,124 @@ -{extends file="layout.tpl"} -{block name=content} - -
- -
- -
- -
-{/block} - - +{extends file="layout.tpl"} +{block name=content} + +
+ +
+ +
+ +
+{/block} + + diff --git a/code/web/public_php/ams/templates/reset_password.tpl b/code/web/public_php/ams/templates/reset_password.tpl index 4c5bca351..57d0567ff 100644 --- a/code/web/public_php/ams/templates/reset_password.tpl +++ b/code/web/public_php/ams/templates/reset_password.tpl @@ -1,66 +1,66 @@ -{extends file="layout.tpl"} -{block name=content} - -
- -
- -
- -
-{/block} - - +{extends file="layout.tpl"} +{block name=content} + +
+ +
+ +
+ +
+{/block} + + diff --git a/code/web/public_php/ams/templates/settings.tpl b/code/web/public_php/ams/templates/settings.tpl index 94883c9de..0e04cab17 100644 --- a/code/web/public_php/ams/templates/settings.tpl +++ b/code/web/public_php/ams/templates/settings.tpl @@ -1,382 +1,382 @@ -{block name=content} -
-
-
-
- Change Password -
-
-
-
- Change Password - - {if !isset($changesOther) or $changesOther eq "FALSE"} -
- -
-
- - - {if isset($MATCH_ERROR) and $MATCH_ERROR eq "TRUE"}The password is incorrect{/if} -
-
-
- {/if} -
- -
-
- - - {if isset($NEWPASSWORD_ERROR) and $NEWPASSWORD_ERROR eq "TRUE"}{$newpass_error_message}{/if} -
-
-
- -
- -
-
- - - {if isset($CNEWPASSWORD_ERROR) and $CNEWPASSWORD_ERROR eq "TRUE"}{$confirmnewpass_error_message}{/if} -
-
-
- - - - {if isset($SUCCESS_PASS) and $SUCCESS_PASS eq "OK"} -
- The password has been changed! -
- {/if} - - {if isset($SUCCESS_PASS) and $SUCCESS_PASS eq "SHARDOFF"} -
- The password has been changed, though the shard seems offline, it may take some time to see the change on the shard. -
- {/if} - - - -
- -
- -
-
-
-
-
-
-
- - {if $permission != '1'} -
-
-
- Add User -
-
-
-
- Add User - -
- -
-
- - - {if isset($USERNAME_ERROR) and $USERNAME_ERROR eq "TRUE"}{$USERNAME}{/if} -
-
-
- -
- -
-
- - - {if isset($PASSWORD_ERROR) and $PASSWORD_ERROR eq "TRUE"}{$PASSWORD}{/if} -
-
-
- -
- -
-
- - - {if isset($CPASSWORD_ERROR) and $CPASSWORD_ERROR eq "TRUE"}{$CPASSWORD}{/if} -
-
-
- -
- -
-
- - - {if isset($EMAIL_ERROR) and $EMAIL_ERROR eq "TRUE" and isset($do)}{$EMAIL}{/if} -
-
-
- - - {if isset($SUCCESS_ADD) and $SUCCESS_ADD eq "ok"} -
- The user has been created! -
- {/if} - - {if isset($SUCCESS_ADD) and $SUCCESS_ADD eq "shardoffline"} -
- The user is created, though the shard seems offline, it may take some time to see the change on the shard. -
- {/if} - - - -
- -
- -
-
-
-
-
-
-
- {/if} - -
-
-
- Change Email -
-
-
-
- Change Email -
- -
-
- - - {if isset($CEMAIL_ERROR) and $CEMAIL_ERROR eq "TRUE"}{$EMAIL}{/if} - -
-
-
- - - {if isset($SUCCESS_MAIL) and $SUCCESS_MAIL eq "OK"} -
- The email has been changed! -
- {/if} - - {if isset($SUCCESS_MAIL) and $SUCCESS_MAIL eq "SHARDOFF"} -
- The email has been changed, though the shard seems offline, it may take some time to see the change on the shard. -
- {/if} - - - -
- -
- -
-
-
-
-
-
-
- -
-
-
- Ticket updates -
- - -
-
-
- Ticket-Update Mail Settings - -
- -
- -
- -
- - - -
- -
- -
-
-
-
-
-
-
- -
-
-
- Change Info -
-
-
-
- Change Info - -
- -
-
- - -
-
-
- -
- -
-
- - -
-
-
- -
- -
- -
-
- -
- -
- -
- -
- -
-
- - {if isset($info_updated) and $info_updated eq "OK"} -
- The Info has been updated! -
- {/if} - - - -
- -
- -
-
-
-
-
-
-
- - {if $permission == '3'} -
-
-
- User Registration -
-
-
-
- User Registration - -
-
- -
- -
- -
- -
-
- - - -
- -
- -
-
-
-
-
-
-
- {/if} - -
- - - -{/block} - +{block name=content} +
+
+
+
+ Change Password +
+
+
+
+ Change Password + + {if !isset($changesOther) or $changesOther eq "FALSE"} +
+ +
+
+ + + {if isset($MATCH_ERROR) and $MATCH_ERROR eq "TRUE"}The password is incorrect{/if} +
+
+
+ {/if} +
+ +
+
+ + + {if isset($NEWPASSWORD_ERROR) and $NEWPASSWORD_ERROR eq "TRUE"}{$newpass_error_message}{/if} +
+
+
+ +
+ +
+
+ + + {if isset($CNEWPASSWORD_ERROR) and $CNEWPASSWORD_ERROR eq "TRUE"}{$confirmnewpass_error_message}{/if} +
+
+
+ + + + {if isset($SUCCESS_PASS) and $SUCCESS_PASS eq "OK"} +
+ The password has been changed! +
+ {/if} + + {if isset($SUCCESS_PASS) and $SUCCESS_PASS eq "SHARDOFF"} +
+ The password has been changed, though the shard seems offline, it may take some time to see the change on the shard. +
+ {/if} + + + +
+ +
+ +
+
+
+
+
+
+
+ + {if $permission != '1'} +
+
+
+ Add User +
+
+
+
+ Add User + +
+ +
+
+ + + {if isset($USERNAME_ERROR) and $USERNAME_ERROR eq "TRUE"}{$USERNAME}{/if} +
+
+
+ +
+ +
+
+ + + {if isset($PASSWORD_ERROR) and $PASSWORD_ERROR eq "TRUE"}{$PASSWORD}{/if} +
+
+
+ +
+ +
+
+ + + {if isset($CPASSWORD_ERROR) and $CPASSWORD_ERROR eq "TRUE"}{$CPASSWORD}{/if} +
+
+
+ +
+ +
+
+ + + {if isset($EMAIL_ERROR) and $EMAIL_ERROR eq "TRUE" and isset($do)}{$EMAIL}{/if} +
+
+
+ + + {if isset($SUCCESS_ADD) and $SUCCESS_ADD eq "ok"} +
+ The user has been created! +
+ {/if} + + {if isset($SUCCESS_ADD) and $SUCCESS_ADD eq "shardoffline"} +
+ The user is created, though the shard seems offline, it may take some time to see the change on the shard. +
+ {/if} + + + +
+ +
+ +
+
+
+
+
+
+
+ {/if} + +
+
+
+ Change Email +
+
+
+
+ Change Email +
+ +
+
+ + + {if isset($CEMAIL_ERROR) and $CEMAIL_ERROR eq "TRUE"}{$EMAIL}{/if} + +
+
+
+ + + {if isset($SUCCESS_MAIL) and $SUCCESS_MAIL eq "OK"} +
+ The email has been changed! +
+ {/if} + + {if isset($SUCCESS_MAIL) and $SUCCESS_MAIL eq "SHARDOFF"} +
+ The email has been changed, though the shard seems offline, it may take some time to see the change on the shard. +
+ {/if} + + + +
+ +
+ +
+
+
+
+
+
+
+ +
+
+
+ Ticket updates +
+ + +
+
+
+ Ticket-Update Mail Settings + +
+ +
+ +
+ +
+ + + +
+ +
+ +
+
+
+
+
+
+
+ +
+
+
+ Change Info +
+
+
+
+ Change Info + +
+ +
+
+ + +
+
+
+ +
+ +
+
+ + +
+
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+ +
+ +
+
+ + {if isset($info_updated) and $info_updated eq "OK"} +
+ The Info has been updated! +
+ {/if} + + + +
+ +
+ +
+
+
+
+
+
+
+ + {if $permission == '3'} +
+
+
+ User Registration +
+
+
+
+ User Registration + +
+
+ +
+ +
+ +
+ +
+
+ + + +
+ +
+ +
+
+
+
+
+
+
+ {/if} + +
+ + + +{/block} + diff --git a/code/web/public_php/crash_report/config.inc.php b/code/web/public_php/crash_report/config.inc.php new file mode 100644 index 000000000..fe4b3e928 --- /dev/null +++ b/code/web/public_php/crash_report/config.inc.php @@ -0,0 +1,30 @@ + +// +// 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 . + +class BugReportConfig +{ + static public $dbhost = "localhost"; + static public $dbport = "3306"; + static public $dbdb = "bugs"; + static public $dbuser = "bugs"; + static public $dbpw = "bugs"; +} + +?> diff --git a/code/web/public_php/crash_report/log.inc.php b/code/web/public_php/crash_report/log.inc.php new file mode 100644 index 000000000..71deee24f --- /dev/null +++ b/code/web/public_php/crash_report/log.inc.php @@ -0,0 +1,45 @@ + +// +// 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 . + +/// Simple file logger class +class Logger +{ + private $lf = NULL; + + function __construct() + { + $this->lf = fopen( 'log.txt', 'a' ); + if( $this->lf === FALSE ) + exit( 1 ); + } + + function __destruct() + { + fclose( $this->lf ); + } + + public function log( $msg ) + { + $date = date( "[M d, Y H:i:s] " ); + fwrite( $this->lf, $date . $msg . "\n" ); + } +} + +?> diff --git a/code/web/public_php/crash_report/submit.php b/code/web/public_php/crash_report/submit.php new file mode 100644 index 000000000..d20214d11 --- /dev/null +++ b/code/web/public_php/crash_report/submit.php @@ -0,0 +1,112 @@ + +// +// 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 . + +require_once( 'config.inc.php' ); +require_once( 'log.inc.php' ); + +/// Example web application that takes bug reports from the bug reporter Qt app +class BugReportGatherApp +{ + private $db = NULL; + private $logger = NULL; + + function __construct() + { + $this->logger = new Logger(); + } + + private function logPOSTVars() + { + $report = ""; + $descr = ""; + $email = ""; + + if( isset( $_POST[ 'report' ] ) ) + $report = $_POST[ 'report' ]; + + if( isset( $_POST[ 'descr' ] ) ) + $descr = $_POST[ 'descr' ]; + + if( isset( $_POST[ 'email' ] ) ) + $email = $_POST[ 'email' ]; + + $this->logger->log( 'report: ' . "\n" . $report ); + $this->logger->log( 'description: ' . "\n" . $descr ); + $this->logger->log( 'email: ' . "\n" . $email ); + } + + private function buildQuery() + { + $report = ""; + $descr = ""; + $email = ""; + + if( isset( $_POST[ 'report' ] ) ) + $report = $_POST[ 'report' ]; + + if( isset( $_POST[ 'descr' ] ) ) + $descr = $_POST[ 'descr' ]; + + if( isset( $_POST[ 'email' ] ) ) + $email = $_POST[ 'email' ]; + + $report = $this->db->real_escape_string( $report ); + $descr = $this->db->real_escape_string( $descr ); + $email = $this->db->real_escape_string( $email ); + + + $q = "INSERT INTO `bugs` (`report`,`description`,`email`) VALUES ("; + $q .= "'$report',"; + $q .= "'$descr',"; + $q .= "'$email')"; + + return $q; + } + + public function exec() + { + //$this->logPOSTVars(); + + $this->db = new mysqli( BugReportConfig::$dbhost, BugReportConfig::$dbuser, BugReportConfig::$dbpw, BugReportConfig::$dbdb, BugReportConfig::$dbport ); + if( mysqli_connect_error() ) + { + $this->logger->log( "Connection error :(" ); + $this->logger->log( mysqli_connect_error() ); + return; + } + + $q = $this->buildQuery(); + $result = $this->db->query( $q ); + if( $result !== TRUE ) + { + $this->logger->log( "Query failed :(" ); + $this->logger->log( 'Query: ' . $q ); + $this->logPOSTVars(); + } + + $this->db->close(); + } +} + + +$app = new BugReportGatherApp(); +$app->exec(); + +?> diff --git a/code/web/public_php/setup/database.php b/code/web/public_php/setup/database.php index 3e195f2b8..6137cb00f 100644 --- a/code/web/public_php/setup/database.php +++ b/code/web/public_php/setup/database.php @@ -6,7 +6,7 @@ $db_nel_tool = 2; // Support $db_nel_ams = 2; -$db_nel_ams_lib = 6; +$db_nel_ams_lib = 7; // Domain $db_ring_domain = 1; diff --git a/code/web/public_php/setup/install.php b/code/web/public_php/setup/install.php index 49fc0b3a7..438a5c332 100644 --- a/code/web/public_php/setup/install.php +++ b/code/web/public_php/setup/install.php @@ -42,6 +42,20 @@ require_once('setup/version.php'); $continue = false; } } + + if ($continue) { + try { + if (!in_array("mysql",PDO::getAvailableDrivers(),TRUE)) + { + throw new PDOException ("Cannot work without a proper database setting up"); + } + } + catch (PDOException $pdoEx) + { + printalert("danger", "PHP PDO seems to be missing the mysql driver"); + $continue = false; + } + } // Validate basics if ($continue) { diff --git a/dist/debian/precise/debian/changelog b/dist/debian/precise/debian/changelog new file mode 100644 index 000000000..943b56deb --- /dev/null +++ b/dist/debian/precise/debian/changelog @@ -0,0 +1,414 @@ +ryzom-core (0.8.2802~precise1) precise; urgency=low + + * New upstream release (revision 2802) + + -- Cédric OCHS Sun, 09 Dec 2012 14:19:29 +0100 + +ryzom-core (0.8.2801~precise1) precise; urgency=low + + * New upstream release (revision 2801) + + -- Cédric OCHS Sat, 08 Dec 2012 14:08:35 +0100 + +ryzom-core (0.8.2786~precise1) precise; urgency=low + + * New upstream release (revision 2786) + + -- Cédric OCHS Fri, 07 Dec 2012 17:18:02 +0100 + +ryzom-core (0.8.2691~precise1) precise; urgency=low + + * New upstream release (revision 2691) + + -- Cédric OCHS Sun, 07 Oct 2012 10:00:31 +0200 + +ryzom-core (0.8.2683~precise2) precise; urgency=low + + * New upstream release (revision 2683) + + -- Cédric OCHS Thu, 04 Oct 2012 10:11:23 +0200 + +ryzom-core (0.8.2683~precise1) precise; urgency=low + + * New upstream release (revision 2683) + + -- Cédric OCHS Wed, 03 Oct 2012 22:37:14 +0200 + +ryzom-core (0.8.2682~precise1) precise; urgency=low + + * New upstream release (revision 2682) + + -- Cédric OCHS Wed, 03 Oct 2012 19:02:23 +0200 + +ryzom-core (0.8.2681~precise2) precise; urgency=low + + * New upstream release (revision 2681) + + -- Cédric OCHS Tue, 02 Oct 2012 23:06:36 +0200 + +ryzom-core (0.8.2681~precise1) precise; urgency=low + + * New upstream release (revision 2681) + + -- Cédric OCHS Tue, 02 Oct 2012 17:19:25 +0200 + +ryzom-core (0.8.2025~precise1) precise; urgency=low + + * New upstream release (revision 2025) + + -- Cédric OCHS Sat, 10 Mar 2012 22:23:49 +0100 + +ryzom-core (0.8.2024~precise1) precise; urgency=low + + * New upstream release (revision 2024) + + -- Cédric OCHS Sat, 10 Mar 2012 11:16:08 +0100 + +ryzom-core (0.8.1847~natty1) natty; urgency=low + + * New upstream release (revision 1847) + + -- Cédric OCHS Mon, 17 Oct 2011 09:33:45 +0200 + +ryzom-core (0.8.1847~natty0) natty; urgency=low + + * New upstream release (revision 1847) + + -- Cédric OCHS Sun, 16 Oct 2011 18:45:27 +0200 + +ryzom-core (0.8.1758~natty0) natty; urgency=low + + * New upstream release (revision 1758) + + -- Cédric OCHS Tue, 16 Aug 2011 09:02:55 +0200 + +ryzom-core (0.8.1752~natty0) natty; urgency=low + + * New upstream release (revision 1752) + + -- Cédric OCHS Sun, 14 Aug 2011 16:07:29 +0200 + +ryzom-core (0.8.1751~natty0) natty; urgency=low + + * New upstream release (revision 1751) + + -- Cédric OCHS Sun, 14 Aug 2011 14:16:24 +0200 + +ryzom-core (0.8.1750~natty0) natty; urgency=low + + * New upstream release (revision 1750) + + -- Cédric OCHS Sun, 14 Aug 2011 12:30:18 +0200 + +ryzom-core (0.8.1744~natty0) natty; urgency=low + + * New upstream release (revision 1744) + + -- Cédric OCHS Sat, 13 Aug 2011 20:24:49 +0200 + +ryzom-core (0.8.1742~natty0) natty; urgency=low + + * New upstream release (revision 1742) + + -- Cédric OCHS Fri, 12 Aug 2011 18:11:07 +0200 + +ryzom-core (0.8.1628~natty0) natty; urgency=low + + * New upstream release (revision 1628) + + -- Cédric OCHS Fri, 17 Jun 2011 12:56:17 +0200 + +ryzom-core (0.8.1627~natty0) natty; urgency=low + + * New upstream release (revision 1627) + + -- Cédric OCHS Tue, 14 Jun 2011 20:37:05 +0200 + +ryzom-core (0.8.1611~natty0) natty; urgency=low + + * New upstream release (revision 1611) + + -- Cédric OCHS Wed, 08 Jun 2011 19:53:44 +0200 + +ryzom-core (0.8.1596~natty1) natty; urgency=low + + * New upstream release (revision 1596) + + -- Cédric OCHS Sat, 04 Jun 2011 18:11:45 +0200 + +ryzom-core (0.7.1406~natty0) natty; urgency=low + + * New upstream release (revision 1406) + + -- Kervala Sun, 13 Mar 2011 19:07:44 +0100 + +ryzom-core (0.7.1404~karmic0) karmic; urgency=low + + * New upstream release (revision 1404) + + -- Kervala Thu, 10 Mar 2011 20:13:35 +0100 + +ryzom-core (0.7.1122~karmic0) karmic; urgency=low + + * New upstream release (revision 1122) + + -- Kervala Thu, 25 Nov 2010 13:18:41 +0100 + +ryzom-core (0.7.992~karmic0) karmic; urgency=low + + * New upstream release (revision 992) + + -- Kervala Tue, 19 Oct 2010 13:44:23 +0200 + +ryzom-core (0.7.941~karmic0) karmic; urgency=low + + * New upstream release (revision 941) + + -- Kervala Sat, 16 Oct 2010 14:59:36 +0200 + +ryzom-core (0.7.933~karmic0) karmic; urgency=low + + * New upstream release (revision 933) + + -- Kervala Fri, 15 Oct 2010 22:29:44 +0200 + +ryzom-core (0.7.932~karmic0) karmic; urgency=low + + * New upstream release (revision 932) + + -- Kervala Fri, 15 Oct 2010 19:53:47 +0200 + +ryzom-core (0.7.666~karmic0) karmic; urgency=low + + * New upstream release (revision 666) + + -- Kervala Sun, 29 Aug 2010 17:56:06 +0200 + +ryzom-core (0.7.631~karmic0) karmic; urgency=low + + * New upstream release (revision 631) + + -- Kervala Thu, 12 Aug 2010 16:57:30 +0200 + +ryzom-core (0.7.614~lucid1) lucid; urgency=low + + * Fixed dependencies + + -- Kervala Sun, 08 Aug 2010 22:42:50 +0200 + +ryzom-core (0.7.614~lucid0) lucid; urgency=low + + * New upstream release (revision 614) + + -- Kervala Sun, 08 Aug 2010 21:53:00 +0200 + +ryzom-core (0.7.583~lucid1) lucid; urgency=low + + * Added dependency on libogg and libvorbis + + -- Kervala Sun, 01 Aug 2010 15:38:40 +0200 + +ryzom-core (0.7.583~lucid0) lucid; urgency=low + + * New upstream release (revision 583) + + -- Kervala Sun, 01 Aug 2010 14:43:28 +0200 + +ryzom-core (0.7.530~lucid0) lucid; urgency=low + + * New upstream release (revision 530) + + -- Kervala Sun, 25 Jul 2010 16:50:57 +0200 + +ryzom-core (0.7.519~lucid0) lucid; urgency=low + + * New upstream release (revision 519) + + -- Kervala Mon, 19 Jul 2010 22:24:05 +0200 + +ryzom-core (0.7.507~lucid0) lucid; urgency=low + + * New upstream release (revision 507) + + -- Kervala Sat, 17 Jul 2010 19:56:35 +0200 + +ryzom-core (0.7.474~lucid0) lucid; urgency=low + + * New upstream release (revision 474) + + -- Kervala Tue, 13 Jul 2010 08:56:24 +0200 + +ryzom-core (0.7.473~lucid1) lucid; urgency=low + + * Some fixes + + -- Kervala Mon, 12 Jul 2010 22:46:16 +0200 + +ryzom-core (0.7.473~lucid0) lucid; urgency=low + + * New upstream release (revision 473) + + -- Kervala Mon, 12 Jul 2010 22:04:30 +0200 + +ryzom-core (0.7.437~lucid1) lucid; urgency=low + + * Fixed drivers installation + + -- Kervala Thu, 08 Jul 2010 08:54:02 +0200 + +ryzom-core (0.7.437~lucid0) lucid; urgency=low + + * New upstream release (revision 437) + + -- Kervala Thu, 01 Jul 2010 20:07:14 +0200 + +ryzom-core (0.7.419~lucid0) lucid; urgency=low + + * New upstream release (revision 419) + + -- Kervala Sat, 26 Jun 2010 18:58:36 +0200 + +ryzom-core (0.7.411~lucid0) lucid; urgency=low + + * New upstream release (revision 411) + + -- Kervala Sat, 26 Jun 2010 11:00:47 +0200 + +ryzom-core (0.7.404~lucid1) lucid; urgency=low + + * Fix OpenAL driver + + -- Kervala Thu, 24 Jun 2010 23:06:51 +0200 + +ryzom-core (0.7.404~lucid0) lucid; urgency=low + + * New upstream release (revision 404) + + -- Kervala Thu, 24 Jun 2010 22:17:36 +0200 + +ryzom-core (0.7.394~lucid0) lucid; urgency=low + + * New upstream release (revision 394) + + -- Kervala Tue, 22 Jun 2010 06:53:15 +0200 + +ryzom-core (0.7.375~lucid0) lucid; urgency=low + + * New upstream release (revision 375) + + -- Kervala Wed, 16 Jun 2010 12:46:51 +0200 + +ryzom-core (0.7.371~lucid0) lucid; urgency=low + + * New upstream release (revision 371) + + -- Kervala Mon, 14 Jun 2010 22:48:27 +0200 + +ryzom-core (0.7.359~lucid0) lucid; urgency=low + + * New upstream release (revision 359) + + -- Kervala Sun, 13 Jun 2010 21:31:29 +0200 + +ryzom-core (0.7.350~lucid1) lucid; urgency=low + + * Fixes problem with "copy" files + + -- Kervala Sun, 13 Jun 2010 10:36:30 +0200 + +ryzom-core (0.7.350~lucid0) lucid; urgency=low + + * New upstream release (revision 350) + + -- Kervala Sun, 13 Jun 2010 09:55:38 +0200 + +ryzom-core (0.7.332~lucid0) lucid; urgency=low + + * New upstream release (revision 332) + + -- Kervala Sat, 12 Jun 2010 09:09:21 +0200 + +ryzom-core (0.7.317~lucid0) lucid; urgency=low + + * New upstream release (revision 317) + + -- Kervala Thu, 10 Jun 2010 13:11:28 +0200 + +ryzom-core (0.7.315~lucid0) lucid; urgency=low + + * Fixed pkg-config installation again + + -- Kervala Thu, 10 Jun 2010 08:19:44 +0200 + +ryzom-core (0.7.311~lucid2) lucid; urgency=low + + * Fixed pkg-config files + + -- Kervala Wed, 09 Jun 2010 22:58:15 +0200 + +ryzom-core (0.7.311~lucid1) lucid; urgency=low + + * Fixed dependencies versions + + -- Kervala Wed, 09 Jun 2010 22:27:00 +0200 + +ryzom-core (0.7.311~lucid0) lucid; urgency=low + + * New upstream version (revision 311). + + -- Kervala Wed, 09 Jun 2010 21:15:42 +0200 + +ryzom-core (0.7.304~lucid0) lucid; urgency=low + + * New upstream version (revision 304). + + -- Kervala Wed, 09 Jun 2010 08:34:10 +0200 + +ryzom-core (0.7.0-1) unstable; urgency=low + + [ Gürkan Sengün ] + * New upstream version. (Closes: #553248) + * Updated build dependencies. + + [ Michal Čihař ] + * Convert to dh with cmake support. + * Bump standards to 3.8.4. + + [ Luboš Novák ] + * Change maintainer to 'Debian Games Team' + * ftbfs_gcc_4.5.path: Fix build with g++-4.5. (Closes: #565104) + * Converted direct changes in source to patches. + * Enable building CEGUI renderer. + * Add package libnel-doc with documentation. + * debian/control + + Changed priority of libnel-dbg to extra. + + Remove duplicate Section in libnel0. + + Update short descriptions. + + Replace obsolete package xlibmesa-gl-dev with libgl1-mesa-dev + in build-depends. + + Add libpng-dev to build-depends. + + Remove libalut-dev from build-depends. + + New homepage. + + Supported architectures are i386 and amd64. + * debian/libnel-dev.dirs + + Remove empty dir usr/lib/nel. + * debian/copyright + + Update redistribution licence from GPL to GPL-2. + * debian/rules + + Disable building unit test, samples and tools. + + -- Luboš Novák Tue, 30 Mar 2010 10:29:23 +0100 + +ryzom-core (0.5.0-1.1) unstable; urgency=low + + * Non-maintainer upload. + * Change Build-Depends: libstlport5.2-dev. (Closes: #521762) + + -- Torsten Werner Sun, 28 Jun 2009 11:54:05 +0200 + +ryzom-core (0.5.0-1) unstable; urgency=low + + * Initial release. (Closes: #448067) + + -- Gürkan Sengün Tue, 23 Oct 2007 12:56:45 +0200 + diff --git a/dist/debian/precise/debian/client_default.cfg b/dist/debian/precise/debian/client_default.cfg new file mode 100644 index 000000000..d09cbbb9c --- /dev/null +++ b/dist/debian/precise/debian/client_default.cfg @@ -0,0 +1,567 @@ +////////////////////////// +////////////////////////// +/// CLIENT CONFIG FILE /// +////////////////////////// +////////////////////////// + + +// If you set this variable to 1, your client.cfg will be overwritten when you quit the client. +// You will loose all the comments and identation in this file. +SaveConfig = 1; + +/////////////////// +// WINDOW CONFIG // +/////////////////// + +Driver3D="Auto"; // Valid values are "Auto" or "0", "OpengGL" or "1" & "Direct3D" or "2" + // "Auto" will choose the best suited driver depending on hardware +FullScreen = 0; +Width = 1024; +Height = 768; +PositionX = 0; +PositionY = 0; +Frequency = 60; +Depth = 32; +Sleep = -1; +ProcessPriority = 0; // -2 = idle, -1 = below normal, 0 = normal, 1 = above normal, 2 = high, 3 = real time +Contrast = 0.0; // -1.0 ~ 1.0 +Luminosity = 0.0; // -1.0 ~ 1.0 +Gamma = 0.0; // -1.0 ~ 1.0 +Contrast_min = -1.0; +Luminosity_min = -1.0; +Gamma_min = -1.0; +Contrast_max = 1.0; +Luminosity_max = 1.0; +Gamma_max = 1.0; + + +///////////// +// NETWORK // +///////////// + +Application = { "ryzom_live", "./client_ryzom_r.exe", "./" }; +BackgroundDownloader = 0; +PatchServer = "http://dl.ryzom.com/patch_live"; +SignUpURL = "http://www.ryzom.com/subscribe"; +StartupHost = "shard.ryzom.com:40916"; +StartupPage = "/login/r2_login.php"; +InstallStatsUrl = "http://shard.ryzom.com:50000/stats/stats.php"; +CreateAccountURL = "https://secure.ryzom.com/signup/from_client.php"; +InstallWebPage = "http://dl.ryzom.com/installer/"; + + +//////////////// +// INTERFACES // +//////////////// + +// the language to use as in ISO 639-2 +LanguageCode = "en"; // english + +XMLInputFile = "input_config_v3.xml"; + +XMLLoginInterfaceFiles = { + "login_config.xml", + "login_widgets.xml", + "login_main.xml", + "login_keys.xml", +}; + +XMLOutGameInterfaceFiles = { + "out_v2_config.xml", + "out_v2_widgets.xml", + "out_v2_connect.xml", + "out_v2_intro.xml", + "out_v2_select.xml", + "out_v2_appear.xml", + "out_v2_location.xml", + "out_v2_crash.xml", + "out_v2_hierarchy.xml", + "out_v2_keys.xml", +}; + +// The ligo primitive class file +LigoPrimitiveClass = "world_editor_classes.xml"; + +VerboseLog = 1; + +/////////// +// MOUSE // +/////////// +HardwareCursor = 1; + +CursorSpeed = 1.0; // In pixels per mickey +CursorSpeed_min = 0.5; +CursorSpeed_max = 2.0; + +CursorAcceleration = 40; // Threshold in mickey +CursorAcceleration_min = 20; +CursorAcceleration_max = 80; + +FreeLookSpeed = 0.004; // In radian per mickey +FreeLookSpeed_min = 0.0001; +FreeLookSpeed_max = 0.01; + +FreeLookAcceleration = 40; // Threshold in mickey +FreeLookAcceleration_min = 20; +FreeLookAcceleration_max = 80; + +FreeLookInverted = 0; +AutomaticCamera = 0; +DblClickMode = 1; +AutoEquipTool = 1; + +/////////////////// +// RENDER CONFIG // +/////////////////// + +// NB: thoses variables configure also the InGameConfigurator: +// _min and _max define the bounds +// _step defines the step (NB: take care of _min and _max!!) +// _ps0 is the LOW preset, _ps1 is the MEDIUM preset, _ps2 is the NORMAL Preset, and _ps3 is the HIGH one + + +// *** LANDSCAPE +LandscapeTileNear = 150.000000; +LandscapeTileNear_min = 20.000000; +LandscapeTileNear_max = 250.000000; +LandscapeTileNear_step = 10.0; +LandscapeTileNear_ps0 = 20.0; +LandscapeTileNear_ps1 = 100.0; +LandscapeTileNear_ps2 = 150.0; +LandscapeTileNear_ps3 = 200.0; + +// NB: threshold is inverted ULandscape::setThreshold(), to be more intelligible +LandscapeThreshold = 2000.0; +LandscapeThreshold_min = 100.0; // Low quality => 0.01 threshold +LandscapeThreshold_max = 4000.0; // High quality => 0.0005 threshold +LandscapeThreshold_step = 100.0; +LandscapeThreshold_ps0 = 100.0; +LandscapeThreshold_ps1 = 1000.0; +LandscapeThreshold_ps2 = 2000.0; +LandscapeThreshold_ps3 = 3000.0; + +Vision = 500.000000; +Vision_min = 200.000000; +Vision_max = 800.000000; +Vision_step = 100.000000; +Vision_ps0 = 200.0; +Vision_ps1 = 400.0; +Vision_ps2 = 500.0; +Vision_ps3 = 800.0; + +MicroVeget = 1; // Enable/Disable MicroVeget. +MicroVeget_ps0 = 0; +MicroVeget_ps1 = 1; +MicroVeget_ps2 = 1; +MicroVeget_ps3 = 1; + +MicroVegetDensity = 80.0; +MicroVegetDensity_min = 10.0; +MicroVegetDensity_max = 100.0; +MicroVegetDensity_step = 10.0; +MicroVegetDensity_ps0 = 10.0; // not used since disabled! +MicroVegetDensity_ps1 = 30.0; +MicroVegetDensity_ps2 = 80.0; +MicroVegetDensity_ps3 = 100.0; + + +// *** FX +FxNbMaxPoly = 20000; +FxNbMaxPoly_min = 2000; +FxNbMaxPoly_max = 50000; +FxNbMaxPoly_step= 2000; +FxNbMaxPoly_ps0 = 2000; +FxNbMaxPoly_ps1 = 10000; +FxNbMaxPoly_ps2 = 20000; +FxNbMaxPoly_ps3 = 50000; + +Cloud = 1; +Cloud_ps0 = 0 ; +Cloud_ps1 = 1 ; +Cloud_ps2 = 1 ; +Cloud_ps3 = 1 ; + +CloudQuality = 160.0; +CloudQuality_min = 80.0; +CloudQuality_max = 320.0; +CloudQuality_step = 20.0; +CloudQuality_ps0 = 80.0; // not used since disabled! +CloudQuality_ps1 = 80.0; +CloudQuality_ps2 = 160.0; +CloudQuality_ps3 = 320.0; + +CloudUpdate = 1; +CloudUpdate_min = 1; +CloudUpdate_max = 8; +CloudUpdate_step= 1; +CloudUpdate_ps0 = 1; // not used since disabled! +CloudUpdate_ps1 = 1; +CloudUpdate_ps2 = 1; +CloudUpdate_ps3 = 3; + +Shadows = 1; +Shadows_ps0 = 0; +Shadows_ps1 = 1; +Shadows_ps2 = 1; +Shadows_ps3 = 1; + +Bloom = 0; +Bloom_ps0 = 0; +Bloom_ps1 = 1; +Bloom_ps2 = 1; +Bloom_ps3 = 1; + +SquareBloom = 1; +SquareBloom_ps0 = 0; +SquareBloom_ps1 = 1; +SquareBloom_ps2 = 1; +SquareBloom_ps3 = 1; + +DensityBloom = 255.0; +DensityBloom_min = 0.0; +DensityBloom_max = 255.0; +DensityBloom_step = 1.0; +DensityBloom_ps0 = 255.0; +DensityBloom_ps1 = 255.0; +DensityBloom_ps2 = 255.0; +DensityBloom_ps3 = 255.0; + + +// *** CHARACTERS +SkinNbMaxPoly = 100000; +SkinNbMaxPoly_min = 5000; +SkinNbMaxPoly_max = 250000; +SkinNbMaxPoly_step = 5000; +SkinNbMaxPoly_ps0 = 10000; +SkinNbMaxPoly_ps1 = 70000; +SkinNbMaxPoly_ps2 = 100000; +SkinNbMaxPoly_ps3 = 200000; + +NbMaxSkeletonNotCLod = 125; +NbMaxSkeletonNotCLod_min = 5; +NbMaxSkeletonNotCLod_max = 255; +NbMaxSkeletonNotCLod_step = 5; +NbMaxSkeletonNotCLod_ps0 = 10; +NbMaxSkeletonNotCLod_ps1 = 50; +NbMaxSkeletonNotCLod_ps2 = 125; +NbMaxSkeletonNotCLod_ps3 = 255; + +CharacterFarClip = 200.0; +CharacterFarClip_min = 50.0; +CharacterFarClip_max = 500.0; +CharacterFarClip_step = 10.0; +CharacterFarClip_ps0 = 50.0; +CharacterFarClip_ps1 = 100.0; +CharacterFarClip_ps2 = 200.0; +CharacterFarClip_ps3 = 500.0; + +EnableRacialAnimation = 1; + +// *** MISC +// This is the actual aspect ratio of your screen (no relation with the resolution!!). Set 1.7777 if you got a 16/9 screen for instance +ScreenAspectRatio = 0.0; +ForceDXTC = 1; // Enable/Disable DXTC. +DivideTextureSizeBy2= 0; // Divide texture size +DisableVtxProgram = 0; // Disable Hardware Vertex Program. +DisableVtxAGP = 0; // Disable Hardware Vertex AGP. +DisableTextureShdr = 0; // Disable Hardware Texture Shader. +HDEntityTexture = 0; +HDTextureInstalled = 1; +WaitVBL = 0; // 0 or 1 to wait Vertical Sync. + +////////////////// +// GAME OPTIONS // +////////////////// +SelectWithRClick = 1; +DisplayWeapons = 1; +RotKeySpeedMax = 2.0; +RotKeySpeedMax_min = 1.0; +RotKeySpeedMax_max = 4.0; +RotKeySpeedMin = 1.0; +RotKeySpeedMin_min = 0.5; +RotKeySpeedMin_max = 2.0; +RotAccel = 3.0; +FollowOnAtk = 0; +AtkOnSelect = 0; +ZCPacsPrim = "gen_bt_col_ext.pacs_prim"; + +///////////////// +// PREFERENCES // +///////////////// +FPV = 0; // FPV(First Person View) : default is false (Third Person View). +CameraHeight = 2.2; // Camera Height (in meter) from the ground (for the Third Person View). +CameraDistance = 3.0; // Camera Distance(in meter) from the user (for the Third Person View). +CameraDistStep = 1.0; +CameraDistMin = 1.0; +CameraDistMax = 25.0; +CameraAccel = 5.0; +CameraSpeedMin = 2.0; +CameraSpeedMax = 100.0; +CameraResetSpeed = 10.0; // Speed in radian/s + +////////////////// +// SOUND CONFIG // +////////////////// +SoundForceSoftwareBuffer= 1; +SoundOn = 1; +UseEax = 0; + +MaxTrack = 32; +MaxTrack_min = 4; +MaxTrack_max = 32; +MaxTrack_step = 4; + +// This is the volume for "InGame" sound FXs +SoundSFXVolume = 1.0; +SoundSFXVolume_min = 0.0; +SoundSFXVolume_max = 1.0; +SoundSFXVolume_step = 0.001; + +// This is volume for "InGame" music. Does not affect the MP3 player +SoundGameMusicVolume = 0.5; +SoundGameMusicVolume_min = 0.0; +SoundGameMusicVolume_max = 1.0; +SoundGameMusicVolume_step = 0.001; + +// MISC +PreDataPath = { "user", "patch", "examples", "data/fonts", "data/gamedev.bnp" }; +DataPath = { "data" }; +NeedComputeVS = 0; + +NegFiltersDebug = {"Update DB", "Reading:", "Read Value :", "impulseCallBack", "CLIMPD:", "LNET" }; +NegFiltersInfo = { "CLIMPD:", "CPath::lookup" , "LNET" }; +NegFiltersWarning = { "'basics.Equipment Slot'.", "_usercolor.tga", "PACS" }; + +// Big screen shot +ScreenShotWidth = 0; +ScreenShotHeight = 0; +ScreenShotFullDetail = 1; // 1 to switch full detail mode for characters (both standard & big screenshots) + +// Read : "ID", "R G B A MODE [FX]" +SystemInfoColors = +{ +// OLD STUFF Here for compatibility +"RG", "0 0 0 255 normal", // Black to see when there is an error +"BC", "0 0 0 255 normal", // Black to see when there is an error +"JA", "0 0 0 255 normal", // Black to see when there is an error +"BL", "0 0 0 255 normal", // Black to see when there is an error +"VE", "0 0 0 255 normal", // Black to see when there is an error +"VI", "0 0 0 255 normal", // Black to see when there is an error + +// NEW System Info Categories +"SYS", "255 255 255 255 normal", // Default system messages +"BC", "255 255 255 255 centeraround", // Broadcast messages +"TAGBC", "255 255 255 255 centeraround", // Taged broadcast messages : color should remain white as some word are tagged +"XP", "255 255 64 255 over", // XP Gain +"SP", "255 255 64 255 over", // SP Gain +"TTL", "255 255 64 255 over", // Title +"TSK", "255 255 255 255 over", // Task +"ZON", "255 255 255 255 center", // Zone +"DG", "255 0 0 255 normal", // Damage to me +"DMG", "255 0 0 255 normal", // Damage to me +"DGP", "200 0 0 255 normal", // Damage to me from player +"DGM", "255 128 64 255 normal", // Damage from me +"MIS", "150 150 150 255 normal", // The opponent misses +"MISM", "255 255 255 255 normal", // I miss +"ITM", "0 200 0 255 over", // Item +"ITMO", "170 170 255 255 overonly", // Item other in group +"ITMF", "220 0 220 255 over", // Item failed +"SPL", "50 50 250 255 normal", // Spell to me +"SPLM", "50 150 250 255 normal", // Spell from me +"EMT", "255 150 150 255 normal", // Emote +"MTD", "255 255 0 255 over", // Message Of The Day +"FORLD","64 255 64 255 overonly", // Forage Locate Deposit +"CHK", "255 120 60 255 center", // Tous ce qui ne remplit pas une condition +"CHKCB","255 255 0 255 center", // Tous ce qui ne remplit pas une condition en combat (trop loin, cible invalide, pas assez de mana, etc.) +"PVPTM","255 120 60 255 overonly", // PVP timer +"THM", "255 255 64 255 over misc_levelup.ps", // Thema finished +"AMB", "255 255 64 255 center", // Ambiance +"ISE", "192 208 255 255 normal", // Item special effect +"ISE2", "192 208 255 255 center", // Item special effect with center text (for effects without flying text) +"OSM", "128 160 255 255 center", // Outpost state message +"AROUND","255 255 0 255 around", // Only in around channel +"R2_INVITE","0 255 0 255 around", // Ring invitation +}; + +PrintfCommands = { + "52", "15", "55 55 0 255", "28", "uiChapterV", "624", + "428", "0 0 0 255", "18", "", "624", "378", + "0 0 0 255", "14", "", "644", "278", "0 0 0 255", + "18", "", "52", "17", "255 255 255 255", "28", + "uiChapterV", "622", "430", "255 255 255 255", "18", "", + "622", "380", "255 255 255 255", "14", "", "642", + "280", "255 255 255 255", "18", "" +}; + +PrintfCommandsFreeTrial = { + "52", "15", "55 55 0 255", "28", "uiChapterV", "624", + "428", "0 0 0 255", "18", "", "624", "378", + "0 0 0 255", "14", "", "644", "278", "0 0 0 255", + "18", "", "52", "17", "255 255 255 255", "28", + "uiChapterV", "622", "430", "255 255 255 255", "18", "", + "622", "380", "255 255 255 255", "14", "", "642", + "280", "255 255 255 255", "18", "" +}; + +DisplayMissingAnimFile = 0; + +LoadingStringCount = 54; + + +// Some R2 parameters ... + +R2Mode = 1; +R2EDEnabled = 1; +R2EDExtendedDebug = 0; +R2EDLightPalette = 0; +R2ClientGw = "r2linux01"; +LoadLuaDebugger = 0; +CheckR2ScenarioMD5 = 1; +LevelDesignEnabled = 0; + +DmCameraDistMax = 25; +DmRun = 20; +DmWalk = 6; + +R2EDReloadFiles = { + "r2ed.xml", + "r2_basic_bricks.lua", + "r2_components.lua", + "r2_core.lua", + "r2_features_default.lua", + "r2_features_fauna.lua", + "r2_features_npc_groups.lua", + "r2_palette.lua", + "r2_scenario.lua", + "r2_ui.lua" +}; + +XMLInterfaceFiles = { + "config.xml", + "widgets.xml", + "webig_widgets.xml", + "player.xml", + "inventory.xml", + "interaction.xml", + "phrase.xml", + "harvest.xml", + "macros.xml", + "info_player.xml", + "outpost.xml", + "guild.xml", + "taskbar.xml", + "game_config.xml", + "game_context_menu.xml", + "player_trade.xml", + "bot_chat_v4.xml", + "compass.xml", + "map.xml", + "hierarchy.xml", + "reset.xml", + "actions.xml", + "help.xml", + "encyclopedia.xml", + "commands.xml", + "commands2.xml", + "ring_access_point_filter.xml", + "ring_window.xml", + "bg_downloader.xml" +}; + +XMLR2EDInterfaceFiles = +{ + "r2ed.xml", + "r2_triggers.xml", + "r2_logic_entities.xml", + "r2ed_acts.xml", + "r2ed_scenario.xml", + "r2ed_connect.xml" +}; + +FogDistAndDepthLookupBias = 20; // bias for lookup of fog distance and depth + + +// Hardware cursor textures +// These will be extracted from the corresponding packed ui .tga files when they are loaded +// * +// * individual .tga files for hardware cursor bitmap not looked for, and not supported yet +HardwareCursors = +{ + "curs_can_pan.tga", + "curs_can_pan_dup.tga", + "curs_create.tga", + "curs_create_multi.tga", + "curs_create_vertex_invalid.tga", + "curs_default.tga", + "curs_dup.tga", + "curs_L.tga", + "curs_M.tga", + "curs_pan.tga", + "curs_pan_dup.tga", + "curs_pick.tga", + "curs_pick_dup.tga", + "curs_R.tga", + "curs_resize_BL_TR.tga", + "curs_resize_BR_TL.tga", + "curs_resize_LR.tga", + "curs_resize_TB.tga", + "curs_rotate.tga", + "curs_scale.tga", + "curs_stop.tga", + "text_cursor.tga", + "r2_hand_can_pan.tga", + "r2_hand_pan.tga", + "r2ed_tool_can_pick.tga", + "r2ed_tool_can_rotate.tga", + "r2ed_tool_pick.tga", + "r2ed_tool_rotate.tga", + "r2ed_tool_rotating.tga" +}; + +Loading_BG = "new_loading_bg.tga"; // Default name for the loading background file. +Launch_BG = "new_launcher_bg.tga"; // Default name for the launch background file. +TeleportKami_BG = "new_teleport_kami_bg.tga"; +TeleportKaravan_BG = "new_teleport_caravan_bg.tga"; +Elevator_BG = "new_elevator_bg.tga"; // Default name for the loading background file. +ResurectKami_BG = "new_resurect_kami_bg.tga"; +ResurectKaravan_BG = "new_resurect_caravane_bg.tga"; +End_BG = "end_bg.tga"; // Default name for the last background file. + +ScenarioSavePath = "./my_scenarios/"; + +// list ofpredefined keyset +// name will be looked up in the translation file by searching 'uiCP_KeysetName_" + id +// tooltip will be looked up in the translation file by searching 'uiCP_KeysetTooltip_" + id +// 'bi.' stands for built-in +// note : we add a dot in the name to be sure that there cannot be a conflict with character keyset name +BuiltInKeySets = +{ + "", // default ryzom keyboard layout + "bi.zqsd", // european keyboard fps displacement style (NB : don't change this layout name, ryzom will automatically select it if keyboard is french or belgian) + "bi.wasd", // english keyboard fps displacement style (NB : don't change this layout name, ryzom will automatically select it if keyboard is not french nor belgian) + "bi.wow_alike" // 'world of warcraft' like keyboard style. (NB : not available for ring) +}; + +// "Newbie Training", "Story Telling", "Mistery", "Hack & Slash", "Guild Training", "Other" +ScenarioTypes = {"so_newbie_training","so_story_telling","so_mistery","so_hack_slash","so_guild_training","so_other"}; + +ScenarioLanguages = {"fr","de","en","other_lang"}; + +// Map each language to a forum help page +HelpPages = +{ + "fr=http://forums.ryzom.com/forum/showthread.php?t=29130", + "en=http://forums.ryzom.com/forum/showthread.php?t=29129", + "wk=http://forums.ryzom.com/forum/showthread.php?t=29129", + "de=http://forums.ryzom.com/forum/showthread.php?t=29131" +}; + +WebIgMainDomain = "app.ryzom.com"; +WebIgTrustedDomains = { + "api.ryzom.com", "app.ryzom.com" +}; +PatchletUrl = "http://app.ryzom.com/app_patchlet/index.php?patch=preload"; + +SelectedSlot = 0; + +BuildName = "RELEASE_HEAD"; diff --git a/dist/debian/precise/debian/compat b/dist/debian/precise/debian/compat new file mode 100644 index 000000000..ec635144f --- /dev/null +++ b/dist/debian/precise/debian/compat @@ -0,0 +1 @@ +9 diff --git a/dist/debian/precise/debian/control b/dist/debian/precise/debian/control new file mode 100644 index 000000000..cf8840bb2 --- /dev/null +++ b/dist/debian/precise/debian/control @@ -0,0 +1,212 @@ +Source: ryzom-core +Priority: extra +Maintainer: Debian Games Team +Uploaders: Luboš Novák , Cédric OCHS +Build-Depends: debhelper (>= 9), cmake(>= 2.6), libxml2-dev, + libgl1-mesa-dev, libjpeg8-dev | libjpeg62-dev, libpng12-dev, libopenal-dev, + libfreetype6-dev, libxxf86vm-dev, libxrandr-dev, libxrender-dev, + libvorbis-dev, libsquish-dev, libcurl4-openssl-dev, libluabind-dev, + libboost-dev, libwww-dev, libmysqlclient-dev, + libcpptest-dev, libqt4-dev, libqt4-opengl-dev +Standards-Version: 3.9.3 +Section: games +Bugs: http://dev.ryzom.com/projects/ryzom/issues +Homepage: http://dev.ryzom.com +Vcs-Svn: svn://svn.debian.org/svn/pkg-games/packages/trunk/nel/ +Vcs-Browser: http://svn.debian.org/wsvn/pkg-games/packages/trunk/nel/?op=log + +Package: libnel0 +Section: libdevel +Architecture: any +Multi-Arch: same +Pre-Depends: ${misc:Pre-Depends} +Depends: ${misc:Depends}, ${shlibs:Depends} +Description: Massive multi-user 3D game environments library (shared library) + This is a software platform for creating and running massively multi-user + entertainment in a 3D environment over the Internet. + . + This library is further divided into specific modules: network, ai, 3d + and misc. If you want to use any of these, you also need to use the misc + part of the library, but ai, 3d and network are totally independent from + each other so you can use only the parts you really need in your project. + . + This package contains the shared library. + +Package: libnel-dev +Section: libdevel +Architecture: any +Multi-Arch: same +Depends: ${misc:Depends}, libnel0 (= ${binary:Version}) +Description: Massive multi-user 3D game environments library (development files) + This is a software platform for creating and running massively multi-user + entertainment in a 3D environment over the Internet. + . + This library is further divided into specific modules: network, ai, 3d + and misc. If you want to use any of these, you also need to use the misc + part of the library, but ai, 3d and network are totally independent from + each other so you can use only the parts you really need in your project. + . + This package contains the headers. + +Package: libnel0-dbg +Section: debug +Architecture: any +Depends: ${misc:Depends}, libnel0 (= ${binary:Version}) +Description: Massive multi-user 3D game environments library (debugging symbols) + This is a software platform for creating and running massively multi-user + entertainment in a 3D environment over the Internet. + . + This library is further divided into specific modules: network, ai, 3d + and misc. If you want to use any of these, you also need to use the misc + part of the library, but ai, 3d and network are totally independent from + each other so you can use only the parts you really need in your project. + . + This package contains the debugging symbols. + +Package: nel-tools +Section: devel +Architecture: any +Multi-Arch: same +Pre-Depends: ${misc:Pre-Depends} +Depends: ${misc:Depends}, ${shlibs:Depends}, libnel0 (= ${binary:Version}) +Description: Massive multi-user 3D game environments library (tools) + This is a software platform for creating and running massively multi-user + entertainment in a 3D environment over the Internet. + . + This library is further divided into specific modules: network, ai, 3d + and misc. If you want to use any of these, you also need to use the misc + part of the library, but ai, 3d and network are totally independent from + each other so you can use only the parts you really need in your project. + . + This package contains the tools. + +Package: nel-tools-dbg +Section: debug +Architecture: any +Depends: ${misc:Depends}, nel-tools (= ${binary:Version}) +Description: Massive multi-user 3D game environments library (tools debugging symbols) + This is a software platform for creating and running massively multi-user + entertainment in a 3D environment over the Internet. + . + This library is further divided into specific modules: network, ai, 3d + and misc. If you want to use any of these, you also need to use the misc + part of the library, but ai, 3d and network are totally independent from + each other so you can use only the parts you really need in your project. + . + This package contains the tools debugging symbols. + +Package: libryzom-sevenzip0 +Architecture: any +Multi-Arch: same +Pre-Depends: ${misc:Pre-Depends} +Depends: ${misc:Depends}, ${shlibs:Depends} +Description: Ryzom science-fantasy MMORPG (decompression library) + Ryzom Core provides the base technologies and a set of development + methodologies for the development of both client and server code. + . + This package contains the decompression shared library. + +Package: libryzom-sevenzip0-dbg +Section: debug +Architecture: any +Depends: ${misc:Depends}, libryzom-sevenzip0 (= ${binary:Version}) +Description: Ryzom science-fantasy MMORPG (decompression library debugging symbols) + Ryzom Core provides the base technologies and a set of development + methodologies for the development of both client and server code. + . + This package contains the decompression shared library debugging symbols. + +Package: libryzom-gameshare0 +Architecture: any +Multi-Arch: same +Pre-Depends: ${misc:Pre-Depends} +Depends: ${misc:Depends}, ${shlibs:Depends}, libnel0 (= ${binary:Version}) +Description: Ryzom science-fantasy MMORPG (common shared library) + Ryzom Core provides the base technologies and a set of development + methodologies for the development of both client and server code. + . + This package contains the game common shared library. + +Package: libryzom-gameshare0-dbg +Section: debug +Architecture: any +Depends: ${misc:Depends}, libryzom-gameshare0 (= ${binary:Version}) +Description: Ryzom science-fantasy MMORPG (common debugging symbols) + Ryzom Core provides the base technologies and a set of development + methodologies for the development of both client and server code. + . + This package contains the game common debugging symbols. + +Package: libryzom-clientsheets0 +Architecture: any +Multi-Arch: same +Pre-Depends: ${misc:Pre-Depends} +Depends: ${misc:Depends}, ${shlibs:Depends}, libryzom-gameshare0 (= ${binary:Version}) +Description: Ryzom science-fantasy MMORPG (client sheets shared library) + Ryzom Core provides the base technologies and a set of development + methodologies for the development of both client and server code. + . + This package contains the client sheets shared library. + +Package: libryzom-clientsheets0-dbg +Section: debug +Architecture: any +Depends: ${misc:Depends}, libryzom-clientsheets0 (= ${binary:Version}) +Description: Ryzom science-fantasy MMORPG (client sheets debugging symbols) + Ryzom Core provides the base technologies and a set of development + methodologies for the development of both client and server code. + . + This package contains the client sheets debugging symbols. + +Package: ryzom-client +Architecture: any +Depends: ${misc:Depends}, ${shlibs:Depends}, libryzom-gameshare0 (= ${binary:Version}), + libryzom-clientsheets0 (= ${binary:Version}), + ryzom-client-config (>= ${source:Version}), rsync, wget, p7zip-full +Description: Ryzom science-fantasy MMORPG (client) + Ryzom Core provides the base technologies and a set of development + methodologies for the development of both client and server code. + . + This package contains the game client. + +Package: ryzom-client-dbg +Section: debug +Architecture: any +Depends: ${misc:Depends}, ryzom-client (= ${binary:Version}) +Description: Ryzom science-fantasy MMORPG (client debugging symbols) + Ryzom Core provides the base technologies and a set of development + methodologies for the development of both client and server code. + . + This package contains the client debugging symbols. + +Package: ryzom-tools +Section: devel +Architecture: any +Multi-Arch: same +Pre-Depends: ${misc:Pre-Depends} +Depends: ${misc:Depends}, ${shlibs:Depends}, libryzom-gameshare0 (= ${binary:Version}), + libryzom-clientsheets0 (= ${binary:Version}) +Description: Ryzom science-fantasy MMORPG (tools) + Ryzom Core provides the base technologies and a set of development + methodologies for the development of both client and server code. + . + This package contains the tools. + +Package: ryzom-tools-dbg +Section: debug +Architecture: any +Depends: ${misc:Depends}, ryzom-tools (= ${binary:Version}) +Description: Ryzom science-fantasy MMORPG (tools debugging symbols) + Ryzom Core provides the base technologies and a set of development + methodologies for the development of both client and server code. + . + This package contains the tools debugging symbols. + +Package: ryzom-client-config +Architecture: all +Depends: ${misc:Depends} +Description: Ryzom science-fantasy MMORPG (client configuration) + Ryzom Core provides the base technologies and a set of development + methodologies for the development of both client and server code. + . + This package contains the client configuration. diff --git a/dist/debian/precise/debian/copyright b/dist/debian/precise/debian/copyright new file mode 100644 index 000000000..d5a0f2f10 --- /dev/null +++ b/dist/debian/precise/debian/copyright @@ -0,0 +1,53 @@ +This package was debianized by Gürkan Sengün on +Tue, 23 Oct 2007 12:56:45 +0200. + +It was downloaded from + +Upstream Authors: + + Olivier Cado + Bertram Felgenhauer + Krzysztof Kotlenga + Henri Kuuste + Vianney Lecroart + Namine + Cédric Ochs + Guillaume Puzin + Matt Raykowski + Robert Timm + Titegus + Ulukyn + Robert Wetzel + Zorglor + TODO: take names from Ryzom credits + +Copyright: + + Copyright (C) 2003-2009 Vianney Lecroart + Copyright (C) 2003-2009 Matt Raykowski + Copyright (C) 2000-2006 Nevrax Ltd. + Copyright (C) 2006-2007 Gameforge France + Copyright (C) 2008-2010 Winch Gate Property Limited + +License: + + 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 . + +The Debian packaging is: + + Copyright (C) 2007 Gürkan Sengün + +and is licensed under the GPL version 2, +see `/usr/share/common-licenses/GPL-2'. + diff --git a/dist/debian/precise/debian/docs b/dist/debian/precise/debian/docs new file mode 100644 index 000000000..58e5e3e76 --- /dev/null +++ b/dist/debian/precise/debian/docs @@ -0,0 +1,2 @@ +changelog +README diff --git a/dist/debian/precise/debian/libnel-dev.docs b/dist/debian/precise/debian/libnel-dev.docs new file mode 100644 index 000000000..ba8894c15 --- /dev/null +++ b/dist/debian/precise/debian/libnel-dev.docs @@ -0,0 +1,2 @@ +README + diff --git a/dist/debian/precise/debian/libnel-dev.install b/dist/debian/precise/debian/libnel-dev.install new file mode 100644 index 000000000..9f9310cee --- /dev/null +++ b/dist/debian/precise/debian/libnel-dev.install @@ -0,0 +1,3 @@ +usr/include/* +usr/lib/*/libnel*.so +usr/lib/*/pkgconfig/* diff --git a/dist/debian/precise/debian/libnel-dev.manpages b/dist/debian/precise/debian/libnel-dev.manpages new file mode 100644 index 000000000..bb4027ca9 --- /dev/null +++ b/dist/debian/precise/debian/libnel-dev.manpages @@ -0,0 +1 @@ +debian/nel-config.1 diff --git a/dist/debian/precise/debian/libnel-doc.doc-base.nel b/dist/debian/precise/debian/libnel-doc.doc-base.nel new file mode 100644 index 000000000..6ae95fc9f --- /dev/null +++ b/dist/debian/precise/debian/libnel-doc.doc-base.nel @@ -0,0 +1,9 @@ +Document: nel +Title: NeL Reference Manual +Author: Nevrax +Abstract: This is a software platform for creating and running massively multi-user entertainment in a 3D environment over the Internet. +Section: Programming/C + +Format: HTML +Index: /usr/share/doc/libnel-doc/html/index.html +Files: /usr/share/doc/libnel-doc/html/*.html diff --git a/dist/debian/precise/debian/libnel-doc.install b/dist/debian/precise/debian/libnel-doc.install new file mode 100644 index 000000000..bf3f02a61 --- /dev/null +++ b/dist/debian/precise/debian/libnel-doc.install @@ -0,0 +1 @@ +usr/share/doc/libnel-doc/html/* diff --git a/dist/debian/precise/debian/libnel0.install b/dist/debian/precise/debian/libnel0.install new file mode 100644 index 000000000..4273c0ad1 --- /dev/null +++ b/dist/debian/precise/debian/libnel0.install @@ -0,0 +1,3 @@ +usr/lib/*/libnel*.so.* +usr/lib/*/nel/libnel_drv_openal.so +usr/lib/*/nel/libnel_drv_opengl.so diff --git a/dist/debian/precise/debian/libryzom-clientsheets0.install b/dist/debian/precise/debian/libryzom-clientsheets0.install new file mode 100644 index 000000000..b5ea5b79c --- /dev/null +++ b/dist/debian/precise/debian/libryzom-clientsheets0.install @@ -0,0 +1,2 @@ +usr/lib/*/libryzom_clientsheets.so.* + diff --git a/dist/debian/precise/debian/libryzom-gameshare0.install b/dist/debian/precise/debian/libryzom-gameshare0.install new file mode 100644 index 000000000..2f51b0804 --- /dev/null +++ b/dist/debian/precise/debian/libryzom-gameshare0.install @@ -0,0 +1,2 @@ +usr/lib/*/libryzom_gameshare.so.* + diff --git a/dist/debian/precise/debian/libryzom-sevenzip0.install b/dist/debian/precise/debian/libryzom-sevenzip0.install new file mode 100644 index 000000000..1edced3f8 --- /dev/null +++ b/dist/debian/precise/debian/libryzom-sevenzip0.install @@ -0,0 +1,2 @@ +usr/lib/*/libryzom_sevenzip.so.* + diff --git a/dist/debian/precise/debian/nel-config.1 b/dist/debian/precise/debian/nel-config.1 new file mode 100644 index 000000000..be47bf496 --- /dev/null +++ b/dist/debian/precise/debian/nel-config.1 @@ -0,0 +1,37 @@ +.TH nel-config 1 "26 Oct 2007" +.SH NAME +nel-config \- Get information about a libnel installation +.SH SYNOPSIS +.B nel-config [options] +.SH DESCRIPTION +.B nel-config +displays information about a libnel installation. +.SH OPTIONS +.IP "--cflags" +Set of compiler options (CFLAGS) to use when compiling files that use +libnel. Currently that is only thw include path to the nel include files. +.IP "--libs" +Shows the complete set of libs and other linker options you will need in order +to link your application with libnel. +.IP "--prefix" +This is the prefix used when libnel was installed. libnel is then installed +in $prefix/lib and its header files are installed in $prefix/include and so +on. The prefix is set with "configure \-\-prefix". +.IP "--version" +Outputs version information about the installed libnel. +.SH "EXAMPLES" +What linker options do I need when I link with libnel? + + $ nel-config \-\-libs + +What compiler options do I need when I compile using libnel functions? + + $ nel-config \-\-cflags + +What's the installed libnel version? + + $ nel-config \-\-version +.SH AUTHOR +.PP +This manual page was written by G\[:u]rkan Seng\[:u]n +,for the Debian project (but may be used by others). diff --git a/dist/debian/precise/debian/nel-tools.install b/dist/debian/precise/debian/nel-tools.install new file mode 100644 index 000000000..4ca03208c --- /dev/null +++ b/dist/debian/precise/debian/nel-tools.install @@ -0,0 +1,87 @@ +etc/nel/build_ig_boxes.cfg +etc/nel/build_indoor_rbank.cfg +etc/nel/build_rbank.cfg +etc/nel/make_sheet_id.cfg +etc/nel/words_dic.cfg +etc/nel/zviewer.cfg +usr/bin/animation_set_builder +usr/bin/anim_builder +usr/bin/bnp_make +usr/bin/build_clod_bank +usr/bin/build_clodtex +usr/bin/build_coarse_mesh +usr/bin/build_far_bank +usr/bin/build_ig_boxes +usr/bin/build_indoor_rbank +usr/bin/build_interface +usr/bin/build_rbank +usr/bin/build_samplebank +usr/bin/build_shadow_skin +usr/bin/build_smallbank +usr/bin/build_sound +usr/bin/build_soundbank +usr/bin/cluster_viewer +usr/bin/disp_sheet_id +usr/bin/extract_filename +usr/bin/file_info +usr/bin/georges2csv +usr/bin/get_neighbors +usr/bin/hls_bank_maker +usr/bin/ig_add +usr/bin/ig_info +usr/bin/ig_lighter +usr/bin/lock +usr/bin/make_sheet_id +usr/bin/memlog +usr/bin/message_box_qt +usr/bin/nl_probe_timers +usr/bin/nl_sample_chatclient +usr/bin/nl_sample_chatserver +usr/bin/nl_sample_clusterview +usr/bin/nl_sample_command +usr/bin/nl_sample_configfile +usr/bin/nl_sample_ct_ai_service +usr/bin/nl_sample_ct_gd_service +usr/bin/nl_sample_debug +usr/bin/nl_sample_font +usr/bin/nl_sample_georges +usr/bin/nl_sample_i18n +usr/bin/nl_sample_log +usr/bin/nl_sample_ls_client +usr/bin/nl_sample_ls_fes +usr/bin/nl_sample_pacs +usr/bin/nl_sample_shapeview +usr/bin/nl_sample_sound_sources +usr/bin/nl_sample_stream_file +usr/bin/nl_sample_stream_ogg_vorbis +usr/bin/nl_sample_strings +usr/bin/nl_sample_udpclient +usr/bin/nl_sample_udpserver +usr/bin/panoply_maker +usr/bin/shapes_exporter +usr/bin/tga2dds +usr/bin/tga_cut +usr/bin/tga_resize +usr/bin/tile_edit_qt +usr/bin/words_dic_qt +usr/bin/xml_packer +usr/bin/zone_check_bind +usr/bin/zone_dependencies +usr/bin/zone_dump +usr/bin/zone_ig_lighter +usr/bin/zone_lighter +usr/bin/zone_welder +usr/bin/zviewer +usr/lib/*/libs3tc_compressor.so.* +usr/share/nel/nl_sample_chat +usr/share/nel/nl_sample_class_transport +usr/share/nel/nl_sample_clusterview +usr/share/nel/nl_sample_configfile +usr/share/nel/nl_sample_font +usr/share/nel/nl_sample_georges +usr/share/nel/nl_sample_i18n +usr/share/nel/nl_sample_login_system +usr/share/nel/nl_sample_pacs +usr/share/nel/nl_sample_sound +usr/share/nel/nl_sample_udp +usr/share/nel/zviewer diff --git a/dist/debian/precise/debian/rules b/dist/debian/precise/debian/rules new file mode 100755 index 000000000..2b329f3be --- /dev/null +++ b/dist/debian/precise/debian/rules @@ -0,0 +1,19 @@ +#!/usr/bin/make -f +%: + dh $@ --buildsystem=cmake --parallel + +override_dh_strip: + dh_strip -plibnel0 --dbg-package=libnel0-dbg + dh_strip -pnel-tools --dbg-package=nel-tools-dbg + dh_strip -plibryzom-sevenzip0 --dbg-package=libryzom-sevenzip0-dbg + dh_strip -plibryzom-gameshare0 --dbg-package=libryzom-gameshare0-dbg + dh_strip -plibryzom-clientsheets0 --dbg-package=libryzom-clientsheets0-dbg + dh_strip -pryzom-client --dbg-package=ryzom-client-dbg + dh_strip -pryzom-tools --dbg-package=ryzom-tools-dbg + +override_dh_auto_configure: + dh_auto_configure -- -DLIBRARY_ARCHITECTURE=$(DEB_HOST_MULTIARCH) -DTARGET_CPU=$(DEB_HOST_GNU_CPU) -DWITH_SYMBOLS=ON -DNL_ETC_PREFIX=/etc/nel -DRYZOM_ETC_PREFIX=/etc/ryzom -DRYZOM_SHARE_PREFIX=/usr/share/games/ryzom -DRYZOM_BIN_PREFIX=/usr/bin -DRYZOM_GAMES_PREFIX=/usr/games -DWITH_RYZOM_SERVER=OFF -DWITH_NEL_TESTS=OFF -DWITH_LIBWWW_STATIC=ON -DWITH_QT=ON + +override_dh_install: + dh_install + install -m755 debian/ryzom debian/ryzom-client/usr/games/ryzom diff --git a/dist/debian/precise/debian/ryzom b/dist/debian/precise/debian/ryzom new file mode 100755 index 000000000..79923e9e9 --- /dev/null +++ b/dist/debian/precise/debian/ryzom @@ -0,0 +1,116 @@ +#!/bin/sh + +P7ZIP=/usr/bin/7z +RSYNC=/usr/bin/rsync +WGET=/usr/bin/wget +RYZOM_CLIENT=/usr/games/ryzom_client +RYZOM_CONFIG_DEFAULT=/etc/ryzom/client_default.cfg +RYZOM_CONFIG=~/.ryzom/client.cfg + +RYZOM_DIR=~/.ryzom +DATA_DIR=$RYZOM_DIR/data + +mkdir -p $RYZOM_DIR + +if [ ! -d "$DATA_DIR" ] +then + # symlink user's data dir to ryzom data cache + ln -s /var/cache/ryzom/data $DATA_DIR +fi + +# Check if a directory contains Ryzom data +ryzom_data_found() +{ + # Check for directory, gamedev.bnp and ryzom.ttf + COUNT=0 + + if [ -d $1 ] + then + # If there are a least 220 bnp files, we could use this directory + # There are 226 bnp files in last version + COUNT=$(find -L $1 -name *.bnp | wc -l) + fi + + echo $COUNT +} + +COUNT=$(ryzom_data_found $DATA_DIR) + +echo "Found $COUNT BNP files in $DATA_DIR" + +if [ $COUNT -lt 220 ] && [ -f $WGET ] && [ -f $P7ZIP ] +then + mkdir -p "$DATA_DIR/tmp" + + # Check free diskspace + echo "Checking for free disk space..." + DISKSPACE=$(df "$DATA_DIR/tmp" | grep "/dev" | awk '{print $4}') + if [ $? -ne 0 ] + then + exit 1 + fi + if [ "$DISKSPACE" -lt "8000000" ] + then + echo "You don't have enough free space to download and uncompress Ryzom client data." + exit 1 + fi + + # Download + echo "Downloading ryzom_client.7z from sourceforge..." + # wget + $WGET -c http://sourceforge.net/projects/ryzom/files/ryzom_client.7z -O "$DATA_DIR/tmp/ryzom_client.7z" + if [ $? -ne 0 ] + then + exit 1 + fi + + # Extract data + echo "Extracting data from ryzom_client.7z..." + cd "$DATA_DIR/tmp" + # 7z + $P7ZIP x ryzom_client.7z + if [ $? -ne 0 ] + then + exit 1 + fi + cd .. + mv -uf tmp/ryzom/data/* . + # Delete temporary downloaded files + rm -rf tmp +fi + +if [ -f $RYZOM_CONFIG ] +then + echo "Updating $RYZOM_CONFIG..." + + # Escape path for sed using bash find and replace + RYZOM_CONFIG_DEFAULT_ESCAPED=$(echo $RYZOM_CONFIG_DEFAULT | sed 's/\//\\\//g') + + # Update RootConfigFilename to be sure it's using the right default config + sed -i 's/RootConfigFilename.*/RootConfigFilename = \"'$RYZOM_CONFIG_DEFAULT_ESCAPED'\"/g' $RYZOM_CONFIG +fi + +if [ -f $RSYNC ] +then + echo "Patching Ryzom data..." + + # Rsync + $RSYNC -rOtzv --progress --stats www.ryzom.com::ryzom/data/ $DATA_DIR + if [ $? -ne 0 ] + then + exit 1 + fi +fi + +# Launch Ryzom client if it exists +if [ -f $RYZOM_CLIENT ] +then + echo "Launching Ryzom..." + + nohup $RYZOM_CLIENT $1 $2 $3 2> /dev/null & +fi + +# Wait until all previous commands are executed and displayed before exiting +sync + +exit 0 diff --git a/dist/debian/precise/debian/ryzom-client-config.install b/dist/debian/precise/debian/ryzom-client-config.install new file mode 100644 index 000000000..bef3f53dd --- /dev/null +++ b/dist/debian/precise/debian/ryzom-client-config.install @@ -0,0 +1 @@ +debian/client_default.cfg etc/ryzom diff --git a/dist/debian/precise/debian/ryzom-client.dirs b/dist/debian/precise/debian/ryzom-client.dirs new file mode 100644 index 000000000..d1571095c --- /dev/null +++ b/dist/debian/precise/debian/ryzom-client.dirs @@ -0,0 +1,4 @@ +usr/games +usr/share/applications +usr/share/pixmaps +var/cache/ryzom/data diff --git a/dist/debian/precise/debian/ryzom-client.install b/dist/debian/precise/debian/ryzom-client.install new file mode 100644 index 000000000..be142a6be --- /dev/null +++ b/dist/debian/precise/debian/ryzom-client.install @@ -0,0 +1,4 @@ +usr/games/ryzom_client +usr/share/icons +usr/share/pixmaps +debian/ryzom_client.desktop usr/share/applications diff --git a/dist/debian/precise/debian/ryzom-client.menu b/dist/debian/precise/debian/ryzom-client.menu new file mode 100644 index 000000000..5e15bf577 --- /dev/null +++ b/dist/debian/precise/debian/ryzom-client.menu @@ -0,0 +1,6 @@ +?package(ryzom-client): \ + needs="x11" \ + section="Games/Adventure" \ + icon="/usr/share/pixmaps/ryzom.xpm" \ + title="Ryzom" \ + command="/usr/games/ryzom" diff --git a/dist/debian/precise/debian/ryzom-client.postinst b/dist/debian/precise/debian/ryzom-client.postinst new file mode 100644 index 000000000..51570a3dc --- /dev/null +++ b/dist/debian/precise/debian/ryzom-client.postinst @@ -0,0 +1,10 @@ +#!/bin/sh + +if ! getent group ryzom ; then + addgroup --system ryzom +fi + +chgrp -R ryzom /var/cache/ryzom/data +chmod -R g+wrxs /var/cache/ryzom/data + +#DEBHELPER# diff --git a/dist/debian/precise/debian/ryzom-client.postrm b/dist/debian/precise/debian/ryzom-client.postrm new file mode 100644 index 000000000..828871eb4 --- /dev/null +++ b/dist/debian/precise/debian/ryzom-client.postrm @@ -0,0 +1,49 @@ +#! /bin/sh +# postrm script for ryzom-client +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `remove' +# * `purge' +# * `upgrade' +# * `failed-upgrade' +# * `abort-install' +# * `abort-install' +# * `abort-upgrade' +# * `disappear' overwrit>r> +# for details, see /usr/share/doc/packaging-manual/ + +case "$1" in + purge) + + FILES=/home/* + + for f in $FILES + do + FOLDER="$f/.ryzom/data" + + if [ -d $FOLDER ] + then + rm -rf $FOLDER + echo "Deleting $FOLDER..." + fi + done + + ;; + + remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + + ;; + + *) + echo "postrm called with unknown argument \`$1'" >&2 + exit 1 + +esac + +#DEBHELPER# + +exit 0 diff --git a/dist/debian/precise/debian/ryzom-tools.install b/dist/debian/precise/debian/ryzom-tools.install new file mode 100644 index 000000000..c468e32d8 --- /dev/null +++ b/dist/debian/precise/debian/ryzom-tools.install @@ -0,0 +1,26 @@ +usr/bin/7zDec +usr/bin/alias_synchronizer +usr/bin/assoc_mem +usr/bin/csv_transform +usr/bin/georges_editor_qt +usr/bin/icon_search +usr/bin/make_alias_file +usr/bin/make_anim_by_race +usr/bin/make_anim_melee_impact +usr/bin/mp_generator +usr/bin/named2csv +usr/bin/patch_gen +usr/bin/patch_gen_service +usr/bin/pd_parser +usr/bin/pdr_util +usr/bin/prim_export +usr/bin/ryzom_mission_compiler +usr/bin/sheets_packer +usr/bin/skill_extractor +usr/bin/stats_scan +usr/bin/translation_tools +usr/bin/uni_conv +usr/games/ryzom_client_patcher +usr/lib/*/libryzom_mission_compiler_lib.so.* +usr/share/games/ryzom/data_leveldesign +usr/share/games/ryzom/georges_editor_qt diff --git a/dist/debian/precise/debian/ryzom_client.desktop b/dist/debian/precise/debian/ryzom_client.desktop new file mode 100644 index 000000000..1c62d1b6a --- /dev/null +++ b/dist/debian/precise/debian/ryzom_client.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Version=1.0 +Name=Ryzom +Name[ru]=Ризом +Type=Application +GenericName=ryzom_client +Exec=/usr/games/ryzom +Icon=ryzom_client +Terminal=true +Hidden=false +Categories=Game;RolePlaying; diff --git a/dist/debian/precise/debian/source/format b/dist/debian/precise/debian/source/format new file mode 100644 index 000000000..b9b023757 --- /dev/null +++ b/dist/debian/precise/debian/source/format @@ -0,0 +1,2 @@ +1.0 + diff --git a/dist/debian/readme.txt b/dist/debian/readme.txt new file mode 100644 index 000000000..2c43c9414 --- /dev/null +++ b/dist/debian/readme.txt @@ -0,0 +1,4 @@ +To create a official Ryzom Core package, you have to do: + +- launch ./update.sh to update Ryzom Core to last version and create the .orig directory +- launch ./update_debian.sh to update packaging stuff for , create the final directory and upload source package diff --git a/dist/debian/ryzomcore_version.sh b/dist/debian/ryzomcore_version.sh new file mode 100755 index 000000000..c072095f2 --- /dev/null +++ b/dist/debian/ryzomcore_version.sh @@ -0,0 +1,37 @@ +#!/bin/sh + +CODEROOT=../../code + +VERSION_FILE=$CODEROOT/CMakeLists.txt + +if [ ! -f $VERSION_FILE ] +then + echo "Unable to find $VERSION_FILE" + exit 1 +fi + +parse_version() +{ + FILE=$1 + VAR=$2 + + V=$(grep -o -P "NL_$VAR [0-9]+" $FILE | awk '{print $2}' | head -n 1) + + if [ -z "$V" ] + then + echo "Can't parse $VAR from $FILE, aborting..." + exit 1 + fi + + export $VAR=$V +} + +parse_version $VERSION_FILE VERSION_MAJOR +parse_version $VERSION_FILE VERSION_MINOR +parse_version $VERSION_FILE VERSION_PATCH + +VERSION=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_PATCH + +echo $VERSION + +exit 0 diff --git a/dist/debian/trusty/debian/changelog b/dist/debian/trusty/debian/changelog new file mode 100644 index 000000000..44f3e244e --- /dev/null +++ b/dist/debian/trusty/debian/changelog @@ -0,0 +1,408 @@ +ryzom-core (0.8.2802~raring1) raring; urgency=low + + * New upstream release (revision 2802) + + -- Cédric OCHS Mon, 10 Dec 2012 11:12:17 +0100 + +ryzom-core (0.8.2786~raring1) raring; urgency=low + + * New upstream release (revision 2786) + + -- Cédric OCHS Fri, 07 Dec 2012 16:33:15 +0100 + +ryzom-core (0.8.2691~quantal1) quantal; urgency=low + + * New upstream release (revision 2691) + + -- Cédric OCHS Sun, 07 Oct 2012 09:46:56 +0200 + +ryzom-core (0.8.2682~quantal1) quantal; urgency=low + + * New upstream release (revision 2682) + + -- Cédric OCHS Wed, 03 Oct 2012 15:59:54 +0200 + +ryzom-core (0.8.2681~quantal2) quantal; urgency=low + + * New upstream release (revision 2681) + + -- Cédric OCHS Tue, 02 Oct 2012 17:42:23 +0200 + +ryzom-core (0.8.2681~quantal1) quantal; urgency=low + + * New upstream release (revision 2681) + + -- Cédric OCHS Tue, 02 Oct 2012 17:13:57 +0200 + +ryzom-core (0.8.2650~quantal2) quantal; urgency=low + + * New upstream release (revision 2650) + + -- Cédric OCHS Mon, 24 Sep 2012 22:06:37 +0200 + +ryzom-core (0.8.2650~quantal1) quantal; urgency=low + + * New upstream release (revision 2650) + + -- Cédric OCHS Mon, 24 Sep 2012 20:55:19 +0200 + +ryzom-core (0.8.2025~precise1) precise; urgency=low + + * New upstream release (revision 2025) + + -- Cédric OCHS Sat, 10 Mar 2012 22:23:49 +0100 + +ryzom-core (0.8.2024~precise1) precise; urgency=low + + * New upstream release (revision 2024) + + -- Cédric OCHS Sat, 10 Mar 2012 11:16:08 +0100 + +ryzom-core (0.8.1847~natty1) natty; urgency=low + + * New upstream release (revision 1847) + + -- Cédric OCHS Mon, 17 Oct 2011 09:33:45 +0200 + +ryzom-core (0.8.1847~natty0) natty; urgency=low + + * New upstream release (revision 1847) + + -- Cédric OCHS Sun, 16 Oct 2011 18:45:27 +0200 + +ryzom-core (0.8.1758~natty0) natty; urgency=low + + * New upstream release (revision 1758) + + -- Cédric OCHS Tue, 16 Aug 2011 09:02:55 +0200 + +ryzom-core (0.8.1752~natty0) natty; urgency=low + + * New upstream release (revision 1752) + + -- Cédric OCHS Sun, 14 Aug 2011 16:07:29 +0200 + +ryzom-core (0.8.1751~natty0) natty; urgency=low + + * New upstream release (revision 1751) + + -- Cédric OCHS Sun, 14 Aug 2011 14:16:24 +0200 + +ryzom-core (0.8.1750~natty0) natty; urgency=low + + * New upstream release (revision 1750) + + -- Cédric OCHS Sun, 14 Aug 2011 12:30:18 +0200 + +ryzom-core (0.8.1744~natty0) natty; urgency=low + + * New upstream release (revision 1744) + + -- Cédric OCHS Sat, 13 Aug 2011 20:24:49 +0200 + +ryzom-core (0.8.1742~natty0) natty; urgency=low + + * New upstream release (revision 1742) + + -- Cédric OCHS Fri, 12 Aug 2011 18:11:07 +0200 + +ryzom-core (0.8.1628~natty0) natty; urgency=low + + * New upstream release (revision 1628) + + -- Cédric OCHS Fri, 17 Jun 2011 12:56:17 +0200 + +ryzom-core (0.8.1627~natty0) natty; urgency=low + + * New upstream release (revision 1627) + + -- Cédric OCHS Tue, 14 Jun 2011 20:37:05 +0200 + +ryzom-core (0.8.1611~natty0) natty; urgency=low + + * New upstream release (revision 1611) + + -- Cédric OCHS Wed, 08 Jun 2011 19:53:44 +0200 + +ryzom-core (0.8.1596~natty1) natty; urgency=low + + * New upstream release (revision 1596) + + -- Cédric OCHS Sat, 04 Jun 2011 18:11:45 +0200 + +ryzom-core (0.7.1406~natty0) natty; urgency=low + + * New upstream release (revision 1406) + + -- Kervala Sun, 13 Mar 2011 19:07:44 +0100 + +ryzom-core (0.7.1404~karmic0) karmic; urgency=low + + * New upstream release (revision 1404) + + -- Kervala Thu, 10 Mar 2011 20:13:35 +0100 + +ryzom-core (0.7.1122~karmic0) karmic; urgency=low + + * New upstream release (revision 1122) + + -- Kervala Thu, 25 Nov 2010 13:18:41 +0100 + +ryzom-core (0.7.992~karmic0) karmic; urgency=low + + * New upstream release (revision 992) + + -- Kervala Tue, 19 Oct 2010 13:44:23 +0200 + +ryzom-core (0.7.941~karmic0) karmic; urgency=low + + * New upstream release (revision 941) + + -- Kervala Sat, 16 Oct 2010 14:59:36 +0200 + +ryzom-core (0.7.933~karmic0) karmic; urgency=low + + * New upstream release (revision 933) + + -- Kervala Fri, 15 Oct 2010 22:29:44 +0200 + +ryzom-core (0.7.932~karmic0) karmic; urgency=low + + * New upstream release (revision 932) + + -- Kervala Fri, 15 Oct 2010 19:53:47 +0200 + +ryzom-core (0.7.666~karmic0) karmic; urgency=low + + * New upstream release (revision 666) + + -- Kervala Sun, 29 Aug 2010 17:56:06 +0200 + +ryzom-core (0.7.631~karmic0) karmic; urgency=low + + * New upstream release (revision 631) + + -- Kervala Thu, 12 Aug 2010 16:57:30 +0200 + +ryzom-core (0.7.614~lucid1) lucid; urgency=low + + * Fixed dependencies + + -- Kervala Sun, 08 Aug 2010 22:42:50 +0200 + +ryzom-core (0.7.614~lucid0) lucid; urgency=low + + * New upstream release (revision 614) + + -- Kervala Sun, 08 Aug 2010 21:53:00 +0200 + +ryzom-core (0.7.583~lucid1) lucid; urgency=low + + * Added dependency on libogg and libvorbis + + -- Kervala Sun, 01 Aug 2010 15:38:40 +0200 + +ryzom-core (0.7.583~lucid0) lucid; urgency=low + + * New upstream release (revision 583) + + -- Kervala Sun, 01 Aug 2010 14:43:28 +0200 + +ryzom-core (0.7.530~lucid0) lucid; urgency=low + + * New upstream release (revision 530) + + -- Kervala Sun, 25 Jul 2010 16:50:57 +0200 + +ryzom-core (0.7.519~lucid0) lucid; urgency=low + + * New upstream release (revision 519) + + -- Kervala Mon, 19 Jul 2010 22:24:05 +0200 + +ryzom-core (0.7.507~lucid0) lucid; urgency=low + + * New upstream release (revision 507) + + -- Kervala Sat, 17 Jul 2010 19:56:35 +0200 + +ryzom-core (0.7.474~lucid0) lucid; urgency=low + + * New upstream release (revision 474) + + -- Kervala Tue, 13 Jul 2010 08:56:24 +0200 + +ryzom-core (0.7.473~lucid1) lucid; urgency=low + + * Some fixes + + -- Kervala Mon, 12 Jul 2010 22:46:16 +0200 + +ryzom-core (0.7.473~lucid0) lucid; urgency=low + + * New upstream release (revision 473) + + -- Kervala Mon, 12 Jul 2010 22:04:30 +0200 + +ryzom-core (0.7.437~lucid1) lucid; urgency=low + + * Fixed drivers installation + + -- Kervala Thu, 08 Jul 2010 08:54:02 +0200 + +ryzom-core (0.7.437~lucid0) lucid; urgency=low + + * New upstream release (revision 437) + + -- Kervala Thu, 01 Jul 2010 20:07:14 +0200 + +ryzom-core (0.7.419~lucid0) lucid; urgency=low + + * New upstream release (revision 419) + + -- Kervala Sat, 26 Jun 2010 18:58:36 +0200 + +ryzom-core (0.7.411~lucid0) lucid; urgency=low + + * New upstream release (revision 411) + + -- Kervala Sat, 26 Jun 2010 11:00:47 +0200 + +ryzom-core (0.7.404~lucid1) lucid; urgency=low + + * Fix OpenAL driver + + -- Kervala Thu, 24 Jun 2010 23:06:51 +0200 + +ryzom-core (0.7.404~lucid0) lucid; urgency=low + + * New upstream release (revision 404) + + -- Kervala Thu, 24 Jun 2010 22:17:36 +0200 + +ryzom-core (0.7.394~lucid0) lucid; urgency=low + + * New upstream release (revision 394) + + -- Kervala Tue, 22 Jun 2010 06:53:15 +0200 + +ryzom-core (0.7.375~lucid0) lucid; urgency=low + + * New upstream release (revision 375) + + -- Kervala Wed, 16 Jun 2010 12:46:51 +0200 + +ryzom-core (0.7.371~lucid0) lucid; urgency=low + + * New upstream release (revision 371) + + -- Kervala Mon, 14 Jun 2010 22:48:27 +0200 + +ryzom-core (0.7.359~lucid0) lucid; urgency=low + + * New upstream release (revision 359) + + -- Kervala Sun, 13 Jun 2010 21:31:29 +0200 + +ryzom-core (0.7.350~lucid1) lucid; urgency=low + + * Fixes problem with "copy" files + + -- Kervala Sun, 13 Jun 2010 10:36:30 +0200 + +ryzom-core (0.7.350~lucid0) lucid; urgency=low + + * New upstream release (revision 350) + + -- Kervala Sun, 13 Jun 2010 09:55:38 +0200 + +ryzom-core (0.7.332~lucid0) lucid; urgency=low + + * New upstream release (revision 332) + + -- Kervala Sat, 12 Jun 2010 09:09:21 +0200 + +ryzom-core (0.7.317~lucid0) lucid; urgency=low + + * New upstream release (revision 317) + + -- Kervala Thu, 10 Jun 2010 13:11:28 +0200 + +ryzom-core (0.7.315~lucid0) lucid; urgency=low + + * Fixed pkg-config installation again + + -- Kervala Thu, 10 Jun 2010 08:19:44 +0200 + +ryzom-core (0.7.311~lucid2) lucid; urgency=low + + * Fixed pkg-config files + + -- Kervala Wed, 09 Jun 2010 22:58:15 +0200 + +ryzom-core (0.7.311~lucid1) lucid; urgency=low + + * Fixed dependencies versions + + -- Kervala Wed, 09 Jun 2010 22:27:00 +0200 + +ryzom-core (0.7.311~lucid0) lucid; urgency=low + + * New upstream version (revision 311). + + -- Kervala Wed, 09 Jun 2010 21:15:42 +0200 + +ryzom-core (0.7.304~lucid0) lucid; urgency=low + + * New upstream version (revision 304). + + -- Kervala Wed, 09 Jun 2010 08:34:10 +0200 + +ryzom-core (0.7.0-1) unstable; urgency=low + + [ Gürkan Sengün ] + * New upstream version. (Closes: #553248) + * Updated build dependencies. + + [ Michal Čihař ] + * Convert to dh with cmake support. + * Bump standards to 3.8.4. + + [ Luboš Novák ] + * Change maintainer to 'Debian Games Team' + * ftbfs_gcc_4.5.path: Fix build with g++-4.5. (Closes: #565104) + * Converted direct changes in source to patches. + * Enable building CEGUI renderer. + * Add package libnel-doc with documentation. + * debian/control + + Changed priority of libnel-dbg to extra. + + Remove duplicate Section in libnel0. + + Update short descriptions. + + Replace obsolete package xlibmesa-gl-dev with libgl1-mesa-dev + in build-depends. + + Add libpng-dev to build-depends. + + Remove libalut-dev from build-depends. + + New homepage. + + Supported architectures are i386 and amd64. + * debian/libnel-dev.dirs + + Remove empty dir usr/lib/nel. + * debian/copyright + + Update redistribution licence from GPL to GPL-2. + * debian/rules + + Disable building unit test, samples and tools. + + -- Luboš Novák Tue, 30 Mar 2010 10:29:23 +0100 + +ryzom-core (0.5.0-1.1) unstable; urgency=low + + * Non-maintainer upload. + * Change Build-Depends: libstlport5.2-dev. (Closes: #521762) + + -- Torsten Werner Sun, 28 Jun 2009 11:54:05 +0200 + +ryzom-core (0.5.0-1) unstable; urgency=low + + * Initial release. (Closes: #448067) + + -- Gürkan Sengün Tue, 23 Oct 2007 12:56:45 +0200 + diff --git a/dist/debian/trusty/debian/client_default.cfg b/dist/debian/trusty/debian/client_default.cfg new file mode 100644 index 000000000..d09cbbb9c --- /dev/null +++ b/dist/debian/trusty/debian/client_default.cfg @@ -0,0 +1,567 @@ +////////////////////////// +////////////////////////// +/// CLIENT CONFIG FILE /// +////////////////////////// +////////////////////////// + + +// If you set this variable to 1, your client.cfg will be overwritten when you quit the client. +// You will loose all the comments and identation in this file. +SaveConfig = 1; + +/////////////////// +// WINDOW CONFIG // +/////////////////// + +Driver3D="Auto"; // Valid values are "Auto" or "0", "OpengGL" or "1" & "Direct3D" or "2" + // "Auto" will choose the best suited driver depending on hardware +FullScreen = 0; +Width = 1024; +Height = 768; +PositionX = 0; +PositionY = 0; +Frequency = 60; +Depth = 32; +Sleep = -1; +ProcessPriority = 0; // -2 = idle, -1 = below normal, 0 = normal, 1 = above normal, 2 = high, 3 = real time +Contrast = 0.0; // -1.0 ~ 1.0 +Luminosity = 0.0; // -1.0 ~ 1.0 +Gamma = 0.0; // -1.0 ~ 1.0 +Contrast_min = -1.0; +Luminosity_min = -1.0; +Gamma_min = -1.0; +Contrast_max = 1.0; +Luminosity_max = 1.0; +Gamma_max = 1.0; + + +///////////// +// NETWORK // +///////////// + +Application = { "ryzom_live", "./client_ryzom_r.exe", "./" }; +BackgroundDownloader = 0; +PatchServer = "http://dl.ryzom.com/patch_live"; +SignUpURL = "http://www.ryzom.com/subscribe"; +StartupHost = "shard.ryzom.com:40916"; +StartupPage = "/login/r2_login.php"; +InstallStatsUrl = "http://shard.ryzom.com:50000/stats/stats.php"; +CreateAccountURL = "https://secure.ryzom.com/signup/from_client.php"; +InstallWebPage = "http://dl.ryzom.com/installer/"; + + +//////////////// +// INTERFACES // +//////////////// + +// the language to use as in ISO 639-2 +LanguageCode = "en"; // english + +XMLInputFile = "input_config_v3.xml"; + +XMLLoginInterfaceFiles = { + "login_config.xml", + "login_widgets.xml", + "login_main.xml", + "login_keys.xml", +}; + +XMLOutGameInterfaceFiles = { + "out_v2_config.xml", + "out_v2_widgets.xml", + "out_v2_connect.xml", + "out_v2_intro.xml", + "out_v2_select.xml", + "out_v2_appear.xml", + "out_v2_location.xml", + "out_v2_crash.xml", + "out_v2_hierarchy.xml", + "out_v2_keys.xml", +}; + +// The ligo primitive class file +LigoPrimitiveClass = "world_editor_classes.xml"; + +VerboseLog = 1; + +/////////// +// MOUSE // +/////////// +HardwareCursor = 1; + +CursorSpeed = 1.0; // In pixels per mickey +CursorSpeed_min = 0.5; +CursorSpeed_max = 2.0; + +CursorAcceleration = 40; // Threshold in mickey +CursorAcceleration_min = 20; +CursorAcceleration_max = 80; + +FreeLookSpeed = 0.004; // In radian per mickey +FreeLookSpeed_min = 0.0001; +FreeLookSpeed_max = 0.01; + +FreeLookAcceleration = 40; // Threshold in mickey +FreeLookAcceleration_min = 20; +FreeLookAcceleration_max = 80; + +FreeLookInverted = 0; +AutomaticCamera = 0; +DblClickMode = 1; +AutoEquipTool = 1; + +/////////////////// +// RENDER CONFIG // +/////////////////// + +// NB: thoses variables configure also the InGameConfigurator: +// _min and _max define the bounds +// _step defines the step (NB: take care of _min and _max!!) +// _ps0 is the LOW preset, _ps1 is the MEDIUM preset, _ps2 is the NORMAL Preset, and _ps3 is the HIGH one + + +// *** LANDSCAPE +LandscapeTileNear = 150.000000; +LandscapeTileNear_min = 20.000000; +LandscapeTileNear_max = 250.000000; +LandscapeTileNear_step = 10.0; +LandscapeTileNear_ps0 = 20.0; +LandscapeTileNear_ps1 = 100.0; +LandscapeTileNear_ps2 = 150.0; +LandscapeTileNear_ps3 = 200.0; + +// NB: threshold is inverted ULandscape::setThreshold(), to be more intelligible +LandscapeThreshold = 2000.0; +LandscapeThreshold_min = 100.0; // Low quality => 0.01 threshold +LandscapeThreshold_max = 4000.0; // High quality => 0.0005 threshold +LandscapeThreshold_step = 100.0; +LandscapeThreshold_ps0 = 100.0; +LandscapeThreshold_ps1 = 1000.0; +LandscapeThreshold_ps2 = 2000.0; +LandscapeThreshold_ps3 = 3000.0; + +Vision = 500.000000; +Vision_min = 200.000000; +Vision_max = 800.000000; +Vision_step = 100.000000; +Vision_ps0 = 200.0; +Vision_ps1 = 400.0; +Vision_ps2 = 500.0; +Vision_ps3 = 800.0; + +MicroVeget = 1; // Enable/Disable MicroVeget. +MicroVeget_ps0 = 0; +MicroVeget_ps1 = 1; +MicroVeget_ps2 = 1; +MicroVeget_ps3 = 1; + +MicroVegetDensity = 80.0; +MicroVegetDensity_min = 10.0; +MicroVegetDensity_max = 100.0; +MicroVegetDensity_step = 10.0; +MicroVegetDensity_ps0 = 10.0; // not used since disabled! +MicroVegetDensity_ps1 = 30.0; +MicroVegetDensity_ps2 = 80.0; +MicroVegetDensity_ps3 = 100.0; + + +// *** FX +FxNbMaxPoly = 20000; +FxNbMaxPoly_min = 2000; +FxNbMaxPoly_max = 50000; +FxNbMaxPoly_step= 2000; +FxNbMaxPoly_ps0 = 2000; +FxNbMaxPoly_ps1 = 10000; +FxNbMaxPoly_ps2 = 20000; +FxNbMaxPoly_ps3 = 50000; + +Cloud = 1; +Cloud_ps0 = 0 ; +Cloud_ps1 = 1 ; +Cloud_ps2 = 1 ; +Cloud_ps3 = 1 ; + +CloudQuality = 160.0; +CloudQuality_min = 80.0; +CloudQuality_max = 320.0; +CloudQuality_step = 20.0; +CloudQuality_ps0 = 80.0; // not used since disabled! +CloudQuality_ps1 = 80.0; +CloudQuality_ps2 = 160.0; +CloudQuality_ps3 = 320.0; + +CloudUpdate = 1; +CloudUpdate_min = 1; +CloudUpdate_max = 8; +CloudUpdate_step= 1; +CloudUpdate_ps0 = 1; // not used since disabled! +CloudUpdate_ps1 = 1; +CloudUpdate_ps2 = 1; +CloudUpdate_ps3 = 3; + +Shadows = 1; +Shadows_ps0 = 0; +Shadows_ps1 = 1; +Shadows_ps2 = 1; +Shadows_ps3 = 1; + +Bloom = 0; +Bloom_ps0 = 0; +Bloom_ps1 = 1; +Bloom_ps2 = 1; +Bloom_ps3 = 1; + +SquareBloom = 1; +SquareBloom_ps0 = 0; +SquareBloom_ps1 = 1; +SquareBloom_ps2 = 1; +SquareBloom_ps3 = 1; + +DensityBloom = 255.0; +DensityBloom_min = 0.0; +DensityBloom_max = 255.0; +DensityBloom_step = 1.0; +DensityBloom_ps0 = 255.0; +DensityBloom_ps1 = 255.0; +DensityBloom_ps2 = 255.0; +DensityBloom_ps3 = 255.0; + + +// *** CHARACTERS +SkinNbMaxPoly = 100000; +SkinNbMaxPoly_min = 5000; +SkinNbMaxPoly_max = 250000; +SkinNbMaxPoly_step = 5000; +SkinNbMaxPoly_ps0 = 10000; +SkinNbMaxPoly_ps1 = 70000; +SkinNbMaxPoly_ps2 = 100000; +SkinNbMaxPoly_ps3 = 200000; + +NbMaxSkeletonNotCLod = 125; +NbMaxSkeletonNotCLod_min = 5; +NbMaxSkeletonNotCLod_max = 255; +NbMaxSkeletonNotCLod_step = 5; +NbMaxSkeletonNotCLod_ps0 = 10; +NbMaxSkeletonNotCLod_ps1 = 50; +NbMaxSkeletonNotCLod_ps2 = 125; +NbMaxSkeletonNotCLod_ps3 = 255; + +CharacterFarClip = 200.0; +CharacterFarClip_min = 50.0; +CharacterFarClip_max = 500.0; +CharacterFarClip_step = 10.0; +CharacterFarClip_ps0 = 50.0; +CharacterFarClip_ps1 = 100.0; +CharacterFarClip_ps2 = 200.0; +CharacterFarClip_ps3 = 500.0; + +EnableRacialAnimation = 1; + +// *** MISC +// This is the actual aspect ratio of your screen (no relation with the resolution!!). Set 1.7777 if you got a 16/9 screen for instance +ScreenAspectRatio = 0.0; +ForceDXTC = 1; // Enable/Disable DXTC. +DivideTextureSizeBy2= 0; // Divide texture size +DisableVtxProgram = 0; // Disable Hardware Vertex Program. +DisableVtxAGP = 0; // Disable Hardware Vertex AGP. +DisableTextureShdr = 0; // Disable Hardware Texture Shader. +HDEntityTexture = 0; +HDTextureInstalled = 1; +WaitVBL = 0; // 0 or 1 to wait Vertical Sync. + +////////////////// +// GAME OPTIONS // +////////////////// +SelectWithRClick = 1; +DisplayWeapons = 1; +RotKeySpeedMax = 2.0; +RotKeySpeedMax_min = 1.0; +RotKeySpeedMax_max = 4.0; +RotKeySpeedMin = 1.0; +RotKeySpeedMin_min = 0.5; +RotKeySpeedMin_max = 2.0; +RotAccel = 3.0; +FollowOnAtk = 0; +AtkOnSelect = 0; +ZCPacsPrim = "gen_bt_col_ext.pacs_prim"; + +///////////////// +// PREFERENCES // +///////////////// +FPV = 0; // FPV(First Person View) : default is false (Third Person View). +CameraHeight = 2.2; // Camera Height (in meter) from the ground (for the Third Person View). +CameraDistance = 3.0; // Camera Distance(in meter) from the user (for the Third Person View). +CameraDistStep = 1.0; +CameraDistMin = 1.0; +CameraDistMax = 25.0; +CameraAccel = 5.0; +CameraSpeedMin = 2.0; +CameraSpeedMax = 100.0; +CameraResetSpeed = 10.0; // Speed in radian/s + +////////////////// +// SOUND CONFIG // +////////////////// +SoundForceSoftwareBuffer= 1; +SoundOn = 1; +UseEax = 0; + +MaxTrack = 32; +MaxTrack_min = 4; +MaxTrack_max = 32; +MaxTrack_step = 4; + +// This is the volume for "InGame" sound FXs +SoundSFXVolume = 1.0; +SoundSFXVolume_min = 0.0; +SoundSFXVolume_max = 1.0; +SoundSFXVolume_step = 0.001; + +// This is volume for "InGame" music. Does not affect the MP3 player +SoundGameMusicVolume = 0.5; +SoundGameMusicVolume_min = 0.0; +SoundGameMusicVolume_max = 1.0; +SoundGameMusicVolume_step = 0.001; + +// MISC +PreDataPath = { "user", "patch", "examples", "data/fonts", "data/gamedev.bnp" }; +DataPath = { "data" }; +NeedComputeVS = 0; + +NegFiltersDebug = {"Update DB", "Reading:", "Read Value :", "impulseCallBack", "CLIMPD:", "LNET" }; +NegFiltersInfo = { "CLIMPD:", "CPath::lookup" , "LNET" }; +NegFiltersWarning = { "'basics.Equipment Slot'.", "_usercolor.tga", "PACS" }; + +// Big screen shot +ScreenShotWidth = 0; +ScreenShotHeight = 0; +ScreenShotFullDetail = 1; // 1 to switch full detail mode for characters (both standard & big screenshots) + +// Read : "ID", "R G B A MODE [FX]" +SystemInfoColors = +{ +// OLD STUFF Here for compatibility +"RG", "0 0 0 255 normal", // Black to see when there is an error +"BC", "0 0 0 255 normal", // Black to see when there is an error +"JA", "0 0 0 255 normal", // Black to see when there is an error +"BL", "0 0 0 255 normal", // Black to see when there is an error +"VE", "0 0 0 255 normal", // Black to see when there is an error +"VI", "0 0 0 255 normal", // Black to see when there is an error + +// NEW System Info Categories +"SYS", "255 255 255 255 normal", // Default system messages +"BC", "255 255 255 255 centeraround", // Broadcast messages +"TAGBC", "255 255 255 255 centeraround", // Taged broadcast messages : color should remain white as some word are tagged +"XP", "255 255 64 255 over", // XP Gain +"SP", "255 255 64 255 over", // SP Gain +"TTL", "255 255 64 255 over", // Title +"TSK", "255 255 255 255 over", // Task +"ZON", "255 255 255 255 center", // Zone +"DG", "255 0 0 255 normal", // Damage to me +"DMG", "255 0 0 255 normal", // Damage to me +"DGP", "200 0 0 255 normal", // Damage to me from player +"DGM", "255 128 64 255 normal", // Damage from me +"MIS", "150 150 150 255 normal", // The opponent misses +"MISM", "255 255 255 255 normal", // I miss +"ITM", "0 200 0 255 over", // Item +"ITMO", "170 170 255 255 overonly", // Item other in group +"ITMF", "220 0 220 255 over", // Item failed +"SPL", "50 50 250 255 normal", // Spell to me +"SPLM", "50 150 250 255 normal", // Spell from me +"EMT", "255 150 150 255 normal", // Emote +"MTD", "255 255 0 255 over", // Message Of The Day +"FORLD","64 255 64 255 overonly", // Forage Locate Deposit +"CHK", "255 120 60 255 center", // Tous ce qui ne remplit pas une condition +"CHKCB","255 255 0 255 center", // Tous ce qui ne remplit pas une condition en combat (trop loin, cible invalide, pas assez de mana, etc.) +"PVPTM","255 120 60 255 overonly", // PVP timer +"THM", "255 255 64 255 over misc_levelup.ps", // Thema finished +"AMB", "255 255 64 255 center", // Ambiance +"ISE", "192 208 255 255 normal", // Item special effect +"ISE2", "192 208 255 255 center", // Item special effect with center text (for effects without flying text) +"OSM", "128 160 255 255 center", // Outpost state message +"AROUND","255 255 0 255 around", // Only in around channel +"R2_INVITE","0 255 0 255 around", // Ring invitation +}; + +PrintfCommands = { + "52", "15", "55 55 0 255", "28", "uiChapterV", "624", + "428", "0 0 0 255", "18", "", "624", "378", + "0 0 0 255", "14", "", "644", "278", "0 0 0 255", + "18", "", "52", "17", "255 255 255 255", "28", + "uiChapterV", "622", "430", "255 255 255 255", "18", "", + "622", "380", "255 255 255 255", "14", "", "642", + "280", "255 255 255 255", "18", "" +}; + +PrintfCommandsFreeTrial = { + "52", "15", "55 55 0 255", "28", "uiChapterV", "624", + "428", "0 0 0 255", "18", "", "624", "378", + "0 0 0 255", "14", "", "644", "278", "0 0 0 255", + "18", "", "52", "17", "255 255 255 255", "28", + "uiChapterV", "622", "430", "255 255 255 255", "18", "", + "622", "380", "255 255 255 255", "14", "", "642", + "280", "255 255 255 255", "18", "" +}; + +DisplayMissingAnimFile = 0; + +LoadingStringCount = 54; + + +// Some R2 parameters ... + +R2Mode = 1; +R2EDEnabled = 1; +R2EDExtendedDebug = 0; +R2EDLightPalette = 0; +R2ClientGw = "r2linux01"; +LoadLuaDebugger = 0; +CheckR2ScenarioMD5 = 1; +LevelDesignEnabled = 0; + +DmCameraDistMax = 25; +DmRun = 20; +DmWalk = 6; + +R2EDReloadFiles = { + "r2ed.xml", + "r2_basic_bricks.lua", + "r2_components.lua", + "r2_core.lua", + "r2_features_default.lua", + "r2_features_fauna.lua", + "r2_features_npc_groups.lua", + "r2_palette.lua", + "r2_scenario.lua", + "r2_ui.lua" +}; + +XMLInterfaceFiles = { + "config.xml", + "widgets.xml", + "webig_widgets.xml", + "player.xml", + "inventory.xml", + "interaction.xml", + "phrase.xml", + "harvest.xml", + "macros.xml", + "info_player.xml", + "outpost.xml", + "guild.xml", + "taskbar.xml", + "game_config.xml", + "game_context_menu.xml", + "player_trade.xml", + "bot_chat_v4.xml", + "compass.xml", + "map.xml", + "hierarchy.xml", + "reset.xml", + "actions.xml", + "help.xml", + "encyclopedia.xml", + "commands.xml", + "commands2.xml", + "ring_access_point_filter.xml", + "ring_window.xml", + "bg_downloader.xml" +}; + +XMLR2EDInterfaceFiles = +{ + "r2ed.xml", + "r2_triggers.xml", + "r2_logic_entities.xml", + "r2ed_acts.xml", + "r2ed_scenario.xml", + "r2ed_connect.xml" +}; + +FogDistAndDepthLookupBias = 20; // bias for lookup of fog distance and depth + + +// Hardware cursor textures +// These will be extracted from the corresponding packed ui .tga files when they are loaded +// * +// * individual .tga files for hardware cursor bitmap not looked for, and not supported yet +HardwareCursors = +{ + "curs_can_pan.tga", + "curs_can_pan_dup.tga", + "curs_create.tga", + "curs_create_multi.tga", + "curs_create_vertex_invalid.tga", + "curs_default.tga", + "curs_dup.tga", + "curs_L.tga", + "curs_M.tga", + "curs_pan.tga", + "curs_pan_dup.tga", + "curs_pick.tga", + "curs_pick_dup.tga", + "curs_R.tga", + "curs_resize_BL_TR.tga", + "curs_resize_BR_TL.tga", + "curs_resize_LR.tga", + "curs_resize_TB.tga", + "curs_rotate.tga", + "curs_scale.tga", + "curs_stop.tga", + "text_cursor.tga", + "r2_hand_can_pan.tga", + "r2_hand_pan.tga", + "r2ed_tool_can_pick.tga", + "r2ed_tool_can_rotate.tga", + "r2ed_tool_pick.tga", + "r2ed_tool_rotate.tga", + "r2ed_tool_rotating.tga" +}; + +Loading_BG = "new_loading_bg.tga"; // Default name for the loading background file. +Launch_BG = "new_launcher_bg.tga"; // Default name for the launch background file. +TeleportKami_BG = "new_teleport_kami_bg.tga"; +TeleportKaravan_BG = "new_teleport_caravan_bg.tga"; +Elevator_BG = "new_elevator_bg.tga"; // Default name for the loading background file. +ResurectKami_BG = "new_resurect_kami_bg.tga"; +ResurectKaravan_BG = "new_resurect_caravane_bg.tga"; +End_BG = "end_bg.tga"; // Default name for the last background file. + +ScenarioSavePath = "./my_scenarios/"; + +// list ofpredefined keyset +// name will be looked up in the translation file by searching 'uiCP_KeysetName_" + id +// tooltip will be looked up in the translation file by searching 'uiCP_KeysetTooltip_" + id +// 'bi.' stands for built-in +// note : we add a dot in the name to be sure that there cannot be a conflict with character keyset name +BuiltInKeySets = +{ + "", // default ryzom keyboard layout + "bi.zqsd", // european keyboard fps displacement style (NB : don't change this layout name, ryzom will automatically select it if keyboard is french or belgian) + "bi.wasd", // english keyboard fps displacement style (NB : don't change this layout name, ryzom will automatically select it if keyboard is not french nor belgian) + "bi.wow_alike" // 'world of warcraft' like keyboard style. (NB : not available for ring) +}; + +// "Newbie Training", "Story Telling", "Mistery", "Hack & Slash", "Guild Training", "Other" +ScenarioTypes = {"so_newbie_training","so_story_telling","so_mistery","so_hack_slash","so_guild_training","so_other"}; + +ScenarioLanguages = {"fr","de","en","other_lang"}; + +// Map each language to a forum help page +HelpPages = +{ + "fr=http://forums.ryzom.com/forum/showthread.php?t=29130", + "en=http://forums.ryzom.com/forum/showthread.php?t=29129", + "wk=http://forums.ryzom.com/forum/showthread.php?t=29129", + "de=http://forums.ryzom.com/forum/showthread.php?t=29131" +}; + +WebIgMainDomain = "app.ryzom.com"; +WebIgTrustedDomains = { + "api.ryzom.com", "app.ryzom.com" +}; +PatchletUrl = "http://app.ryzom.com/app_patchlet/index.php?patch=preload"; + +SelectedSlot = 0; + +BuildName = "RELEASE_HEAD"; diff --git a/dist/debian/trusty/debian/compat b/dist/debian/trusty/debian/compat new file mode 100644 index 000000000..ec635144f --- /dev/null +++ b/dist/debian/trusty/debian/compat @@ -0,0 +1 @@ +9 diff --git a/dist/debian/trusty/debian/control b/dist/debian/trusty/debian/control new file mode 100644 index 000000000..e662d1f37 --- /dev/null +++ b/dist/debian/trusty/debian/control @@ -0,0 +1,212 @@ +Source: ryzom-core +Priority: extra +Maintainer: Debian Games Team +Uploaders: Luboš Novák , Cédric OCHS +Build-Depends: debhelper (>= 9), cmake(>= 2.6), libxml2-dev, + libgl1-mesa-dev, libjpeg8-dev | libjpeg62-dev, libpng12-dev, libopenal-dev, + libfreetype6-dev, libxxf86vm-dev, libxrandr-dev, libxrender-dev, + libvorbis-dev, libsquish-dev, libcurl4-openssl-dev, libluabind-dev, + libboost-dev, libwww-dev, libmysqlclient-dev, + libcpptest-dev, libqt4-dev, libqt4-opengl-dev +Standards-Version: 3.9.5 +Section: games +Bugs: http://dev.ryzom.com/projects/ryzom/issues +Homepage: http://dev.ryzom.com +Vcs-Svn: svn://svn.debian.org/svn/pkg-games/packages/trunk/nel/ +Vcs-Browser: http://svn.debian.org/wsvn/pkg-games/packages/trunk/nel/?op=log + +Package: libnel0 +Section: libdevel +Architecture: any +Multi-Arch: same +Pre-Depends: ${misc:Pre-Depends} +Depends: ${misc:Depends}, ${shlibs:Depends} +Description: Massive multi-user 3D game environments library (shared library) + This is a software platform for creating and running massively multi-user + entertainment in a 3D environment over the Internet. + . + This library is further divided into specific modules: network, ai, 3d + and misc. If you want to use any of these, you also need to use the misc + part of the library, but ai, 3d and network are totally independent from + each other so you can use only the parts you really need in your project. + . + This package contains the shared library. + +Package: libnel-dev +Section: libdevel +Architecture: any +Multi-Arch: same +Depends: ${misc:Depends}, libnel0 (= ${binary:Version}) +Description: Massive multi-user 3D game environments library (development files) + This is a software platform for creating and running massively multi-user + entertainment in a 3D environment over the Internet. + . + This library is further divided into specific modules: network, ai, 3d + and misc. If you want to use any of these, you also need to use the misc + part of the library, but ai, 3d and network are totally independent from + each other so you can use only the parts you really need in your project. + . + This package contains the headers. + +Package: libnel0-dbg +Section: debug +Architecture: any +Depends: ${misc:Depends}, libnel0 (= ${binary:Version}) +Description: Massive multi-user 3D game environments library (debugging symbols) + This is a software platform for creating and running massively multi-user + entertainment in a 3D environment over the Internet. + . + This library is further divided into specific modules: network, ai, 3d + and misc. If you want to use any of these, you also need to use the misc + part of the library, but ai, 3d and network are totally independent from + each other so you can use only the parts you really need in your project. + . + This package contains the debugging symbols. + +Package: nel-tools +Section: devel +Architecture: any +Multi-Arch: same +Pre-Depends: ${misc:Pre-Depends} +Depends: ${misc:Depends}, ${shlibs:Depends}, libnel0 (= ${binary:Version}) +Description: Massive multi-user 3D game environments library (tools) + This is a software platform for creating and running massively multi-user + entertainment in a 3D environment over the Internet. + . + This library is further divided into specific modules: network, ai, 3d + and misc. If you want to use any of these, you also need to use the misc + part of the library, but ai, 3d and network are totally independent from + each other so you can use only the parts you really need in your project. + . + This package contains the tools. + +Package: nel-tools-dbg +Section: debug +Architecture: any +Depends: ${misc:Depends}, nel-tools (= ${binary:Version}) +Description: Massive multi-user 3D game environments library (tools debugging symbols) + This is a software platform for creating and running massively multi-user + entertainment in a 3D environment over the Internet. + . + This library is further divided into specific modules: network, ai, 3d + and misc. If you want to use any of these, you also need to use the misc + part of the library, but ai, 3d and network are totally independent from + each other so you can use only the parts you really need in your project. + . + This package contains the tools debugging symbols. + +Package: libryzom-sevenzip0 +Architecture: any +Multi-Arch: same +Pre-Depends: ${misc:Pre-Depends} +Depends: ${misc:Depends}, ${shlibs:Depends} +Description: Ryzom science-fantasy MMORPG (decompression library) + Ryzom Core provides the base technologies and a set of development + methodologies for the development of both client and server code. + . + This package contains the decompression shared library. + +Package: libryzom-sevenzip0-dbg +Section: debug +Architecture: any +Depends: ${misc:Depends}, libryzom-sevenzip0 (= ${binary:Version}) +Description: Ryzom science-fantasy MMORPG (decompression library debugging symbols) + Ryzom Core provides the base technologies and a set of development + methodologies for the development of both client and server code. + . + This package contains the decompression shared library debugging symbols. + +Package: libryzom-gameshare0 +Architecture: any +Multi-Arch: same +Pre-Depends: ${misc:Pre-Depends} +Depends: ${misc:Depends}, ${shlibs:Depends}, libnel0 (= ${binary:Version}) +Description: Ryzom science-fantasy MMORPG (common shared library) + Ryzom Core provides the base technologies and a set of development + methodologies for the development of both client and server code. + . + This package contains the game common shared library. + +Package: libryzom-gameshare0-dbg +Section: debug +Architecture: any +Depends: ${misc:Depends}, libryzom-gameshare0 (= ${binary:Version}) +Description: Ryzom science-fantasy MMORPG (common debugging symbols) + Ryzom Core provides the base technologies and a set of development + methodologies for the development of both client and server code. + . + This package contains the game common debugging symbols. + +Package: libryzom-clientsheets0 +Architecture: any +Multi-Arch: same +Pre-Depends: ${misc:Pre-Depends} +Depends: ${misc:Depends}, ${shlibs:Depends}, libryzom-gameshare0 (= ${binary:Version}) +Description: Ryzom science-fantasy MMORPG (client sheets shared library) + Ryzom Core provides the base technologies and a set of development + methodologies for the development of both client and server code. + . + This package contains the client sheets shared library. + +Package: libryzom-clientsheets0-dbg +Section: debug +Architecture: any +Depends: ${misc:Depends}, libryzom-clientsheets0 (= ${binary:Version}) +Description: Ryzom science-fantasy MMORPG (client sheets debugging symbols) + Ryzom Core provides the base technologies and a set of development + methodologies for the development of both client and server code. + . + This package contains the client sheets debugging symbols. + +Package: ryzom-client +Architecture: any +Depends: ${misc:Depends}, ${shlibs:Depends}, libryzom-gameshare0 (= ${binary:Version}), + libryzom-clientsheets0 (= ${binary:Version}), + ryzom-client-config (>= ${source:Version}), rsync, wget, p7zip-full +Description: Ryzom science-fantasy MMORPG (client) + Ryzom Core provides the base technologies and a set of development + methodologies for the development of both client and server code. + . + This package contains the game client. + +Package: ryzom-client-dbg +Section: debug +Architecture: any +Depends: ${misc:Depends}, ryzom-client (= ${binary:Version}) +Description: Ryzom science-fantasy MMORPG (client debugging symbols) + Ryzom Core provides the base technologies and a set of development + methodologies for the development of both client and server code. + . + This package contains the client debugging symbols. + +Package: ryzom-tools +Section: devel +Architecture: any +Multi-Arch: same +Pre-Depends: ${misc:Pre-Depends} +Depends: ${misc:Depends}, ${shlibs:Depends}, libryzom-gameshare0 (= ${binary:Version}), + libryzom-clientsheets0 (= ${binary:Version}) +Description: Ryzom science-fantasy MMORPG (tools) + Ryzom Core provides the base technologies and a set of development + methodologies for the development of both client and server code. + . + This package contains the tools. + +Package: ryzom-tools-dbg +Section: debug +Architecture: any +Depends: ${misc:Depends}, ryzom-tools (= ${binary:Version}) +Description: Ryzom science-fantasy MMORPG (tools debugging symbols) + Ryzom Core provides the base technologies and a set of development + methodologies for the development of both client and server code. + . + This package contains the tools debugging symbols. + +Package: ryzom-client-config +Architecture: all +Depends: ${misc:Depends} +Description: Ryzom science-fantasy MMORPG (client configuration) + Ryzom Core provides the base technologies and a set of development + methodologies for the development of both client and server code. + . + This package contains the client configuration. diff --git a/dist/debian/trusty/debian/copyright b/dist/debian/trusty/debian/copyright new file mode 100644 index 000000000..d5a0f2f10 --- /dev/null +++ b/dist/debian/trusty/debian/copyright @@ -0,0 +1,53 @@ +This package was debianized by Gürkan Sengün on +Tue, 23 Oct 2007 12:56:45 +0200. + +It was downloaded from + +Upstream Authors: + + Olivier Cado + Bertram Felgenhauer + Krzysztof Kotlenga + Henri Kuuste + Vianney Lecroart + Namine + Cédric Ochs + Guillaume Puzin + Matt Raykowski + Robert Timm + Titegus + Ulukyn + Robert Wetzel + Zorglor + TODO: take names from Ryzom credits + +Copyright: + + Copyright (C) 2003-2009 Vianney Lecroart + Copyright (C) 2003-2009 Matt Raykowski + Copyright (C) 2000-2006 Nevrax Ltd. + Copyright (C) 2006-2007 Gameforge France + Copyright (C) 2008-2010 Winch Gate Property Limited + +License: + + 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 . + +The Debian packaging is: + + Copyright (C) 2007 Gürkan Sengün + +and is licensed under the GPL version 2, +see `/usr/share/common-licenses/GPL-2'. + diff --git a/dist/debian/trusty/debian/docs b/dist/debian/trusty/debian/docs new file mode 100644 index 000000000..58e5e3e76 --- /dev/null +++ b/dist/debian/trusty/debian/docs @@ -0,0 +1,2 @@ +changelog +README diff --git a/dist/debian/trusty/debian/libnel-dev.docs b/dist/debian/trusty/debian/libnel-dev.docs new file mode 100644 index 000000000..ba8894c15 --- /dev/null +++ b/dist/debian/trusty/debian/libnel-dev.docs @@ -0,0 +1,2 @@ +README + diff --git a/dist/debian/trusty/debian/libnel-dev.install b/dist/debian/trusty/debian/libnel-dev.install new file mode 100644 index 000000000..9f9310cee --- /dev/null +++ b/dist/debian/trusty/debian/libnel-dev.install @@ -0,0 +1,3 @@ +usr/include/* +usr/lib/*/libnel*.so +usr/lib/*/pkgconfig/* diff --git a/dist/debian/trusty/debian/libnel-dev.manpages b/dist/debian/trusty/debian/libnel-dev.manpages new file mode 100644 index 000000000..bb4027ca9 --- /dev/null +++ b/dist/debian/trusty/debian/libnel-dev.manpages @@ -0,0 +1 @@ +debian/nel-config.1 diff --git a/dist/debian/trusty/debian/libnel-doc.doc-base.nel b/dist/debian/trusty/debian/libnel-doc.doc-base.nel new file mode 100644 index 000000000..6ae95fc9f --- /dev/null +++ b/dist/debian/trusty/debian/libnel-doc.doc-base.nel @@ -0,0 +1,9 @@ +Document: nel +Title: NeL Reference Manual +Author: Nevrax +Abstract: This is a software platform for creating and running massively multi-user entertainment in a 3D environment over the Internet. +Section: Programming/C + +Format: HTML +Index: /usr/share/doc/libnel-doc/html/index.html +Files: /usr/share/doc/libnel-doc/html/*.html diff --git a/dist/debian/trusty/debian/libnel-doc.install b/dist/debian/trusty/debian/libnel-doc.install new file mode 100644 index 000000000..bf3f02a61 --- /dev/null +++ b/dist/debian/trusty/debian/libnel-doc.install @@ -0,0 +1 @@ +usr/share/doc/libnel-doc/html/* diff --git a/dist/debian/trusty/debian/libnel0.install b/dist/debian/trusty/debian/libnel0.install new file mode 100644 index 000000000..4273c0ad1 --- /dev/null +++ b/dist/debian/trusty/debian/libnel0.install @@ -0,0 +1,3 @@ +usr/lib/*/libnel*.so.* +usr/lib/*/nel/libnel_drv_openal.so +usr/lib/*/nel/libnel_drv_opengl.so diff --git a/dist/debian/trusty/debian/libryzom-clientsheets0.install b/dist/debian/trusty/debian/libryzom-clientsheets0.install new file mode 100644 index 000000000..b5ea5b79c --- /dev/null +++ b/dist/debian/trusty/debian/libryzom-clientsheets0.install @@ -0,0 +1,2 @@ +usr/lib/*/libryzom_clientsheets.so.* + diff --git a/dist/debian/trusty/debian/libryzom-gameshare0.install b/dist/debian/trusty/debian/libryzom-gameshare0.install new file mode 100644 index 000000000..2f51b0804 --- /dev/null +++ b/dist/debian/trusty/debian/libryzom-gameshare0.install @@ -0,0 +1,2 @@ +usr/lib/*/libryzom_gameshare.so.* + diff --git a/dist/debian/trusty/debian/libryzom-sevenzip0.install b/dist/debian/trusty/debian/libryzom-sevenzip0.install new file mode 100644 index 000000000..1edced3f8 --- /dev/null +++ b/dist/debian/trusty/debian/libryzom-sevenzip0.install @@ -0,0 +1,2 @@ +usr/lib/*/libryzom_sevenzip.so.* + diff --git a/dist/debian/trusty/debian/nel-config.1 b/dist/debian/trusty/debian/nel-config.1 new file mode 100644 index 000000000..be47bf496 --- /dev/null +++ b/dist/debian/trusty/debian/nel-config.1 @@ -0,0 +1,37 @@ +.TH nel-config 1 "26 Oct 2007" +.SH NAME +nel-config \- Get information about a libnel installation +.SH SYNOPSIS +.B nel-config [options] +.SH DESCRIPTION +.B nel-config +displays information about a libnel installation. +.SH OPTIONS +.IP "--cflags" +Set of compiler options (CFLAGS) to use when compiling files that use +libnel. Currently that is only thw include path to the nel include files. +.IP "--libs" +Shows the complete set of libs and other linker options you will need in order +to link your application with libnel. +.IP "--prefix" +This is the prefix used when libnel was installed. libnel is then installed +in $prefix/lib and its header files are installed in $prefix/include and so +on. The prefix is set with "configure \-\-prefix". +.IP "--version" +Outputs version information about the installed libnel. +.SH "EXAMPLES" +What linker options do I need when I link with libnel? + + $ nel-config \-\-libs + +What compiler options do I need when I compile using libnel functions? + + $ nel-config \-\-cflags + +What's the installed libnel version? + + $ nel-config \-\-version +.SH AUTHOR +.PP +This manual page was written by G\[:u]rkan Seng\[:u]n +,for the Debian project (but may be used by others). diff --git a/dist/debian/trusty/debian/nel-tools.install b/dist/debian/trusty/debian/nel-tools.install new file mode 100644 index 000000000..4ca03208c --- /dev/null +++ b/dist/debian/trusty/debian/nel-tools.install @@ -0,0 +1,87 @@ +etc/nel/build_ig_boxes.cfg +etc/nel/build_indoor_rbank.cfg +etc/nel/build_rbank.cfg +etc/nel/make_sheet_id.cfg +etc/nel/words_dic.cfg +etc/nel/zviewer.cfg +usr/bin/animation_set_builder +usr/bin/anim_builder +usr/bin/bnp_make +usr/bin/build_clod_bank +usr/bin/build_clodtex +usr/bin/build_coarse_mesh +usr/bin/build_far_bank +usr/bin/build_ig_boxes +usr/bin/build_indoor_rbank +usr/bin/build_interface +usr/bin/build_rbank +usr/bin/build_samplebank +usr/bin/build_shadow_skin +usr/bin/build_smallbank +usr/bin/build_sound +usr/bin/build_soundbank +usr/bin/cluster_viewer +usr/bin/disp_sheet_id +usr/bin/extract_filename +usr/bin/file_info +usr/bin/georges2csv +usr/bin/get_neighbors +usr/bin/hls_bank_maker +usr/bin/ig_add +usr/bin/ig_info +usr/bin/ig_lighter +usr/bin/lock +usr/bin/make_sheet_id +usr/bin/memlog +usr/bin/message_box_qt +usr/bin/nl_probe_timers +usr/bin/nl_sample_chatclient +usr/bin/nl_sample_chatserver +usr/bin/nl_sample_clusterview +usr/bin/nl_sample_command +usr/bin/nl_sample_configfile +usr/bin/nl_sample_ct_ai_service +usr/bin/nl_sample_ct_gd_service +usr/bin/nl_sample_debug +usr/bin/nl_sample_font +usr/bin/nl_sample_georges +usr/bin/nl_sample_i18n +usr/bin/nl_sample_log +usr/bin/nl_sample_ls_client +usr/bin/nl_sample_ls_fes +usr/bin/nl_sample_pacs +usr/bin/nl_sample_shapeview +usr/bin/nl_sample_sound_sources +usr/bin/nl_sample_stream_file +usr/bin/nl_sample_stream_ogg_vorbis +usr/bin/nl_sample_strings +usr/bin/nl_sample_udpclient +usr/bin/nl_sample_udpserver +usr/bin/panoply_maker +usr/bin/shapes_exporter +usr/bin/tga2dds +usr/bin/tga_cut +usr/bin/tga_resize +usr/bin/tile_edit_qt +usr/bin/words_dic_qt +usr/bin/xml_packer +usr/bin/zone_check_bind +usr/bin/zone_dependencies +usr/bin/zone_dump +usr/bin/zone_ig_lighter +usr/bin/zone_lighter +usr/bin/zone_welder +usr/bin/zviewer +usr/lib/*/libs3tc_compressor.so.* +usr/share/nel/nl_sample_chat +usr/share/nel/nl_sample_class_transport +usr/share/nel/nl_sample_clusterview +usr/share/nel/nl_sample_configfile +usr/share/nel/nl_sample_font +usr/share/nel/nl_sample_georges +usr/share/nel/nl_sample_i18n +usr/share/nel/nl_sample_login_system +usr/share/nel/nl_sample_pacs +usr/share/nel/nl_sample_sound +usr/share/nel/nl_sample_udp +usr/share/nel/zviewer diff --git a/dist/debian/trusty/debian/rules b/dist/debian/trusty/debian/rules new file mode 100755 index 000000000..2b329f3be --- /dev/null +++ b/dist/debian/trusty/debian/rules @@ -0,0 +1,19 @@ +#!/usr/bin/make -f +%: + dh $@ --buildsystem=cmake --parallel + +override_dh_strip: + dh_strip -plibnel0 --dbg-package=libnel0-dbg + dh_strip -pnel-tools --dbg-package=nel-tools-dbg + dh_strip -plibryzom-sevenzip0 --dbg-package=libryzom-sevenzip0-dbg + dh_strip -plibryzom-gameshare0 --dbg-package=libryzom-gameshare0-dbg + dh_strip -plibryzom-clientsheets0 --dbg-package=libryzom-clientsheets0-dbg + dh_strip -pryzom-client --dbg-package=ryzom-client-dbg + dh_strip -pryzom-tools --dbg-package=ryzom-tools-dbg + +override_dh_auto_configure: + dh_auto_configure -- -DLIBRARY_ARCHITECTURE=$(DEB_HOST_MULTIARCH) -DTARGET_CPU=$(DEB_HOST_GNU_CPU) -DWITH_SYMBOLS=ON -DNL_ETC_PREFIX=/etc/nel -DRYZOM_ETC_PREFIX=/etc/ryzom -DRYZOM_SHARE_PREFIX=/usr/share/games/ryzom -DRYZOM_BIN_PREFIX=/usr/bin -DRYZOM_GAMES_PREFIX=/usr/games -DWITH_RYZOM_SERVER=OFF -DWITH_NEL_TESTS=OFF -DWITH_LIBWWW_STATIC=ON -DWITH_QT=ON + +override_dh_install: + dh_install + install -m755 debian/ryzom debian/ryzom-client/usr/games/ryzom diff --git a/dist/debian/trusty/debian/ryzom b/dist/debian/trusty/debian/ryzom new file mode 100755 index 000000000..79923e9e9 --- /dev/null +++ b/dist/debian/trusty/debian/ryzom @@ -0,0 +1,116 @@ +#!/bin/sh + +P7ZIP=/usr/bin/7z +RSYNC=/usr/bin/rsync +WGET=/usr/bin/wget +RYZOM_CLIENT=/usr/games/ryzom_client +RYZOM_CONFIG_DEFAULT=/etc/ryzom/client_default.cfg +RYZOM_CONFIG=~/.ryzom/client.cfg + +RYZOM_DIR=~/.ryzom +DATA_DIR=$RYZOM_DIR/data + +mkdir -p $RYZOM_DIR + +if [ ! -d "$DATA_DIR" ] +then + # symlink user's data dir to ryzom data cache + ln -s /var/cache/ryzom/data $DATA_DIR +fi + +# Check if a directory contains Ryzom data +ryzom_data_found() +{ + # Check for directory, gamedev.bnp and ryzom.ttf + COUNT=0 + + if [ -d $1 ] + then + # If there are a least 220 bnp files, we could use this directory + # There are 226 bnp files in last version + COUNT=$(find -L $1 -name *.bnp | wc -l) + fi + + echo $COUNT +} + +COUNT=$(ryzom_data_found $DATA_DIR) + +echo "Found $COUNT BNP files in $DATA_DIR" + +if [ $COUNT -lt 220 ] && [ -f $WGET ] && [ -f $P7ZIP ] +then + mkdir -p "$DATA_DIR/tmp" + + # Check free diskspace + echo "Checking for free disk space..." + DISKSPACE=$(df "$DATA_DIR/tmp" | grep "/dev" | awk '{print $4}') + if [ $? -ne 0 ] + then + exit 1 + fi + if [ "$DISKSPACE" -lt "8000000" ] + then + echo "You don't have enough free space to download and uncompress Ryzom client data." + exit 1 + fi + + # Download + echo "Downloading ryzom_client.7z from sourceforge..." + # wget + $WGET -c http://sourceforge.net/projects/ryzom/files/ryzom_client.7z -O "$DATA_DIR/tmp/ryzom_client.7z" + if [ $? -ne 0 ] + then + exit 1 + fi + + # Extract data + echo "Extracting data from ryzom_client.7z..." + cd "$DATA_DIR/tmp" + # 7z + $P7ZIP x ryzom_client.7z + if [ $? -ne 0 ] + then + exit 1 + fi + cd .. + mv -uf tmp/ryzom/data/* . + # Delete temporary downloaded files + rm -rf tmp +fi + +if [ -f $RYZOM_CONFIG ] +then + echo "Updating $RYZOM_CONFIG..." + + # Escape path for sed using bash find and replace + RYZOM_CONFIG_DEFAULT_ESCAPED=$(echo $RYZOM_CONFIG_DEFAULT | sed 's/\//\\\//g') + + # Update RootConfigFilename to be sure it's using the right default config + sed -i 's/RootConfigFilename.*/RootConfigFilename = \"'$RYZOM_CONFIG_DEFAULT_ESCAPED'\"/g' $RYZOM_CONFIG +fi + +if [ -f $RSYNC ] +then + echo "Patching Ryzom data..." + + # Rsync + $RSYNC -rOtzv --progress --stats www.ryzom.com::ryzom/data/ $DATA_DIR + if [ $? -ne 0 ] + then + exit 1 + fi +fi + +# Launch Ryzom client if it exists +if [ -f $RYZOM_CLIENT ] +then + echo "Launching Ryzom..." + + nohup $RYZOM_CLIENT $1 $2 $3 2> /dev/null & +fi + +# Wait until all previous commands are executed and displayed before exiting +sync + +exit 0 diff --git a/dist/debian/trusty/debian/ryzom-client-config.install b/dist/debian/trusty/debian/ryzom-client-config.install new file mode 100644 index 000000000..bef3f53dd --- /dev/null +++ b/dist/debian/trusty/debian/ryzom-client-config.install @@ -0,0 +1 @@ +debian/client_default.cfg etc/ryzom diff --git a/dist/debian/trusty/debian/ryzom-client.dirs b/dist/debian/trusty/debian/ryzom-client.dirs new file mode 100644 index 000000000..d1571095c --- /dev/null +++ b/dist/debian/trusty/debian/ryzom-client.dirs @@ -0,0 +1,4 @@ +usr/games +usr/share/applications +usr/share/pixmaps +var/cache/ryzom/data diff --git a/dist/debian/trusty/debian/ryzom-client.install b/dist/debian/trusty/debian/ryzom-client.install new file mode 100644 index 000000000..be142a6be --- /dev/null +++ b/dist/debian/trusty/debian/ryzom-client.install @@ -0,0 +1,4 @@ +usr/games/ryzom_client +usr/share/icons +usr/share/pixmaps +debian/ryzom_client.desktop usr/share/applications diff --git a/dist/debian/trusty/debian/ryzom-client.menu b/dist/debian/trusty/debian/ryzom-client.menu new file mode 100644 index 000000000..5e15bf577 --- /dev/null +++ b/dist/debian/trusty/debian/ryzom-client.menu @@ -0,0 +1,6 @@ +?package(ryzom-client): \ + needs="x11" \ + section="Games/Adventure" \ + icon="/usr/share/pixmaps/ryzom.xpm" \ + title="Ryzom" \ + command="/usr/games/ryzom" diff --git a/dist/debian/trusty/debian/ryzom-client.postinst b/dist/debian/trusty/debian/ryzom-client.postinst new file mode 100644 index 000000000..51570a3dc --- /dev/null +++ b/dist/debian/trusty/debian/ryzom-client.postinst @@ -0,0 +1,10 @@ +#!/bin/sh + +if ! getent group ryzom ; then + addgroup --system ryzom +fi + +chgrp -R ryzom /var/cache/ryzom/data +chmod -R g+wrxs /var/cache/ryzom/data + +#DEBHELPER# diff --git a/dist/debian/trusty/debian/ryzom-client.postrm b/dist/debian/trusty/debian/ryzom-client.postrm new file mode 100644 index 000000000..828871eb4 --- /dev/null +++ b/dist/debian/trusty/debian/ryzom-client.postrm @@ -0,0 +1,49 @@ +#! /bin/sh +# postrm script for ryzom-client +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `remove' +# * `purge' +# * `upgrade' +# * `failed-upgrade' +# * `abort-install' +# * `abort-install' +# * `abort-upgrade' +# * `disappear' overwrit>r> +# for details, see /usr/share/doc/packaging-manual/ + +case "$1" in + purge) + + FILES=/home/* + + for f in $FILES + do + FOLDER="$f/.ryzom/data" + + if [ -d $FOLDER ] + then + rm -rf $FOLDER + echo "Deleting $FOLDER..." + fi + done + + ;; + + remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + + ;; + + *) + echo "postrm called with unknown argument \`$1'" >&2 + exit 1 + +esac + +#DEBHELPER# + +exit 0 diff --git a/dist/debian/trusty/debian/ryzom-tools.install b/dist/debian/trusty/debian/ryzom-tools.install new file mode 100644 index 000000000..c468e32d8 --- /dev/null +++ b/dist/debian/trusty/debian/ryzom-tools.install @@ -0,0 +1,26 @@ +usr/bin/7zDec +usr/bin/alias_synchronizer +usr/bin/assoc_mem +usr/bin/csv_transform +usr/bin/georges_editor_qt +usr/bin/icon_search +usr/bin/make_alias_file +usr/bin/make_anim_by_race +usr/bin/make_anim_melee_impact +usr/bin/mp_generator +usr/bin/named2csv +usr/bin/patch_gen +usr/bin/patch_gen_service +usr/bin/pd_parser +usr/bin/pdr_util +usr/bin/prim_export +usr/bin/ryzom_mission_compiler +usr/bin/sheets_packer +usr/bin/skill_extractor +usr/bin/stats_scan +usr/bin/translation_tools +usr/bin/uni_conv +usr/games/ryzom_client_patcher +usr/lib/*/libryzom_mission_compiler_lib.so.* +usr/share/games/ryzom/data_leveldesign +usr/share/games/ryzom/georges_editor_qt diff --git a/dist/debian/trusty/debian/ryzom_client.desktop b/dist/debian/trusty/debian/ryzom_client.desktop new file mode 100644 index 000000000..1c62d1b6a --- /dev/null +++ b/dist/debian/trusty/debian/ryzom_client.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Version=1.0 +Name=Ryzom +Name[ru]=Ризом +Type=Application +GenericName=ryzom_client +Exec=/usr/games/ryzom +Icon=ryzom_client +Terminal=true +Hidden=false +Categories=Game;RolePlaying; diff --git a/dist/debian/trusty/debian/source/format b/dist/debian/trusty/debian/source/format new file mode 100644 index 000000000..b9b023757 --- /dev/null +++ b/dist/debian/trusty/debian/source/format @@ -0,0 +1,2 @@ +1.0 + diff --git a/dist/debian/update.sh b/dist/debian/update.sh new file mode 100755 index 000000000..a68d3edb4 --- /dev/null +++ b/dist/debian/update.sh @@ -0,0 +1,43 @@ +#!/bin/sh + +HGBIN="/usr/bin/hg" +CODEROOT=../../code + +echo "Generating changelogs..." +$HGBIN log -M --style $CODEROOT/changelog.template > $CODEROOT/changelog + +REVISION=$($HGBIN identify -n | grep -o -P "[0-9]+") +echo "Found revision $REVISION" + +REVISION_H=$CODEROOT/revision.h + +# Copy revision.h template +cp $REVISION_H.in $REVISION_H + +DATE=$(date "+%Y-%m-%d %H:%M:%S") + +# Update revision.h with revision and build date +sed -i 's/#cmakedefine/#define/g' $REVISION_H +sed -i 's/${REVISION}/'$REVISION'/g' $REVISION_H +sed -i 's/${BUILD_DATE}/'"$DATE"'/g' $REVISION_H + +VERSION=$(./ryzomcore_version.sh) + +if [ -z "$VERSION" ] +then + echo "Can't parse version from $VERSION_FILE, aborting..." + exit 1 +fi + +DSTFOLDER=ryzom-core-$VERSION.$REVISION + +# remove destination folder if present +rm -rf $DSTFOLDER.orig +# copy all files +echo "Copying files to $DSTFOLDER..." +cp -r -p $CODEROOT $DSTFOLDER.orig + +echo "Removing web files, because we don't need them and they generate lintian errors..." +rm -rf $DSTFOLDER.orig/web + +echo "Done. Now launch ./update_debian.sh " diff --git a/dist/debian/update_debian.sh b/dist/debian/update_debian.sh new file mode 100755 index 000000000..8c2c5dd7d --- /dev/null +++ b/dist/debian/update_debian.sh @@ -0,0 +1,88 @@ +#!/bin/sh + +HGBIN="/usr/bin/hg" +DCHBIN="/usr/bin/dch" + +if [ ! -e $DCHBIN ] +then + apt-get install devscripts debhelper +fi + +DISTRIB=$1 +MINORDISTRIB=$2 + +if [ -z "$DISTRIB" ] +then + echo "You must specify a distribution" + exit 1 +fi + +if [ -z "$MINORDISTRIB" ] +then + MINORDISTRIB=1 +fi + +if [ ! -d "$DISTRIB" ] +then + echo "$DISTRIB is not supported, you can create the folder or compile for another version." + exit 1 +fi + +echo "Targetting $DISTRIB..." + +VERSION=$(./ryzomcore_version.sh) + +if [ -z "$VERSION" ] +then + echo "Can't parse version from $VERSION_FILE, aborting..." + exit 1 +fi + +REVISION=$($HGBIN identify -n | grep -o -P "[0-9]+") + +DSTFOLDER=ryzom-core-$VERSION.$REVISION + +if [ ! -d "$DSTFOLDER.orig" ] +then + echo "$DSTFOLDER.orig doesn't exist, did you forget to launch ./update.sh?" + exit 1 +fi + +# copy files if directory doesn't exist +if [ ! -d $DSTFOLDER ] +then + # copy all files + echo "Copying files to $DSTFOLDER..." + cp -r -p $DSTFOLDER.orig $DSTFOLDER +fi + +cd $DSTFOLDER + +echo "Copying debian directory..." +# delete debian directory if present +rm -rf debian +# create debian folder +mkdir -p debian +# copy debian folder +cp -r -p ../$DISTRIB/debian . + +# returning the line with the version +LAST_VERSION=`grep $VERSION.$REVISION debian/changelog` +FULL_VERSION=$VERSION.$REVISION-1~$DISTRIB$MINORDISTRIB + +# adding the new version to changelog +if [ -z "$LAST_VERSION" ] +then + echo "Adding $FULL_VERSION to debian/changelog for $DISTRIB" + $DCHBIN --force-distribution -b -v $FULL_VERSION -D $DISTRIB "New upstream release (revision $REVISION)" +else + echo "Last version is $LAST_VERSION" +fi + +echo "Creating source package..." +debuild -S + +cd .. + +echo "Done." +echo "If you want to upload source to your PPA, type: dput ryzom-core_"$FULL_VERSION"_source.changes" diff --git a/dist/debian/utopic/debian/changelog b/dist/debian/utopic/debian/changelog new file mode 100644 index 000000000..44f3e244e --- /dev/null +++ b/dist/debian/utopic/debian/changelog @@ -0,0 +1,408 @@ +ryzom-core (0.8.2802~raring1) raring; urgency=low + + * New upstream release (revision 2802) + + -- Cédric OCHS Mon, 10 Dec 2012 11:12:17 +0100 + +ryzom-core (0.8.2786~raring1) raring; urgency=low + + * New upstream release (revision 2786) + + -- Cédric OCHS Fri, 07 Dec 2012 16:33:15 +0100 + +ryzom-core (0.8.2691~quantal1) quantal; urgency=low + + * New upstream release (revision 2691) + + -- Cédric OCHS Sun, 07 Oct 2012 09:46:56 +0200 + +ryzom-core (0.8.2682~quantal1) quantal; urgency=low + + * New upstream release (revision 2682) + + -- Cédric OCHS Wed, 03 Oct 2012 15:59:54 +0200 + +ryzom-core (0.8.2681~quantal2) quantal; urgency=low + + * New upstream release (revision 2681) + + -- Cédric OCHS Tue, 02 Oct 2012 17:42:23 +0200 + +ryzom-core (0.8.2681~quantal1) quantal; urgency=low + + * New upstream release (revision 2681) + + -- Cédric OCHS Tue, 02 Oct 2012 17:13:57 +0200 + +ryzom-core (0.8.2650~quantal2) quantal; urgency=low + + * New upstream release (revision 2650) + + -- Cédric OCHS Mon, 24 Sep 2012 22:06:37 +0200 + +ryzom-core (0.8.2650~quantal1) quantal; urgency=low + + * New upstream release (revision 2650) + + -- Cédric OCHS Mon, 24 Sep 2012 20:55:19 +0200 + +ryzom-core (0.8.2025~precise1) precise; urgency=low + + * New upstream release (revision 2025) + + -- Cédric OCHS Sat, 10 Mar 2012 22:23:49 +0100 + +ryzom-core (0.8.2024~precise1) precise; urgency=low + + * New upstream release (revision 2024) + + -- Cédric OCHS Sat, 10 Mar 2012 11:16:08 +0100 + +ryzom-core (0.8.1847~natty1) natty; urgency=low + + * New upstream release (revision 1847) + + -- Cédric OCHS Mon, 17 Oct 2011 09:33:45 +0200 + +ryzom-core (0.8.1847~natty0) natty; urgency=low + + * New upstream release (revision 1847) + + -- Cédric OCHS Sun, 16 Oct 2011 18:45:27 +0200 + +ryzom-core (0.8.1758~natty0) natty; urgency=low + + * New upstream release (revision 1758) + + -- Cédric OCHS Tue, 16 Aug 2011 09:02:55 +0200 + +ryzom-core (0.8.1752~natty0) natty; urgency=low + + * New upstream release (revision 1752) + + -- Cédric OCHS Sun, 14 Aug 2011 16:07:29 +0200 + +ryzom-core (0.8.1751~natty0) natty; urgency=low + + * New upstream release (revision 1751) + + -- Cédric OCHS Sun, 14 Aug 2011 14:16:24 +0200 + +ryzom-core (0.8.1750~natty0) natty; urgency=low + + * New upstream release (revision 1750) + + -- Cédric OCHS Sun, 14 Aug 2011 12:30:18 +0200 + +ryzom-core (0.8.1744~natty0) natty; urgency=low + + * New upstream release (revision 1744) + + -- Cédric OCHS Sat, 13 Aug 2011 20:24:49 +0200 + +ryzom-core (0.8.1742~natty0) natty; urgency=low + + * New upstream release (revision 1742) + + -- Cédric OCHS Fri, 12 Aug 2011 18:11:07 +0200 + +ryzom-core (0.8.1628~natty0) natty; urgency=low + + * New upstream release (revision 1628) + + -- Cédric OCHS Fri, 17 Jun 2011 12:56:17 +0200 + +ryzom-core (0.8.1627~natty0) natty; urgency=low + + * New upstream release (revision 1627) + + -- Cédric OCHS Tue, 14 Jun 2011 20:37:05 +0200 + +ryzom-core (0.8.1611~natty0) natty; urgency=low + + * New upstream release (revision 1611) + + -- Cédric OCHS Wed, 08 Jun 2011 19:53:44 +0200 + +ryzom-core (0.8.1596~natty1) natty; urgency=low + + * New upstream release (revision 1596) + + -- Cédric OCHS Sat, 04 Jun 2011 18:11:45 +0200 + +ryzom-core (0.7.1406~natty0) natty; urgency=low + + * New upstream release (revision 1406) + + -- Kervala Sun, 13 Mar 2011 19:07:44 +0100 + +ryzom-core (0.7.1404~karmic0) karmic; urgency=low + + * New upstream release (revision 1404) + + -- Kervala Thu, 10 Mar 2011 20:13:35 +0100 + +ryzom-core (0.7.1122~karmic0) karmic; urgency=low + + * New upstream release (revision 1122) + + -- Kervala Thu, 25 Nov 2010 13:18:41 +0100 + +ryzom-core (0.7.992~karmic0) karmic; urgency=low + + * New upstream release (revision 992) + + -- Kervala Tue, 19 Oct 2010 13:44:23 +0200 + +ryzom-core (0.7.941~karmic0) karmic; urgency=low + + * New upstream release (revision 941) + + -- Kervala Sat, 16 Oct 2010 14:59:36 +0200 + +ryzom-core (0.7.933~karmic0) karmic; urgency=low + + * New upstream release (revision 933) + + -- Kervala Fri, 15 Oct 2010 22:29:44 +0200 + +ryzom-core (0.7.932~karmic0) karmic; urgency=low + + * New upstream release (revision 932) + + -- Kervala Fri, 15 Oct 2010 19:53:47 +0200 + +ryzom-core (0.7.666~karmic0) karmic; urgency=low + + * New upstream release (revision 666) + + -- Kervala Sun, 29 Aug 2010 17:56:06 +0200 + +ryzom-core (0.7.631~karmic0) karmic; urgency=low + + * New upstream release (revision 631) + + -- Kervala Thu, 12 Aug 2010 16:57:30 +0200 + +ryzom-core (0.7.614~lucid1) lucid; urgency=low + + * Fixed dependencies + + -- Kervala Sun, 08 Aug 2010 22:42:50 +0200 + +ryzom-core (0.7.614~lucid0) lucid; urgency=low + + * New upstream release (revision 614) + + -- Kervala Sun, 08 Aug 2010 21:53:00 +0200 + +ryzom-core (0.7.583~lucid1) lucid; urgency=low + + * Added dependency on libogg and libvorbis + + -- Kervala Sun, 01 Aug 2010 15:38:40 +0200 + +ryzom-core (0.7.583~lucid0) lucid; urgency=low + + * New upstream release (revision 583) + + -- Kervala Sun, 01 Aug 2010 14:43:28 +0200 + +ryzom-core (0.7.530~lucid0) lucid; urgency=low + + * New upstream release (revision 530) + + -- Kervala Sun, 25 Jul 2010 16:50:57 +0200 + +ryzom-core (0.7.519~lucid0) lucid; urgency=low + + * New upstream release (revision 519) + + -- Kervala Mon, 19 Jul 2010 22:24:05 +0200 + +ryzom-core (0.7.507~lucid0) lucid; urgency=low + + * New upstream release (revision 507) + + -- Kervala Sat, 17 Jul 2010 19:56:35 +0200 + +ryzom-core (0.7.474~lucid0) lucid; urgency=low + + * New upstream release (revision 474) + + -- Kervala Tue, 13 Jul 2010 08:56:24 +0200 + +ryzom-core (0.7.473~lucid1) lucid; urgency=low + + * Some fixes + + -- Kervala Mon, 12 Jul 2010 22:46:16 +0200 + +ryzom-core (0.7.473~lucid0) lucid; urgency=low + + * New upstream release (revision 473) + + -- Kervala Mon, 12 Jul 2010 22:04:30 +0200 + +ryzom-core (0.7.437~lucid1) lucid; urgency=low + + * Fixed drivers installation + + -- Kervala Thu, 08 Jul 2010 08:54:02 +0200 + +ryzom-core (0.7.437~lucid0) lucid; urgency=low + + * New upstream release (revision 437) + + -- Kervala Thu, 01 Jul 2010 20:07:14 +0200 + +ryzom-core (0.7.419~lucid0) lucid; urgency=low + + * New upstream release (revision 419) + + -- Kervala Sat, 26 Jun 2010 18:58:36 +0200 + +ryzom-core (0.7.411~lucid0) lucid; urgency=low + + * New upstream release (revision 411) + + -- Kervala Sat, 26 Jun 2010 11:00:47 +0200 + +ryzom-core (0.7.404~lucid1) lucid; urgency=low + + * Fix OpenAL driver + + -- Kervala Thu, 24 Jun 2010 23:06:51 +0200 + +ryzom-core (0.7.404~lucid0) lucid; urgency=low + + * New upstream release (revision 404) + + -- Kervala Thu, 24 Jun 2010 22:17:36 +0200 + +ryzom-core (0.7.394~lucid0) lucid; urgency=low + + * New upstream release (revision 394) + + -- Kervala Tue, 22 Jun 2010 06:53:15 +0200 + +ryzom-core (0.7.375~lucid0) lucid; urgency=low + + * New upstream release (revision 375) + + -- Kervala Wed, 16 Jun 2010 12:46:51 +0200 + +ryzom-core (0.7.371~lucid0) lucid; urgency=low + + * New upstream release (revision 371) + + -- Kervala Mon, 14 Jun 2010 22:48:27 +0200 + +ryzom-core (0.7.359~lucid0) lucid; urgency=low + + * New upstream release (revision 359) + + -- Kervala Sun, 13 Jun 2010 21:31:29 +0200 + +ryzom-core (0.7.350~lucid1) lucid; urgency=low + + * Fixes problem with "copy" files + + -- Kervala Sun, 13 Jun 2010 10:36:30 +0200 + +ryzom-core (0.7.350~lucid0) lucid; urgency=low + + * New upstream release (revision 350) + + -- Kervala Sun, 13 Jun 2010 09:55:38 +0200 + +ryzom-core (0.7.332~lucid0) lucid; urgency=low + + * New upstream release (revision 332) + + -- Kervala Sat, 12 Jun 2010 09:09:21 +0200 + +ryzom-core (0.7.317~lucid0) lucid; urgency=low + + * New upstream release (revision 317) + + -- Kervala Thu, 10 Jun 2010 13:11:28 +0200 + +ryzom-core (0.7.315~lucid0) lucid; urgency=low + + * Fixed pkg-config installation again + + -- Kervala Thu, 10 Jun 2010 08:19:44 +0200 + +ryzom-core (0.7.311~lucid2) lucid; urgency=low + + * Fixed pkg-config files + + -- Kervala Wed, 09 Jun 2010 22:58:15 +0200 + +ryzom-core (0.7.311~lucid1) lucid; urgency=low + + * Fixed dependencies versions + + -- Kervala Wed, 09 Jun 2010 22:27:00 +0200 + +ryzom-core (0.7.311~lucid0) lucid; urgency=low + + * New upstream version (revision 311). + + -- Kervala Wed, 09 Jun 2010 21:15:42 +0200 + +ryzom-core (0.7.304~lucid0) lucid; urgency=low + + * New upstream version (revision 304). + + -- Kervala Wed, 09 Jun 2010 08:34:10 +0200 + +ryzom-core (0.7.0-1) unstable; urgency=low + + [ Gürkan Sengün ] + * New upstream version. (Closes: #553248) + * Updated build dependencies. + + [ Michal Čihař ] + * Convert to dh with cmake support. + * Bump standards to 3.8.4. + + [ Luboš Novák ] + * Change maintainer to 'Debian Games Team' + * ftbfs_gcc_4.5.path: Fix build with g++-4.5. (Closes: #565104) + * Converted direct changes in source to patches. + * Enable building CEGUI renderer. + * Add package libnel-doc with documentation. + * debian/control + + Changed priority of libnel-dbg to extra. + + Remove duplicate Section in libnel0. + + Update short descriptions. + + Replace obsolete package xlibmesa-gl-dev with libgl1-mesa-dev + in build-depends. + + Add libpng-dev to build-depends. + + Remove libalut-dev from build-depends. + + New homepage. + + Supported architectures are i386 and amd64. + * debian/libnel-dev.dirs + + Remove empty dir usr/lib/nel. + * debian/copyright + + Update redistribution licence from GPL to GPL-2. + * debian/rules + + Disable building unit test, samples and tools. + + -- Luboš Novák Tue, 30 Mar 2010 10:29:23 +0100 + +ryzom-core (0.5.0-1.1) unstable; urgency=low + + * Non-maintainer upload. + * Change Build-Depends: libstlport5.2-dev. (Closes: #521762) + + -- Torsten Werner Sun, 28 Jun 2009 11:54:05 +0200 + +ryzom-core (0.5.0-1) unstable; urgency=low + + * Initial release. (Closes: #448067) + + -- Gürkan Sengün Tue, 23 Oct 2007 12:56:45 +0200 + diff --git a/dist/debian/utopic/debian/client_default.cfg b/dist/debian/utopic/debian/client_default.cfg new file mode 100644 index 000000000..d09cbbb9c --- /dev/null +++ b/dist/debian/utopic/debian/client_default.cfg @@ -0,0 +1,567 @@ +////////////////////////// +////////////////////////// +/// CLIENT CONFIG FILE /// +////////////////////////// +////////////////////////// + + +// If you set this variable to 1, your client.cfg will be overwritten when you quit the client. +// You will loose all the comments and identation in this file. +SaveConfig = 1; + +/////////////////// +// WINDOW CONFIG // +/////////////////// + +Driver3D="Auto"; // Valid values are "Auto" or "0", "OpengGL" or "1" & "Direct3D" or "2" + // "Auto" will choose the best suited driver depending on hardware +FullScreen = 0; +Width = 1024; +Height = 768; +PositionX = 0; +PositionY = 0; +Frequency = 60; +Depth = 32; +Sleep = -1; +ProcessPriority = 0; // -2 = idle, -1 = below normal, 0 = normal, 1 = above normal, 2 = high, 3 = real time +Contrast = 0.0; // -1.0 ~ 1.0 +Luminosity = 0.0; // -1.0 ~ 1.0 +Gamma = 0.0; // -1.0 ~ 1.0 +Contrast_min = -1.0; +Luminosity_min = -1.0; +Gamma_min = -1.0; +Contrast_max = 1.0; +Luminosity_max = 1.0; +Gamma_max = 1.0; + + +///////////// +// NETWORK // +///////////// + +Application = { "ryzom_live", "./client_ryzom_r.exe", "./" }; +BackgroundDownloader = 0; +PatchServer = "http://dl.ryzom.com/patch_live"; +SignUpURL = "http://www.ryzom.com/subscribe"; +StartupHost = "shard.ryzom.com:40916"; +StartupPage = "/login/r2_login.php"; +InstallStatsUrl = "http://shard.ryzom.com:50000/stats/stats.php"; +CreateAccountURL = "https://secure.ryzom.com/signup/from_client.php"; +InstallWebPage = "http://dl.ryzom.com/installer/"; + + +//////////////// +// INTERFACES // +//////////////// + +// the language to use as in ISO 639-2 +LanguageCode = "en"; // english + +XMLInputFile = "input_config_v3.xml"; + +XMLLoginInterfaceFiles = { + "login_config.xml", + "login_widgets.xml", + "login_main.xml", + "login_keys.xml", +}; + +XMLOutGameInterfaceFiles = { + "out_v2_config.xml", + "out_v2_widgets.xml", + "out_v2_connect.xml", + "out_v2_intro.xml", + "out_v2_select.xml", + "out_v2_appear.xml", + "out_v2_location.xml", + "out_v2_crash.xml", + "out_v2_hierarchy.xml", + "out_v2_keys.xml", +}; + +// The ligo primitive class file +LigoPrimitiveClass = "world_editor_classes.xml"; + +VerboseLog = 1; + +/////////// +// MOUSE // +/////////// +HardwareCursor = 1; + +CursorSpeed = 1.0; // In pixels per mickey +CursorSpeed_min = 0.5; +CursorSpeed_max = 2.0; + +CursorAcceleration = 40; // Threshold in mickey +CursorAcceleration_min = 20; +CursorAcceleration_max = 80; + +FreeLookSpeed = 0.004; // In radian per mickey +FreeLookSpeed_min = 0.0001; +FreeLookSpeed_max = 0.01; + +FreeLookAcceleration = 40; // Threshold in mickey +FreeLookAcceleration_min = 20; +FreeLookAcceleration_max = 80; + +FreeLookInverted = 0; +AutomaticCamera = 0; +DblClickMode = 1; +AutoEquipTool = 1; + +/////////////////// +// RENDER CONFIG // +/////////////////// + +// NB: thoses variables configure also the InGameConfigurator: +// _min and _max define the bounds +// _step defines the step (NB: take care of _min and _max!!) +// _ps0 is the LOW preset, _ps1 is the MEDIUM preset, _ps2 is the NORMAL Preset, and _ps3 is the HIGH one + + +// *** LANDSCAPE +LandscapeTileNear = 150.000000; +LandscapeTileNear_min = 20.000000; +LandscapeTileNear_max = 250.000000; +LandscapeTileNear_step = 10.0; +LandscapeTileNear_ps0 = 20.0; +LandscapeTileNear_ps1 = 100.0; +LandscapeTileNear_ps2 = 150.0; +LandscapeTileNear_ps3 = 200.0; + +// NB: threshold is inverted ULandscape::setThreshold(), to be more intelligible +LandscapeThreshold = 2000.0; +LandscapeThreshold_min = 100.0; // Low quality => 0.01 threshold +LandscapeThreshold_max = 4000.0; // High quality => 0.0005 threshold +LandscapeThreshold_step = 100.0; +LandscapeThreshold_ps0 = 100.0; +LandscapeThreshold_ps1 = 1000.0; +LandscapeThreshold_ps2 = 2000.0; +LandscapeThreshold_ps3 = 3000.0; + +Vision = 500.000000; +Vision_min = 200.000000; +Vision_max = 800.000000; +Vision_step = 100.000000; +Vision_ps0 = 200.0; +Vision_ps1 = 400.0; +Vision_ps2 = 500.0; +Vision_ps3 = 800.0; + +MicroVeget = 1; // Enable/Disable MicroVeget. +MicroVeget_ps0 = 0; +MicroVeget_ps1 = 1; +MicroVeget_ps2 = 1; +MicroVeget_ps3 = 1; + +MicroVegetDensity = 80.0; +MicroVegetDensity_min = 10.0; +MicroVegetDensity_max = 100.0; +MicroVegetDensity_step = 10.0; +MicroVegetDensity_ps0 = 10.0; // not used since disabled! +MicroVegetDensity_ps1 = 30.0; +MicroVegetDensity_ps2 = 80.0; +MicroVegetDensity_ps3 = 100.0; + + +// *** FX +FxNbMaxPoly = 20000; +FxNbMaxPoly_min = 2000; +FxNbMaxPoly_max = 50000; +FxNbMaxPoly_step= 2000; +FxNbMaxPoly_ps0 = 2000; +FxNbMaxPoly_ps1 = 10000; +FxNbMaxPoly_ps2 = 20000; +FxNbMaxPoly_ps3 = 50000; + +Cloud = 1; +Cloud_ps0 = 0 ; +Cloud_ps1 = 1 ; +Cloud_ps2 = 1 ; +Cloud_ps3 = 1 ; + +CloudQuality = 160.0; +CloudQuality_min = 80.0; +CloudQuality_max = 320.0; +CloudQuality_step = 20.0; +CloudQuality_ps0 = 80.0; // not used since disabled! +CloudQuality_ps1 = 80.0; +CloudQuality_ps2 = 160.0; +CloudQuality_ps3 = 320.0; + +CloudUpdate = 1; +CloudUpdate_min = 1; +CloudUpdate_max = 8; +CloudUpdate_step= 1; +CloudUpdate_ps0 = 1; // not used since disabled! +CloudUpdate_ps1 = 1; +CloudUpdate_ps2 = 1; +CloudUpdate_ps3 = 3; + +Shadows = 1; +Shadows_ps0 = 0; +Shadows_ps1 = 1; +Shadows_ps2 = 1; +Shadows_ps3 = 1; + +Bloom = 0; +Bloom_ps0 = 0; +Bloom_ps1 = 1; +Bloom_ps2 = 1; +Bloom_ps3 = 1; + +SquareBloom = 1; +SquareBloom_ps0 = 0; +SquareBloom_ps1 = 1; +SquareBloom_ps2 = 1; +SquareBloom_ps3 = 1; + +DensityBloom = 255.0; +DensityBloom_min = 0.0; +DensityBloom_max = 255.0; +DensityBloom_step = 1.0; +DensityBloom_ps0 = 255.0; +DensityBloom_ps1 = 255.0; +DensityBloom_ps2 = 255.0; +DensityBloom_ps3 = 255.0; + + +// *** CHARACTERS +SkinNbMaxPoly = 100000; +SkinNbMaxPoly_min = 5000; +SkinNbMaxPoly_max = 250000; +SkinNbMaxPoly_step = 5000; +SkinNbMaxPoly_ps0 = 10000; +SkinNbMaxPoly_ps1 = 70000; +SkinNbMaxPoly_ps2 = 100000; +SkinNbMaxPoly_ps3 = 200000; + +NbMaxSkeletonNotCLod = 125; +NbMaxSkeletonNotCLod_min = 5; +NbMaxSkeletonNotCLod_max = 255; +NbMaxSkeletonNotCLod_step = 5; +NbMaxSkeletonNotCLod_ps0 = 10; +NbMaxSkeletonNotCLod_ps1 = 50; +NbMaxSkeletonNotCLod_ps2 = 125; +NbMaxSkeletonNotCLod_ps3 = 255; + +CharacterFarClip = 200.0; +CharacterFarClip_min = 50.0; +CharacterFarClip_max = 500.0; +CharacterFarClip_step = 10.0; +CharacterFarClip_ps0 = 50.0; +CharacterFarClip_ps1 = 100.0; +CharacterFarClip_ps2 = 200.0; +CharacterFarClip_ps3 = 500.0; + +EnableRacialAnimation = 1; + +// *** MISC +// This is the actual aspect ratio of your screen (no relation with the resolution!!). Set 1.7777 if you got a 16/9 screen for instance +ScreenAspectRatio = 0.0; +ForceDXTC = 1; // Enable/Disable DXTC. +DivideTextureSizeBy2= 0; // Divide texture size +DisableVtxProgram = 0; // Disable Hardware Vertex Program. +DisableVtxAGP = 0; // Disable Hardware Vertex AGP. +DisableTextureShdr = 0; // Disable Hardware Texture Shader. +HDEntityTexture = 0; +HDTextureInstalled = 1; +WaitVBL = 0; // 0 or 1 to wait Vertical Sync. + +////////////////// +// GAME OPTIONS // +////////////////// +SelectWithRClick = 1; +DisplayWeapons = 1; +RotKeySpeedMax = 2.0; +RotKeySpeedMax_min = 1.0; +RotKeySpeedMax_max = 4.0; +RotKeySpeedMin = 1.0; +RotKeySpeedMin_min = 0.5; +RotKeySpeedMin_max = 2.0; +RotAccel = 3.0; +FollowOnAtk = 0; +AtkOnSelect = 0; +ZCPacsPrim = "gen_bt_col_ext.pacs_prim"; + +///////////////// +// PREFERENCES // +///////////////// +FPV = 0; // FPV(First Person View) : default is false (Third Person View). +CameraHeight = 2.2; // Camera Height (in meter) from the ground (for the Third Person View). +CameraDistance = 3.0; // Camera Distance(in meter) from the user (for the Third Person View). +CameraDistStep = 1.0; +CameraDistMin = 1.0; +CameraDistMax = 25.0; +CameraAccel = 5.0; +CameraSpeedMin = 2.0; +CameraSpeedMax = 100.0; +CameraResetSpeed = 10.0; // Speed in radian/s + +////////////////// +// SOUND CONFIG // +////////////////// +SoundForceSoftwareBuffer= 1; +SoundOn = 1; +UseEax = 0; + +MaxTrack = 32; +MaxTrack_min = 4; +MaxTrack_max = 32; +MaxTrack_step = 4; + +// This is the volume for "InGame" sound FXs +SoundSFXVolume = 1.0; +SoundSFXVolume_min = 0.0; +SoundSFXVolume_max = 1.0; +SoundSFXVolume_step = 0.001; + +// This is volume for "InGame" music. Does not affect the MP3 player +SoundGameMusicVolume = 0.5; +SoundGameMusicVolume_min = 0.0; +SoundGameMusicVolume_max = 1.0; +SoundGameMusicVolume_step = 0.001; + +// MISC +PreDataPath = { "user", "patch", "examples", "data/fonts", "data/gamedev.bnp" }; +DataPath = { "data" }; +NeedComputeVS = 0; + +NegFiltersDebug = {"Update DB", "Reading:", "Read Value :", "impulseCallBack", "CLIMPD:", "LNET" }; +NegFiltersInfo = { "CLIMPD:", "CPath::lookup" , "LNET" }; +NegFiltersWarning = { "'basics.Equipment Slot'.", "_usercolor.tga", "PACS" }; + +// Big screen shot +ScreenShotWidth = 0; +ScreenShotHeight = 0; +ScreenShotFullDetail = 1; // 1 to switch full detail mode for characters (both standard & big screenshots) + +// Read : "ID", "R G B A MODE [FX]" +SystemInfoColors = +{ +// OLD STUFF Here for compatibility +"RG", "0 0 0 255 normal", // Black to see when there is an error +"BC", "0 0 0 255 normal", // Black to see when there is an error +"JA", "0 0 0 255 normal", // Black to see when there is an error +"BL", "0 0 0 255 normal", // Black to see when there is an error +"VE", "0 0 0 255 normal", // Black to see when there is an error +"VI", "0 0 0 255 normal", // Black to see when there is an error + +// NEW System Info Categories +"SYS", "255 255 255 255 normal", // Default system messages +"BC", "255 255 255 255 centeraround", // Broadcast messages +"TAGBC", "255 255 255 255 centeraround", // Taged broadcast messages : color should remain white as some word are tagged +"XP", "255 255 64 255 over", // XP Gain +"SP", "255 255 64 255 over", // SP Gain +"TTL", "255 255 64 255 over", // Title +"TSK", "255 255 255 255 over", // Task +"ZON", "255 255 255 255 center", // Zone +"DG", "255 0 0 255 normal", // Damage to me +"DMG", "255 0 0 255 normal", // Damage to me +"DGP", "200 0 0 255 normal", // Damage to me from player +"DGM", "255 128 64 255 normal", // Damage from me +"MIS", "150 150 150 255 normal", // The opponent misses +"MISM", "255 255 255 255 normal", // I miss +"ITM", "0 200 0 255 over", // Item +"ITMO", "170 170 255 255 overonly", // Item other in group +"ITMF", "220 0 220 255 over", // Item failed +"SPL", "50 50 250 255 normal", // Spell to me +"SPLM", "50 150 250 255 normal", // Spell from me +"EMT", "255 150 150 255 normal", // Emote +"MTD", "255 255 0 255 over", // Message Of The Day +"FORLD","64 255 64 255 overonly", // Forage Locate Deposit +"CHK", "255 120 60 255 center", // Tous ce qui ne remplit pas une condition +"CHKCB","255 255 0 255 center", // Tous ce qui ne remplit pas une condition en combat (trop loin, cible invalide, pas assez de mana, etc.) +"PVPTM","255 120 60 255 overonly", // PVP timer +"THM", "255 255 64 255 over misc_levelup.ps", // Thema finished +"AMB", "255 255 64 255 center", // Ambiance +"ISE", "192 208 255 255 normal", // Item special effect +"ISE2", "192 208 255 255 center", // Item special effect with center text (for effects without flying text) +"OSM", "128 160 255 255 center", // Outpost state message +"AROUND","255 255 0 255 around", // Only in around channel +"R2_INVITE","0 255 0 255 around", // Ring invitation +}; + +PrintfCommands = { + "52", "15", "55 55 0 255", "28", "uiChapterV", "624", + "428", "0 0 0 255", "18", "", "624", "378", + "0 0 0 255", "14", "", "644", "278", "0 0 0 255", + "18", "", "52", "17", "255 255 255 255", "28", + "uiChapterV", "622", "430", "255 255 255 255", "18", "", + "622", "380", "255 255 255 255", "14", "", "642", + "280", "255 255 255 255", "18", "" +}; + +PrintfCommandsFreeTrial = { + "52", "15", "55 55 0 255", "28", "uiChapterV", "624", + "428", "0 0 0 255", "18", "", "624", "378", + "0 0 0 255", "14", "", "644", "278", "0 0 0 255", + "18", "", "52", "17", "255 255 255 255", "28", + "uiChapterV", "622", "430", "255 255 255 255", "18", "", + "622", "380", "255 255 255 255", "14", "", "642", + "280", "255 255 255 255", "18", "" +}; + +DisplayMissingAnimFile = 0; + +LoadingStringCount = 54; + + +// Some R2 parameters ... + +R2Mode = 1; +R2EDEnabled = 1; +R2EDExtendedDebug = 0; +R2EDLightPalette = 0; +R2ClientGw = "r2linux01"; +LoadLuaDebugger = 0; +CheckR2ScenarioMD5 = 1; +LevelDesignEnabled = 0; + +DmCameraDistMax = 25; +DmRun = 20; +DmWalk = 6; + +R2EDReloadFiles = { + "r2ed.xml", + "r2_basic_bricks.lua", + "r2_components.lua", + "r2_core.lua", + "r2_features_default.lua", + "r2_features_fauna.lua", + "r2_features_npc_groups.lua", + "r2_palette.lua", + "r2_scenario.lua", + "r2_ui.lua" +}; + +XMLInterfaceFiles = { + "config.xml", + "widgets.xml", + "webig_widgets.xml", + "player.xml", + "inventory.xml", + "interaction.xml", + "phrase.xml", + "harvest.xml", + "macros.xml", + "info_player.xml", + "outpost.xml", + "guild.xml", + "taskbar.xml", + "game_config.xml", + "game_context_menu.xml", + "player_trade.xml", + "bot_chat_v4.xml", + "compass.xml", + "map.xml", + "hierarchy.xml", + "reset.xml", + "actions.xml", + "help.xml", + "encyclopedia.xml", + "commands.xml", + "commands2.xml", + "ring_access_point_filter.xml", + "ring_window.xml", + "bg_downloader.xml" +}; + +XMLR2EDInterfaceFiles = +{ + "r2ed.xml", + "r2_triggers.xml", + "r2_logic_entities.xml", + "r2ed_acts.xml", + "r2ed_scenario.xml", + "r2ed_connect.xml" +}; + +FogDistAndDepthLookupBias = 20; // bias for lookup of fog distance and depth + + +// Hardware cursor textures +// These will be extracted from the corresponding packed ui .tga files when they are loaded +// * +// * individual .tga files for hardware cursor bitmap not looked for, and not supported yet +HardwareCursors = +{ + "curs_can_pan.tga", + "curs_can_pan_dup.tga", + "curs_create.tga", + "curs_create_multi.tga", + "curs_create_vertex_invalid.tga", + "curs_default.tga", + "curs_dup.tga", + "curs_L.tga", + "curs_M.tga", + "curs_pan.tga", + "curs_pan_dup.tga", + "curs_pick.tga", + "curs_pick_dup.tga", + "curs_R.tga", + "curs_resize_BL_TR.tga", + "curs_resize_BR_TL.tga", + "curs_resize_LR.tga", + "curs_resize_TB.tga", + "curs_rotate.tga", + "curs_scale.tga", + "curs_stop.tga", + "text_cursor.tga", + "r2_hand_can_pan.tga", + "r2_hand_pan.tga", + "r2ed_tool_can_pick.tga", + "r2ed_tool_can_rotate.tga", + "r2ed_tool_pick.tga", + "r2ed_tool_rotate.tga", + "r2ed_tool_rotating.tga" +}; + +Loading_BG = "new_loading_bg.tga"; // Default name for the loading background file. +Launch_BG = "new_launcher_bg.tga"; // Default name for the launch background file. +TeleportKami_BG = "new_teleport_kami_bg.tga"; +TeleportKaravan_BG = "new_teleport_caravan_bg.tga"; +Elevator_BG = "new_elevator_bg.tga"; // Default name for the loading background file. +ResurectKami_BG = "new_resurect_kami_bg.tga"; +ResurectKaravan_BG = "new_resurect_caravane_bg.tga"; +End_BG = "end_bg.tga"; // Default name for the last background file. + +ScenarioSavePath = "./my_scenarios/"; + +// list ofpredefined keyset +// name will be looked up in the translation file by searching 'uiCP_KeysetName_" + id +// tooltip will be looked up in the translation file by searching 'uiCP_KeysetTooltip_" + id +// 'bi.' stands for built-in +// note : we add a dot in the name to be sure that there cannot be a conflict with character keyset name +BuiltInKeySets = +{ + "", // default ryzom keyboard layout + "bi.zqsd", // european keyboard fps displacement style (NB : don't change this layout name, ryzom will automatically select it if keyboard is french or belgian) + "bi.wasd", // english keyboard fps displacement style (NB : don't change this layout name, ryzom will automatically select it if keyboard is not french nor belgian) + "bi.wow_alike" // 'world of warcraft' like keyboard style. (NB : not available for ring) +}; + +// "Newbie Training", "Story Telling", "Mistery", "Hack & Slash", "Guild Training", "Other" +ScenarioTypes = {"so_newbie_training","so_story_telling","so_mistery","so_hack_slash","so_guild_training","so_other"}; + +ScenarioLanguages = {"fr","de","en","other_lang"}; + +// Map each language to a forum help page +HelpPages = +{ + "fr=http://forums.ryzom.com/forum/showthread.php?t=29130", + "en=http://forums.ryzom.com/forum/showthread.php?t=29129", + "wk=http://forums.ryzom.com/forum/showthread.php?t=29129", + "de=http://forums.ryzom.com/forum/showthread.php?t=29131" +}; + +WebIgMainDomain = "app.ryzom.com"; +WebIgTrustedDomains = { + "api.ryzom.com", "app.ryzom.com" +}; +PatchletUrl = "http://app.ryzom.com/app_patchlet/index.php?patch=preload"; + +SelectedSlot = 0; + +BuildName = "RELEASE_HEAD"; diff --git a/dist/debian/utopic/debian/compat b/dist/debian/utopic/debian/compat new file mode 100644 index 000000000..ec635144f --- /dev/null +++ b/dist/debian/utopic/debian/compat @@ -0,0 +1 @@ +9 diff --git a/dist/debian/utopic/debian/control b/dist/debian/utopic/debian/control new file mode 100644 index 000000000..e662d1f37 --- /dev/null +++ b/dist/debian/utopic/debian/control @@ -0,0 +1,212 @@ +Source: ryzom-core +Priority: extra +Maintainer: Debian Games Team +Uploaders: Luboš Novák , Cédric OCHS +Build-Depends: debhelper (>= 9), cmake(>= 2.6), libxml2-dev, + libgl1-mesa-dev, libjpeg8-dev | libjpeg62-dev, libpng12-dev, libopenal-dev, + libfreetype6-dev, libxxf86vm-dev, libxrandr-dev, libxrender-dev, + libvorbis-dev, libsquish-dev, libcurl4-openssl-dev, libluabind-dev, + libboost-dev, libwww-dev, libmysqlclient-dev, + libcpptest-dev, libqt4-dev, libqt4-opengl-dev +Standards-Version: 3.9.5 +Section: games +Bugs: http://dev.ryzom.com/projects/ryzom/issues +Homepage: http://dev.ryzom.com +Vcs-Svn: svn://svn.debian.org/svn/pkg-games/packages/trunk/nel/ +Vcs-Browser: http://svn.debian.org/wsvn/pkg-games/packages/trunk/nel/?op=log + +Package: libnel0 +Section: libdevel +Architecture: any +Multi-Arch: same +Pre-Depends: ${misc:Pre-Depends} +Depends: ${misc:Depends}, ${shlibs:Depends} +Description: Massive multi-user 3D game environments library (shared library) + This is a software platform for creating and running massively multi-user + entertainment in a 3D environment over the Internet. + . + This library is further divided into specific modules: network, ai, 3d + and misc. If you want to use any of these, you also need to use the misc + part of the library, but ai, 3d and network are totally independent from + each other so you can use only the parts you really need in your project. + . + This package contains the shared library. + +Package: libnel-dev +Section: libdevel +Architecture: any +Multi-Arch: same +Depends: ${misc:Depends}, libnel0 (= ${binary:Version}) +Description: Massive multi-user 3D game environments library (development files) + This is a software platform for creating and running massively multi-user + entertainment in a 3D environment over the Internet. + . + This library is further divided into specific modules: network, ai, 3d + and misc. If you want to use any of these, you also need to use the misc + part of the library, but ai, 3d and network are totally independent from + each other so you can use only the parts you really need in your project. + . + This package contains the headers. + +Package: libnel0-dbg +Section: debug +Architecture: any +Depends: ${misc:Depends}, libnel0 (= ${binary:Version}) +Description: Massive multi-user 3D game environments library (debugging symbols) + This is a software platform for creating and running massively multi-user + entertainment in a 3D environment over the Internet. + . + This library is further divided into specific modules: network, ai, 3d + and misc. If you want to use any of these, you also need to use the misc + part of the library, but ai, 3d and network are totally independent from + each other so you can use only the parts you really need in your project. + . + This package contains the debugging symbols. + +Package: nel-tools +Section: devel +Architecture: any +Multi-Arch: same +Pre-Depends: ${misc:Pre-Depends} +Depends: ${misc:Depends}, ${shlibs:Depends}, libnel0 (= ${binary:Version}) +Description: Massive multi-user 3D game environments library (tools) + This is a software platform for creating and running massively multi-user + entertainment in a 3D environment over the Internet. + . + This library is further divided into specific modules: network, ai, 3d + and misc. If you want to use any of these, you also need to use the misc + part of the library, but ai, 3d and network are totally independent from + each other so you can use only the parts you really need in your project. + . + This package contains the tools. + +Package: nel-tools-dbg +Section: debug +Architecture: any +Depends: ${misc:Depends}, nel-tools (= ${binary:Version}) +Description: Massive multi-user 3D game environments library (tools debugging symbols) + This is a software platform for creating and running massively multi-user + entertainment in a 3D environment over the Internet. + . + This library is further divided into specific modules: network, ai, 3d + and misc. If you want to use any of these, you also need to use the misc + part of the library, but ai, 3d and network are totally independent from + each other so you can use only the parts you really need in your project. + . + This package contains the tools debugging symbols. + +Package: libryzom-sevenzip0 +Architecture: any +Multi-Arch: same +Pre-Depends: ${misc:Pre-Depends} +Depends: ${misc:Depends}, ${shlibs:Depends} +Description: Ryzom science-fantasy MMORPG (decompression library) + Ryzom Core provides the base technologies and a set of development + methodologies for the development of both client and server code. + . + This package contains the decompression shared library. + +Package: libryzom-sevenzip0-dbg +Section: debug +Architecture: any +Depends: ${misc:Depends}, libryzom-sevenzip0 (= ${binary:Version}) +Description: Ryzom science-fantasy MMORPG (decompression library debugging symbols) + Ryzom Core provides the base technologies and a set of development + methodologies for the development of both client and server code. + . + This package contains the decompression shared library debugging symbols. + +Package: libryzom-gameshare0 +Architecture: any +Multi-Arch: same +Pre-Depends: ${misc:Pre-Depends} +Depends: ${misc:Depends}, ${shlibs:Depends}, libnel0 (= ${binary:Version}) +Description: Ryzom science-fantasy MMORPG (common shared library) + Ryzom Core provides the base technologies and a set of development + methodologies for the development of both client and server code. + . + This package contains the game common shared library. + +Package: libryzom-gameshare0-dbg +Section: debug +Architecture: any +Depends: ${misc:Depends}, libryzom-gameshare0 (= ${binary:Version}) +Description: Ryzom science-fantasy MMORPG (common debugging symbols) + Ryzom Core provides the base technologies and a set of development + methodologies for the development of both client and server code. + . + This package contains the game common debugging symbols. + +Package: libryzom-clientsheets0 +Architecture: any +Multi-Arch: same +Pre-Depends: ${misc:Pre-Depends} +Depends: ${misc:Depends}, ${shlibs:Depends}, libryzom-gameshare0 (= ${binary:Version}) +Description: Ryzom science-fantasy MMORPG (client sheets shared library) + Ryzom Core provides the base technologies and a set of development + methodologies for the development of both client and server code. + . + This package contains the client sheets shared library. + +Package: libryzom-clientsheets0-dbg +Section: debug +Architecture: any +Depends: ${misc:Depends}, libryzom-clientsheets0 (= ${binary:Version}) +Description: Ryzom science-fantasy MMORPG (client sheets debugging symbols) + Ryzom Core provides the base technologies and a set of development + methodologies for the development of both client and server code. + . + This package contains the client sheets debugging symbols. + +Package: ryzom-client +Architecture: any +Depends: ${misc:Depends}, ${shlibs:Depends}, libryzom-gameshare0 (= ${binary:Version}), + libryzom-clientsheets0 (= ${binary:Version}), + ryzom-client-config (>= ${source:Version}), rsync, wget, p7zip-full +Description: Ryzom science-fantasy MMORPG (client) + Ryzom Core provides the base technologies and a set of development + methodologies for the development of both client and server code. + . + This package contains the game client. + +Package: ryzom-client-dbg +Section: debug +Architecture: any +Depends: ${misc:Depends}, ryzom-client (= ${binary:Version}) +Description: Ryzom science-fantasy MMORPG (client debugging symbols) + Ryzom Core provides the base technologies and a set of development + methodologies for the development of both client and server code. + . + This package contains the client debugging symbols. + +Package: ryzom-tools +Section: devel +Architecture: any +Multi-Arch: same +Pre-Depends: ${misc:Pre-Depends} +Depends: ${misc:Depends}, ${shlibs:Depends}, libryzom-gameshare0 (= ${binary:Version}), + libryzom-clientsheets0 (= ${binary:Version}) +Description: Ryzom science-fantasy MMORPG (tools) + Ryzom Core provides the base technologies and a set of development + methodologies for the development of both client and server code. + . + This package contains the tools. + +Package: ryzom-tools-dbg +Section: debug +Architecture: any +Depends: ${misc:Depends}, ryzom-tools (= ${binary:Version}) +Description: Ryzom science-fantasy MMORPG (tools debugging symbols) + Ryzom Core provides the base technologies and a set of development + methodologies for the development of both client and server code. + . + This package contains the tools debugging symbols. + +Package: ryzom-client-config +Architecture: all +Depends: ${misc:Depends} +Description: Ryzom science-fantasy MMORPG (client configuration) + Ryzom Core provides the base technologies and a set of development + methodologies for the development of both client and server code. + . + This package contains the client configuration. diff --git a/dist/debian/utopic/debian/copyright b/dist/debian/utopic/debian/copyright new file mode 100644 index 000000000..d5a0f2f10 --- /dev/null +++ b/dist/debian/utopic/debian/copyright @@ -0,0 +1,53 @@ +This package was debianized by Gürkan Sengün on +Tue, 23 Oct 2007 12:56:45 +0200. + +It was downloaded from + +Upstream Authors: + + Olivier Cado + Bertram Felgenhauer + Krzysztof Kotlenga + Henri Kuuste + Vianney Lecroart + Namine + Cédric Ochs + Guillaume Puzin + Matt Raykowski + Robert Timm + Titegus + Ulukyn + Robert Wetzel + Zorglor + TODO: take names from Ryzom credits + +Copyright: + + Copyright (C) 2003-2009 Vianney Lecroart + Copyright (C) 2003-2009 Matt Raykowski + Copyright (C) 2000-2006 Nevrax Ltd. + Copyright (C) 2006-2007 Gameforge France + Copyright (C) 2008-2010 Winch Gate Property Limited + +License: + + 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 . + +The Debian packaging is: + + Copyright (C) 2007 Gürkan Sengün + +and is licensed under the GPL version 2, +see `/usr/share/common-licenses/GPL-2'. + diff --git a/dist/debian/utopic/debian/docs b/dist/debian/utopic/debian/docs new file mode 100644 index 000000000..58e5e3e76 --- /dev/null +++ b/dist/debian/utopic/debian/docs @@ -0,0 +1,2 @@ +changelog +README diff --git a/dist/debian/utopic/debian/libnel-dev.docs b/dist/debian/utopic/debian/libnel-dev.docs new file mode 100644 index 000000000..ba8894c15 --- /dev/null +++ b/dist/debian/utopic/debian/libnel-dev.docs @@ -0,0 +1,2 @@ +README + diff --git a/dist/debian/utopic/debian/libnel-dev.install b/dist/debian/utopic/debian/libnel-dev.install new file mode 100644 index 000000000..9f9310cee --- /dev/null +++ b/dist/debian/utopic/debian/libnel-dev.install @@ -0,0 +1,3 @@ +usr/include/* +usr/lib/*/libnel*.so +usr/lib/*/pkgconfig/* diff --git a/dist/debian/utopic/debian/libnel-dev.manpages b/dist/debian/utopic/debian/libnel-dev.manpages new file mode 100644 index 000000000..bb4027ca9 --- /dev/null +++ b/dist/debian/utopic/debian/libnel-dev.manpages @@ -0,0 +1 @@ +debian/nel-config.1 diff --git a/dist/debian/utopic/debian/libnel-doc.doc-base.nel b/dist/debian/utopic/debian/libnel-doc.doc-base.nel new file mode 100644 index 000000000..6ae95fc9f --- /dev/null +++ b/dist/debian/utopic/debian/libnel-doc.doc-base.nel @@ -0,0 +1,9 @@ +Document: nel +Title: NeL Reference Manual +Author: Nevrax +Abstract: This is a software platform for creating and running massively multi-user entertainment in a 3D environment over the Internet. +Section: Programming/C + +Format: HTML +Index: /usr/share/doc/libnel-doc/html/index.html +Files: /usr/share/doc/libnel-doc/html/*.html diff --git a/dist/debian/utopic/debian/libnel-doc.install b/dist/debian/utopic/debian/libnel-doc.install new file mode 100644 index 000000000..bf3f02a61 --- /dev/null +++ b/dist/debian/utopic/debian/libnel-doc.install @@ -0,0 +1 @@ +usr/share/doc/libnel-doc/html/* diff --git a/dist/debian/utopic/debian/libnel0.install b/dist/debian/utopic/debian/libnel0.install new file mode 100644 index 000000000..4273c0ad1 --- /dev/null +++ b/dist/debian/utopic/debian/libnel0.install @@ -0,0 +1,3 @@ +usr/lib/*/libnel*.so.* +usr/lib/*/nel/libnel_drv_openal.so +usr/lib/*/nel/libnel_drv_opengl.so diff --git a/dist/debian/utopic/debian/libryzom-clientsheets0.install b/dist/debian/utopic/debian/libryzom-clientsheets0.install new file mode 100644 index 000000000..b5ea5b79c --- /dev/null +++ b/dist/debian/utopic/debian/libryzom-clientsheets0.install @@ -0,0 +1,2 @@ +usr/lib/*/libryzom_clientsheets.so.* + diff --git a/dist/debian/utopic/debian/libryzom-gameshare0.install b/dist/debian/utopic/debian/libryzom-gameshare0.install new file mode 100644 index 000000000..2f51b0804 --- /dev/null +++ b/dist/debian/utopic/debian/libryzom-gameshare0.install @@ -0,0 +1,2 @@ +usr/lib/*/libryzom_gameshare.so.* + diff --git a/dist/debian/utopic/debian/libryzom-sevenzip0.install b/dist/debian/utopic/debian/libryzom-sevenzip0.install new file mode 100644 index 000000000..1edced3f8 --- /dev/null +++ b/dist/debian/utopic/debian/libryzom-sevenzip0.install @@ -0,0 +1,2 @@ +usr/lib/*/libryzom_sevenzip.so.* + diff --git a/dist/debian/utopic/debian/nel-config.1 b/dist/debian/utopic/debian/nel-config.1 new file mode 100644 index 000000000..be47bf496 --- /dev/null +++ b/dist/debian/utopic/debian/nel-config.1 @@ -0,0 +1,37 @@ +.TH nel-config 1 "26 Oct 2007" +.SH NAME +nel-config \- Get information about a libnel installation +.SH SYNOPSIS +.B nel-config [options] +.SH DESCRIPTION +.B nel-config +displays information about a libnel installation. +.SH OPTIONS +.IP "--cflags" +Set of compiler options (CFLAGS) to use when compiling files that use +libnel. Currently that is only thw include path to the nel include files. +.IP "--libs" +Shows the complete set of libs and other linker options you will need in order +to link your application with libnel. +.IP "--prefix" +This is the prefix used when libnel was installed. libnel is then installed +in $prefix/lib and its header files are installed in $prefix/include and so +on. The prefix is set with "configure \-\-prefix". +.IP "--version" +Outputs version information about the installed libnel. +.SH "EXAMPLES" +What linker options do I need when I link with libnel? + + $ nel-config \-\-libs + +What compiler options do I need when I compile using libnel functions? + + $ nel-config \-\-cflags + +What's the installed libnel version? + + $ nel-config \-\-version +.SH AUTHOR +.PP +This manual page was written by G\[:u]rkan Seng\[:u]n +,for the Debian project (but may be used by others). diff --git a/dist/debian/utopic/debian/nel-tools.install b/dist/debian/utopic/debian/nel-tools.install new file mode 100644 index 000000000..4ca03208c --- /dev/null +++ b/dist/debian/utopic/debian/nel-tools.install @@ -0,0 +1,87 @@ +etc/nel/build_ig_boxes.cfg +etc/nel/build_indoor_rbank.cfg +etc/nel/build_rbank.cfg +etc/nel/make_sheet_id.cfg +etc/nel/words_dic.cfg +etc/nel/zviewer.cfg +usr/bin/animation_set_builder +usr/bin/anim_builder +usr/bin/bnp_make +usr/bin/build_clod_bank +usr/bin/build_clodtex +usr/bin/build_coarse_mesh +usr/bin/build_far_bank +usr/bin/build_ig_boxes +usr/bin/build_indoor_rbank +usr/bin/build_interface +usr/bin/build_rbank +usr/bin/build_samplebank +usr/bin/build_shadow_skin +usr/bin/build_smallbank +usr/bin/build_sound +usr/bin/build_soundbank +usr/bin/cluster_viewer +usr/bin/disp_sheet_id +usr/bin/extract_filename +usr/bin/file_info +usr/bin/georges2csv +usr/bin/get_neighbors +usr/bin/hls_bank_maker +usr/bin/ig_add +usr/bin/ig_info +usr/bin/ig_lighter +usr/bin/lock +usr/bin/make_sheet_id +usr/bin/memlog +usr/bin/message_box_qt +usr/bin/nl_probe_timers +usr/bin/nl_sample_chatclient +usr/bin/nl_sample_chatserver +usr/bin/nl_sample_clusterview +usr/bin/nl_sample_command +usr/bin/nl_sample_configfile +usr/bin/nl_sample_ct_ai_service +usr/bin/nl_sample_ct_gd_service +usr/bin/nl_sample_debug +usr/bin/nl_sample_font +usr/bin/nl_sample_georges +usr/bin/nl_sample_i18n +usr/bin/nl_sample_log +usr/bin/nl_sample_ls_client +usr/bin/nl_sample_ls_fes +usr/bin/nl_sample_pacs +usr/bin/nl_sample_shapeview +usr/bin/nl_sample_sound_sources +usr/bin/nl_sample_stream_file +usr/bin/nl_sample_stream_ogg_vorbis +usr/bin/nl_sample_strings +usr/bin/nl_sample_udpclient +usr/bin/nl_sample_udpserver +usr/bin/panoply_maker +usr/bin/shapes_exporter +usr/bin/tga2dds +usr/bin/tga_cut +usr/bin/tga_resize +usr/bin/tile_edit_qt +usr/bin/words_dic_qt +usr/bin/xml_packer +usr/bin/zone_check_bind +usr/bin/zone_dependencies +usr/bin/zone_dump +usr/bin/zone_ig_lighter +usr/bin/zone_lighter +usr/bin/zone_welder +usr/bin/zviewer +usr/lib/*/libs3tc_compressor.so.* +usr/share/nel/nl_sample_chat +usr/share/nel/nl_sample_class_transport +usr/share/nel/nl_sample_clusterview +usr/share/nel/nl_sample_configfile +usr/share/nel/nl_sample_font +usr/share/nel/nl_sample_georges +usr/share/nel/nl_sample_i18n +usr/share/nel/nl_sample_login_system +usr/share/nel/nl_sample_pacs +usr/share/nel/nl_sample_sound +usr/share/nel/nl_sample_udp +usr/share/nel/zviewer diff --git a/dist/debian/utopic/debian/rules b/dist/debian/utopic/debian/rules new file mode 100755 index 000000000..2b329f3be --- /dev/null +++ b/dist/debian/utopic/debian/rules @@ -0,0 +1,19 @@ +#!/usr/bin/make -f +%: + dh $@ --buildsystem=cmake --parallel + +override_dh_strip: + dh_strip -plibnel0 --dbg-package=libnel0-dbg + dh_strip -pnel-tools --dbg-package=nel-tools-dbg + dh_strip -plibryzom-sevenzip0 --dbg-package=libryzom-sevenzip0-dbg + dh_strip -plibryzom-gameshare0 --dbg-package=libryzom-gameshare0-dbg + dh_strip -plibryzom-clientsheets0 --dbg-package=libryzom-clientsheets0-dbg + dh_strip -pryzom-client --dbg-package=ryzom-client-dbg + dh_strip -pryzom-tools --dbg-package=ryzom-tools-dbg + +override_dh_auto_configure: + dh_auto_configure -- -DLIBRARY_ARCHITECTURE=$(DEB_HOST_MULTIARCH) -DTARGET_CPU=$(DEB_HOST_GNU_CPU) -DWITH_SYMBOLS=ON -DNL_ETC_PREFIX=/etc/nel -DRYZOM_ETC_PREFIX=/etc/ryzom -DRYZOM_SHARE_PREFIX=/usr/share/games/ryzom -DRYZOM_BIN_PREFIX=/usr/bin -DRYZOM_GAMES_PREFIX=/usr/games -DWITH_RYZOM_SERVER=OFF -DWITH_NEL_TESTS=OFF -DWITH_LIBWWW_STATIC=ON -DWITH_QT=ON + +override_dh_install: + dh_install + install -m755 debian/ryzom debian/ryzom-client/usr/games/ryzom diff --git a/dist/debian/utopic/debian/ryzom b/dist/debian/utopic/debian/ryzom new file mode 100755 index 000000000..79923e9e9 --- /dev/null +++ b/dist/debian/utopic/debian/ryzom @@ -0,0 +1,116 @@ +#!/bin/sh + +P7ZIP=/usr/bin/7z +RSYNC=/usr/bin/rsync +WGET=/usr/bin/wget +RYZOM_CLIENT=/usr/games/ryzom_client +RYZOM_CONFIG_DEFAULT=/etc/ryzom/client_default.cfg +RYZOM_CONFIG=~/.ryzom/client.cfg + +RYZOM_DIR=~/.ryzom +DATA_DIR=$RYZOM_DIR/data + +mkdir -p $RYZOM_DIR + +if [ ! -d "$DATA_DIR" ] +then + # symlink user's data dir to ryzom data cache + ln -s /var/cache/ryzom/data $DATA_DIR +fi + +# Check if a directory contains Ryzom data +ryzom_data_found() +{ + # Check for directory, gamedev.bnp and ryzom.ttf + COUNT=0 + + if [ -d $1 ] + then + # If there are a least 220 bnp files, we could use this directory + # There are 226 bnp files in last version + COUNT=$(find -L $1 -name *.bnp | wc -l) + fi + + echo $COUNT +} + +COUNT=$(ryzom_data_found $DATA_DIR) + +echo "Found $COUNT BNP files in $DATA_DIR" + +if [ $COUNT -lt 220 ] && [ -f $WGET ] && [ -f $P7ZIP ] +then + mkdir -p "$DATA_DIR/tmp" + + # Check free diskspace + echo "Checking for free disk space..." + DISKSPACE=$(df "$DATA_DIR/tmp" | grep "/dev" | awk '{print $4}') + if [ $? -ne 0 ] + then + exit 1 + fi + if [ "$DISKSPACE" -lt "8000000" ] + then + echo "You don't have enough free space to download and uncompress Ryzom client data." + exit 1 + fi + + # Download + echo "Downloading ryzom_client.7z from sourceforge..." + # wget + $WGET -c http://sourceforge.net/projects/ryzom/files/ryzom_client.7z -O "$DATA_DIR/tmp/ryzom_client.7z" + if [ $? -ne 0 ] + then + exit 1 + fi + + # Extract data + echo "Extracting data from ryzom_client.7z..." + cd "$DATA_DIR/tmp" + # 7z + $P7ZIP x ryzom_client.7z + if [ $? -ne 0 ] + then + exit 1 + fi + cd .. + mv -uf tmp/ryzom/data/* . + # Delete temporary downloaded files + rm -rf tmp +fi + +if [ -f $RYZOM_CONFIG ] +then + echo "Updating $RYZOM_CONFIG..." + + # Escape path for sed using bash find and replace + RYZOM_CONFIG_DEFAULT_ESCAPED=$(echo $RYZOM_CONFIG_DEFAULT | sed 's/\//\\\//g') + + # Update RootConfigFilename to be sure it's using the right default config + sed -i 's/RootConfigFilename.*/RootConfigFilename = \"'$RYZOM_CONFIG_DEFAULT_ESCAPED'\"/g' $RYZOM_CONFIG +fi + +if [ -f $RSYNC ] +then + echo "Patching Ryzom data..." + + # Rsync + $RSYNC -rOtzv --progress --stats www.ryzom.com::ryzom/data/ $DATA_DIR + if [ $? -ne 0 ] + then + exit 1 + fi +fi + +# Launch Ryzom client if it exists +if [ -f $RYZOM_CLIENT ] +then + echo "Launching Ryzom..." + + nohup $RYZOM_CLIENT $1 $2 $3 2> /dev/null & +fi + +# Wait until all previous commands are executed and displayed before exiting +sync + +exit 0 diff --git a/dist/debian/utopic/debian/ryzom-client-config.install b/dist/debian/utopic/debian/ryzom-client-config.install new file mode 100644 index 000000000..bef3f53dd --- /dev/null +++ b/dist/debian/utopic/debian/ryzom-client-config.install @@ -0,0 +1 @@ +debian/client_default.cfg etc/ryzom diff --git a/dist/debian/utopic/debian/ryzom-client.dirs b/dist/debian/utopic/debian/ryzom-client.dirs new file mode 100644 index 000000000..d1571095c --- /dev/null +++ b/dist/debian/utopic/debian/ryzom-client.dirs @@ -0,0 +1,4 @@ +usr/games +usr/share/applications +usr/share/pixmaps +var/cache/ryzom/data diff --git a/dist/debian/utopic/debian/ryzom-client.install b/dist/debian/utopic/debian/ryzom-client.install new file mode 100644 index 000000000..be142a6be --- /dev/null +++ b/dist/debian/utopic/debian/ryzom-client.install @@ -0,0 +1,4 @@ +usr/games/ryzom_client +usr/share/icons +usr/share/pixmaps +debian/ryzom_client.desktop usr/share/applications diff --git a/dist/debian/utopic/debian/ryzom-client.menu b/dist/debian/utopic/debian/ryzom-client.menu new file mode 100644 index 000000000..5e15bf577 --- /dev/null +++ b/dist/debian/utopic/debian/ryzom-client.menu @@ -0,0 +1,6 @@ +?package(ryzom-client): \ + needs="x11" \ + section="Games/Adventure" \ + icon="/usr/share/pixmaps/ryzom.xpm" \ + title="Ryzom" \ + command="/usr/games/ryzom" diff --git a/dist/debian/utopic/debian/ryzom-client.postinst b/dist/debian/utopic/debian/ryzom-client.postinst new file mode 100644 index 000000000..51570a3dc --- /dev/null +++ b/dist/debian/utopic/debian/ryzom-client.postinst @@ -0,0 +1,10 @@ +#!/bin/sh + +if ! getent group ryzom ; then + addgroup --system ryzom +fi + +chgrp -R ryzom /var/cache/ryzom/data +chmod -R g+wrxs /var/cache/ryzom/data + +#DEBHELPER# diff --git a/dist/debian/utopic/debian/ryzom-client.postrm b/dist/debian/utopic/debian/ryzom-client.postrm new file mode 100644 index 000000000..828871eb4 --- /dev/null +++ b/dist/debian/utopic/debian/ryzom-client.postrm @@ -0,0 +1,49 @@ +#! /bin/sh +# postrm script for ryzom-client +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `remove' +# * `purge' +# * `upgrade' +# * `failed-upgrade' +# * `abort-install' +# * `abort-install' +# * `abort-upgrade' +# * `disappear' overwrit>r> +# for details, see /usr/share/doc/packaging-manual/ + +case "$1" in + purge) + + FILES=/home/* + + for f in $FILES + do + FOLDER="$f/.ryzom/data" + + if [ -d $FOLDER ] + then + rm -rf $FOLDER + echo "Deleting $FOLDER..." + fi + done + + ;; + + remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + + ;; + + *) + echo "postrm called with unknown argument \`$1'" >&2 + exit 1 + +esac + +#DEBHELPER# + +exit 0 diff --git a/dist/debian/utopic/debian/ryzom-tools.install b/dist/debian/utopic/debian/ryzom-tools.install new file mode 100644 index 000000000..c468e32d8 --- /dev/null +++ b/dist/debian/utopic/debian/ryzom-tools.install @@ -0,0 +1,26 @@ +usr/bin/7zDec +usr/bin/alias_synchronizer +usr/bin/assoc_mem +usr/bin/csv_transform +usr/bin/georges_editor_qt +usr/bin/icon_search +usr/bin/make_alias_file +usr/bin/make_anim_by_race +usr/bin/make_anim_melee_impact +usr/bin/mp_generator +usr/bin/named2csv +usr/bin/patch_gen +usr/bin/patch_gen_service +usr/bin/pd_parser +usr/bin/pdr_util +usr/bin/prim_export +usr/bin/ryzom_mission_compiler +usr/bin/sheets_packer +usr/bin/skill_extractor +usr/bin/stats_scan +usr/bin/translation_tools +usr/bin/uni_conv +usr/games/ryzom_client_patcher +usr/lib/*/libryzom_mission_compiler_lib.so.* +usr/share/games/ryzom/data_leveldesign +usr/share/games/ryzom/georges_editor_qt diff --git a/dist/debian/utopic/debian/ryzom_client.desktop b/dist/debian/utopic/debian/ryzom_client.desktop new file mode 100644 index 000000000..1c62d1b6a --- /dev/null +++ b/dist/debian/utopic/debian/ryzom_client.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Version=1.0 +Name=Ryzom +Name[ru]=Ризом +Type=Application +GenericName=ryzom_client +Exec=/usr/games/ryzom +Icon=ryzom_client +Terminal=true +Hidden=false +Categories=Game;RolePlaying; diff --git a/dist/debian/utopic/debian/source/format b/dist/debian/utopic/debian/source/format new file mode 100644 index 000000000..b9b023757 --- /dev/null +++ b/dist/debian/utopic/debian/source/format @@ -0,0 +1,2 @@ +1.0 + diff --git a/dist/debian/vivid/debian/changelog b/dist/debian/vivid/debian/changelog new file mode 100644 index 000000000..44f3e244e --- /dev/null +++ b/dist/debian/vivid/debian/changelog @@ -0,0 +1,408 @@ +ryzom-core (0.8.2802~raring1) raring; urgency=low + + * New upstream release (revision 2802) + + -- Cédric OCHS Mon, 10 Dec 2012 11:12:17 +0100 + +ryzom-core (0.8.2786~raring1) raring; urgency=low + + * New upstream release (revision 2786) + + -- Cédric OCHS Fri, 07 Dec 2012 16:33:15 +0100 + +ryzom-core (0.8.2691~quantal1) quantal; urgency=low + + * New upstream release (revision 2691) + + -- Cédric OCHS Sun, 07 Oct 2012 09:46:56 +0200 + +ryzom-core (0.8.2682~quantal1) quantal; urgency=low + + * New upstream release (revision 2682) + + -- Cédric OCHS Wed, 03 Oct 2012 15:59:54 +0200 + +ryzom-core (0.8.2681~quantal2) quantal; urgency=low + + * New upstream release (revision 2681) + + -- Cédric OCHS Tue, 02 Oct 2012 17:42:23 +0200 + +ryzom-core (0.8.2681~quantal1) quantal; urgency=low + + * New upstream release (revision 2681) + + -- Cédric OCHS Tue, 02 Oct 2012 17:13:57 +0200 + +ryzom-core (0.8.2650~quantal2) quantal; urgency=low + + * New upstream release (revision 2650) + + -- Cédric OCHS Mon, 24 Sep 2012 22:06:37 +0200 + +ryzom-core (0.8.2650~quantal1) quantal; urgency=low + + * New upstream release (revision 2650) + + -- Cédric OCHS Mon, 24 Sep 2012 20:55:19 +0200 + +ryzom-core (0.8.2025~precise1) precise; urgency=low + + * New upstream release (revision 2025) + + -- Cédric OCHS Sat, 10 Mar 2012 22:23:49 +0100 + +ryzom-core (0.8.2024~precise1) precise; urgency=low + + * New upstream release (revision 2024) + + -- Cédric OCHS Sat, 10 Mar 2012 11:16:08 +0100 + +ryzom-core (0.8.1847~natty1) natty; urgency=low + + * New upstream release (revision 1847) + + -- Cédric OCHS Mon, 17 Oct 2011 09:33:45 +0200 + +ryzom-core (0.8.1847~natty0) natty; urgency=low + + * New upstream release (revision 1847) + + -- Cédric OCHS Sun, 16 Oct 2011 18:45:27 +0200 + +ryzom-core (0.8.1758~natty0) natty; urgency=low + + * New upstream release (revision 1758) + + -- Cédric OCHS Tue, 16 Aug 2011 09:02:55 +0200 + +ryzom-core (0.8.1752~natty0) natty; urgency=low + + * New upstream release (revision 1752) + + -- Cédric OCHS Sun, 14 Aug 2011 16:07:29 +0200 + +ryzom-core (0.8.1751~natty0) natty; urgency=low + + * New upstream release (revision 1751) + + -- Cédric OCHS Sun, 14 Aug 2011 14:16:24 +0200 + +ryzom-core (0.8.1750~natty0) natty; urgency=low + + * New upstream release (revision 1750) + + -- Cédric OCHS Sun, 14 Aug 2011 12:30:18 +0200 + +ryzom-core (0.8.1744~natty0) natty; urgency=low + + * New upstream release (revision 1744) + + -- Cédric OCHS Sat, 13 Aug 2011 20:24:49 +0200 + +ryzom-core (0.8.1742~natty0) natty; urgency=low + + * New upstream release (revision 1742) + + -- Cédric OCHS Fri, 12 Aug 2011 18:11:07 +0200 + +ryzom-core (0.8.1628~natty0) natty; urgency=low + + * New upstream release (revision 1628) + + -- Cédric OCHS Fri, 17 Jun 2011 12:56:17 +0200 + +ryzom-core (0.8.1627~natty0) natty; urgency=low + + * New upstream release (revision 1627) + + -- Cédric OCHS Tue, 14 Jun 2011 20:37:05 +0200 + +ryzom-core (0.8.1611~natty0) natty; urgency=low + + * New upstream release (revision 1611) + + -- Cédric OCHS Wed, 08 Jun 2011 19:53:44 +0200 + +ryzom-core (0.8.1596~natty1) natty; urgency=low + + * New upstream release (revision 1596) + + -- Cédric OCHS Sat, 04 Jun 2011 18:11:45 +0200 + +ryzom-core (0.7.1406~natty0) natty; urgency=low + + * New upstream release (revision 1406) + + -- Kervala Sun, 13 Mar 2011 19:07:44 +0100 + +ryzom-core (0.7.1404~karmic0) karmic; urgency=low + + * New upstream release (revision 1404) + + -- Kervala Thu, 10 Mar 2011 20:13:35 +0100 + +ryzom-core (0.7.1122~karmic0) karmic; urgency=low + + * New upstream release (revision 1122) + + -- Kervala Thu, 25 Nov 2010 13:18:41 +0100 + +ryzom-core (0.7.992~karmic0) karmic; urgency=low + + * New upstream release (revision 992) + + -- Kervala Tue, 19 Oct 2010 13:44:23 +0200 + +ryzom-core (0.7.941~karmic0) karmic; urgency=low + + * New upstream release (revision 941) + + -- Kervala Sat, 16 Oct 2010 14:59:36 +0200 + +ryzom-core (0.7.933~karmic0) karmic; urgency=low + + * New upstream release (revision 933) + + -- Kervala Fri, 15 Oct 2010 22:29:44 +0200 + +ryzom-core (0.7.932~karmic0) karmic; urgency=low + + * New upstream release (revision 932) + + -- Kervala Fri, 15 Oct 2010 19:53:47 +0200 + +ryzom-core (0.7.666~karmic0) karmic; urgency=low + + * New upstream release (revision 666) + + -- Kervala Sun, 29 Aug 2010 17:56:06 +0200 + +ryzom-core (0.7.631~karmic0) karmic; urgency=low + + * New upstream release (revision 631) + + -- Kervala Thu, 12 Aug 2010 16:57:30 +0200 + +ryzom-core (0.7.614~lucid1) lucid; urgency=low + + * Fixed dependencies + + -- Kervala Sun, 08 Aug 2010 22:42:50 +0200 + +ryzom-core (0.7.614~lucid0) lucid; urgency=low + + * New upstream release (revision 614) + + -- Kervala Sun, 08 Aug 2010 21:53:00 +0200 + +ryzom-core (0.7.583~lucid1) lucid; urgency=low + + * Added dependency on libogg and libvorbis + + -- Kervala Sun, 01 Aug 2010 15:38:40 +0200 + +ryzom-core (0.7.583~lucid0) lucid; urgency=low + + * New upstream release (revision 583) + + -- Kervala Sun, 01 Aug 2010 14:43:28 +0200 + +ryzom-core (0.7.530~lucid0) lucid; urgency=low + + * New upstream release (revision 530) + + -- Kervala Sun, 25 Jul 2010 16:50:57 +0200 + +ryzom-core (0.7.519~lucid0) lucid; urgency=low + + * New upstream release (revision 519) + + -- Kervala Mon, 19 Jul 2010 22:24:05 +0200 + +ryzom-core (0.7.507~lucid0) lucid; urgency=low + + * New upstream release (revision 507) + + -- Kervala Sat, 17 Jul 2010 19:56:35 +0200 + +ryzom-core (0.7.474~lucid0) lucid; urgency=low + + * New upstream release (revision 474) + + -- Kervala Tue, 13 Jul 2010 08:56:24 +0200 + +ryzom-core (0.7.473~lucid1) lucid; urgency=low + + * Some fixes + + -- Kervala Mon, 12 Jul 2010 22:46:16 +0200 + +ryzom-core (0.7.473~lucid0) lucid; urgency=low + + * New upstream release (revision 473) + + -- Kervala Mon, 12 Jul 2010 22:04:30 +0200 + +ryzom-core (0.7.437~lucid1) lucid; urgency=low + + * Fixed drivers installation + + -- Kervala Thu, 08 Jul 2010 08:54:02 +0200 + +ryzom-core (0.7.437~lucid0) lucid; urgency=low + + * New upstream release (revision 437) + + -- Kervala Thu, 01 Jul 2010 20:07:14 +0200 + +ryzom-core (0.7.419~lucid0) lucid; urgency=low + + * New upstream release (revision 419) + + -- Kervala Sat, 26 Jun 2010 18:58:36 +0200 + +ryzom-core (0.7.411~lucid0) lucid; urgency=low + + * New upstream release (revision 411) + + -- Kervala Sat, 26 Jun 2010 11:00:47 +0200 + +ryzom-core (0.7.404~lucid1) lucid; urgency=low + + * Fix OpenAL driver + + -- Kervala Thu, 24 Jun 2010 23:06:51 +0200 + +ryzom-core (0.7.404~lucid0) lucid; urgency=low + + * New upstream release (revision 404) + + -- Kervala Thu, 24 Jun 2010 22:17:36 +0200 + +ryzom-core (0.7.394~lucid0) lucid; urgency=low + + * New upstream release (revision 394) + + -- Kervala Tue, 22 Jun 2010 06:53:15 +0200 + +ryzom-core (0.7.375~lucid0) lucid; urgency=low + + * New upstream release (revision 375) + + -- Kervala Wed, 16 Jun 2010 12:46:51 +0200 + +ryzom-core (0.7.371~lucid0) lucid; urgency=low + + * New upstream release (revision 371) + + -- Kervala Mon, 14 Jun 2010 22:48:27 +0200 + +ryzom-core (0.7.359~lucid0) lucid; urgency=low + + * New upstream release (revision 359) + + -- Kervala Sun, 13 Jun 2010 21:31:29 +0200 + +ryzom-core (0.7.350~lucid1) lucid; urgency=low + + * Fixes problem with "copy" files + + -- Kervala Sun, 13 Jun 2010 10:36:30 +0200 + +ryzom-core (0.7.350~lucid0) lucid; urgency=low + + * New upstream release (revision 350) + + -- Kervala Sun, 13 Jun 2010 09:55:38 +0200 + +ryzom-core (0.7.332~lucid0) lucid; urgency=low + + * New upstream release (revision 332) + + -- Kervala Sat, 12 Jun 2010 09:09:21 +0200 + +ryzom-core (0.7.317~lucid0) lucid; urgency=low + + * New upstream release (revision 317) + + -- Kervala Thu, 10 Jun 2010 13:11:28 +0200 + +ryzom-core (0.7.315~lucid0) lucid; urgency=low + + * Fixed pkg-config installation again + + -- Kervala Thu, 10 Jun 2010 08:19:44 +0200 + +ryzom-core (0.7.311~lucid2) lucid; urgency=low + + * Fixed pkg-config files + + -- Kervala Wed, 09 Jun 2010 22:58:15 +0200 + +ryzom-core (0.7.311~lucid1) lucid; urgency=low + + * Fixed dependencies versions + + -- Kervala Wed, 09 Jun 2010 22:27:00 +0200 + +ryzom-core (0.7.311~lucid0) lucid; urgency=low + + * New upstream version (revision 311). + + -- Kervala Wed, 09 Jun 2010 21:15:42 +0200 + +ryzom-core (0.7.304~lucid0) lucid; urgency=low + + * New upstream version (revision 304). + + -- Kervala Wed, 09 Jun 2010 08:34:10 +0200 + +ryzom-core (0.7.0-1) unstable; urgency=low + + [ Gürkan Sengün ] + * New upstream version. (Closes: #553248) + * Updated build dependencies. + + [ Michal Čihař ] + * Convert to dh with cmake support. + * Bump standards to 3.8.4. + + [ Luboš Novák ] + * Change maintainer to 'Debian Games Team' + * ftbfs_gcc_4.5.path: Fix build with g++-4.5. (Closes: #565104) + * Converted direct changes in source to patches. + * Enable building CEGUI renderer. + * Add package libnel-doc with documentation. + * debian/control + + Changed priority of libnel-dbg to extra. + + Remove duplicate Section in libnel0. + + Update short descriptions. + + Replace obsolete package xlibmesa-gl-dev with libgl1-mesa-dev + in build-depends. + + Add libpng-dev to build-depends. + + Remove libalut-dev from build-depends. + + New homepage. + + Supported architectures are i386 and amd64. + * debian/libnel-dev.dirs + + Remove empty dir usr/lib/nel. + * debian/copyright + + Update redistribution licence from GPL to GPL-2. + * debian/rules + + Disable building unit test, samples and tools. + + -- Luboš Novák Tue, 30 Mar 2010 10:29:23 +0100 + +ryzom-core (0.5.0-1.1) unstable; urgency=low + + * Non-maintainer upload. + * Change Build-Depends: libstlport5.2-dev. (Closes: #521762) + + -- Torsten Werner Sun, 28 Jun 2009 11:54:05 +0200 + +ryzom-core (0.5.0-1) unstable; urgency=low + + * Initial release. (Closes: #448067) + + -- Gürkan Sengün Tue, 23 Oct 2007 12:56:45 +0200 + diff --git a/dist/debian/vivid/debian/client_default.cfg b/dist/debian/vivid/debian/client_default.cfg new file mode 100644 index 000000000..d09cbbb9c --- /dev/null +++ b/dist/debian/vivid/debian/client_default.cfg @@ -0,0 +1,567 @@ +////////////////////////// +////////////////////////// +/// CLIENT CONFIG FILE /// +////////////////////////// +////////////////////////// + + +// If you set this variable to 1, your client.cfg will be overwritten when you quit the client. +// You will loose all the comments and identation in this file. +SaveConfig = 1; + +/////////////////// +// WINDOW CONFIG // +/////////////////// + +Driver3D="Auto"; // Valid values are "Auto" or "0", "OpengGL" or "1" & "Direct3D" or "2" + // "Auto" will choose the best suited driver depending on hardware +FullScreen = 0; +Width = 1024; +Height = 768; +PositionX = 0; +PositionY = 0; +Frequency = 60; +Depth = 32; +Sleep = -1; +ProcessPriority = 0; // -2 = idle, -1 = below normal, 0 = normal, 1 = above normal, 2 = high, 3 = real time +Contrast = 0.0; // -1.0 ~ 1.0 +Luminosity = 0.0; // -1.0 ~ 1.0 +Gamma = 0.0; // -1.0 ~ 1.0 +Contrast_min = -1.0; +Luminosity_min = -1.0; +Gamma_min = -1.0; +Contrast_max = 1.0; +Luminosity_max = 1.0; +Gamma_max = 1.0; + + +///////////// +// NETWORK // +///////////// + +Application = { "ryzom_live", "./client_ryzom_r.exe", "./" }; +BackgroundDownloader = 0; +PatchServer = "http://dl.ryzom.com/patch_live"; +SignUpURL = "http://www.ryzom.com/subscribe"; +StartupHost = "shard.ryzom.com:40916"; +StartupPage = "/login/r2_login.php"; +InstallStatsUrl = "http://shard.ryzom.com:50000/stats/stats.php"; +CreateAccountURL = "https://secure.ryzom.com/signup/from_client.php"; +InstallWebPage = "http://dl.ryzom.com/installer/"; + + +//////////////// +// INTERFACES // +//////////////// + +// the language to use as in ISO 639-2 +LanguageCode = "en"; // english + +XMLInputFile = "input_config_v3.xml"; + +XMLLoginInterfaceFiles = { + "login_config.xml", + "login_widgets.xml", + "login_main.xml", + "login_keys.xml", +}; + +XMLOutGameInterfaceFiles = { + "out_v2_config.xml", + "out_v2_widgets.xml", + "out_v2_connect.xml", + "out_v2_intro.xml", + "out_v2_select.xml", + "out_v2_appear.xml", + "out_v2_location.xml", + "out_v2_crash.xml", + "out_v2_hierarchy.xml", + "out_v2_keys.xml", +}; + +// The ligo primitive class file +LigoPrimitiveClass = "world_editor_classes.xml"; + +VerboseLog = 1; + +/////////// +// MOUSE // +/////////// +HardwareCursor = 1; + +CursorSpeed = 1.0; // In pixels per mickey +CursorSpeed_min = 0.5; +CursorSpeed_max = 2.0; + +CursorAcceleration = 40; // Threshold in mickey +CursorAcceleration_min = 20; +CursorAcceleration_max = 80; + +FreeLookSpeed = 0.004; // In radian per mickey +FreeLookSpeed_min = 0.0001; +FreeLookSpeed_max = 0.01; + +FreeLookAcceleration = 40; // Threshold in mickey +FreeLookAcceleration_min = 20; +FreeLookAcceleration_max = 80; + +FreeLookInverted = 0; +AutomaticCamera = 0; +DblClickMode = 1; +AutoEquipTool = 1; + +/////////////////// +// RENDER CONFIG // +/////////////////// + +// NB: thoses variables configure also the InGameConfigurator: +// _min and _max define the bounds +// _step defines the step (NB: take care of _min and _max!!) +// _ps0 is the LOW preset, _ps1 is the MEDIUM preset, _ps2 is the NORMAL Preset, and _ps3 is the HIGH one + + +// *** LANDSCAPE +LandscapeTileNear = 150.000000; +LandscapeTileNear_min = 20.000000; +LandscapeTileNear_max = 250.000000; +LandscapeTileNear_step = 10.0; +LandscapeTileNear_ps0 = 20.0; +LandscapeTileNear_ps1 = 100.0; +LandscapeTileNear_ps2 = 150.0; +LandscapeTileNear_ps3 = 200.0; + +// NB: threshold is inverted ULandscape::setThreshold(), to be more intelligible +LandscapeThreshold = 2000.0; +LandscapeThreshold_min = 100.0; // Low quality => 0.01 threshold +LandscapeThreshold_max = 4000.0; // High quality => 0.0005 threshold +LandscapeThreshold_step = 100.0; +LandscapeThreshold_ps0 = 100.0; +LandscapeThreshold_ps1 = 1000.0; +LandscapeThreshold_ps2 = 2000.0; +LandscapeThreshold_ps3 = 3000.0; + +Vision = 500.000000; +Vision_min = 200.000000; +Vision_max = 800.000000; +Vision_step = 100.000000; +Vision_ps0 = 200.0; +Vision_ps1 = 400.0; +Vision_ps2 = 500.0; +Vision_ps3 = 800.0; + +MicroVeget = 1; // Enable/Disable MicroVeget. +MicroVeget_ps0 = 0; +MicroVeget_ps1 = 1; +MicroVeget_ps2 = 1; +MicroVeget_ps3 = 1; + +MicroVegetDensity = 80.0; +MicroVegetDensity_min = 10.0; +MicroVegetDensity_max = 100.0; +MicroVegetDensity_step = 10.0; +MicroVegetDensity_ps0 = 10.0; // not used since disabled! +MicroVegetDensity_ps1 = 30.0; +MicroVegetDensity_ps2 = 80.0; +MicroVegetDensity_ps3 = 100.0; + + +// *** FX +FxNbMaxPoly = 20000; +FxNbMaxPoly_min = 2000; +FxNbMaxPoly_max = 50000; +FxNbMaxPoly_step= 2000; +FxNbMaxPoly_ps0 = 2000; +FxNbMaxPoly_ps1 = 10000; +FxNbMaxPoly_ps2 = 20000; +FxNbMaxPoly_ps3 = 50000; + +Cloud = 1; +Cloud_ps0 = 0 ; +Cloud_ps1 = 1 ; +Cloud_ps2 = 1 ; +Cloud_ps3 = 1 ; + +CloudQuality = 160.0; +CloudQuality_min = 80.0; +CloudQuality_max = 320.0; +CloudQuality_step = 20.0; +CloudQuality_ps0 = 80.0; // not used since disabled! +CloudQuality_ps1 = 80.0; +CloudQuality_ps2 = 160.0; +CloudQuality_ps3 = 320.0; + +CloudUpdate = 1; +CloudUpdate_min = 1; +CloudUpdate_max = 8; +CloudUpdate_step= 1; +CloudUpdate_ps0 = 1; // not used since disabled! +CloudUpdate_ps1 = 1; +CloudUpdate_ps2 = 1; +CloudUpdate_ps3 = 3; + +Shadows = 1; +Shadows_ps0 = 0; +Shadows_ps1 = 1; +Shadows_ps2 = 1; +Shadows_ps3 = 1; + +Bloom = 0; +Bloom_ps0 = 0; +Bloom_ps1 = 1; +Bloom_ps2 = 1; +Bloom_ps3 = 1; + +SquareBloom = 1; +SquareBloom_ps0 = 0; +SquareBloom_ps1 = 1; +SquareBloom_ps2 = 1; +SquareBloom_ps3 = 1; + +DensityBloom = 255.0; +DensityBloom_min = 0.0; +DensityBloom_max = 255.0; +DensityBloom_step = 1.0; +DensityBloom_ps0 = 255.0; +DensityBloom_ps1 = 255.0; +DensityBloom_ps2 = 255.0; +DensityBloom_ps3 = 255.0; + + +// *** CHARACTERS +SkinNbMaxPoly = 100000; +SkinNbMaxPoly_min = 5000; +SkinNbMaxPoly_max = 250000; +SkinNbMaxPoly_step = 5000; +SkinNbMaxPoly_ps0 = 10000; +SkinNbMaxPoly_ps1 = 70000; +SkinNbMaxPoly_ps2 = 100000; +SkinNbMaxPoly_ps3 = 200000; + +NbMaxSkeletonNotCLod = 125; +NbMaxSkeletonNotCLod_min = 5; +NbMaxSkeletonNotCLod_max = 255; +NbMaxSkeletonNotCLod_step = 5; +NbMaxSkeletonNotCLod_ps0 = 10; +NbMaxSkeletonNotCLod_ps1 = 50; +NbMaxSkeletonNotCLod_ps2 = 125; +NbMaxSkeletonNotCLod_ps3 = 255; + +CharacterFarClip = 200.0; +CharacterFarClip_min = 50.0; +CharacterFarClip_max = 500.0; +CharacterFarClip_step = 10.0; +CharacterFarClip_ps0 = 50.0; +CharacterFarClip_ps1 = 100.0; +CharacterFarClip_ps2 = 200.0; +CharacterFarClip_ps3 = 500.0; + +EnableRacialAnimation = 1; + +// *** MISC +// This is the actual aspect ratio of your screen (no relation with the resolution!!). Set 1.7777 if you got a 16/9 screen for instance +ScreenAspectRatio = 0.0; +ForceDXTC = 1; // Enable/Disable DXTC. +DivideTextureSizeBy2= 0; // Divide texture size +DisableVtxProgram = 0; // Disable Hardware Vertex Program. +DisableVtxAGP = 0; // Disable Hardware Vertex AGP. +DisableTextureShdr = 0; // Disable Hardware Texture Shader. +HDEntityTexture = 0; +HDTextureInstalled = 1; +WaitVBL = 0; // 0 or 1 to wait Vertical Sync. + +////////////////// +// GAME OPTIONS // +////////////////// +SelectWithRClick = 1; +DisplayWeapons = 1; +RotKeySpeedMax = 2.0; +RotKeySpeedMax_min = 1.0; +RotKeySpeedMax_max = 4.0; +RotKeySpeedMin = 1.0; +RotKeySpeedMin_min = 0.5; +RotKeySpeedMin_max = 2.0; +RotAccel = 3.0; +FollowOnAtk = 0; +AtkOnSelect = 0; +ZCPacsPrim = "gen_bt_col_ext.pacs_prim"; + +///////////////// +// PREFERENCES // +///////////////// +FPV = 0; // FPV(First Person View) : default is false (Third Person View). +CameraHeight = 2.2; // Camera Height (in meter) from the ground (for the Third Person View). +CameraDistance = 3.0; // Camera Distance(in meter) from the user (for the Third Person View). +CameraDistStep = 1.0; +CameraDistMin = 1.0; +CameraDistMax = 25.0; +CameraAccel = 5.0; +CameraSpeedMin = 2.0; +CameraSpeedMax = 100.0; +CameraResetSpeed = 10.0; // Speed in radian/s + +////////////////// +// SOUND CONFIG // +////////////////// +SoundForceSoftwareBuffer= 1; +SoundOn = 1; +UseEax = 0; + +MaxTrack = 32; +MaxTrack_min = 4; +MaxTrack_max = 32; +MaxTrack_step = 4; + +// This is the volume for "InGame" sound FXs +SoundSFXVolume = 1.0; +SoundSFXVolume_min = 0.0; +SoundSFXVolume_max = 1.0; +SoundSFXVolume_step = 0.001; + +// This is volume for "InGame" music. Does not affect the MP3 player +SoundGameMusicVolume = 0.5; +SoundGameMusicVolume_min = 0.0; +SoundGameMusicVolume_max = 1.0; +SoundGameMusicVolume_step = 0.001; + +// MISC +PreDataPath = { "user", "patch", "examples", "data/fonts", "data/gamedev.bnp" }; +DataPath = { "data" }; +NeedComputeVS = 0; + +NegFiltersDebug = {"Update DB", "Reading:", "Read Value :", "impulseCallBack", "CLIMPD:", "LNET" }; +NegFiltersInfo = { "CLIMPD:", "CPath::lookup" , "LNET" }; +NegFiltersWarning = { "'basics.Equipment Slot'.", "_usercolor.tga", "PACS" }; + +// Big screen shot +ScreenShotWidth = 0; +ScreenShotHeight = 0; +ScreenShotFullDetail = 1; // 1 to switch full detail mode for characters (both standard & big screenshots) + +// Read : "ID", "R G B A MODE [FX]" +SystemInfoColors = +{ +// OLD STUFF Here for compatibility +"RG", "0 0 0 255 normal", // Black to see when there is an error +"BC", "0 0 0 255 normal", // Black to see when there is an error +"JA", "0 0 0 255 normal", // Black to see when there is an error +"BL", "0 0 0 255 normal", // Black to see when there is an error +"VE", "0 0 0 255 normal", // Black to see when there is an error +"VI", "0 0 0 255 normal", // Black to see when there is an error + +// NEW System Info Categories +"SYS", "255 255 255 255 normal", // Default system messages +"BC", "255 255 255 255 centeraround", // Broadcast messages +"TAGBC", "255 255 255 255 centeraround", // Taged broadcast messages : color should remain white as some word are tagged +"XP", "255 255 64 255 over", // XP Gain +"SP", "255 255 64 255 over", // SP Gain +"TTL", "255 255 64 255 over", // Title +"TSK", "255 255 255 255 over", // Task +"ZON", "255 255 255 255 center", // Zone +"DG", "255 0 0 255 normal", // Damage to me +"DMG", "255 0 0 255 normal", // Damage to me +"DGP", "200 0 0 255 normal", // Damage to me from player +"DGM", "255 128 64 255 normal", // Damage from me +"MIS", "150 150 150 255 normal", // The opponent misses +"MISM", "255 255 255 255 normal", // I miss +"ITM", "0 200 0 255 over", // Item +"ITMO", "170 170 255 255 overonly", // Item other in group +"ITMF", "220 0 220 255 over", // Item failed +"SPL", "50 50 250 255 normal", // Spell to me +"SPLM", "50 150 250 255 normal", // Spell from me +"EMT", "255 150 150 255 normal", // Emote +"MTD", "255 255 0 255 over", // Message Of The Day +"FORLD","64 255 64 255 overonly", // Forage Locate Deposit +"CHK", "255 120 60 255 center", // Tous ce qui ne remplit pas une condition +"CHKCB","255 255 0 255 center", // Tous ce qui ne remplit pas une condition en combat (trop loin, cible invalide, pas assez de mana, etc.) +"PVPTM","255 120 60 255 overonly", // PVP timer +"THM", "255 255 64 255 over misc_levelup.ps", // Thema finished +"AMB", "255 255 64 255 center", // Ambiance +"ISE", "192 208 255 255 normal", // Item special effect +"ISE2", "192 208 255 255 center", // Item special effect with center text (for effects without flying text) +"OSM", "128 160 255 255 center", // Outpost state message +"AROUND","255 255 0 255 around", // Only in around channel +"R2_INVITE","0 255 0 255 around", // Ring invitation +}; + +PrintfCommands = { + "52", "15", "55 55 0 255", "28", "uiChapterV", "624", + "428", "0 0 0 255", "18", "", "624", "378", + "0 0 0 255", "14", "", "644", "278", "0 0 0 255", + "18", "", "52", "17", "255 255 255 255", "28", + "uiChapterV", "622", "430", "255 255 255 255", "18", "", + "622", "380", "255 255 255 255", "14", "", "642", + "280", "255 255 255 255", "18", "" +}; + +PrintfCommandsFreeTrial = { + "52", "15", "55 55 0 255", "28", "uiChapterV", "624", + "428", "0 0 0 255", "18", "", "624", "378", + "0 0 0 255", "14", "", "644", "278", "0 0 0 255", + "18", "", "52", "17", "255 255 255 255", "28", + "uiChapterV", "622", "430", "255 255 255 255", "18", "", + "622", "380", "255 255 255 255", "14", "", "642", + "280", "255 255 255 255", "18", "" +}; + +DisplayMissingAnimFile = 0; + +LoadingStringCount = 54; + + +// Some R2 parameters ... + +R2Mode = 1; +R2EDEnabled = 1; +R2EDExtendedDebug = 0; +R2EDLightPalette = 0; +R2ClientGw = "r2linux01"; +LoadLuaDebugger = 0; +CheckR2ScenarioMD5 = 1; +LevelDesignEnabled = 0; + +DmCameraDistMax = 25; +DmRun = 20; +DmWalk = 6; + +R2EDReloadFiles = { + "r2ed.xml", + "r2_basic_bricks.lua", + "r2_components.lua", + "r2_core.lua", + "r2_features_default.lua", + "r2_features_fauna.lua", + "r2_features_npc_groups.lua", + "r2_palette.lua", + "r2_scenario.lua", + "r2_ui.lua" +}; + +XMLInterfaceFiles = { + "config.xml", + "widgets.xml", + "webig_widgets.xml", + "player.xml", + "inventory.xml", + "interaction.xml", + "phrase.xml", + "harvest.xml", + "macros.xml", + "info_player.xml", + "outpost.xml", + "guild.xml", + "taskbar.xml", + "game_config.xml", + "game_context_menu.xml", + "player_trade.xml", + "bot_chat_v4.xml", + "compass.xml", + "map.xml", + "hierarchy.xml", + "reset.xml", + "actions.xml", + "help.xml", + "encyclopedia.xml", + "commands.xml", + "commands2.xml", + "ring_access_point_filter.xml", + "ring_window.xml", + "bg_downloader.xml" +}; + +XMLR2EDInterfaceFiles = +{ + "r2ed.xml", + "r2_triggers.xml", + "r2_logic_entities.xml", + "r2ed_acts.xml", + "r2ed_scenario.xml", + "r2ed_connect.xml" +}; + +FogDistAndDepthLookupBias = 20; // bias for lookup of fog distance and depth + + +// Hardware cursor textures +// These will be extracted from the corresponding packed ui .tga files when they are loaded +// * +// * individual .tga files for hardware cursor bitmap not looked for, and not supported yet +HardwareCursors = +{ + "curs_can_pan.tga", + "curs_can_pan_dup.tga", + "curs_create.tga", + "curs_create_multi.tga", + "curs_create_vertex_invalid.tga", + "curs_default.tga", + "curs_dup.tga", + "curs_L.tga", + "curs_M.tga", + "curs_pan.tga", + "curs_pan_dup.tga", + "curs_pick.tga", + "curs_pick_dup.tga", + "curs_R.tga", + "curs_resize_BL_TR.tga", + "curs_resize_BR_TL.tga", + "curs_resize_LR.tga", + "curs_resize_TB.tga", + "curs_rotate.tga", + "curs_scale.tga", + "curs_stop.tga", + "text_cursor.tga", + "r2_hand_can_pan.tga", + "r2_hand_pan.tga", + "r2ed_tool_can_pick.tga", + "r2ed_tool_can_rotate.tga", + "r2ed_tool_pick.tga", + "r2ed_tool_rotate.tga", + "r2ed_tool_rotating.tga" +}; + +Loading_BG = "new_loading_bg.tga"; // Default name for the loading background file. +Launch_BG = "new_launcher_bg.tga"; // Default name for the launch background file. +TeleportKami_BG = "new_teleport_kami_bg.tga"; +TeleportKaravan_BG = "new_teleport_caravan_bg.tga"; +Elevator_BG = "new_elevator_bg.tga"; // Default name for the loading background file. +ResurectKami_BG = "new_resurect_kami_bg.tga"; +ResurectKaravan_BG = "new_resurect_caravane_bg.tga"; +End_BG = "end_bg.tga"; // Default name for the last background file. + +ScenarioSavePath = "./my_scenarios/"; + +// list ofpredefined keyset +// name will be looked up in the translation file by searching 'uiCP_KeysetName_" + id +// tooltip will be looked up in the translation file by searching 'uiCP_KeysetTooltip_" + id +// 'bi.' stands for built-in +// note : we add a dot in the name to be sure that there cannot be a conflict with character keyset name +BuiltInKeySets = +{ + "", // default ryzom keyboard layout + "bi.zqsd", // european keyboard fps displacement style (NB : don't change this layout name, ryzom will automatically select it if keyboard is french or belgian) + "bi.wasd", // english keyboard fps displacement style (NB : don't change this layout name, ryzom will automatically select it if keyboard is not french nor belgian) + "bi.wow_alike" // 'world of warcraft' like keyboard style. (NB : not available for ring) +}; + +// "Newbie Training", "Story Telling", "Mistery", "Hack & Slash", "Guild Training", "Other" +ScenarioTypes = {"so_newbie_training","so_story_telling","so_mistery","so_hack_slash","so_guild_training","so_other"}; + +ScenarioLanguages = {"fr","de","en","other_lang"}; + +// Map each language to a forum help page +HelpPages = +{ + "fr=http://forums.ryzom.com/forum/showthread.php?t=29130", + "en=http://forums.ryzom.com/forum/showthread.php?t=29129", + "wk=http://forums.ryzom.com/forum/showthread.php?t=29129", + "de=http://forums.ryzom.com/forum/showthread.php?t=29131" +}; + +WebIgMainDomain = "app.ryzom.com"; +WebIgTrustedDomains = { + "api.ryzom.com", "app.ryzom.com" +}; +PatchletUrl = "http://app.ryzom.com/app_patchlet/index.php?patch=preload"; + +SelectedSlot = 0; + +BuildName = "RELEASE_HEAD"; diff --git a/dist/debian/vivid/debian/compat b/dist/debian/vivid/debian/compat new file mode 100644 index 000000000..ec635144f --- /dev/null +++ b/dist/debian/vivid/debian/compat @@ -0,0 +1 @@ +9 diff --git a/dist/debian/vivid/debian/control b/dist/debian/vivid/debian/control new file mode 100644 index 000000000..e662d1f37 --- /dev/null +++ b/dist/debian/vivid/debian/control @@ -0,0 +1,212 @@ +Source: ryzom-core +Priority: extra +Maintainer: Debian Games Team +Uploaders: Luboš Novák , Cédric OCHS +Build-Depends: debhelper (>= 9), cmake(>= 2.6), libxml2-dev, + libgl1-mesa-dev, libjpeg8-dev | libjpeg62-dev, libpng12-dev, libopenal-dev, + libfreetype6-dev, libxxf86vm-dev, libxrandr-dev, libxrender-dev, + libvorbis-dev, libsquish-dev, libcurl4-openssl-dev, libluabind-dev, + libboost-dev, libwww-dev, libmysqlclient-dev, + libcpptest-dev, libqt4-dev, libqt4-opengl-dev +Standards-Version: 3.9.5 +Section: games +Bugs: http://dev.ryzom.com/projects/ryzom/issues +Homepage: http://dev.ryzom.com +Vcs-Svn: svn://svn.debian.org/svn/pkg-games/packages/trunk/nel/ +Vcs-Browser: http://svn.debian.org/wsvn/pkg-games/packages/trunk/nel/?op=log + +Package: libnel0 +Section: libdevel +Architecture: any +Multi-Arch: same +Pre-Depends: ${misc:Pre-Depends} +Depends: ${misc:Depends}, ${shlibs:Depends} +Description: Massive multi-user 3D game environments library (shared library) + This is a software platform for creating and running massively multi-user + entertainment in a 3D environment over the Internet. + . + This library is further divided into specific modules: network, ai, 3d + and misc. If you want to use any of these, you also need to use the misc + part of the library, but ai, 3d and network are totally independent from + each other so you can use only the parts you really need in your project. + . + This package contains the shared library. + +Package: libnel-dev +Section: libdevel +Architecture: any +Multi-Arch: same +Depends: ${misc:Depends}, libnel0 (= ${binary:Version}) +Description: Massive multi-user 3D game environments library (development files) + This is a software platform for creating and running massively multi-user + entertainment in a 3D environment over the Internet. + . + This library is further divided into specific modules: network, ai, 3d + and misc. If you want to use any of these, you also need to use the misc + part of the library, but ai, 3d and network are totally independent from + each other so you can use only the parts you really need in your project. + . + This package contains the headers. + +Package: libnel0-dbg +Section: debug +Architecture: any +Depends: ${misc:Depends}, libnel0 (= ${binary:Version}) +Description: Massive multi-user 3D game environments library (debugging symbols) + This is a software platform for creating and running massively multi-user + entertainment in a 3D environment over the Internet. + . + This library is further divided into specific modules: network, ai, 3d + and misc. If you want to use any of these, you also need to use the misc + part of the library, but ai, 3d and network are totally independent from + each other so you can use only the parts you really need in your project. + . + This package contains the debugging symbols. + +Package: nel-tools +Section: devel +Architecture: any +Multi-Arch: same +Pre-Depends: ${misc:Pre-Depends} +Depends: ${misc:Depends}, ${shlibs:Depends}, libnel0 (= ${binary:Version}) +Description: Massive multi-user 3D game environments library (tools) + This is a software platform for creating and running massively multi-user + entertainment in a 3D environment over the Internet. + . + This library is further divided into specific modules: network, ai, 3d + and misc. If you want to use any of these, you also need to use the misc + part of the library, but ai, 3d and network are totally independent from + each other so you can use only the parts you really need in your project. + . + This package contains the tools. + +Package: nel-tools-dbg +Section: debug +Architecture: any +Depends: ${misc:Depends}, nel-tools (= ${binary:Version}) +Description: Massive multi-user 3D game environments library (tools debugging symbols) + This is a software platform for creating and running massively multi-user + entertainment in a 3D environment over the Internet. + . + This library is further divided into specific modules: network, ai, 3d + and misc. If you want to use any of these, you also need to use the misc + part of the library, but ai, 3d and network are totally independent from + each other so you can use only the parts you really need in your project. + . + This package contains the tools debugging symbols. + +Package: libryzom-sevenzip0 +Architecture: any +Multi-Arch: same +Pre-Depends: ${misc:Pre-Depends} +Depends: ${misc:Depends}, ${shlibs:Depends} +Description: Ryzom science-fantasy MMORPG (decompression library) + Ryzom Core provides the base technologies and a set of development + methodologies for the development of both client and server code. + . + This package contains the decompression shared library. + +Package: libryzom-sevenzip0-dbg +Section: debug +Architecture: any +Depends: ${misc:Depends}, libryzom-sevenzip0 (= ${binary:Version}) +Description: Ryzom science-fantasy MMORPG (decompression library debugging symbols) + Ryzom Core provides the base technologies and a set of development + methodologies for the development of both client and server code. + . + This package contains the decompression shared library debugging symbols. + +Package: libryzom-gameshare0 +Architecture: any +Multi-Arch: same +Pre-Depends: ${misc:Pre-Depends} +Depends: ${misc:Depends}, ${shlibs:Depends}, libnel0 (= ${binary:Version}) +Description: Ryzom science-fantasy MMORPG (common shared library) + Ryzom Core provides the base technologies and a set of development + methodologies for the development of both client and server code. + . + This package contains the game common shared library. + +Package: libryzom-gameshare0-dbg +Section: debug +Architecture: any +Depends: ${misc:Depends}, libryzom-gameshare0 (= ${binary:Version}) +Description: Ryzom science-fantasy MMORPG (common debugging symbols) + Ryzom Core provides the base technologies and a set of development + methodologies for the development of both client and server code. + . + This package contains the game common debugging symbols. + +Package: libryzom-clientsheets0 +Architecture: any +Multi-Arch: same +Pre-Depends: ${misc:Pre-Depends} +Depends: ${misc:Depends}, ${shlibs:Depends}, libryzom-gameshare0 (= ${binary:Version}) +Description: Ryzom science-fantasy MMORPG (client sheets shared library) + Ryzom Core provides the base technologies and a set of development + methodologies for the development of both client and server code. + . + This package contains the client sheets shared library. + +Package: libryzom-clientsheets0-dbg +Section: debug +Architecture: any +Depends: ${misc:Depends}, libryzom-clientsheets0 (= ${binary:Version}) +Description: Ryzom science-fantasy MMORPG (client sheets debugging symbols) + Ryzom Core provides the base technologies and a set of development + methodologies for the development of both client and server code. + . + This package contains the client sheets debugging symbols. + +Package: ryzom-client +Architecture: any +Depends: ${misc:Depends}, ${shlibs:Depends}, libryzom-gameshare0 (= ${binary:Version}), + libryzom-clientsheets0 (= ${binary:Version}), + ryzom-client-config (>= ${source:Version}), rsync, wget, p7zip-full +Description: Ryzom science-fantasy MMORPG (client) + Ryzom Core provides the base technologies and a set of development + methodologies for the development of both client and server code. + . + This package contains the game client. + +Package: ryzom-client-dbg +Section: debug +Architecture: any +Depends: ${misc:Depends}, ryzom-client (= ${binary:Version}) +Description: Ryzom science-fantasy MMORPG (client debugging symbols) + Ryzom Core provides the base technologies and a set of development + methodologies for the development of both client and server code. + . + This package contains the client debugging symbols. + +Package: ryzom-tools +Section: devel +Architecture: any +Multi-Arch: same +Pre-Depends: ${misc:Pre-Depends} +Depends: ${misc:Depends}, ${shlibs:Depends}, libryzom-gameshare0 (= ${binary:Version}), + libryzom-clientsheets0 (= ${binary:Version}) +Description: Ryzom science-fantasy MMORPG (tools) + Ryzom Core provides the base technologies and a set of development + methodologies for the development of both client and server code. + . + This package contains the tools. + +Package: ryzom-tools-dbg +Section: debug +Architecture: any +Depends: ${misc:Depends}, ryzom-tools (= ${binary:Version}) +Description: Ryzom science-fantasy MMORPG (tools debugging symbols) + Ryzom Core provides the base technologies and a set of development + methodologies for the development of both client and server code. + . + This package contains the tools debugging symbols. + +Package: ryzom-client-config +Architecture: all +Depends: ${misc:Depends} +Description: Ryzom science-fantasy MMORPG (client configuration) + Ryzom Core provides the base technologies and a set of development + methodologies for the development of both client and server code. + . + This package contains the client configuration. diff --git a/dist/debian/vivid/debian/copyright b/dist/debian/vivid/debian/copyright new file mode 100644 index 000000000..d5a0f2f10 --- /dev/null +++ b/dist/debian/vivid/debian/copyright @@ -0,0 +1,53 @@ +This package was debianized by Gürkan Sengün on +Tue, 23 Oct 2007 12:56:45 +0200. + +It was downloaded from + +Upstream Authors: + + Olivier Cado + Bertram Felgenhauer + Krzysztof Kotlenga + Henri Kuuste + Vianney Lecroart + Namine + Cédric Ochs + Guillaume Puzin + Matt Raykowski + Robert Timm + Titegus + Ulukyn + Robert Wetzel + Zorglor + TODO: take names from Ryzom credits + +Copyright: + + Copyright (C) 2003-2009 Vianney Lecroart + Copyright (C) 2003-2009 Matt Raykowski + Copyright (C) 2000-2006 Nevrax Ltd. + Copyright (C) 2006-2007 Gameforge France + Copyright (C) 2008-2010 Winch Gate Property Limited + +License: + + 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 . + +The Debian packaging is: + + Copyright (C) 2007 Gürkan Sengün + +and is licensed under the GPL version 2, +see `/usr/share/common-licenses/GPL-2'. + diff --git a/dist/debian/vivid/debian/docs b/dist/debian/vivid/debian/docs new file mode 100644 index 000000000..58e5e3e76 --- /dev/null +++ b/dist/debian/vivid/debian/docs @@ -0,0 +1,2 @@ +changelog +README diff --git a/dist/debian/vivid/debian/libnel-dev.docs b/dist/debian/vivid/debian/libnel-dev.docs new file mode 100644 index 000000000..ba8894c15 --- /dev/null +++ b/dist/debian/vivid/debian/libnel-dev.docs @@ -0,0 +1,2 @@ +README + diff --git a/dist/debian/vivid/debian/libnel-dev.install b/dist/debian/vivid/debian/libnel-dev.install new file mode 100644 index 000000000..9f9310cee --- /dev/null +++ b/dist/debian/vivid/debian/libnel-dev.install @@ -0,0 +1,3 @@ +usr/include/* +usr/lib/*/libnel*.so +usr/lib/*/pkgconfig/* diff --git a/dist/debian/vivid/debian/libnel-dev.manpages b/dist/debian/vivid/debian/libnel-dev.manpages new file mode 100644 index 000000000..bb4027ca9 --- /dev/null +++ b/dist/debian/vivid/debian/libnel-dev.manpages @@ -0,0 +1 @@ +debian/nel-config.1 diff --git a/dist/debian/vivid/debian/libnel-doc.doc-base.nel b/dist/debian/vivid/debian/libnel-doc.doc-base.nel new file mode 100644 index 000000000..6ae95fc9f --- /dev/null +++ b/dist/debian/vivid/debian/libnel-doc.doc-base.nel @@ -0,0 +1,9 @@ +Document: nel +Title: NeL Reference Manual +Author: Nevrax +Abstract: This is a software platform for creating and running massively multi-user entertainment in a 3D environment over the Internet. +Section: Programming/C + +Format: HTML +Index: /usr/share/doc/libnel-doc/html/index.html +Files: /usr/share/doc/libnel-doc/html/*.html diff --git a/dist/debian/vivid/debian/libnel-doc.install b/dist/debian/vivid/debian/libnel-doc.install new file mode 100644 index 000000000..bf3f02a61 --- /dev/null +++ b/dist/debian/vivid/debian/libnel-doc.install @@ -0,0 +1 @@ +usr/share/doc/libnel-doc/html/* diff --git a/dist/debian/vivid/debian/libnel0.install b/dist/debian/vivid/debian/libnel0.install new file mode 100644 index 000000000..4273c0ad1 --- /dev/null +++ b/dist/debian/vivid/debian/libnel0.install @@ -0,0 +1,3 @@ +usr/lib/*/libnel*.so.* +usr/lib/*/nel/libnel_drv_openal.so +usr/lib/*/nel/libnel_drv_opengl.so diff --git a/dist/debian/vivid/debian/libryzom-clientsheets0.install b/dist/debian/vivid/debian/libryzom-clientsheets0.install new file mode 100644 index 000000000..b5ea5b79c --- /dev/null +++ b/dist/debian/vivid/debian/libryzom-clientsheets0.install @@ -0,0 +1,2 @@ +usr/lib/*/libryzom_clientsheets.so.* + diff --git a/dist/debian/vivid/debian/libryzom-gameshare0.install b/dist/debian/vivid/debian/libryzom-gameshare0.install new file mode 100644 index 000000000..2f51b0804 --- /dev/null +++ b/dist/debian/vivid/debian/libryzom-gameshare0.install @@ -0,0 +1,2 @@ +usr/lib/*/libryzom_gameshare.so.* + diff --git a/dist/debian/vivid/debian/libryzom-sevenzip0.install b/dist/debian/vivid/debian/libryzom-sevenzip0.install new file mode 100644 index 000000000..1edced3f8 --- /dev/null +++ b/dist/debian/vivid/debian/libryzom-sevenzip0.install @@ -0,0 +1,2 @@ +usr/lib/*/libryzom_sevenzip.so.* + diff --git a/dist/debian/vivid/debian/nel-config.1 b/dist/debian/vivid/debian/nel-config.1 new file mode 100644 index 000000000..be47bf496 --- /dev/null +++ b/dist/debian/vivid/debian/nel-config.1 @@ -0,0 +1,37 @@ +.TH nel-config 1 "26 Oct 2007" +.SH NAME +nel-config \- Get information about a libnel installation +.SH SYNOPSIS +.B nel-config [options] +.SH DESCRIPTION +.B nel-config +displays information about a libnel installation. +.SH OPTIONS +.IP "--cflags" +Set of compiler options (CFLAGS) to use when compiling files that use +libnel. Currently that is only thw include path to the nel include files. +.IP "--libs" +Shows the complete set of libs and other linker options you will need in order +to link your application with libnel. +.IP "--prefix" +This is the prefix used when libnel was installed. libnel is then installed +in $prefix/lib and its header files are installed in $prefix/include and so +on. The prefix is set with "configure \-\-prefix". +.IP "--version" +Outputs version information about the installed libnel. +.SH "EXAMPLES" +What linker options do I need when I link with libnel? + + $ nel-config \-\-libs + +What compiler options do I need when I compile using libnel functions? + + $ nel-config \-\-cflags + +What's the installed libnel version? + + $ nel-config \-\-version +.SH AUTHOR +.PP +This manual page was written by G\[:u]rkan Seng\[:u]n +,for the Debian project (but may be used by others). diff --git a/dist/debian/vivid/debian/nel-tools.install b/dist/debian/vivid/debian/nel-tools.install new file mode 100644 index 000000000..4ca03208c --- /dev/null +++ b/dist/debian/vivid/debian/nel-tools.install @@ -0,0 +1,87 @@ +etc/nel/build_ig_boxes.cfg +etc/nel/build_indoor_rbank.cfg +etc/nel/build_rbank.cfg +etc/nel/make_sheet_id.cfg +etc/nel/words_dic.cfg +etc/nel/zviewer.cfg +usr/bin/animation_set_builder +usr/bin/anim_builder +usr/bin/bnp_make +usr/bin/build_clod_bank +usr/bin/build_clodtex +usr/bin/build_coarse_mesh +usr/bin/build_far_bank +usr/bin/build_ig_boxes +usr/bin/build_indoor_rbank +usr/bin/build_interface +usr/bin/build_rbank +usr/bin/build_samplebank +usr/bin/build_shadow_skin +usr/bin/build_smallbank +usr/bin/build_sound +usr/bin/build_soundbank +usr/bin/cluster_viewer +usr/bin/disp_sheet_id +usr/bin/extract_filename +usr/bin/file_info +usr/bin/georges2csv +usr/bin/get_neighbors +usr/bin/hls_bank_maker +usr/bin/ig_add +usr/bin/ig_info +usr/bin/ig_lighter +usr/bin/lock +usr/bin/make_sheet_id +usr/bin/memlog +usr/bin/message_box_qt +usr/bin/nl_probe_timers +usr/bin/nl_sample_chatclient +usr/bin/nl_sample_chatserver +usr/bin/nl_sample_clusterview +usr/bin/nl_sample_command +usr/bin/nl_sample_configfile +usr/bin/nl_sample_ct_ai_service +usr/bin/nl_sample_ct_gd_service +usr/bin/nl_sample_debug +usr/bin/nl_sample_font +usr/bin/nl_sample_georges +usr/bin/nl_sample_i18n +usr/bin/nl_sample_log +usr/bin/nl_sample_ls_client +usr/bin/nl_sample_ls_fes +usr/bin/nl_sample_pacs +usr/bin/nl_sample_shapeview +usr/bin/nl_sample_sound_sources +usr/bin/nl_sample_stream_file +usr/bin/nl_sample_stream_ogg_vorbis +usr/bin/nl_sample_strings +usr/bin/nl_sample_udpclient +usr/bin/nl_sample_udpserver +usr/bin/panoply_maker +usr/bin/shapes_exporter +usr/bin/tga2dds +usr/bin/tga_cut +usr/bin/tga_resize +usr/bin/tile_edit_qt +usr/bin/words_dic_qt +usr/bin/xml_packer +usr/bin/zone_check_bind +usr/bin/zone_dependencies +usr/bin/zone_dump +usr/bin/zone_ig_lighter +usr/bin/zone_lighter +usr/bin/zone_welder +usr/bin/zviewer +usr/lib/*/libs3tc_compressor.so.* +usr/share/nel/nl_sample_chat +usr/share/nel/nl_sample_class_transport +usr/share/nel/nl_sample_clusterview +usr/share/nel/nl_sample_configfile +usr/share/nel/nl_sample_font +usr/share/nel/nl_sample_georges +usr/share/nel/nl_sample_i18n +usr/share/nel/nl_sample_login_system +usr/share/nel/nl_sample_pacs +usr/share/nel/nl_sample_sound +usr/share/nel/nl_sample_udp +usr/share/nel/zviewer diff --git a/dist/debian/vivid/debian/rules b/dist/debian/vivid/debian/rules new file mode 100755 index 000000000..2b329f3be --- /dev/null +++ b/dist/debian/vivid/debian/rules @@ -0,0 +1,19 @@ +#!/usr/bin/make -f +%: + dh $@ --buildsystem=cmake --parallel + +override_dh_strip: + dh_strip -plibnel0 --dbg-package=libnel0-dbg + dh_strip -pnel-tools --dbg-package=nel-tools-dbg + dh_strip -plibryzom-sevenzip0 --dbg-package=libryzom-sevenzip0-dbg + dh_strip -plibryzom-gameshare0 --dbg-package=libryzom-gameshare0-dbg + dh_strip -plibryzom-clientsheets0 --dbg-package=libryzom-clientsheets0-dbg + dh_strip -pryzom-client --dbg-package=ryzom-client-dbg + dh_strip -pryzom-tools --dbg-package=ryzom-tools-dbg + +override_dh_auto_configure: + dh_auto_configure -- -DLIBRARY_ARCHITECTURE=$(DEB_HOST_MULTIARCH) -DTARGET_CPU=$(DEB_HOST_GNU_CPU) -DWITH_SYMBOLS=ON -DNL_ETC_PREFIX=/etc/nel -DRYZOM_ETC_PREFIX=/etc/ryzom -DRYZOM_SHARE_PREFIX=/usr/share/games/ryzom -DRYZOM_BIN_PREFIX=/usr/bin -DRYZOM_GAMES_PREFIX=/usr/games -DWITH_RYZOM_SERVER=OFF -DWITH_NEL_TESTS=OFF -DWITH_LIBWWW_STATIC=ON -DWITH_QT=ON + +override_dh_install: + dh_install + install -m755 debian/ryzom debian/ryzom-client/usr/games/ryzom diff --git a/dist/debian/vivid/debian/ryzom b/dist/debian/vivid/debian/ryzom new file mode 100755 index 000000000..79923e9e9 --- /dev/null +++ b/dist/debian/vivid/debian/ryzom @@ -0,0 +1,116 @@ +#!/bin/sh + +P7ZIP=/usr/bin/7z +RSYNC=/usr/bin/rsync +WGET=/usr/bin/wget +RYZOM_CLIENT=/usr/games/ryzom_client +RYZOM_CONFIG_DEFAULT=/etc/ryzom/client_default.cfg +RYZOM_CONFIG=~/.ryzom/client.cfg + +RYZOM_DIR=~/.ryzom +DATA_DIR=$RYZOM_DIR/data + +mkdir -p $RYZOM_DIR + +if [ ! -d "$DATA_DIR" ] +then + # symlink user's data dir to ryzom data cache + ln -s /var/cache/ryzom/data $DATA_DIR +fi + +# Check if a directory contains Ryzom data +ryzom_data_found() +{ + # Check for directory, gamedev.bnp and ryzom.ttf + COUNT=0 + + if [ -d $1 ] + then + # If there are a least 220 bnp files, we could use this directory + # There are 226 bnp files in last version + COUNT=$(find -L $1 -name *.bnp | wc -l) + fi + + echo $COUNT +} + +COUNT=$(ryzom_data_found $DATA_DIR) + +echo "Found $COUNT BNP files in $DATA_DIR" + +if [ $COUNT -lt 220 ] && [ -f $WGET ] && [ -f $P7ZIP ] +then + mkdir -p "$DATA_DIR/tmp" + + # Check free diskspace + echo "Checking for free disk space..." + DISKSPACE=$(df "$DATA_DIR/tmp" | grep "/dev" | awk '{print $4}') + if [ $? -ne 0 ] + then + exit 1 + fi + if [ "$DISKSPACE" -lt "8000000" ] + then + echo "You don't have enough free space to download and uncompress Ryzom client data." + exit 1 + fi + + # Download + echo "Downloading ryzom_client.7z from sourceforge..." + # wget + $WGET -c http://sourceforge.net/projects/ryzom/files/ryzom_client.7z -O "$DATA_DIR/tmp/ryzom_client.7z" + if [ $? -ne 0 ] + then + exit 1 + fi + + # Extract data + echo "Extracting data from ryzom_client.7z..." + cd "$DATA_DIR/tmp" + # 7z + $P7ZIP x ryzom_client.7z + if [ $? -ne 0 ] + then + exit 1 + fi + cd .. + mv -uf tmp/ryzom/data/* . + # Delete temporary downloaded files + rm -rf tmp +fi + +if [ -f $RYZOM_CONFIG ] +then + echo "Updating $RYZOM_CONFIG..." + + # Escape path for sed using bash find and replace + RYZOM_CONFIG_DEFAULT_ESCAPED=$(echo $RYZOM_CONFIG_DEFAULT | sed 's/\//\\\//g') + + # Update RootConfigFilename to be sure it's using the right default config + sed -i 's/RootConfigFilename.*/RootConfigFilename = \"'$RYZOM_CONFIG_DEFAULT_ESCAPED'\"/g' $RYZOM_CONFIG +fi + +if [ -f $RSYNC ] +then + echo "Patching Ryzom data..." + + # Rsync + $RSYNC -rOtzv --progress --stats www.ryzom.com::ryzom/data/ $DATA_DIR + if [ $? -ne 0 ] + then + exit 1 + fi +fi + +# Launch Ryzom client if it exists +if [ -f $RYZOM_CLIENT ] +then + echo "Launching Ryzom..." + + nohup $RYZOM_CLIENT $1 $2 $3 2> /dev/null & +fi + +# Wait until all previous commands are executed and displayed before exiting +sync + +exit 0 diff --git a/dist/debian/vivid/debian/ryzom-client-config.install b/dist/debian/vivid/debian/ryzom-client-config.install new file mode 100644 index 000000000..bef3f53dd --- /dev/null +++ b/dist/debian/vivid/debian/ryzom-client-config.install @@ -0,0 +1 @@ +debian/client_default.cfg etc/ryzom diff --git a/dist/debian/vivid/debian/ryzom-client.dirs b/dist/debian/vivid/debian/ryzom-client.dirs new file mode 100644 index 000000000..d1571095c --- /dev/null +++ b/dist/debian/vivid/debian/ryzom-client.dirs @@ -0,0 +1,4 @@ +usr/games +usr/share/applications +usr/share/pixmaps +var/cache/ryzom/data diff --git a/dist/debian/vivid/debian/ryzom-client.install b/dist/debian/vivid/debian/ryzom-client.install new file mode 100644 index 000000000..be142a6be --- /dev/null +++ b/dist/debian/vivid/debian/ryzom-client.install @@ -0,0 +1,4 @@ +usr/games/ryzom_client +usr/share/icons +usr/share/pixmaps +debian/ryzom_client.desktop usr/share/applications diff --git a/dist/debian/vivid/debian/ryzom-client.menu b/dist/debian/vivid/debian/ryzom-client.menu new file mode 100644 index 000000000..5e15bf577 --- /dev/null +++ b/dist/debian/vivid/debian/ryzom-client.menu @@ -0,0 +1,6 @@ +?package(ryzom-client): \ + needs="x11" \ + section="Games/Adventure" \ + icon="/usr/share/pixmaps/ryzom.xpm" \ + title="Ryzom" \ + command="/usr/games/ryzom" diff --git a/dist/debian/vivid/debian/ryzom-client.postinst b/dist/debian/vivid/debian/ryzom-client.postinst new file mode 100644 index 000000000..51570a3dc --- /dev/null +++ b/dist/debian/vivid/debian/ryzom-client.postinst @@ -0,0 +1,10 @@ +#!/bin/sh + +if ! getent group ryzom ; then + addgroup --system ryzom +fi + +chgrp -R ryzom /var/cache/ryzom/data +chmod -R g+wrxs /var/cache/ryzom/data + +#DEBHELPER# diff --git a/dist/debian/vivid/debian/ryzom-client.postrm b/dist/debian/vivid/debian/ryzom-client.postrm new file mode 100644 index 000000000..828871eb4 --- /dev/null +++ b/dist/debian/vivid/debian/ryzom-client.postrm @@ -0,0 +1,49 @@ +#! /bin/sh +# postrm script for ryzom-client +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `remove' +# * `purge' +# * `upgrade' +# * `failed-upgrade' +# * `abort-install' +# * `abort-install' +# * `abort-upgrade' +# * `disappear' overwrit>r> +# for details, see /usr/share/doc/packaging-manual/ + +case "$1" in + purge) + + FILES=/home/* + + for f in $FILES + do + FOLDER="$f/.ryzom/data" + + if [ -d $FOLDER ] + then + rm -rf $FOLDER + echo "Deleting $FOLDER..." + fi + done + + ;; + + remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + + ;; + + *) + echo "postrm called with unknown argument \`$1'" >&2 + exit 1 + +esac + +#DEBHELPER# + +exit 0 diff --git a/dist/debian/vivid/debian/ryzom-tools.install b/dist/debian/vivid/debian/ryzom-tools.install new file mode 100644 index 000000000..c468e32d8 --- /dev/null +++ b/dist/debian/vivid/debian/ryzom-tools.install @@ -0,0 +1,26 @@ +usr/bin/7zDec +usr/bin/alias_synchronizer +usr/bin/assoc_mem +usr/bin/csv_transform +usr/bin/georges_editor_qt +usr/bin/icon_search +usr/bin/make_alias_file +usr/bin/make_anim_by_race +usr/bin/make_anim_melee_impact +usr/bin/mp_generator +usr/bin/named2csv +usr/bin/patch_gen +usr/bin/patch_gen_service +usr/bin/pd_parser +usr/bin/pdr_util +usr/bin/prim_export +usr/bin/ryzom_mission_compiler +usr/bin/sheets_packer +usr/bin/skill_extractor +usr/bin/stats_scan +usr/bin/translation_tools +usr/bin/uni_conv +usr/games/ryzom_client_patcher +usr/lib/*/libryzom_mission_compiler_lib.so.* +usr/share/games/ryzom/data_leveldesign +usr/share/games/ryzom/georges_editor_qt diff --git a/dist/debian/vivid/debian/ryzom_client.desktop b/dist/debian/vivid/debian/ryzom_client.desktop new file mode 100644 index 000000000..1c62d1b6a --- /dev/null +++ b/dist/debian/vivid/debian/ryzom_client.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Version=1.0 +Name=Ryzom +Name[ru]=Ризом +Type=Application +GenericName=ryzom_client +Exec=/usr/games/ryzom +Icon=ryzom_client +Terminal=true +Hidden=false +Categories=Game;RolePlaying; diff --git a/dist/debian/vivid/debian/source/format b/dist/debian/vivid/debian/source/format new file mode 100644 index 000000000..b9b023757 --- /dev/null +++ b/dist/debian/vivid/debian/source/format @@ -0,0 +1,2 @@ +1.0 +