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/code/CMakeLists.txt b/code/CMakeLists.txt index 0f9a72ac6..7a4f0b4c5 100644 --- a/code/CMakeLists.txt +++ b/code/CMakeLists.txt @@ -1,8 +1,8 @@ #----------------------------------------------------------------------------- # -# NeL -# Authors: Nevrax and the NeL Community -# Version: 0.11.2 +# Ryzom Core +# Authors: Nevrax and the Ryzom Core Community +# Version: 0.11.3 # # Notes: # * Changing install location: add -DCMAKE_INSTALL_PREFIX:PATH=/my/new/path @@ -48,7 +48,7 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.6) PROJECT(RyzomCore CXX C) SET(NL_VERSION_MAJOR 0) SET(NL_VERSION_MINOR 11) -SET(NL_VERSION_PATCH 2) +SET(NL_VERSION_PATCH 3) SET(NL_VERSION "${NL_VERSION_MAJOR}.${NL_VERSION_MINOR}.${NL_VERSION_PATCH}") #----------------------------------------------------------------------------- @@ -228,30 +228,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}") +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) + +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}") -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 "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/FindMSVC.cmake b/code/CMakeModules/FindMSVC.cmake index 16455b02d..644fc57e6 100644 --- a/code/CMakeModules/FindMSVC.cmake +++ b/code/CMakeModules/FindMSVC.cmake @@ -57,6 +57,7 @@ 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 @@ -64,6 +65,7 @@ IF(MSVC12) ENDIF(NOT MSVC11_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..fd7004884 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" @@ -384,8 +387,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") 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/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/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..bb6b2da86 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; 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/path.h b/code/nel/include/nel/misc/path.h index f3120c907..cd19c43ee 100644 --- a/code/nel/include/nel/misc/path.h +++ b/code/nel/include/nel/misc/path.h @@ -507,6 +507,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/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/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/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/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/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..0dd4ffbda 100644 --- a/code/nel/src/gui/group_editbox.cpp +++ b/code/nel/src/gui/group_editbox.cpp @@ -1336,6 +1336,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 +1536,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/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))) { + 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; + } + } - 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; + 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; } - } - - 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; - } { - 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(); + /* 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); + 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); + /* 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; - } + /* 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); - } - - { - 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); + { + HTStream * rstream = HTStreamStack(HTAnchor_format(anchor), + HTRequest_outputFormat(request), + HTRequest_outputStream(request), + request, YES); + HTNet_setReadStream(net, rstream); + HTRequest_setOutputConnected(request, YES); } - return HT_OK; + + { + 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, "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 { - HTRequest_addError(request, ERR_INFO, NO, HTERR_INTERNAL, - NULL, 0, (char*)"HTLoadFile"); - file->state = FS_ERROR; /* Error or interrupt */ + else if (status == HT_WOULD_BLOCK || status == HT_PENDING) + { + return HT_OK; + } + 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/widget_manager.cpp b/code/nel/src/gui/widget_manager.cpp index 81fbaf28b..4591d7554 100644 --- a/code/nel/src/gui/widget_manager.cpp +++ b/code/nel/src/gui/widget_manager.cpp @@ -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/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/mutex.cpp b/code/nel/src/misc/mutex.cpp index 3c86e2b29..28f6bae37 100644 --- a/code/nel/src/misc/mutex.cpp +++ b/code/nel/src/misc/mutex.cpp @@ -406,13 +406,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 +429,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 +442,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 +455,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/path.cpp b/code/nel/src/misc/path.cpp index d47b8ce4a..2a25276e8 100644 --- a/code/nel/src/misc/path.cpp +++ b/code/nel/src/misc/path.cpp @@ -2544,6 +2544,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/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_export/nel_export.rc b/code/nel/tools/3d/plugin_max/nel_export/nel_export.rc index d01762618..31a258fb9 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, 11, 3, 0 + PRODUCTVERSION 0, 11, 3, 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.11.3\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.11.3\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_patch_converter/nel_patch_converter.rc b/code/nel/tools/3d/plugin_max/nel_patch_converter/nel_patch_converter.rc index b6eea41a6..068bddea0 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, 11, 3, 0 + PRODUCTVERSION 0, 11, 3, 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.11.3" 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.11.3" 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 6de328356..d49d40a82 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, 2, 0 - PRODUCTVERSION 0, 11, 2, 0 + FILEVERSION 0, 11, 3, 0 + PRODUCTVERSION 0, 11, 3, 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.2" + VALUE "FileVersion", "0.11.3" 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.2" + VALUE "ProductVersion", "0.11.3" 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..6b8d7f88e 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, 11, 3, 0 + PRODUCTVERSION 0, 11, 3, 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.11.3\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.11.3\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..8620d6170 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, 11, 3, 0 + PRODUCTVERSION 0, 11, 3, 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.11.3\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.11.3\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..315747354 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, 11, 3, 0 + PRODUCTVERSION 0, 11, 3, 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.11.3\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.11.3\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/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/init.cpp b/code/ryzom/client/src/init.cpp index 1644f7e2d..6958fe790 100644 --- a/code/ryzom/client/src/init.cpp +++ b/code/ryzom/client/src/init.cpp @@ -556,10 +556,9 @@ 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]!='/') + if (!CFile::isExists("client_default.cfg") && !dir.empty() && dir[0]!='/') { return getAppBundlePath() + "/Contents/Resources/" + dir; } 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_window.cpp b/code/ryzom/client/src/interface_v3/chat_window.cpp index e74392432..1d4c0516b 100644 --- a/code/ryzom/client/src/interface_v3/chat_window.cpp +++ b/code/ryzom/client/src/interface_v3/chat_window.cpp @@ -604,7 +604,11 @@ void CChatGroupWindow::displayMessage(const ucstring &msg, NLMISC::CRGBA col, CC 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..6aa1f0e40 100644 --- a/code/ryzom/client/src/interface_v3/dbctrl_sheet.cpp +++ b/code/ryzom/client/src/interface_v3/dbctrl_sheet.cpp @@ -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<resizeBanks( NB_CDB_BANKS ); interfaceLinkUpdater = new CInterfaceLink::CInterfaceLinkUpdater(); @@ -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++) diff --git a/code/ryzom/client/src/login_patch.cpp b/code/ryzom/client/src/login_patch.cpp index 5b9a83c83..da94f37d6 100644 --- a/code/ryzom/client/src/login_patch.cpp +++ b/code/ryzom/client/src/login_patch.cpp @@ -1068,12 +1068,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 +1351,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 +1492,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 +1566,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); @@ -3398,6 +3398,7 @@ bool CPatchManager::extract(const std::string& patchPath, ok = true; } } + if (!ok) { // nothing to extract @@ -3407,15 +3408,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) @@ -3442,21 +3449,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..565de7da2 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); 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/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/net_manager.cpp b/code/ryzom/client/src/net_manager.cpp index 4b37b698a..0d369fe85 100644 --- a/code/ryzom/client/src/net_manager.cpp +++ b/code/ryzom/client/src/net_manager.cpp @@ -4109,7 +4109,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/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..93978800d 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 @@ -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/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/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/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/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/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 915f9ed1c..9b4fa3f07 100644 --- a/code/ryzom/common/src/game_share/ryzom_version.h +++ b/code/ryzom/common/src/game_share/ryzom_version.h @@ -19,7 +19,7 @@ #define RYZOM_VERSION "ryzomcore" \ "/" \ - "v0.11.2" \ + "v0.11.3" \ "" #endif // RYZOM_VERSION_H diff --git a/code/ryzom/server/data_shard/mirror_sheets/fe_temp.dataset b/code/ryzom/server/data_shard/mirror_sheets/fe_temp.dataset index f88263c27..b891b6252 100644 --- a/code/ryzom/server/data_shard/mirror_sheets/fe_temp.dataset +++ b/code/ryzom/server/data_shard/mirror_sheets/fe_temp.dataset @@ -292,14 +292,14 @@ - + - + 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..66dddbe1e 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" 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/ai_service/ai_bot_npc.cpp b/code/ryzom/server/src/ai_service/ai_bot_npc.cpp index cb183850e..8a7518709 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) diff --git a/code/ryzom/server/src/ai_service/commands.cpp b/code/ryzom/server/src/ai_service/commands.cpp index d257d0492..7a4ff6f0d 100644 --- a/code/ryzom/server/src/ai_service/commands.cpp +++ b/code/ryzom/server/src/ai_service/commands.cpp @@ -577,10 +577,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())); } 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/entities_game_service/admin.cpp b/code/ryzom/server/src/entities_game_service/admin.cpp index 20941e77f..6e06da000 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; } 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/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/input_output_service/string_manager_parser.cpp b/code/ryzom/server/src/input_output_service/string_manager_parser.cpp index 67ce62f10..0cbfbf595 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; 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/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..40b1eb6fc 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 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/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..dc1e7efb6 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" @@ -160,7 +160,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..43afec9ee --- /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 = 11 +PatchVersion = 3 +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/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/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..94cf0b4dd 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.11.3 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} +