merge from default
--HG-- branch : gsoc2011-worldeditorqt
This commit is contained in:
commit
a613b2f60b
108 changed files with 7392 additions and 249 deletions
|
@ -125,6 +125,12 @@ IF(WITH_STATIC)
|
||||||
# libxml2 could need winsock2 library
|
# libxml2 could need winsock2 library
|
||||||
SET(LIBXML2_DEFINITIONS ${LIBXML2_DEFINITIONS} -DLIBXML_STATIC)
|
SET(LIBXML2_DEFINITIONS ${LIBXML2_DEFINITIONS} -DLIBXML_STATIC)
|
||||||
SET(LIBXML2_LIBRARIES ${LIBXML2_LIBRARIES} ${WINSOCK2_LIB})
|
SET(LIBXML2_LIBRARIES ${LIBXML2_LIBRARIES} ${WINSOCK2_LIB})
|
||||||
|
|
||||||
|
# on Mac OS X libxml2 requieres iconv
|
||||||
|
IF(APPLE)
|
||||||
|
FIND_PACKAGE(Iconv REQUIRED)
|
||||||
|
SET(LIBXML2_LIBRARIES ${LIBXML2_LIBRARIES} ${ICONV_LIBRARIES})
|
||||||
|
ENDIF(APPLE)
|
||||||
ENDIF(WITH_STATIC)
|
ENDIF(WITH_STATIC)
|
||||||
|
|
||||||
IF(WITH_STLPORT)
|
IF(WITH_STLPORT)
|
||||||
|
|
83
code/CMakeModules/FindIconv.cmake
Normal file
83
code/CMakeModules/FindIconv.cmake
Normal file
|
@ -0,0 +1,83 @@
|
||||||
|
# - Try to find Iconv on Mac OS X
|
||||||
|
# Once done this will define
|
||||||
|
#
|
||||||
|
# ICONV_FOUND - system has Iconv
|
||||||
|
# ICONV_INCLUDE_DIR - the Iconv include directory
|
||||||
|
# ICONV_LIBRARIES - Link these to use Iconv
|
||||||
|
# ICONV_SECOND_ARGUMENT_IS_CONST - the second argument for iconv() is const
|
||||||
|
#
|
||||||
|
|
||||||
|
IF(APPLE)
|
||||||
|
include(CheckCCompilerFlag)
|
||||||
|
include(CheckCSourceCompiles)
|
||||||
|
|
||||||
|
IF (ICONV_INCLUDE_DIR AND ICONV_LIBRARIES)
|
||||||
|
# Already in cache, be silent
|
||||||
|
SET(ICONV_FIND_QUIETLY TRUE)
|
||||||
|
ENDIF (ICONV_INCLUDE_DIR AND ICONV_LIBRARIES)
|
||||||
|
|
||||||
|
IF(APPLE)
|
||||||
|
FIND_PATH(ICONV_INCLUDE_DIR iconv.h
|
||||||
|
PATHS
|
||||||
|
/opt/local/include/
|
||||||
|
NO_CMAKE_SYSTEM_PATH
|
||||||
|
)
|
||||||
|
|
||||||
|
FIND_LIBRARY(ICONV_LIBRARIES NAMES iconv libiconv c
|
||||||
|
PATHS
|
||||||
|
/opt/local/lib/
|
||||||
|
NO_CMAKE_SYSTEM_PATH
|
||||||
|
)
|
||||||
|
ENDIF(APPLE)
|
||||||
|
|
||||||
|
FIND_PATH(ICONV_INCLUDE_DIR iconv.h PATHS /opt/local/include /sw/include)
|
||||||
|
|
||||||
|
string(REGEX REPLACE "(.*)/include/?" "\\1" ICONV_INCLUDE_BASE_DIR "${ICONV_INCLUDE_DIR}")
|
||||||
|
|
||||||
|
FIND_LIBRARY(ICONV_LIBRARIES NAMES iconv libiconv c HINTS "${ICONV_INCLUDE_BASE_DIR}/lib" PATHS /opt/local/lib)
|
||||||
|
|
||||||
|
IF(ICONV_INCLUDE_DIR AND ICONV_LIBRARIES)
|
||||||
|
SET(ICONV_FOUND TRUE)
|
||||||
|
ENDIF(ICONV_INCLUDE_DIR AND ICONV_LIBRARIES)
|
||||||
|
|
||||||
|
set(CMAKE_REQUIRED_INCLUDES ${ICONV_INCLUDE_DIR})
|
||||||
|
set(CMAKE_REQUIRED_LIBRARIES ${ICONV_LIBRARIES})
|
||||||
|
IF(ICONV_FOUND)
|
||||||
|
check_c_compiler_flag("-Werror" ICONV_HAVE_WERROR)
|
||||||
|
set (CMAKE_C_FLAGS_BACKUP "${CMAKE_C_FLAGS}")
|
||||||
|
if(ICONV_HAVE_WERROR)
|
||||||
|
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror")
|
||||||
|
endif(ICONV_HAVE_WERROR)
|
||||||
|
check_c_source_compiles("
|
||||||
|
#include <iconv.h>
|
||||||
|
int main(){
|
||||||
|
iconv_t conv = 0;
|
||||||
|
const char* in = 0;
|
||||||
|
size_t ilen = 0;
|
||||||
|
char* out = 0;
|
||||||
|
size_t olen = 0;
|
||||||
|
iconv(conv, &in, &ilen, &out, &olen);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
" ICONV_SECOND_ARGUMENT_IS_CONST )
|
||||||
|
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS_BACKUP}")
|
||||||
|
ENDIF(ICONV_FOUND)
|
||||||
|
set(CMAKE_REQUIRED_INCLUDES)
|
||||||
|
set(CMAKE_REQUIRED_LIBRARIES)
|
||||||
|
|
||||||
|
IF(ICONV_FOUND)
|
||||||
|
IF(NOT ICONV_FIND_QUIETLY)
|
||||||
|
MESSAGE(STATUS "Found Iconv: ${ICONV_LIBRARIES}")
|
||||||
|
ENDIF(NOT ICONV_FIND_QUIETLY)
|
||||||
|
ELSE(ICONV_FOUND)
|
||||||
|
IF(Iconv_FIND_REQUIRED)
|
||||||
|
MESSAGE(FATAL_ERROR "Could not find Iconv")
|
||||||
|
ENDIF(Iconv_FIND_REQUIRED)
|
||||||
|
ENDIF(ICONV_FOUND)
|
||||||
|
|
||||||
|
MARK_AS_ADVANCED(
|
||||||
|
ICONV_INCLUDE_DIR
|
||||||
|
ICONV_LIBRARIES
|
||||||
|
ICONV_SECOND_ARGUMENT_IS_CONST
|
||||||
|
)
|
||||||
|
ENDIF(APPLE)
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
IF(LUABIND_LIBRARIES AND LUABIND_INCLUDE_DIR)
|
IF(LUABIND_LIBRARIES AND LUABIND_INCLUDE_DIR)
|
||||||
# in cache already
|
# in cache already
|
||||||
SET(LUABIND_FIND_QUIETLY TRUE)
|
SET(Luabind_FIND_QUIETLY TRUE)
|
||||||
ENDIF(LUABIND_LIBRARIES AND LUABIND_INCLUDE_DIR)
|
ENDIF(LUABIND_LIBRARIES AND LUABIND_INCLUDE_DIR)
|
||||||
|
|
||||||
FIND_PATH(LUABIND_INCLUDE_DIR
|
FIND_PATH(LUABIND_INCLUDE_DIR
|
||||||
|
@ -22,7 +22,7 @@ FIND_PATH(LUABIND_INCLUDE_DIR
|
||||||
)
|
)
|
||||||
|
|
||||||
SET(LIBRARY_NAME_RELEASE luabind libluabind)
|
SET(LIBRARY_NAME_RELEASE luabind libluabind)
|
||||||
SET(LIBRARY_NAME_DEBUG luabind_d libluabind_d libluabindd)
|
SET(LIBRARY_NAME_DEBUG luabind_d luabindd libluabind_d libluabindd)
|
||||||
|
|
||||||
IF(WITH_STLPORT)
|
IF(WITH_STLPORT)
|
||||||
SET(LIBRARY_NAME_RELEASE luabind_stlport ${LIBRARY_NAME_RELEASE})
|
SET(LIBRARY_NAME_RELEASE luabind_stlport ${LIBRARY_NAME_RELEASE})
|
||||||
|
@ -62,30 +62,35 @@ FIND_LIBRARY(LUABIND_LIBRARY_DEBUG
|
||||||
FIND_PACKAGE(Boost REQUIRED)
|
FIND_PACKAGE(Boost REQUIRED)
|
||||||
|
|
||||||
IF(LUABIND_INCLUDE_DIR AND Boost_INCLUDE_DIR)
|
IF(LUABIND_INCLUDE_DIR AND Boost_INCLUDE_DIR)
|
||||||
IF(LUABIND_LIBRARY_RELEASE)
|
IF(LUABIND_LIBRARY_RELEASE AND LUABIND_LIBRARY_DEBUG)
|
||||||
|
# Case where both Release and Debug versions are provided
|
||||||
SET(LUABIND_FOUND TRUE)
|
SET(LUABIND_FOUND TRUE)
|
||||||
SET(LUABIND_INCLUDE_DIR ${LUABIND_INCLUDE_DIR} ${Boost_INCLUDE_DIR})
|
SET(LUABIND_LIBRARIES optimized ${LUABIND_LIBRARY_RELEASE} debug ${LUABIND_LIBRARY_DEBUG})
|
||||||
IF(LUABIND_LIBRARY_DEBUG)
|
ELSEIF(LUABIND_LIBRARY_RELEASE)
|
||||||
SET(LUABIND_LIBRARIES "optimized;${LUABIND_LIBRARY_RELEASE};debug;${LUABIND_LIBRARY_DEBUG}")
|
# Normal case
|
||||||
ELSE(LUABIND_LIBRARY_DEBUG)
|
SET(LUABIND_FOUND TRUE)
|
||||||
SET(LUABIND_LIBRARIES "${LUABIND_LIBRARY_RELEASE}")
|
SET(LUABIND_LIBRARIES ${LUABIND_LIBRARY_RELEASE})
|
||||||
ENDIF(LUABIND_LIBRARY_DEBUG)
|
ELSEIF(LUABIND_LIBRARY_DEBUG)
|
||||||
ENDIF(LUABIND_LIBRARY_RELEASE)
|
# Case where Luabind is compiled from sources (debug version is compiled by default)
|
||||||
|
SET(LUABIND_FOUND TRUE)
|
||||||
|
SET(LUABIND_LIBRARIES ${LUABIND_LIBRARY_DEBUG})
|
||||||
|
ENDIF(LUABIND_LIBRARY_RELEASE AND LUABIND_LIBRARY_DEBUG)
|
||||||
ENDIF(LUABIND_INCLUDE_DIR AND Boost_INCLUDE_DIR)
|
ENDIF(LUABIND_INCLUDE_DIR AND Boost_INCLUDE_DIR)
|
||||||
|
|
||||||
IF(LUABIND_FOUND)
|
IF(LUABIND_FOUND)
|
||||||
|
SET(LUABIND_INCLUDE_DIR ${LUABIND_INCLUDE_DIR} ${Boost_INCLUDE_DIR})
|
||||||
# Check if luabind/version.hpp exists
|
# Check if luabind/version.hpp exists
|
||||||
FIND_FILE(LUABIND_VERSION_FILE luabind/version.hpp PATHS ${LUABIND_INCLUDE_DIR})
|
FIND_FILE(LUABIND_VERSION_FILE luabind/version.hpp PATHS ${LUABIND_INCLUDE_DIR})
|
||||||
IF(LUABIND_VERSION_FILE)
|
IF(LUABIND_VERSION_FILE)
|
||||||
SET(LUABIND_DEFINITIONS "-DHAVE_LUABIND_VERSION")
|
SET(LUABIND_DEFINITIONS "-DHAVE_LUABIND_VERSION")
|
||||||
ENDIF(LUABIND_VERSION_FILE)
|
ENDIF(LUABIND_VERSION_FILE)
|
||||||
IF(NOT LUABIND_FIND_QUIETLY)
|
IF(NOT Luabind_FIND_QUIETLY)
|
||||||
MESSAGE(STATUS "Found Luabind: ${LUABIND_LIBRARIES}")
|
MESSAGE(STATUS "Found Luabind: ${LUABIND_LIBRARIES}")
|
||||||
ENDIF(NOT LUABIND_FIND_QUIETLY)
|
ENDIF(NOT Luabind_FIND_QUIETLY)
|
||||||
ELSE(LUABIND_FOUND)
|
ELSE(LUABIND_FOUND)
|
||||||
IF(NOT LUABIND_FIND_QUIETLY)
|
IF(NOT Luabind_FIND_QUIETLY)
|
||||||
MESSAGE(STATUS "Warning: Unable to find Luabind!")
|
MESSAGE(STATUS "Warning: Unable to find Luabind!")
|
||||||
ENDIF(NOT LUABIND_FIND_QUIETLY)
|
ENDIF(NOT Luabind_FIND_QUIETLY)
|
||||||
ENDIF(LUABIND_FOUND)
|
ENDIF(LUABIND_FOUND)
|
||||||
|
|
||||||
MARK_AS_ADVANCED(LUABIND_LIBRARY_RELEASE LUABIND_LIBRARY_DEBUG Boost_LIB_DIAGNOSTIC_DEFINITIONS)
|
MARK_AS_ADVANCED(LUABIND_LIBRARY_RELEASE LUABIND_LIBRARY_DEBUG Boost_LIB_DIAGNOSTIC_DEFINITIONS)
|
||||||
|
|
|
@ -71,9 +71,9 @@ IF(STLPORT_INCLUDE_DIR)
|
||||||
IF(STLPORT_LIBRARY_RELEASE)
|
IF(STLPORT_LIBRARY_RELEASE)
|
||||||
SET(STLPORT_FOUND TRUE)
|
SET(STLPORT_FOUND TRUE)
|
||||||
|
|
||||||
SET(STLPORT_LIBRARIES "optimized;${STLPORT_LIBRARY_RELEASE}")
|
SET(STLPORT_LIBRARIES ${STLPORT_LIBRARY_RELEASE})
|
||||||
IF(STLPORT_LIBRARY_DEBUG)
|
IF(STLPORT_LIBRARY_DEBUG)
|
||||||
SET(STLPORT_LIBRARIES "${STLPORT_LIBRARIES};debug;${STLPORT_LIBRARY_DEBUG}")
|
SET(STLPORT_LIBRARIES optimized ${STLPORT_LIBRARIES} debug ${STLPORT_LIBRARY_DEBUG})
|
||||||
ENDIF(STLPORT_LIBRARY_DEBUG)
|
ENDIF(STLPORT_LIBRARY_DEBUG)
|
||||||
ENDIF(STLPORT_LIBRARY_RELEASE)
|
ENDIF(STLPORT_LIBRARY_RELEASE)
|
||||||
ENDIF(STLPORT_INCLUDE_DIR)
|
ENDIF(STLPORT_INCLUDE_DIR)
|
||||||
|
|
|
@ -1,39 +0,0 @@
|
||||||
# - Find zlib
|
|
||||||
# Find the native ZLIB includes and library
|
|
||||||
#
|
|
||||||
# ZLIB_INCLUDE_DIRS - where to find zlib.h, etc.
|
|
||||||
# ZLIB_LIBRARIES - List of libraries when using zlib.
|
|
||||||
# ZLIB_FOUND - True if zlib found.
|
|
||||||
|
|
||||||
#=============================================================================
|
|
||||||
# Copyright 2001-2009 Kitware, Inc.
|
|
||||||
#
|
|
||||||
# Distributed under the OSI-approved BSD License (the "License");
|
|
||||||
# see accompanying file Copyright.txt for details.
|
|
||||||
#
|
|
||||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
|
||||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
||||||
# See the License for more information.
|
|
||||||
#=============================================================================
|
|
||||||
# (To distributed this file outside of CMake, substitute the full
|
|
||||||
# License text for the above reference.)
|
|
||||||
|
|
||||||
IF (ZLIB_INCLUDE_DIR)
|
|
||||||
# Already in cache, be silent
|
|
||||||
SET(ZLIB_FIND_QUIETLY TRUE)
|
|
||||||
ENDIF (ZLIB_INCLUDE_DIR)
|
|
||||||
|
|
||||||
FIND_PATH(ZLIB_INCLUDE_DIR zlib.h)
|
|
||||||
|
|
||||||
SET(ZLIB_NAMES z zlib zdll)
|
|
||||||
FIND_LIBRARY(ZLIB_LIBRARY NAMES ${ZLIB_NAMES} )
|
|
||||||
MARK_AS_ADVANCED( ZLIB_LIBRARY ZLIB_INCLUDE_DIR )
|
|
||||||
|
|
||||||
# Per-recommendation
|
|
||||||
SET(ZLIB_INCLUDE_DIRS "${ZLIB_INCLUDE_DIR}")
|
|
||||||
SET(ZLIB_LIBRARIES "${ZLIB_LIBRARY}")
|
|
||||||
|
|
||||||
# handle the QUIETLY and REQUIRED arguments and set ZLIB_FOUND to TRUE if
|
|
||||||
# all listed variables are TRUE
|
|
||||||
INCLUDE(FindPackageHandleStandardArgs)
|
|
||||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(ZLIB DEFAULT_MSG ZLIB_LIBRARIES ZLIB_INCLUDE_DIRS)
|
|
|
@ -169,7 +169,7 @@ void setCrashAlreadyReported(bool state);
|
||||||
*\endcode
|
*\endcode
|
||||||
*/
|
*/
|
||||||
#ifdef NL_NO_DEBUG
|
#ifdef NL_NO_DEBUG
|
||||||
# if defined(NL_COMP_VC71) || defined(NL_COMP_VC8) || defined(NL_COMP_VC9)
|
# if defined(NL_COMP_VC71) || defined(NL_COMP_VC8) || defined(NL_COMP_VC9) || defined(NL_COMP_VC10)
|
||||||
# define nldebug __noop
|
# define nldebug __noop
|
||||||
# else
|
# else
|
||||||
# define nldebug 0&&
|
# define nldebug 0&&
|
||||||
|
@ -184,7 +184,7 @@ void setCrashAlreadyReported(bool state);
|
||||||
* Same as nldebug but it will be display in debug and in release mode.
|
* Same as nldebug but it will be display in debug and in release mode.
|
||||||
*/
|
*/
|
||||||
#ifdef NL_NO_DEBUG
|
#ifdef NL_NO_DEBUG
|
||||||
# if defined(NL_COMP_VC71) || defined(NL_COMP_VC8) || defined(NL_COMP_VC9)
|
# if defined(NL_COMP_VC71) || defined(NL_COMP_VC8) || defined(NL_COMP_VC9) || defined(NL_COMP_VC10)
|
||||||
# define nlinfo __noop
|
# define nlinfo __noop
|
||||||
# else
|
# else
|
||||||
# define nlinfo 0&&
|
# define nlinfo 0&&
|
||||||
|
@ -212,7 +212,7 @@ void setCrashAlreadyReported(bool state);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef NL_NO_DEBUG
|
#ifdef NL_NO_DEBUG
|
||||||
# if defined(NL_COMP_VC71) || defined(NL_COMP_VC8) || defined(NL_COMP_VC9)
|
# if defined(NL_COMP_VC71) || defined(NL_COMP_VC8) || defined(NL_COMP_VC9) || defined(NL_COMP_VC10)
|
||||||
# define nlwarning __noop
|
# define nlwarning __noop
|
||||||
# else
|
# else
|
||||||
# define nlwarning 0&&
|
# define nlwarning 0&&
|
||||||
|
@ -583,7 +583,11 @@ template<class T, class U> inline T type_cast(U o)
|
||||||
|
|
||||||
/** Compile time assertion
|
/** Compile time assertion
|
||||||
*/
|
*/
|
||||||
|
#ifdef NL_ISO_CPP0X_AVAILABLE
|
||||||
|
# define nlctassert(cond) static_assert(cond, "Compile time assert in "#cond)
|
||||||
|
#else
|
||||||
# define nlctassert(cond) sizeof(uint[(cond) ? 1 : 0])
|
# define nlctassert(cond) sizeof(uint[(cond) ? 1 : 0])
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Allow to verify an object was accessed before its destructor call.
|
* Allow to verify an object was accessed before its destructor call.
|
||||||
|
|
|
@ -105,4 +105,7 @@ CHashKey getSHA1(const std::string &filename, bool forcePath = false);
|
||||||
// This function get a buffer with size and returns his SHA hash key
|
// This function get a buffer with size and returns his SHA hash key
|
||||||
CHashKey getSHA1(const uint8 *buffer, uint32 size);
|
CHashKey getSHA1(const uint8 *buffer, uint32 size);
|
||||||
|
|
||||||
|
// This function get a buffer and key with size and returns his HMAC-SHA1 hash key
|
||||||
|
CHashKey getHMacSHA1(const uint8 *text, uint32 text_len, const uint8 *key, uint32 key_len);
|
||||||
|
|
||||||
#endif // NL_SHA1_H
|
#endif // NL_SHA1_H
|
||||||
|
|
|
@ -352,7 +352,7 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
#if defined(NL_COMP_VC8) || defined(NL_COMP_VC9)
|
#if defined(NL_COMP_VC8) || defined(NL_COMP_VC9) || defined(NL_COMP_VC10)
|
||||||
|
|
||||||
// This operator only purpose is to compare with NULL value
|
// This operator only purpose is to compare with NULL value
|
||||||
template <class T>
|
template <class T>
|
||||||
|
|
|
@ -51,14 +51,10 @@
|
||||||
# ifndef _WIN32_WINNT
|
# ifndef _WIN32_WINNT
|
||||||
# define _WIN32_WINNT 0x0500 // Minimal OS = Windows 2000 (NeL is not supported on Windows 95/98)
|
# define _WIN32_WINNT 0x0500 // Minimal OS = Windows 2000 (NeL is not supported on Windows 95/98)
|
||||||
# endif
|
# endif
|
||||||
# if _MSC_VER >= 1500
|
# if _MSC_VER >= 1600
|
||||||
|
# define NL_COMP_VC10
|
||||||
|
# elif _MSC_VER >= 1500
|
||||||
# define NL_COMP_VC9
|
# define NL_COMP_VC9
|
||||||
# ifndef _STLPORT_VERSION // STLport doesn't depend on MS STL features
|
|
||||||
# if defined(_HAS_TR1) && (_HAS_TR1 + 0) // VC9 TR1 feature pack
|
|
||||||
# define NL_ISO_STDTR1_AVAILABLE
|
|
||||||
# define NL_ISO_STDTR1_HEADER(header) <header>
|
|
||||||
# endif
|
|
||||||
# endif
|
|
||||||
# elif _MSC_VER >= 1400
|
# elif _MSC_VER >= 1400
|
||||||
# define NL_COMP_VC8
|
# define NL_COMP_VC8
|
||||||
# undef nl_time
|
# undef nl_time
|
||||||
|
@ -79,6 +75,10 @@
|
||||||
# define NL_COMP_VC6
|
# define NL_COMP_VC6
|
||||||
# define NL_COMP_NEED_PARAM_ON_METHOD
|
# define NL_COMP_NEED_PARAM_ON_METHOD
|
||||||
# endif
|
# endif
|
||||||
|
# if defined(_HAS_TR1) && (_HAS_TR1 + 0) // VC9 TR1 feature pack or later
|
||||||
|
# define NL_ISO_STDTR1_AVAILABLE
|
||||||
|
# define NL_ISO_STDTR1_HEADER(header) <header>
|
||||||
|
# endif
|
||||||
# ifdef _DEBUG
|
# ifdef _DEBUG
|
||||||
# define NL_DEBUG
|
# define NL_DEBUG
|
||||||
# elif defined (NDEBUG)
|
# elif defined (NDEBUG)
|
||||||
|
@ -117,6 +117,10 @@
|
||||||
# define NL_COMP_GCC
|
# define NL_COMP_GCC
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(_HAS_CPP0X) || defined(__GXX_EXPERIMENTAL_CXX0X__)
|
||||||
|
# define NL_ISO_CPP0X_AVAILABLE
|
||||||
|
#endif
|
||||||
|
|
||||||
// gcc 3.4 introduced ISO C++ with tough template rules
|
// gcc 3.4 introduced ISO C++ with tough template rules
|
||||||
//
|
//
|
||||||
// NL_ISO_SYNTAX can be used using #if NL_ISO_SYNTAX or #if !NL_ISO_SYNTAX
|
// NL_ISO_SYNTAX can be used using #if NL_ISO_SYNTAX or #if !NL_ISO_SYNTAX
|
||||||
|
@ -149,7 +153,7 @@
|
||||||
# pragma warning (disable : 4390) // don't warn in empty block "if(exp) ;"
|
# pragma warning (disable : 4390) // don't warn in empty block "if(exp) ;"
|
||||||
# pragma warning (disable : 4996) // 'vsnprintf': This function or variable may be unsafe. Consider using vsnprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
# pragma warning (disable : 4996) // 'vsnprintf': This function or variable may be unsafe. Consider using vsnprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||||
// Debug : Sept 01 2006
|
// Debug : Sept 01 2006
|
||||||
# if defined(NL_COMP_VC8) || defined(NL_COMP_VC9)
|
# if defined(NL_COMP_VC8) || defined(NL_COMP_VC9) || defined(NL_COMP_VC10)
|
||||||
# pragma warning (disable : 4005) // don't warn on redefinitions caused by xp platform sdk
|
# pragma warning (disable : 4005) // don't warn on redefinitions caused by xp platform sdk
|
||||||
# endif // NL_COMP_VC8 || NL_COMP_VC9
|
# endif // NL_COMP_VC8 || NL_COMP_VC9
|
||||||
#endif // NL_OS_WINDOWS
|
#endif // NL_OS_WINDOWS
|
||||||
|
@ -287,19 +291,17 @@ typedef unsigned int uint; // at least 32bits (depend of processor)
|
||||||
#define __STDC_FORMAT_MACROS
|
#define __STDC_FORMAT_MACROS
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
|
|
||||||
#ifdef NL_OS_MAC
|
#if defined(__PRI_64_LENGTH_MODIFIER__)
|
||||||
# define NL_I64 __PRI_64_LENGTH_MODIFIER__
|
# define NL_I64 __PRI_64_LENGTH_MODIFIER__
|
||||||
#else
|
#elif defined(__PRI64_PREFIX)
|
||||||
# define NL_I64 __PRI64_PREFIX
|
# define NL_I64 __PRI64_PREFIX
|
||||||
#endif
|
#else
|
||||||
|
|
||||||
/*
|
|
||||||
# ifdef _LP64
|
# ifdef _LP64
|
||||||
# define NL_I64 "l"
|
# define NL_I64 "l"
|
||||||
# else
|
# else
|
||||||
# define NL_I64 "ll"
|
# define NL_I64 "ll"
|
||||||
# endif // _LP64
|
# endif // _LP64
|
||||||
*/
|
#endif
|
||||||
|
|
||||||
#endif // NL_OS_UNIX
|
#endif // NL_OS_UNIX
|
||||||
|
|
||||||
|
@ -364,7 +366,7 @@ typedef uint16 ucchar;
|
||||||
|
|
||||||
// To define a 64bits constant; ie: UINT64_CONSTANT(0x123456781234)
|
// To define a 64bits constant; ie: UINT64_CONSTANT(0x123456781234)
|
||||||
#ifdef NL_OS_WINDOWS
|
#ifdef NL_OS_WINDOWS
|
||||||
# if defined(NL_COMP_VC8) || defined(NL_COMP_VC9)
|
# if defined(NL_COMP_VC8) || defined(NL_COMP_VC9) || defined(NL_COMP_VC10)
|
||||||
# define INT64_CONSTANT(c) (c##LL)
|
# define INT64_CONSTANT(c) (c##LL)
|
||||||
# define SINT64_CONSTANT(c) (c##LL)
|
# define SINT64_CONSTANT(c) (c##LL)
|
||||||
# define UINT64_CONSTANT(c) (c##LL)
|
# define UINT64_CONSTANT(c) (c##LL)
|
||||||
|
|
|
@ -42,7 +42,6 @@ using namespace std;
|
||||||
using namespace NL3D;
|
using namespace NL3D;
|
||||||
using namespace NLMISC;
|
using namespace NLMISC;
|
||||||
|
|
||||||
|
|
||||||
#ifdef NL_OS_WINDOWS
|
#ifdef NL_OS_WINDOWS
|
||||||
int WINAPI WinMain( HINSTANCE hInstance,
|
int WINAPI WinMain( HINSTANCE hInstance,
|
||||||
HINSTANCE hPrevInstance,
|
HINSTANCE hPrevInstance,
|
||||||
|
|
|
@ -109,7 +109,7 @@ CRGBA CFastHLSModifier::convert(uint H, uint L, uint S)
|
||||||
return col;
|
return col;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(NL_COMP_VC71) || defined(NL_COMP_VC8) || defined(NL_COMP_VC9)
|
#if defined(NL_COMP_VC71) || defined(NL_COMP_VC8) || defined(NL_COMP_VC9) || defined(NL_COMP_VC10)
|
||||||
# pragma warning( push )
|
# pragma warning( push )
|
||||||
# pragma warning( disable : 4799 )
|
# pragma warning( disable : 4799 )
|
||||||
#endif
|
#endif
|
||||||
|
@ -262,7 +262,7 @@ uint16 CFastHLSModifier::applyHLSMod(uint16 colorIn, uint8 dHue, uint dLum, uin
|
||||||
#pragma managed(pop)
|
#pragma managed(pop)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(NL_COMP_VC71) || defined(NL_COMP_VC8) || defined(NL_COMP_VC9)
|
#if defined(NL_COMP_VC71) || defined(NL_COMP_VC8) || defined(NL_COMP_VC9) || defined(NL_COMP_VC10)
|
||||||
# pragma warning( pop )
|
# pragma warning( pop )
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -1867,7 +1867,7 @@ void CMeshMRMSkinnedGeom::updateRawSkinNormal(bool enabled, CMeshMRMSkinnedInst
|
||||||
CIndexBufferReadWrite ibaWrite;
|
CIndexBufferReadWrite ibaWrite;
|
||||||
skinLod.RdrPass[i].lock (ibaWrite);
|
skinLod.RdrPass[i].lock (ibaWrite);
|
||||||
#ifndef NL_SKINNED_MESH_MRM_INDEX16
|
#ifndef NL_SKINNED_MESH_MRM_INDEX16
|
||||||
nlassert(ibaWrite.getFormat() == CIndexBuffer::Indices32)
|
nlassert(ibaWrite.getFormat() == CIndexBuffer::Indices32);
|
||||||
uint32 *dstTriPtr= (uint32 *) ibaWrite.getPtr();
|
uint32 *dstTriPtr= (uint32 *) ibaWrite.getPtr();
|
||||||
uint32 numIndices= lod.RdrPass[i].PBlock.size();
|
uint32 numIndices= lod.RdrPass[i].PBlock.size();
|
||||||
for(uint j=0;j<numIndices;j++, srcTriPtr++, dstTriPtr++)
|
for(uint j=0;j<numIndices;j++, srcTriPtr++, dstTriPtr++)
|
||||||
|
|
|
@ -2083,8 +2083,9 @@ static void DuplicatePrimitiveBlock(const CIndexBuffer &srcBlock, CIndexBuffer &
|
||||||
CIndexBufferReadWrite ibaWrite;
|
CIndexBufferReadWrite ibaWrite;
|
||||||
destBlock.lock (ibaWrite);
|
destBlock.lock (ibaWrite);
|
||||||
|
|
||||||
|
#ifdef NL_FORCE_INDEX_BUFFER_16
|
||||||
nlassert(destBlock.getFormat() == CIndexBuffer::Indices16);
|
nlassert(destBlock.getFormat() == CIndexBuffer::Indices16);
|
||||||
|
#endif
|
||||||
|
|
||||||
// TMP TMP TMP
|
// TMP TMP TMP
|
||||||
if (ibaRead.getFormat() == CIndexBuffer::Indices16)
|
if (ibaRead.getFormat() == CIndexBuffer::Indices16)
|
||||||
|
|
|
@ -233,6 +233,7 @@ const CType* CFormElm::getType ()
|
||||||
warning (false, "getType", "This node is not an atom.");
|
warning (false, "getType", "This node is not an atom.");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
|
|
||||||
bool CFormElm::getValue (string &/* result */, TEval /* evaluate */) const
|
bool CFormElm::getValue (string &/* result */, TEval /* evaluate */) const
|
||||||
|
|
|
@ -187,6 +187,77 @@ CHashKey getSHA1(const string &filename, bool forcePath)
|
||||||
return hk;
|
return hk;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* HMAC = hash( (Key ^ 0x5c) .. hash( (Key ^0x36) .. Message ) )
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
CHashKey getHMacSHA1(const uint8 *text, uint32 text_len, const uint8 *key, uint32 key_len)
|
||||||
|
{
|
||||||
|
SHA1Context sha;
|
||||||
|
|
||||||
|
uint8_t SHA1_Key[64];
|
||||||
|
uint8_t SHA1_Key1[20];
|
||||||
|
uint8_t SHA1_Key2[20];
|
||||||
|
|
||||||
|
string buffer1;
|
||||||
|
string buffer2;
|
||||||
|
|
||||||
|
// Init some vars
|
||||||
|
for (uint i = 0; i < 64; i++)
|
||||||
|
SHA1_Key[i] = 0;
|
||||||
|
|
||||||
|
// If lenght of key > 64 use sha1 hash
|
||||||
|
if (key_len > 64) {
|
||||||
|
uint8_t SHA1_Key0[20];
|
||||||
|
SHA1Reset(&sha);
|
||||||
|
SHA1Input(&sha, (const uint8_t*)key, key_len);
|
||||||
|
SHA1Result(&sha, SHA1_Key0);
|
||||||
|
CHashKey hk0 (SHA1_Key0);
|
||||||
|
for (uint i = 0; i < 20; i++)
|
||||||
|
SHA1_Key[i] = hk0.HashKeyString[i];
|
||||||
|
} else {
|
||||||
|
for (uint i = 0; i < key_len; i++)
|
||||||
|
SHA1_Key[i] = key[i];
|
||||||
|
}
|
||||||
|
|
||||||
|
// Do 0x36 XOR Key
|
||||||
|
for (uint i = 0; i < 64; i++)
|
||||||
|
buffer1 += 0x36 ^ SHA1_Key[i];
|
||||||
|
|
||||||
|
// Append text
|
||||||
|
for (uint i = 0; i < text_len; i++)
|
||||||
|
buffer1 += text[i];
|
||||||
|
|
||||||
|
// Get hash
|
||||||
|
SHA1Reset(&sha);
|
||||||
|
SHA1Input(&sha, (const uint8_t*)buffer1.c_str(), (uint)buffer1.size());
|
||||||
|
SHA1Result(&sha, SHA1_Key1);
|
||||||
|
CHashKey hk1 (SHA1_Key1);
|
||||||
|
|
||||||
|
// Do 0x5c XOR Key
|
||||||
|
for (uint i = 0; i < 64; i++)
|
||||||
|
buffer2 += 0x5c ^ SHA1_Key[i];
|
||||||
|
|
||||||
|
// Append previous hash
|
||||||
|
for (uint i = 0; i < 20; i++)
|
||||||
|
buffer2 += hk1.HashKeyString[i];
|
||||||
|
|
||||||
|
// Get new hash
|
||||||
|
SHA1Reset(&sha);
|
||||||
|
SHA1Input(&sha, (const uint8_t*)buffer2.c_str(), (uint)buffer2.size());
|
||||||
|
SHA1Result(&sha, SHA1_Key2);
|
||||||
|
CHashKey hk (SHA1_Key2);
|
||||||
|
|
||||||
|
return hk;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef _MFC_VER
|
||||||
|
#pragma runtime_checks( "", off )
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Define the SHA1 circular left shift macro
|
* Define the SHA1 circular left shift macro
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -37,7 +37,7 @@ namespace NLMISC {
|
||||||
map<void*,HANDLE> AccessAddressesToHandles;
|
map<void*,HANDLE> AccessAddressesToHandles;
|
||||||
#else
|
#else
|
||||||
// Storage for shmid, necessary to destroy the segments
|
// Storage for shmid, necessary to destroy the segments
|
||||||
map<TSharedMemId, int> SharedMemIdsToShmids;
|
map<TSharedMemId, sint> SharedMemIdsToShmids;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
@ -71,7 +71,7 @@ void *CSharedMemory::createSharedMemory( TSharedMemId sharedMemId, uint32 size
|
||||||
#else
|
#else
|
||||||
|
|
||||||
// Create a shared memory segment
|
// Create a shared memory segment
|
||||||
int shmid = shmget( sharedMemId, size, IPC_CREAT | IPC_EXCL | 0666 );
|
sint shmid = shmget( sharedMemId, size, IPC_CREAT | IPC_EXCL | 0666 );
|
||||||
if ( shmid == -1 )
|
if ( shmid == -1 )
|
||||||
return NULL;
|
return NULL;
|
||||||
SharedMemIdsToShmids.insert( make_pair( sharedMemId, shmid ) );
|
SharedMemIdsToShmids.insert( make_pair( sharedMemId, shmid ) );
|
||||||
|
@ -82,6 +82,7 @@ void *CSharedMemory::createSharedMemory( TSharedMemId sharedMemId, uint32 size
|
||||||
return NULL;
|
return NULL;
|
||||||
else
|
else
|
||||||
return accessAddress;
|
return accessAddress;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -22,10 +22,8 @@
|
||||||
#include "nel/misc/hierarchical_timer.h"
|
#include "nel/misc/hierarchical_timer.h"
|
||||||
|
|
||||||
#ifdef NL_OS_WINDOWS
|
#ifdef NL_OS_WINDOWS
|
||||||
# if defined(NL_COMP_VC7) || defined(NL_COMP_VC71) || defined(NL_COMP_VC8) || defined(NL_COMP_VC9)
|
|
||||||
# include <winsock2.h>
|
|
||||||
# endif
|
|
||||||
# define NOMINMAX
|
# define NOMINMAX
|
||||||
|
# include <winsock2.h>
|
||||||
# include <windows.h>
|
# include <windows.h>
|
||||||
# define socklen_t int
|
# define socklen_t int
|
||||||
# define ERROR_NUM WSAGetLastError()
|
# define ERROR_NUM WSAGetLastError()
|
||||||
|
|
|
@ -20,9 +20,7 @@
|
||||||
#include "nel/net/net_log.h"
|
#include "nel/net/net_log.h"
|
||||||
|
|
||||||
#ifdef NL_OS_WINDOWS
|
#ifdef NL_OS_WINDOWS
|
||||||
# if defined(NL_COMP_VC7) || defined(NL_COMP_VC71) || defined(NL_COMP_VC8) || defined(NL_COMP_VC9)
|
|
||||||
# include <winsock2.h>
|
# include <winsock2.h>
|
||||||
# endif
|
|
||||||
# define NOMINMAX
|
# define NOMINMAX
|
||||||
# include <windows.h>
|
# include <windows.h>
|
||||||
# define socklen_t int
|
# define socklen_t int
|
||||||
|
|
|
@ -8,6 +8,10 @@
|
||||||
# This tells the application(s) where to fidn the installed data.
|
# This tells the application(s) where to fidn the installed data.
|
||||||
ADD_DEFINITIONS(-DDATA_DIR="\\"${NL_SHARE_PREFIX}/object_viewer_qt/\\"")
|
ADD_DEFINITIONS(-DDATA_DIR="\\"${NL_SHARE_PREFIX}/object_viewer_qt/\\"")
|
||||||
|
|
||||||
|
IF(UNIX AND WITH_STATIC)
|
||||||
|
MESSAGE(FATAL_ERROR "OVQT does not work with static NeL builds on Unix atm.")
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
ADD_SUBDIRECTORY(src)
|
ADD_SUBDIRECTORY(src)
|
||||||
|
|
||||||
INSTALL(DIRECTORY data/
|
INSTALL(DIRECTORY data/
|
||||||
|
|
|
@ -151,9 +151,9 @@ void CPluginManager::readPluginPaths()
|
||||||
{
|
{
|
||||||
const QDir dir(searchPaths.takeFirst());
|
const QDir dir(searchPaths.takeFirst());
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
const QFileInfoList files = dir.entryInfoList(QStringList() << QString("*.dll"), QDir::Files);
|
const QFileInfoList files = dir.entryInfoList(QStringList() << QString("ovqt_plugin_*.dll"), QDir::Files);
|
||||||
#else
|
#else
|
||||||
const QFileInfoList files = dir.entryInfoList(QStringList() << QString("*.so"), QDir::Files);
|
const QFileInfoList files = dir.entryInfoList(QStringList() << QString("libovqt_plugin_*.so"), QDir::Files);
|
||||||
#endif
|
#endif
|
||||||
Q_FOREACH (const QFileInfo &file, files)
|
Q_FOREACH (const QFileInfo &file, files)
|
||||||
pluginsList << file.absoluteFilePath();
|
pluginsList << file.absoluteFilePath();
|
||||||
|
|
|
@ -61,12 +61,15 @@ bool CorePlugin::initialize(ExtensionSystem::IPluginManager *pluginManager, QStr
|
||||||
bool success = m_mainWindow->initialize(errorString);
|
bool success = m_mainWindow->initialize(errorString);
|
||||||
|
|
||||||
GeneralSettingsPage *generalSettings = new GeneralSettingsPage(this);
|
GeneralSettingsPage *generalSettings = new GeneralSettingsPage(this);
|
||||||
CSearchPathsSettingsPage *searchPathPage = new CSearchPathsSettingsPage(this);
|
CSearchPathsSettingsPage *searchPathPage = new CSearchPathsSettingsPage(false, this);
|
||||||
|
CSearchPathsSettingsPage *recureseSearchPathPage = new CSearchPathsSettingsPage(true, this);
|
||||||
|
|
||||||
generalSettings->applyGeneralSettings();
|
generalSettings->applyGeneralSettings();
|
||||||
searchPathPage->applySearchPaths();
|
searchPathPage->applySearchPaths();
|
||||||
|
recureseSearchPathPage->applySearchPaths();
|
||||||
addAutoReleasedObject(generalSettings);
|
addAutoReleasedObject(generalSettings);
|
||||||
addAutoReleasedObject(searchPathPage);
|
addAutoReleasedObject(searchPathPage);
|
||||||
|
addAutoReleasedObject(recureseSearchPathPage);
|
||||||
return success;
|
return success;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -33,8 +33,9 @@ namespace Core
|
||||||
|
|
||||||
QString lastDir = ".";
|
QString lastDir = ".";
|
||||||
|
|
||||||
CSearchPathsSettingsPage::CSearchPathsSettingsPage(QObject *parent)
|
CSearchPathsSettingsPage::CSearchPathsSettingsPage(bool recurse, QObject *parent)
|
||||||
: IOptionsPage(parent),
|
: IOptionsPage(parent),
|
||||||
|
m_recurse(recurse),
|
||||||
m_page(0)
|
m_page(0)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -45,11 +46,17 @@ CSearchPathsSettingsPage::~CSearchPathsSettingsPage()
|
||||||
|
|
||||||
QString CSearchPathsSettingsPage::id() const
|
QString CSearchPathsSettingsPage::id() const
|
||||||
{
|
{
|
||||||
|
if (m_recurse)
|
||||||
|
return QLatin1String("search_recurse_paths");
|
||||||
|
else
|
||||||
return QLatin1String("search_paths");
|
return QLatin1String("search_paths");
|
||||||
}
|
}
|
||||||
|
|
||||||
QString CSearchPathsSettingsPage::trName() const
|
QString CSearchPathsSettingsPage::trName() const
|
||||||
{
|
{
|
||||||
|
if (m_recurse)
|
||||||
|
return tr("Search Recurse Paths");
|
||||||
|
else
|
||||||
return tr("Search Paths");
|
return tr("Search Paths");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -100,7 +107,11 @@ void CSearchPathsSettingsPage::applySearchPaths()
|
||||||
QStringList paths, remapExt;
|
QStringList paths, remapExt;
|
||||||
QSettings *settings = Core::ICore::instance()->settings();
|
QSettings *settings = Core::ICore::instance()->settings();
|
||||||
settings->beginGroup(Core::Constants::DATA_PATH_SECTION);
|
settings->beginGroup(Core::Constants::DATA_PATH_SECTION);
|
||||||
|
if (m_recurse)
|
||||||
|
paths = settings->value(Core::Constants::RECURSIVE_SEARCH_PATHS).toStringList();
|
||||||
|
else
|
||||||
paths = settings->value(Core::Constants::SEARCH_PATHS).toStringList();
|
paths = settings->value(Core::Constants::SEARCH_PATHS).toStringList();
|
||||||
|
|
||||||
remapExt = settings->value(Core::Constants::REMAP_EXTENSIONS).toStringList();
|
remapExt = settings->value(Core::Constants::REMAP_EXTENSIONS).toStringList();
|
||||||
settings->endGroup();
|
settings->endGroup();
|
||||||
|
|
||||||
|
@ -109,7 +120,7 @@ void CSearchPathsSettingsPage::applySearchPaths()
|
||||||
|
|
||||||
Q_FOREACH(QString path, paths)
|
Q_FOREACH(QString path, paths)
|
||||||
{
|
{
|
||||||
NLMISC::CPath::addSearchPath(path.toStdString(), false, false);
|
NLMISC::CPath::addSearchPath(path.toStdString(), m_recurse, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -164,6 +175,9 @@ void CSearchPathsSettingsPage::readSettings()
|
||||||
QStringList paths;
|
QStringList paths;
|
||||||
QSettings *settings = Core::ICore::instance()->settings();
|
QSettings *settings = Core::ICore::instance()->settings();
|
||||||
settings->beginGroup(Core::Constants::DATA_PATH_SECTION);
|
settings->beginGroup(Core::Constants::DATA_PATH_SECTION);
|
||||||
|
if (m_recurse)
|
||||||
|
paths = settings->value(Core::Constants::RECURSIVE_SEARCH_PATHS).toStringList();
|
||||||
|
else
|
||||||
paths = settings->value(Core::Constants::SEARCH_PATHS).toStringList();
|
paths = settings->value(Core::Constants::SEARCH_PATHS).toStringList();
|
||||||
settings->endGroup();
|
settings->endGroup();
|
||||||
Q_FOREACH(QString path, paths)
|
Q_FOREACH(QString path, paths)
|
||||||
|
@ -183,8 +197,12 @@ void CSearchPathsSettingsPage::writeSettings()
|
||||||
|
|
||||||
QSettings *settings = Core::ICore::instance()->settings();
|
QSettings *settings = Core::ICore::instance()->settings();
|
||||||
settings->beginGroup(Core::Constants::DATA_PATH_SECTION);
|
settings->beginGroup(Core::Constants::DATA_PATH_SECTION);
|
||||||
|
if (m_recurse)
|
||||||
|
settings->setValue(Core::Constants::RECURSIVE_SEARCH_PATHS, paths);
|
||||||
|
else
|
||||||
settings->setValue(Core::Constants::SEARCH_PATHS, paths);
|
settings->setValue(Core::Constants::SEARCH_PATHS, paths);
|
||||||
settings->endGroup();
|
settings->endGroup();
|
||||||
|
settings->sync();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSearchPathsSettingsPage::checkEnabledButton()
|
void CSearchPathsSettingsPage::checkEnabledButton()
|
||||||
|
|
|
@ -37,7 +37,7 @@ class CSearchPathsSettingsPage : public Core::IOptionsPage
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CSearchPathsSettingsPage(QObject *parent = 0);
|
explicit CSearchPathsSettingsPage(bool recurse, QObject *parent = 0);
|
||||||
~CSearchPathsSettingsPage();
|
~CSearchPathsSettingsPage();
|
||||||
|
|
||||||
QString id() const;
|
QString id() const;
|
||||||
|
@ -64,6 +64,7 @@ private:
|
||||||
void writeSettings();
|
void writeSettings();
|
||||||
void checkEnabledButton();
|
void checkEnabledButton();
|
||||||
|
|
||||||
|
bool m_recurse;
|
||||||
QWidget *m_page;
|
QWidget *m_page;
|
||||||
Ui::CSearchPathsSettingsPage m_ui;
|
Ui::CSearchPathsSettingsPage m_ui;
|
||||||
};
|
};
|
||||||
|
|
|
@ -134,6 +134,9 @@ bool CGraphicsViewport::winEvent(MSG *message, long *result)
|
||||||
if (driver)
|
if (driver)
|
||||||
{
|
{
|
||||||
winProc proc = (winProc)driver->getWindowProc();
|
winProc proc = (winProc)driver->getWindowProc();
|
||||||
|
|
||||||
|
// TODO: shouldn't it return false like the others?
|
||||||
|
// see macEvent() and x11Event() below
|
||||||
return proc(driver, message->hwnd, message->message, message->wParam, message->lParam);
|
return proc(driver, message->hwnd, message->message, message->wParam, message->lParam);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -156,10 +159,12 @@ bool CGraphicsViewport::macEvent(EventHandlerCallRef caller, EventRef event)
|
||||||
if (driver)
|
if (driver)
|
||||||
{
|
{
|
||||||
cocoaProc proc = (cocoaProc)driver->getWindowProc();
|
cocoaProc proc = (cocoaProc)driver->getWindowProc();
|
||||||
return proc(driver, event);
|
proc(driver, event);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// return false to let Qt handle the event as well,
|
||||||
|
// else the widget would never get focus
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -175,10 +180,13 @@ bool CGraphicsViewport::x11Event(XEvent *event)
|
||||||
if (driver)
|
if (driver)
|
||||||
{
|
{
|
||||||
x11Proc proc = (x11Proc)driver->getWindowProc();
|
x11Proc proc = (x11Proc)driver->getWindowProc();
|
||||||
return proc(driver, event);
|
proc(driver, event);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// return false to let Qt handle the event as well,
|
||||||
|
// else the widget would never get focus
|
||||||
|
// TODO: test me please, i have no linux at hand (rti)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -86,6 +86,7 @@ QWidget *VegetableSettingsPage::createPage(QWidget *parent)
|
||||||
connect(m_ui.coarseToolButton, SIGNAL(clicked()), this, SLOT(setCoarseMeshTexture()));
|
connect(m_ui.coarseToolButton, SIGNAL(clicked()), this, SLOT(setCoarseMeshTexture()));
|
||||||
connect(m_ui.addZoneToolButton, SIGNAL(clicked()), this, SLOT(addZone()));
|
connect(m_ui.addZoneToolButton, SIGNAL(clicked()), this, SLOT(addZone()));
|
||||||
connect(m_ui.removeZoneToolButton, SIGNAL(clicked()), this, SLOT(removeZone()));
|
connect(m_ui.removeZoneToolButton, SIGNAL(clicked()), this, SLOT(removeZone()));
|
||||||
|
connect(m_ui.clearButton, SIGNAL(clicked()), m_ui.zonesListWidget, SLOT(clear()));
|
||||||
|
|
||||||
return m_page;
|
return m_page;
|
||||||
}
|
}
|
||||||
|
|
|
@ -181,6 +181,17 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QToolButton" name="clearButton">
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="object_viewer.qrc">
|
||||||
|
<normaloff>:/icons/ic_nel_reset_all.png</normaloff>:/icons/ic_nel_reset_all.png</iconset>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item row="5" column="0" colspan="4">
|
<item row="5" column="0" colspan="4">
|
||||||
|
|
|
@ -23,7 +23,7 @@ using namespace NLMISC;
|
||||||
#ifdef NL_DEBUG
|
#ifdef NL_DEBUG
|
||||||
#define INFO nlinfo
|
#define INFO nlinfo
|
||||||
#else // NL_DEBUG
|
#else // NL_DEBUG
|
||||||
# if defined(NL_COMP_VC71) || defined(NL_COMP_VC8) || defined(NL_COMP_VC9)
|
# if defined(NL_COMP_VC71) || defined(NL_COMP_VC8) || defined(NL_COMP_VC9) || defined(NL_COMP_VC10)
|
||||||
# define INFO __noop
|
# define INFO __noop
|
||||||
# else
|
# else
|
||||||
# define INFO 0&&
|
# define INFO 0&&
|
||||||
|
|
|
@ -71,6 +71,8 @@ public:
|
||||||
const NLMISC::CMatrix *StaticMatrix; // Useful if stick mode is "StaticMatrix"
|
const NLMISC::CMatrix *StaticMatrix; // Useful if stick mode is "StaticMatrix"
|
||||||
uint MaxNumAnimCount; // Number of frame on which the fx can overlap when it is being shutdown
|
uint MaxNumAnimCount; // Number of frame on which the fx can overlap when it is being shutdown
|
||||||
float TimeOut;
|
float TimeOut;
|
||||||
|
double StartTime;
|
||||||
|
float DelayBeforeStart;
|
||||||
public:
|
public:
|
||||||
CBuildInfo()
|
CBuildInfo()
|
||||||
{
|
{
|
||||||
|
@ -80,6 +82,8 @@ public:
|
||||||
StaticMatrix = NULL;
|
StaticMatrix = NULL;
|
||||||
MaxNumAnimCount = 0;
|
MaxNumAnimCount = 0;
|
||||||
TimeOut = FX_MANAGER_DEFAULT_TIMEOUT;
|
TimeOut = FX_MANAGER_DEFAULT_TIMEOUT;
|
||||||
|
StartTime = 0.0;
|
||||||
|
DelayBeforeStart = 0.f;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
CAttachedFX();
|
CAttachedFX();
|
||||||
|
|
|
@ -5874,6 +5874,27 @@ void CCharacterCL::updateAttachedFX()
|
||||||
CMatrix alignMatrix;
|
CMatrix alignMatrix;
|
||||||
buildAlignMatrix(alignMatrix);
|
buildAlignMatrix(alignMatrix);
|
||||||
|
|
||||||
|
std::list<CAttachedFX::CBuildInfo>::iterator itAttachedFxToStart = _AttachedFXListToStart.begin();
|
||||||
|
while(itAttachedFxToStart != _AttachedFXListToStart.end())
|
||||||
|
{
|
||||||
|
if ((*itAttachedFxToStart).DelayBeforeStart < (float)(TimeInSec - (*itAttachedFxToStart).StartTime))
|
||||||
|
{
|
||||||
|
uint index = (*itAttachedFxToStart).MaxNumAnimCount;
|
||||||
|
(*itAttachedFxToStart).MaxNumAnimCount = 0;
|
||||||
|
CAttachedFX::TSmartPtr fx = new CAttachedFX;
|
||||||
|
fx->create(*this, (*itAttachedFxToStart), CAttachedFX::CTargeterInfo());
|
||||||
|
if (!fx->FX.empty())
|
||||||
|
{
|
||||||
|
_AuraFX[index] = fx;
|
||||||
|
}
|
||||||
|
itAttachedFxToStart = _AttachedFXListToStart.erase(itAttachedFxToStart);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
++itAttachedFxToStart;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// update tracks & pos for anim attachedfxs
|
// update tracks & pos for anim attachedfxs
|
||||||
std::list<CAttachedFX::TSmartPtr>::iterator itAttachedFx = _AttachedFXListForCurrentAnim.begin();
|
std::list<CAttachedFX::TSmartPtr>::iterator itAttachedFx = _AttachedFXListForCurrentAnim.begin();
|
||||||
while(itAttachedFx != _AttachedFXListForCurrentAnim.end())
|
while(itAttachedFx != _AttachedFXListForCurrentAnim.end())
|
||||||
|
@ -8993,12 +9014,35 @@ void CCharacterCL::setAuraFX(uint index, const CAnimationFX *sheet)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
std::list<CAttachedFX::CBuildInfo>::iterator itAttachedFxToStart = _AttachedFXListToStart.begin();
|
||||||
|
while(itAttachedFxToStart != _AttachedFXListToStart.end())
|
||||||
|
{
|
||||||
|
if ((*itAttachedFxToStart).MaxNumAnimCount == index)
|
||||||
|
return;
|
||||||
|
}
|
||||||
// remove previous aura
|
// remove previous aura
|
||||||
_AuraFX[index] = NULL;
|
_AuraFX[index] = NULL;
|
||||||
CAttachedFX::TSmartPtr fx = new CAttachedFX;
|
|
||||||
CAttachedFX::CBuildInfo bi;
|
CAttachedFX::CBuildInfo bi;
|
||||||
bi.Sheet = sheet;
|
bi.Sheet = sheet;
|
||||||
bi.TimeOut = 0.f;
|
bi.TimeOut = 0.f;
|
||||||
|
|
||||||
|
if (sheet->Sheet->PSName == "misc_caravan_teleportout.ps")
|
||||||
|
{
|
||||||
|
bi.MaxNumAnimCount = index;
|
||||||
|
bi.StartTime = TimeInSec;
|
||||||
|
bi.DelayBeforeStart = 12.5f;
|
||||||
|
_AttachedFXListToStart.push_front(bi);
|
||||||
|
}
|
||||||
|
else if (sheet->Sheet->PSName == "misc_kami_teleportout.ps")
|
||||||
|
{
|
||||||
|
bi.MaxNumAnimCount = index;
|
||||||
|
bi.StartTime = TimeInSec;
|
||||||
|
bi.DelayBeforeStart = 11.5f;
|
||||||
|
_AttachedFXListToStart.push_front(bi);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
CAttachedFX::TSmartPtr fx = new CAttachedFX;
|
||||||
fx->create(*this, bi, CAttachedFX::CTargeterInfo());
|
fx->create(*this, bi, CAttachedFX::CTargeterInfo());
|
||||||
if (!fx->FX.empty())
|
if (!fx->FX.empty())
|
||||||
{
|
{
|
||||||
|
@ -9006,6 +9050,7 @@ void CCharacterCL::setAuraFX(uint index, const CAnimationFX *sheet)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// ***********************************************************************************************************************
|
// ***********************************************************************************************************************
|
||||||
void CCharacterCL::setLinkFX(const CAnimationFX *fx, const CAnimationFX *dispell)
|
void CCharacterCL::setLinkFX(const CAnimationFX *fx, const CAnimationFX *dispell)
|
||||||
|
|
|
@ -675,6 +675,7 @@ protected:
|
||||||
/// List of attached to remove as soon as possible (when there are no particles left)
|
/// List of attached to remove as soon as possible (when there are no particles left)
|
||||||
std::list<CAttachedFX::TSmartPtr> _AttachedFXListToRemove;
|
std::list<CAttachedFX::TSmartPtr> _AttachedFXListToRemove;
|
||||||
|
|
||||||
|
std::list<CAttachedFX::CBuildInfo> _AttachedFXListToStart;
|
||||||
|
|
||||||
CAttachedFX::TSmartPtr _AuraFX[MaxNumAura]; // special case for aura
|
CAttachedFX::TSmartPtr _AuraFX[MaxNumAura]; // special case for aura
|
||||||
CAttachedFX::TSmartPtr _LinkFX; // special case for link
|
CAttachedFX::TSmartPtr _LinkFX; // special case for link
|
||||||
|
|
|
@ -1942,7 +1942,7 @@ void CClientConfig::init(const string &configFileName)
|
||||||
|
|
||||||
// save the updated config file
|
// save the updated config file
|
||||||
NLMISC::COFile configFile(configFileName, false, true, false);
|
NLMISC::COFile configFile(configFileName, false, true, false);
|
||||||
configFile.serialBuffer((uint8*)contentUtf8.c_str(), contentUtf8.size());
|
configFile.serialBuffer((uint8*)contentUtf8.c_str(), (uint)contentUtf8.size());
|
||||||
configFile.close();
|
configFile.close();
|
||||||
|
|
||||||
// now we can continue loading and parsing the config file
|
// now we can continue loading and parsing the config file
|
||||||
|
|
|
@ -1199,6 +1199,11 @@ class CHandlerTell : public IActionHandler
|
||||||
// display msg with good color
|
// display msg with good color
|
||||||
// TDataSetIndex dsi; // not used ....
|
// TDataSetIndex dsi; // not used ....
|
||||||
PeopleInterraction.ChatInput.Tell.displayTellMessage(/*dsi, */finalMsg, receiver, prop.getRGBA());
|
PeopleInterraction.ChatInput.Tell.displayTellMessage(/*dsi, */finalMsg, receiver, prop.getRGBA());
|
||||||
|
|
||||||
|
ucstring s = CI18N::get("youTellPlayer");
|
||||||
|
strFindReplace(s, "%name", receiver);
|
||||||
|
strFindReplace(finalMsg, CI18N::get("youTell"), s);
|
||||||
|
CInterfaceManager::getInstance()->log(finalMsg);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
REGISTER_ACTION_HANDLER( CHandlerTell, "tell");
|
REGISTER_ACTION_HANDLER( CHandlerTell, "tell");
|
||||||
|
|
|
@ -1271,6 +1271,30 @@ NLMISC_COMMAND(7,"talk in 7th dynamic chat channel","<channel_nb> <sentence>")
|
||||||
{
|
{
|
||||||
return talkInChan(7,args);
|
return talkInChan(7,args);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
NLMISC_COMMAND(setItemName, "set name of items, sbrick, etc..","<sheet_id> <name> <desc> <desc2>")
|
||||||
|
{
|
||||||
|
if (args.size() < 2) return false;
|
||||||
|
CSheetId id(args[0]);
|
||||||
|
ucstring name;
|
||||||
|
name.fromUtf8(args[1]);
|
||||||
|
ucstring desc;
|
||||||
|
ucstring desc2;
|
||||||
|
if (args.size() > 2)
|
||||||
|
desc.fromUtf8(args[2]);
|
||||||
|
if (args.size() > 2)
|
||||||
|
desc2.fromUtf8(args[3]);
|
||||||
|
|
||||||
|
STRING_MANAGER::CStringManagerClient *pSMC = STRING_MANAGER::CStringManagerClient::instance();
|
||||||
|
if (pSMC)
|
||||||
|
pSMC->replaceSBrickName(id, name, desc, desc2);
|
||||||
|
else
|
||||||
|
return false;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
|
@ -550,7 +550,9 @@ void checkUnderCursor()
|
||||||
if (!instref.ContextText.empty())
|
if (!instref.ContextText.empty())
|
||||||
{
|
{
|
||||||
selectedInstanceURL = instref.ContextURL;
|
selectedInstanceURL = instref.ContextURL;
|
||||||
if(ContextCur.context("WEBIG", 0.f, ucstring(instref.ContextText)))
|
ucstring contextText;
|
||||||
|
contextText.fromUtf8(instref.ContextText);
|
||||||
|
if(ContextCur.context("WEBIG", 0.f, contextText))
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1326,7 +1326,7 @@ void postlogInit()
|
||||||
ProgressBar.newMessage ( ClientCfg.buildLoadingString(nmsg) );
|
ProgressBar.newMessage ( ClientCfg.buildLoadingString(nmsg) );
|
||||||
|
|
||||||
CSBrickManager::getInstance()->init(); // Must be done after sheet loading
|
CSBrickManager::getInstance()->init(); // Must be done after sheet loading
|
||||||
STRING_MANAGER::CStringManagerClient::specialWordsMemoryCompress(); // Must be done after brick manager init
|
//STRING_MANAGER::CStringManagerClient::specialWordsMemoryCompress(); // Must be done after brick manager init
|
||||||
|
|
||||||
initLast = initCurrent;
|
initLast = initCurrent;
|
||||||
initCurrent = ryzomGetLocalTime();
|
initCurrent = ryzomGetLocalTime();
|
||||||
|
|
|
@ -1761,7 +1761,7 @@ class CHandlerItemMenuCheck : public IActionHandler
|
||||||
if (pCS->getInventoryIndex()==INVENTORIES::bag)
|
if (pCS->getInventoryIndex()==INVENTORIES::bag)
|
||||||
{
|
{
|
||||||
bool isTextEditionActive = false;
|
bool isTextEditionActive = false;
|
||||||
static const string itemTextEditionPriv = ":DEV:SGM:EM:";
|
static const string itemTextEditionPriv = ":DEV:SGM:GM:EM:";
|
||||||
if (!UserPrivileges.empty() && itemTextEditionPriv.find(UserPrivileges)!=std::string::npos)
|
if (!UserPrivileges.empty() && itemTextEditionPriv.find(UserPrivileges)!=std::string::npos)
|
||||||
{
|
{
|
||||||
isTextEditionActive = true;
|
isTextEditionActive = true;
|
||||||
|
|
|
@ -60,6 +60,7 @@ void launchPhraseComposition(bool creation);
|
||||||
const std::string PhraseComposition="ui:interface:phrase_composition";
|
const std::string PhraseComposition="ui:interface:phrase_composition";
|
||||||
const std::string PhraseCompositionGroup="ui:interface:phrase_composition:header_opened";
|
const std::string PhraseCompositionGroup="ui:interface:phrase_composition:header_opened";
|
||||||
const std::string PhraseMemoryCtrlBase= "ui:interface:gestionsets:shortcuts:s";
|
const std::string PhraseMemoryCtrlBase= "ui:interface:gestionsets:shortcuts:s";
|
||||||
|
const std::string PhraseMemoryAltCtrlBase= "ui:interface:gestionsets2:header_closed:shortcuts:s";
|
||||||
|
|
||||||
|
|
||||||
// **********************************************************************************************************
|
// **********************************************************************************************************
|
||||||
|
@ -129,7 +130,11 @@ public:
|
||||||
if(pCSDst && pCSDst->isSPhraseId() && pCSDst->isSPhraseIdMemory())
|
if(pCSDst && pCSDst->isSPhraseId() && pCSDst->isSPhraseIdMemory())
|
||||||
{
|
{
|
||||||
// then will auto-memorize it in this slot
|
// then will auto-memorize it in this slot
|
||||||
|
if (pCSDst->isShortCut())
|
||||||
pPM->CompositionPhraseMemoryLineDest= pPM->getSelectedMemoryLineDB();
|
pPM->CompositionPhraseMemoryLineDest= pPM->getSelectedMemoryLineDB();
|
||||||
|
else
|
||||||
|
pPM->CompositionPhraseMemoryLineDest= 0;
|
||||||
|
|
||||||
pPM->CompositionPhraseMemorySlotDest= pCSDst->getIndexInDB();
|
pPM->CompositionPhraseMemorySlotDest= pCSDst->getIndexInDB();
|
||||||
}
|
}
|
||||||
// else no auto memorize
|
// else no auto memorize
|
||||||
|
@ -1110,7 +1115,11 @@ public:
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Ok, the user try to cast a phrase slot.
|
// Ok, the user try to cast a phrase slot.
|
||||||
sint32 memoryLine= pPM->getSelectedMemoryLineDB();
|
sint32 memoryLine;
|
||||||
|
if (pCSDst->isShortCut())
|
||||||
|
memoryLine = pPM->getSelectedMemoryLineDB();
|
||||||
|
else
|
||||||
|
memoryLine = 0;
|
||||||
if(memoryLine<0)
|
if(memoryLine<0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -1249,12 +1258,16 @@ public:
|
||||||
{
|
{
|
||||||
sint shortcut;
|
sint shortcut;
|
||||||
fromString(Params, shortcut);
|
fromString(Params, shortcut);
|
||||||
if (shortcut>=0 && shortcut <= RYZOM_MAX_SHORTCUT)
|
if (shortcut>=0 && shortcut <= 2*RYZOM_MAX_SHORTCUT)
|
||||||
{
|
{
|
||||||
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
||||||
|
|
||||||
// get the control
|
// get the control
|
||||||
CInterfaceElement *elm= pIM->getElementFromId(PhraseMemoryCtrlBase + toString(shortcut) );
|
CInterfaceElement *elm;
|
||||||
|
if (shortcut < RYZOM_MAX_SHORTCUT)
|
||||||
|
elm = pIM->getElementFromId(PhraseMemoryCtrlBase + toString(shortcut) );
|
||||||
|
else
|
||||||
|
elm = pIM->getElementFromId(PhraseMemoryAltCtrlBase + toString(shortcut-RYZOM_MAX_SHORTCUT) );
|
||||||
CDBCtrlSheet *ctrl= dynamic_cast<CDBCtrlSheet*>(elm);
|
CDBCtrlSheet *ctrl= dynamic_cast<CDBCtrlSheet*>(elm);
|
||||||
if(ctrl)
|
if(ctrl)
|
||||||
{
|
{
|
||||||
|
@ -1491,7 +1504,11 @@ public:
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Ok, the user try to cast a phrase slot.
|
// Ok, the user try to cast a phrase slot.
|
||||||
sint32 memoryLine= pPM->getSelectedMemoryLineDB();
|
sint32 memoryLine;
|
||||||
|
if (pCSDst->isShortCut())
|
||||||
|
memoryLine = pPM->getSelectedMemoryLineDB();
|
||||||
|
else
|
||||||
|
memoryLine = 0;
|
||||||
if(memoryLine<0)
|
if(memoryLine<0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
|
@ -313,7 +313,7 @@ void CChatTargetFilter::msgEntered(const ucstring &msg, CChatWindow *chatWindow)
|
||||||
// the target must be a player, make a tell on him
|
// the target must be a player, make a tell on him
|
||||||
ChatMngr.tell(_TargetPlayer.toString(), msg);
|
ChatMngr.tell(_TargetPlayer.toString(), msg);
|
||||||
// direct output in the chat
|
// direct output in the chat
|
||||||
chatWindow->displayLocalPlayerTell(msg);
|
chatWindow->displayLocalPlayerTell(_TargetPlayer.toString(), msg);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -199,7 +199,7 @@ bool CChatWindow::isVisible() const
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
void CChatWindow::displayMessage(const ucstring &msg, NLMISC::CRGBA col, CChatGroup::TGroupType /* gt */, uint32 /* dynamicChatDbIndex */, uint numBlinks /* = 0*/, bool *windowVisible /*= NULL*/)
|
void CChatWindow::displayMessage(const ucstring &msg, NLMISC::CRGBA col, CChatGroup::TGroupType gt, uint32 dynamicChatDbIndex, uint numBlinks /* = 0*/, bool *windowVisible /*= NULL*/)
|
||||||
{
|
{
|
||||||
if (!_Chat)
|
if (!_Chat)
|
||||||
{
|
{
|
||||||
|
@ -466,7 +466,7 @@ void CChatWindow::setHeaderColor(const std::string &n)
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
void CChatWindow::displayLocalPlayerTell(const ucstring &msg, uint numBlinks /*= 0*/)
|
void CChatWindow::displayLocalPlayerTell(const ucstring &receiver, const ucstring &msg, uint numBlinks /*= 0*/)
|
||||||
{
|
{
|
||||||
ucstring finalMsg;
|
ucstring finalMsg;
|
||||||
CInterfaceProperty prop;
|
CInterfaceProperty prop;
|
||||||
|
@ -484,7 +484,12 @@ void CChatWindow::displayLocalPlayerTell(const ucstring &msg, uint numBlinks /*=
|
||||||
prop.readRGBA("UI:SAVE:CHAT:COLORS:TELL"," ");
|
prop.readRGBA("UI:SAVE:CHAT:COLORS:TELL"," ");
|
||||||
encodeColorTag(prop.getRGBA(), finalMsg, true);
|
encodeColorTag(prop.getRGBA(), finalMsg, true);
|
||||||
finalMsg += msg;
|
finalMsg += msg;
|
||||||
|
|
||||||
|
ucstring s = CI18N::get("youTellPlayer");
|
||||||
|
strFindReplace(s, "%name", receiver);
|
||||||
|
strFindReplace(finalMsg, CI18N::get("youTell"), s);
|
||||||
displayMessage(finalMsg, prop.getRGBA(), CChatGroup::tell, 0, numBlinks);
|
displayMessage(finalMsg, prop.getRGBA(), CChatGroup::tell, 0, numBlinks);
|
||||||
|
CInterfaceManager::getInstance()->log(finalMsg);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CChatWindow::encodeColorTag(const NLMISC::CRGBA &color, ucstring &text, bool append)
|
void CChatWindow::encodeColorTag(const NLMISC::CRGBA &color, ucstring &text, bool append)
|
||||||
|
@ -797,14 +802,6 @@ CGroupContainer *CChatGroupWindow::createFreeTeller(const ucstring &winNameIn, c
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create the free teller in all the desktops
|
|
||||||
uint8 nMode = pIM->getMode();
|
|
||||||
pGC->setActive(false);
|
|
||||||
for (uint8 m = 0; m < MAX_NUM_MODES; ++m)
|
|
||||||
{
|
|
||||||
if (m != nMode)
|
|
||||||
pIM->updateGroupContainerImage(*pGC, m);
|
|
||||||
}
|
|
||||||
// the group is only active on the current desktop
|
// the group is only active on the current desktop
|
||||||
pGC->setActive(true);
|
pGC->setActive(true);
|
||||||
}
|
}
|
||||||
|
@ -812,7 +809,7 @@ CGroupContainer *CChatGroupWindow::createFreeTeller(const ucstring &winNameIn, c
|
||||||
if (!winColor.empty())
|
if (!winColor.empty())
|
||||||
_FreeTellers[i]->setHeaderColor(winColor);
|
_FreeTellers[i]->setHeaderColor(winColor);
|
||||||
|
|
||||||
updateFreeTellerHeader(*_FreeTellers[i]);
|
// updateFreeTellerHeader(*_FreeTellers[i]);
|
||||||
return _FreeTellers[i];
|
return _FreeTellers[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -143,7 +143,7 @@ public:
|
||||||
void setAHOnCloseButtonParams(const std::string &n);
|
void setAHOnCloseButtonParams(const std::string &n);
|
||||||
void setHeaderColor(const std::string &n);
|
void setHeaderColor(const std::string &n);
|
||||||
//
|
//
|
||||||
void displayLocalPlayerTell(const ucstring &msg, uint numBlinks = 0);
|
void displayLocalPlayerTell(const ucstring &receiver, const ucstring &msg, uint numBlinks = 0);
|
||||||
|
|
||||||
/// Encode a color tag '@{RGBA}' in the text. If append is true, append at end of text, otherwise, replace the text
|
/// Encode a color tag '@{RGBA}' in the text. If append is true, append at end of text, otherwise, replace the text
|
||||||
static void encodeColorTag(const NLMISC::CRGBA &color, ucstring &text, bool append=true);
|
static void encodeColorTag(const NLMISC::CRGBA &color, ucstring &text, bool append=true);
|
||||||
|
|
|
@ -114,7 +114,7 @@ public:
|
||||||
/// \name Handlers
|
/// \name Handlers
|
||||||
// @{
|
// @{
|
||||||
// Event part
|
// Event part
|
||||||
void setActionOnLeftClick (const std::string &actionHandlerName) { _AHOnLeftClick = getAH(actionHandlerName, _AHLeftClickParams); }
|
void setActionOnLeftClick (const std::string &actionHandlerName) { _AHOnLeftClickString = actionHandlerName; _AHOnLeftClick = getAH(actionHandlerName, _AHLeftClickParams); }
|
||||||
void setActionOnRightClick (const std::string &actionHandlerName) { _AHOnRightClick = getAH(actionHandlerName, _AHRightClickParams); }
|
void setActionOnRightClick (const std::string &actionHandlerName) { _AHOnRightClick = getAH(actionHandlerName, _AHRightClickParams); }
|
||||||
void setActionOnClockTick (const std::string &ahName) { _AHOnClockTick = getAH(ahName, _AHClockTickParams); }
|
void setActionOnClockTick (const std::string &ahName) { _AHOnClockTick = getAH(ahName, _AHClockTickParams); }
|
||||||
void setParamsOnLeftClick (const std::string ¶msHandlerName) { _AHLeftClickParams = paramsHandlerName; }
|
void setParamsOnLeftClick (const std::string ¶msHandlerName) { _AHLeftClickParams = paramsHandlerName; }
|
||||||
|
@ -203,6 +203,7 @@ protected:
|
||||||
//@{
|
//@{
|
||||||
IActionHandler *_AHOnOver;
|
IActionHandler *_AHOnOver;
|
||||||
CStringShared _AHOverParams;
|
CStringShared _AHOverParams;
|
||||||
|
std::string _AHOnLeftClickString;
|
||||||
IActionHandler *_AHOnLeftClick;
|
IActionHandler *_AHOnLeftClick;
|
||||||
CStringShared _AHLeftClickParams;
|
CStringShared _AHLeftClickParams;
|
||||||
IActionHandler *_AHOnLeftDblClick;
|
IActionHandler *_AHOnLeftDblClick;
|
||||||
|
|
|
@ -333,4 +333,16 @@ void CCtrlButton::fitTexture()
|
||||||
setH(h);
|
setH(h);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ***************************************************************************
|
||||||
|
bool CCtrlButton::getMouseOverShape(string &texName, uint8 &rot, CRGBA &col)
|
||||||
|
{
|
||||||
|
if (_AHOnLeftClickString == "browse")
|
||||||
|
{
|
||||||
|
texName = "curs_pick.tga";
|
||||||
|
rot= 0;
|
||||||
|
col = CRGBA::White;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
|
@ -50,6 +50,8 @@ public:
|
||||||
|
|
||||||
virtual uint32 getMemory() { return (uint32)(sizeof(*this)+_Id.size()); }
|
virtual uint32 getMemory() { return (uint32)(sizeof(*this)+_Id.size()); }
|
||||||
|
|
||||||
|
virtual bool getMouseOverShape(std::string &/* texName */, uint8 &/* rot */, NLMISC::CRGBA &/* col */);
|
||||||
|
|
||||||
// Display part
|
// Display part
|
||||||
virtual void draw();
|
virtual void draw();
|
||||||
|
|
||||||
|
|
|
@ -113,8 +113,8 @@ bool CCtrlTextButton::parse(xmlNodePtr cur, CInterfaceGroup * parentGroup)
|
||||||
_TextureIdOver[2].setTexture((TxName+"_r.tga").c_str());
|
_TextureIdOver[2].setTexture((TxName+"_r.tga").c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Compute Bmp Sizes (crash with VC++ 2010)
|
// Compute Bmp Sizes
|
||||||
// nlctassert(NumTexture==3);
|
nlctassert(NumTexture==3);
|
||||||
rVR.getTextureSizeFromId(_TextureIdNormal[0], _BmpLeftW, _BmpH);
|
rVR.getTextureSizeFromId(_TextureIdNormal[0], _BmpLeftW, _BmpH);
|
||||||
rVR.getTextureSizeFromId(_TextureIdNormal[1], _BmpMiddleW, _BmpH);
|
rVR.getTextureSizeFromId(_TextureIdNormal[1], _BmpMiddleW, _BmpH);
|
||||||
rVR.getTextureSizeFromId(_TextureIdNormal[2], _BmpRightW, _BmpH);
|
rVR.getTextureSizeFromId(_TextureIdNormal[2], _BmpRightW, _BmpH);
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
#include "group_editbox.h"
|
#include "group_editbox.h"
|
||||||
#include "interface_manager.h"
|
#include "interface_manager.h"
|
||||||
#include "input_handler_manager.h"
|
#include "input_handler_manager.h"
|
||||||
|
#include "nel/misc/command.h"
|
||||||
#include "view_text.h"
|
#include "view_text.h"
|
||||||
#include "game_share/xml_auto_ptr.h"
|
#include "game_share/xml_auto_ptr.h"
|
||||||
#include "interface_options.h"
|
#include "interface_options.h"
|
||||||
|
@ -56,6 +57,7 @@ CGroupEditBox::CGroupEditBox(const TCtorParam ¶m) :
|
||||||
_MaxCharsSize(32768),
|
_MaxCharsSize(32768),
|
||||||
_FirstVisibleChar(0),
|
_FirstVisibleChar(0),
|
||||||
_LastVisibleChar(0),
|
_LastVisibleChar(0),
|
||||||
|
_SelectingText(false),
|
||||||
_ViewText(NULL),
|
_ViewText(NULL),
|
||||||
_MaxHistoric(0),
|
_MaxHistoric(0),
|
||||||
_CurrentHistoricIndex(-1),
|
_CurrentHistoricIndex(-1),
|
||||||
|
@ -354,16 +356,27 @@ void CGroupEditBox::paste()
|
||||||
if (Driver->pasteTextFromClipboard(sString))
|
if (Driver->pasteTextFromClipboard(sString))
|
||||||
{
|
{
|
||||||
// append string now
|
// append string now
|
||||||
appendString(sString);
|
appendStringFromClipboard(sString);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
void CGroupEditBox::appendString(const ucstring &str)
|
void CGroupEditBox::appendStringFromClipboard(const ucstring &str)
|
||||||
{
|
{
|
||||||
stopParentBlink();
|
stopParentBlink();
|
||||||
makeTopWindow();
|
makeTopWindow();
|
||||||
|
|
||||||
|
writeString(str, true, false);
|
||||||
|
nlinfo ("Chat input was pasted from the clipboard");
|
||||||
|
|
||||||
|
triggerOnChangeAH();
|
||||||
|
|
||||||
|
_CursorAtPreviousLineEnd = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
void CGroupEditBox::writeString(const ucstring &str, bool replace, bool atEnd)
|
||||||
|
{
|
||||||
sint length = (sint)str.length();
|
sint length = (sint)str.length();
|
||||||
|
|
||||||
ucstring toAppend;
|
ucstring toAppend;
|
||||||
|
@ -500,13 +513,41 @@ void CGroupEditBox::appendString(const ucstring &str)
|
||||||
length = _MaxNumChar - (sint)_InputString.length();
|
length = _MaxNumChar - (sint)_InputString.length();
|
||||||
}
|
}
|
||||||
ucstring toAdd = toAppend.substr(0, length);
|
ucstring toAdd = toAppend.substr(0, length);
|
||||||
_InputString = _InputString.substr(0, _CursorPos) + toAdd + _InputString.substr(_CursorPos);
|
sint32 minPos;
|
||||||
_CursorPos += (sint32)toAdd.length();
|
sint32 maxPos;
|
||||||
nlinfo ("Chat input was pasted from the clipboard");
|
if (_CurrSelection == this)
|
||||||
|
{
|
||||||
|
minPos = min(_CursorPos, _SelectCursorPos);
|
||||||
|
maxPos = max(_CursorPos, _SelectCursorPos);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
minPos = _CursorPos;
|
||||||
|
maxPos = _CursorPos;
|
||||||
|
}
|
||||||
|
|
||||||
triggerOnChangeAH();
|
nlinfo("%d, %d", minPos, maxPos);
|
||||||
|
if (replace)
|
||||||
|
{
|
||||||
|
_InputString = _InputString.substr(0, minPos) + toAdd + _InputString.substr(maxPos);
|
||||||
|
_CursorPos = minPos+(sint32)toAdd.length();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (atEnd)
|
||||||
|
{
|
||||||
|
_InputString = _InputString.substr(0, maxPos) + toAdd + _InputString.substr(maxPos);
|
||||||
|
_CursorPos = maxPos;
|
||||||
|
_SelectCursorPos = _CursorPos;
|
||||||
|
|
||||||
_CursorAtPreviousLineEnd = false;
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_InputString = _InputString.substr(0, minPos) + toAdd + _InputString.substr(minPos);
|
||||||
|
_CursorPos = minPos+(sint32)toAdd.length();
|
||||||
|
_SelectCursorPos = maxPos+(sint32)toAdd.length();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
@ -672,7 +713,7 @@ void CGroupEditBox::handleEventChar(const CEventDescriptorKey &rEDK)
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
void CGroupEditBox::handleEventString(const CEventDescriptorKey &rEDK)
|
void CGroupEditBox::handleEventString(const CEventDescriptorKey &rEDK)
|
||||||
{
|
{
|
||||||
appendString(rEDK.getString());
|
appendStringFromClipboard(rEDK.getString());
|
||||||
}
|
}
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
@ -862,6 +903,7 @@ bool CGroupEditBox::handleEvent (const CEventDescriptor& event)
|
||||||
// if click, and not frozen, then get the focus
|
// if click, and not frozen, then get the focus
|
||||||
if (eventDesc.getEventTypeExtended() == CEventDescriptorMouse::mouseleftdown && !_Frozen)
|
if (eventDesc.getEventTypeExtended() == CEventDescriptorMouse::mouseleftdown && !_Frozen)
|
||||||
{
|
{
|
||||||
|
_SelectingText = true;
|
||||||
stopParentBlink();
|
stopParentBlink();
|
||||||
pIM->setCaptureKeyboard (this);
|
pIM->setCaptureKeyboard (this);
|
||||||
// set the right cursor position
|
// set the right cursor position
|
||||||
|
@ -872,6 +914,31 @@ bool CGroupEditBox::handleEvent (const CEventDescriptor& event)
|
||||||
_CursorPos = newCurPos;
|
_CursorPos = newCurPos;
|
||||||
_CursorPos -= (sint32)_Prompt.length();
|
_CursorPos -= (sint32)_Prompt.length();
|
||||||
_CursorPos = std::max(_CursorPos, sint32(0));
|
_CursorPos = std::max(_CursorPos, sint32(0));
|
||||||
|
_SelectCursorPos = _CursorPos;
|
||||||
|
_CurrSelection = NULL;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
// if click, and not frozen, then get the focus
|
||||||
|
if (eventDesc.getEventTypeExtended() == CEventDescriptorMouse::mousemove && !_Frozen && _SelectingText)
|
||||||
|
{
|
||||||
|
// set the right cursor position
|
||||||
|
uint newCurPos;
|
||||||
|
bool cursorAtPreviousLineEnd;
|
||||||
|
_CurrSelection = this;
|
||||||
|
_ViewText->getCharacterIndexFromPosition(eventDesc.getX() - _ViewText->getXReal(), eventDesc.getY() - _ViewText->getYReal(), newCurPos, cursorAtPreviousLineEnd);
|
||||||
|
_SelectCursorPos = newCurPos;
|
||||||
|
_SelectCursorPos -= (sint32)_Prompt.length();
|
||||||
|
_SelectCursorPos = std::max(_SelectCursorPos, sint32(0));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// if click, and not frozen, then get the focus
|
||||||
|
if (eventDesc.getEventTypeExtended() == CEventDescriptorMouse::mouseleftup && !_Frozen)
|
||||||
|
{
|
||||||
|
_SelectingText = false;
|
||||||
|
if (_SelectCursorPos == _CursorPos)
|
||||||
|
_CurrSelection = NULL;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -125,6 +125,8 @@ public:
|
||||||
void copy();
|
void copy();
|
||||||
// Paste the selection into buffer
|
// Paste the selection into buffer
|
||||||
void paste();
|
void paste();
|
||||||
|
// Write the string into buffer
|
||||||
|
void writeString(const ucstring &str, bool replace = true, bool atEnd = true);
|
||||||
|
|
||||||
// Expand the expression (true if there was a '/' at the start of the line)
|
// Expand the expression (true if there was a '/' at the start of the line)
|
||||||
bool expand();
|
bool expand();
|
||||||
|
@ -217,6 +219,7 @@ protected:
|
||||||
// Text selection
|
// Text selection
|
||||||
static sint32 _SelectCursorPos;
|
static sint32 _SelectCursorPos;
|
||||||
static CGroupEditBox *_CurrSelection; // the edit box for which the selection is currently active, or NULL if there's none
|
static CGroupEditBox *_CurrSelection; // the edit box for which the selection is currently active, or NULL if there's none
|
||||||
|
bool _SelectingText;
|
||||||
NLMISC::CRGBA _TextSelectColor;
|
NLMISC::CRGBA _TextSelectColor;
|
||||||
NLMISC::CRGBA _BackSelectColor;
|
NLMISC::CRGBA _BackSelectColor;
|
||||||
|
|
||||||
|
@ -291,7 +294,7 @@ private:
|
||||||
void handleEventString(const CEventDescriptorKey &event);
|
void handleEventString(const CEventDescriptorKey &event);
|
||||||
void setup();
|
void setup();
|
||||||
void triggerOnChangeAH();
|
void triggerOnChangeAH();
|
||||||
void appendString(const ucstring &str);
|
void appendStringFromClipboard(const ucstring &str);
|
||||||
|
|
||||||
ucstring getSelection();
|
ucstring getSelection();
|
||||||
|
|
||||||
|
|
|
@ -442,6 +442,9 @@ void CGroupHTML::addText (const char * buf, int len)
|
||||||
{
|
{
|
||||||
if (_Browsing)
|
if (_Browsing)
|
||||||
{
|
{
|
||||||
|
if (_IgnoreText)
|
||||||
|
return;
|
||||||
|
|
||||||
// Build a UTF8 string
|
// Build a UTF8 string
|
||||||
string inputString(buf, buf+len);
|
string inputString(buf, buf+len);
|
||||||
// inputString.resize (len);
|
// inputString.resize (len);
|
||||||
|
@ -525,6 +528,11 @@ void CGroupHTML::addLink (uint element_number, uint /* attribute_number */, HTCh
|
||||||
// in ah: command we don't respect the uri standard so the HTAnchor_address doesn't work correctly
|
// in ah: command we don't respect the uri standard so the HTAnchor_address doesn't work correctly
|
||||||
_Link.push_back (suri);
|
_Link.push_back (suri);
|
||||||
}
|
}
|
||||||
|
else if (suri[0] == '#')
|
||||||
|
{
|
||||||
|
// Direct url (hack for lua beginElement)
|
||||||
|
_Link.push_back (suri.substr(1));
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
HTAnchor * dest = HTAnchor_followMainLink((HTAnchor *) anchor);
|
HTAnchor * dest = HTAnchor_followMainLink((HTAnchor *) anchor);
|
||||||
|
@ -839,6 +847,14 @@ void CGroupHTML::beginElement (uint element_number, const BOOL *present, const c
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case HTML_DIV:
|
||||||
|
{
|
||||||
|
if (present[MY_HTML_DIV_NAME] && value[MY_HTML_DIV_NAME])
|
||||||
|
{
|
||||||
|
_DivName = value[MY_HTML_DIV_NAME];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
case HTML_FONT:
|
case HTML_FONT:
|
||||||
{
|
{
|
||||||
bool found = false;
|
bool found = false;
|
||||||
|
@ -1372,6 +1388,9 @@ void CGroupHTML::beginElement (uint element_number, const BOOL *present, const c
|
||||||
_ObjectAction = value[HTML_OBJECT_STANDBY];
|
_ObjectAction = value[HTML_OBJECT_STANDBY];
|
||||||
_Object = true;
|
_Object = true;
|
||||||
|
|
||||||
|
break;
|
||||||
|
case HTML_STYLE:
|
||||||
|
_IgnoreText = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1409,6 +1428,10 @@ void CGroupHTML::endElement (uint element_number)
|
||||||
case HTML_PRE:
|
case HTML_PRE:
|
||||||
popIfNotEmpty (_PRE);
|
popIfNotEmpty (_PRE);
|
||||||
break;
|
break;
|
||||||
|
case HTML_DIV:
|
||||||
|
_DivName = "";
|
||||||
|
break;
|
||||||
|
|
||||||
case HTML_TABLE:
|
case HTML_TABLE:
|
||||||
popIfNotEmpty (_CellParams);
|
popIfNotEmpty (_CellParams);
|
||||||
popIfNotEmpty (_TR);
|
popIfNotEmpty (_TR);
|
||||||
|
@ -1493,6 +1516,9 @@ void CGroupHTML::endElement (uint element_number)
|
||||||
popIfNotEmpty (_UL);
|
popIfNotEmpty (_UL);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case HTML_STYLE:
|
||||||
|
_IgnoreText = false;
|
||||||
|
break;
|
||||||
case HTML_OBJECT:
|
case HTML_OBJECT:
|
||||||
if (_ObjectType=="application/ryzom-data")
|
if (_ObjectType=="application/ryzom-data")
|
||||||
{
|
{
|
||||||
|
@ -1560,6 +1586,7 @@ CGroupHTML::CGroupHTML(const TCtorParam ¶m)
|
||||||
|
|
||||||
// init
|
// init
|
||||||
_ParsingLua = false;
|
_ParsingLua = false;
|
||||||
|
_IgnoreText = false;
|
||||||
_BrowseNextTime = false;
|
_BrowseNextTime = false;
|
||||||
_PostNextTime = false;
|
_PostNextTime = false;
|
||||||
_Browsing = false;
|
_Browsing = false;
|
||||||
|
@ -2506,6 +2533,7 @@ void CGroupHTML::clearContext()
|
||||||
_Cells.clear();
|
_Cells.clear();
|
||||||
_TR.clear();
|
_TR.clear();
|
||||||
_Forms.clear();
|
_Forms.clear();
|
||||||
|
_Groups.clear();
|
||||||
_CellParams.clear();
|
_CellParams.clear();
|
||||||
_Title = false;
|
_Title = false;
|
||||||
_TextArea = false;
|
_TextArea = false;
|
||||||
|
@ -2584,6 +2612,12 @@ void CGroupHTML::addGroup (CInterfaceGroup *group, uint beginSpace)
|
||||||
_Paragraph = NULL;
|
_Paragraph = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!_DivName.empty())
|
||||||
|
{
|
||||||
|
group->setName(_DivName);
|
||||||
|
_Groups.push_back(group);
|
||||||
|
}
|
||||||
|
|
||||||
group->setSizeRef(CInterfaceElement::width);
|
group->setSizeRef(CInterfaceElement::width);
|
||||||
|
|
||||||
// Compute begin space between paragraph and tables
|
// Compute begin space between paragraph and tables
|
||||||
|
@ -3337,6 +3371,171 @@ int CGroupHTML::luaRefresh(CLuaState &ls)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ***************************************************************************
|
||||||
|
int CGroupHTML::luaRemoveContent(CLuaState &ls)
|
||||||
|
{
|
||||||
|
const char *funcName = "refresh";
|
||||||
|
CLuaIHM::checkArgCount(ls, funcName, 0);
|
||||||
|
removeContent();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ***************************************************************************
|
||||||
|
int CGroupHTML::luaInsertText(CLuaState &ls)
|
||||||
|
{
|
||||||
|
const char *funcName = "insertText";
|
||||||
|
CLuaIHM::checkArgCount(ls, funcName, 3);
|
||||||
|
CLuaIHM::checkArgType(ls, funcName, 1, LUA_TSTRING);
|
||||||
|
CLuaIHM::checkArgType(ls, funcName, 2, LUA_TSTRING);
|
||||||
|
CLuaIHM::checkArgType(ls, funcName, 3, LUA_TBOOLEAN);
|
||||||
|
|
||||||
|
string name = ls.toString(1);
|
||||||
|
|
||||||
|
ucstring text;
|
||||||
|
text.fromUtf8(ls.toString(2));
|
||||||
|
|
||||||
|
if (!_Forms.empty()) {
|
||||||
|
for (uint i=0; i<_Forms.back().Entries.size(); i++)
|
||||||
|
{
|
||||||
|
if (_Forms.back().Entries[i].TextArea && _Forms.back().Entries[i].Name == name)
|
||||||
|
{
|
||||||
|
// Get the edit box view
|
||||||
|
CInterfaceGroup *group = _Forms.back().Entries[i].TextArea->getGroup ("eb");
|
||||||
|
if (group)
|
||||||
|
{
|
||||||
|
// Should be a CGroupEditBox
|
||||||
|
CGroupEditBox *editBox = dynamic_cast<CGroupEditBox*>(group);
|
||||||
|
if (editBox)
|
||||||
|
editBox->writeString(text, false, ls.toBoolean(3));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ***************************************************************************
|
||||||
|
int CGroupHTML::luaAddString(CLuaState &ls)
|
||||||
|
{
|
||||||
|
const char *funcName = "addString";
|
||||||
|
CLuaIHM::checkArgCount(ls, funcName, 1);
|
||||||
|
CLuaIHM::checkArgType(ls, funcName, 1, LUA_TSTRING);
|
||||||
|
addString(ucstring(ls.toString(1)));
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ***************************************************************************
|
||||||
|
int CGroupHTML::luaAddImage(CLuaState &ls)
|
||||||
|
{
|
||||||
|
const char *funcName = "addImage";
|
||||||
|
CLuaIHM::checkArgCount(ls, funcName, 2);
|
||||||
|
CLuaIHM::checkArgType(ls, funcName, 1, LUA_TSTRING);
|
||||||
|
CLuaIHM::checkArgType(ls, funcName, 2, LUA_TBOOLEAN);
|
||||||
|
if (!_Paragraph)
|
||||||
|
{
|
||||||
|
newParagraph(0);
|
||||||
|
paragraphChange();
|
||||||
|
}
|
||||||
|
string url = getLink();
|
||||||
|
if (!url.empty()) {
|
||||||
|
string params = "name=" + getId() + "|url=" + getLink ();
|
||||||
|
addButton(CCtrlButton::PushButton, ls.toString(1), ls.toString(1), ls.toString(1),
|
||||||
|
"", ls.toBoolean(2), "browse", params.c_str(), "");
|
||||||
|
} else {
|
||||||
|
addImage(ls.toString(1), ls.toBoolean(2));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ***************************************************************************
|
||||||
|
int CGroupHTML::luaBeginElement(CLuaState &ls)
|
||||||
|
{
|
||||||
|
const char *funcName = "beginElement";
|
||||||
|
CLuaIHM::checkArgCount(ls, funcName, 2);
|
||||||
|
CLuaIHM::checkArgType(ls, funcName, 1, LUA_TNUMBER);
|
||||||
|
CLuaIHM::checkArgType(ls, funcName, 2, LUA_TTABLE);
|
||||||
|
|
||||||
|
uint element_number = (uint)ls.toNumber(1);
|
||||||
|
std::vector<BOOL> present;
|
||||||
|
std::vector<const char *> value;
|
||||||
|
present.resize(30, false);
|
||||||
|
value.resize(30);
|
||||||
|
|
||||||
|
CLuaObject params;
|
||||||
|
params.pop(ls);
|
||||||
|
uint max_idx = 0;
|
||||||
|
|
||||||
|
|
||||||
|
ENUM_LUA_TABLE(params, it)
|
||||||
|
{
|
||||||
|
if (!it.nextKey().isNumber())
|
||||||
|
{
|
||||||
|
nlwarning("%s : bad key encountered with type %s, number expected.", funcName, it.nextKey().getTypename());
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (!it.nextValue().isString())
|
||||||
|
{
|
||||||
|
nlwarning("%s : bad value encountered with type %s for key %s, string expected.", funcName, it.nextValue().getTypename(), it.nextKey().toString().c_str());
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
uint idx = (uint)it.nextKey().toNumber();
|
||||||
|
|
||||||
|
present.insert(present.begin() + (uint)it.nextKey().toNumber(), true);
|
||||||
|
|
||||||
|
string str = it.nextValue().toString();
|
||||||
|
size_t size = str.size() + 1;
|
||||||
|
char * buffer = new char[ size ];
|
||||||
|
strncpy(buffer, str.c_str(), size );
|
||||||
|
|
||||||
|
value.insert(value.begin() + (uint)it.nextKey().toNumber(), buffer);
|
||||||
|
}
|
||||||
|
|
||||||
|
beginElement(element_number, &present[0], &value[0]);
|
||||||
|
if (element_number == HTML_A)
|
||||||
|
addLink(element_number, 0, NULL, &present[0], &value[0]);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ***************************************************************************
|
||||||
|
int CGroupHTML::luaEndElement(CLuaState &ls)
|
||||||
|
{
|
||||||
|
const char *funcName = "endElement";
|
||||||
|
CLuaIHM::checkArgCount(ls, funcName, 1);
|
||||||
|
CLuaIHM::checkArgType(ls, funcName, 1, LUA_TNUMBER);
|
||||||
|
|
||||||
|
uint element_number = (uint)ls.toNumber(1);
|
||||||
|
endElement(element_number);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ***************************************************************************
|
||||||
|
int CGroupHTML::luaShowDiv(CLuaState &ls)
|
||||||
|
{
|
||||||
|
const char *funcName = "showDiv";
|
||||||
|
CLuaIHM::checkArgCount(ls, funcName, 2);
|
||||||
|
CLuaIHM::checkArgType(ls, funcName, 1, LUA_TSTRING);
|
||||||
|
CLuaIHM::checkArgType(ls, funcName, 2, LUA_TBOOLEAN);
|
||||||
|
|
||||||
|
if (!_Groups.empty()) {
|
||||||
|
for (uint i=0; i<_Groups.size(); i++)
|
||||||
|
{
|
||||||
|
CInterfaceGroup *group = _Groups[i];
|
||||||
|
if (group->getName() == ls.toString(1))
|
||||||
|
{
|
||||||
|
group->setActive(ls.toBoolean(2));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
void CGroupHTML::setURL(const std::string &url)
|
void CGroupHTML::setURL(const std::string &url)
|
||||||
{
|
{
|
||||||
|
|
|
@ -165,10 +165,24 @@ public:
|
||||||
|
|
||||||
int luaBrowse(CLuaState &ls);
|
int luaBrowse(CLuaState &ls);
|
||||||
int luaRefresh(CLuaState &ls);
|
int luaRefresh(CLuaState &ls);
|
||||||
|
int luaRemoveContent(CLuaState &ls);
|
||||||
|
int luaInsertText(CLuaState &ls);
|
||||||
|
int luaAddString(CLuaState &ls);
|
||||||
|
int luaAddImage(CLuaState &ls);
|
||||||
|
int luaBeginElement(CLuaState &ls);
|
||||||
|
int luaEndElement(CLuaState &ls);
|
||||||
|
int luaShowDiv(CLuaState &ls);
|
||||||
|
|
||||||
REFLECT_EXPORT_START(CGroupHTML, CGroupScrollText)
|
REFLECT_EXPORT_START(CGroupHTML, CGroupScrollText)
|
||||||
REFLECT_LUA_METHOD("browse", luaBrowse)
|
REFLECT_LUA_METHOD("browse", luaBrowse)
|
||||||
REFLECT_LUA_METHOD("refresh", luaRefresh)
|
REFLECT_LUA_METHOD("refresh", luaRefresh)
|
||||||
|
REFLECT_LUA_METHOD("removeContent", luaRemoveContent)
|
||||||
|
REFLECT_LUA_METHOD("insertText", luaInsertText)
|
||||||
|
REFLECT_LUA_METHOD("addString", luaAddString)
|
||||||
|
REFLECT_LUA_METHOD("addImage", luaAddImage)
|
||||||
|
REFLECT_LUA_METHOD("beginElement", luaBeginElement)
|
||||||
|
REFLECT_LUA_METHOD("endElement", luaEndElement)
|
||||||
|
REFLECT_LUA_METHOD("showDiv", luaShowDiv)
|
||||||
REFLECT_STRING("url", getURL, setURL)
|
REFLECT_STRING("url", getURL, setURL)
|
||||||
REFLECT_FLOAT("timeout", getTimeout, setTimeout)
|
REFLECT_FLOAT("timeout", getTimeout, setTimeout)
|
||||||
REFLECT_EXPORT_END
|
REFLECT_EXPORT_END
|
||||||
|
@ -290,6 +304,7 @@ protected :
|
||||||
// element has been found
|
// element has been found
|
||||||
// True when the <lua> element has been encountered
|
// True when the <lua> element has been encountered
|
||||||
bool _ParsingLua;
|
bool _ParsingLua;
|
||||||
|
bool _IgnoreText;
|
||||||
// the script to execute
|
// the script to execute
|
||||||
std::string _LuaScript;
|
std::string _LuaScript;
|
||||||
|
|
||||||
|
@ -303,6 +318,7 @@ protected :
|
||||||
class CLibWWWData *_LibWWW;
|
class CLibWWWData *_LibWWW;
|
||||||
|
|
||||||
// Current paragraph
|
// Current paragraph
|
||||||
|
std::string _DivName;
|
||||||
CGroupParagraph* _Paragraph;
|
CGroupParagraph* _Paragraph;
|
||||||
inline CGroupParagraph *getParagraph()
|
inline CGroupParagraph *getParagraph()
|
||||||
{
|
{
|
||||||
|
@ -442,6 +458,7 @@ protected :
|
||||||
std::vector<CEntry> Entries;
|
std::vector<CEntry> Entries;
|
||||||
};
|
};
|
||||||
std::vector<CForm> _Forms;
|
std::vector<CForm> _Forms;
|
||||||
|
std::vector<CInterfaceGroup *> _Groups;
|
||||||
|
|
||||||
// Cells parameters
|
// Cells parameters
|
||||||
class CCellParams
|
class CCellParams
|
||||||
|
|
|
@ -278,8 +278,11 @@ void CGroupQuickHelp::browse (const char *url)
|
||||||
_IsQuickHelp = false;
|
_IsQuickHelp = false;
|
||||||
|
|
||||||
string completeURL = url;
|
string completeURL = url;
|
||||||
|
if (completeURL.substr(completeURL.size()-5, 5) == ".html")
|
||||||
|
{
|
||||||
completeURL = completeURL.substr(0, completeURL.size()-5); // Substract the ".html"
|
completeURL = completeURL.substr(0, completeURL.size()-5); // Substract the ".html"
|
||||||
completeURL += "_" + ClientCfg.getHtmlLanguageCode() + ".html";
|
completeURL += "_" + ClientCfg.getHtmlLanguageCode() + ".html";
|
||||||
|
}
|
||||||
|
|
||||||
CGroupHTML::browse (completeURL.c_str());
|
CGroupHTML::browse (completeURL.c_str());
|
||||||
}
|
}
|
||||||
|
|
|
@ -250,6 +250,9 @@ public:
|
||||||
/// Accessors : SET
|
/// Accessors : SET
|
||||||
void setId (const std::string &newID) { _Id = newID; }
|
void setId (const std::string &newID) { _Id = newID; }
|
||||||
|
|
||||||
|
inline void setName(const std::string &name) { _Name = name; }
|
||||||
|
inline const std::string& getName() { return _Name; }
|
||||||
|
|
||||||
virtual void setIdRecurse(const std::string &newID);
|
virtual void setIdRecurse(const std::string &newID);
|
||||||
|
|
||||||
void setParent (CInterfaceGroup *pIG) { _Parent = pIG; }
|
void setParent (CInterfaceGroup *pIG) { _Parent = pIG; }
|
||||||
|
@ -510,6 +513,8 @@ protected:
|
||||||
///the id of the element
|
///the id of the element
|
||||||
std::string _Id;
|
std::string _Id;
|
||||||
|
|
||||||
|
std::string _Name;
|
||||||
|
|
||||||
///is the element active?
|
///is the element active?
|
||||||
bool _Active;
|
bool _Active;
|
||||||
|
|
||||||
|
|
|
@ -524,12 +524,12 @@ void CInterfaceManager::initOutGame()
|
||||||
ActionsContext.addActionsManager(&Actions, "");
|
ActionsContext.addActionsManager(&Actions, "");
|
||||||
ActionsContext.addActionsManager(&EditActions, RZ_CATEGORY_EDIT);
|
ActionsContext.addActionsManager(&EditActions, RZ_CATEGORY_EDIT);
|
||||||
|
|
||||||
|
|
||||||
if (ClientCfg.SelectCharacter != -1) return;
|
|
||||||
|
|
||||||
// Init LUA Scripting
|
// Init LUA Scripting
|
||||||
initLUA();
|
initLUA();
|
||||||
|
|
||||||
|
if (ClientCfg.SelectCharacter != -1)
|
||||||
|
return;
|
||||||
|
|
||||||
{
|
{
|
||||||
if (SoundMngr != NULL)
|
if (SoundMngr != NULL)
|
||||||
{
|
{
|
||||||
|
|
|
@ -113,6 +113,33 @@ void CItemConsumableEffectHelper::getItemConsumableEffectText(const CItemSheet *
|
||||||
effects += "\n";
|
effects += "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( name == "SP_LIFE_AURA2" )
|
||||||
|
{
|
||||||
|
|
||||||
|
uint16 regenMod;
|
||||||
|
fromString(params[0].c_str(), regenMod);
|
||||||
|
uint32 bonus = regenMod * itemQuality;
|
||||||
|
uint32 duration;
|
||||||
|
fromString(params[1].c_str(), duration);
|
||||||
|
uint32 radius;
|
||||||
|
fromString(params[2].c_str(), radius);
|
||||||
|
uint32 targetDisableTime;
|
||||||
|
fromString(params[3].c_str(), targetDisableTime);
|
||||||
|
uint32 userDisableTime;
|
||||||
|
fromString(params[4].c_str(), userDisableTime);
|
||||||
|
|
||||||
|
ucstring result = CI18N::get("uiItemConsumableEffectLifeAura");
|
||||||
|
strFindReplace(result, "%modifier", toString(bonus));
|
||||||
|
strFindReplace(result, "%minutes", toString(duration/60));
|
||||||
|
strFindReplace(result, "%secondes", toString(duration%60));
|
||||||
|
strFindReplace(result, "%radius", toString(radius));
|
||||||
|
strFindReplace(result, "%targetDisableTime", toString(targetDisableTime));
|
||||||
|
strFindReplace(result, "%userDisableTime", toString(userDisableTime));
|
||||||
|
|
||||||
|
effects += result;
|
||||||
|
effects += "\n";
|
||||||
|
}
|
||||||
|
|
||||||
if ( name == "SP_STAMINA_AURA" )
|
if ( name == "SP_STAMINA_AURA" )
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -139,6 +166,34 @@ void CItemConsumableEffectHelper::getItemConsumableEffectText(const CItemSheet *
|
||||||
effects += "\n";
|
effects += "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if ( name == "SP_STAMINA_AURA2" )
|
||||||
|
{
|
||||||
|
|
||||||
|
uint16 regenMod;
|
||||||
|
fromString(params[0].c_str(), regenMod);
|
||||||
|
uint32 bonus = regenMod * itemQuality;
|
||||||
|
uint32 duration;
|
||||||
|
fromString(params[1].c_str(), duration);
|
||||||
|
uint32 radius;
|
||||||
|
fromString(params[2].c_str(), radius);
|
||||||
|
uint32 targetDisableTime;
|
||||||
|
fromString(params[3].c_str(), targetDisableTime);
|
||||||
|
uint32 userDisableTime;
|
||||||
|
fromString(params[4].c_str(), userDisableTime);
|
||||||
|
|
||||||
|
ucstring result = CI18N::get("uiItemConsumableEffectStaminaAura");
|
||||||
|
strFindReplace(result, "%modifier", toString(regenMod));
|
||||||
|
strFindReplace(result, "%minutes", toString(duration/60));
|
||||||
|
strFindReplace(result, "%secondes", toString(duration%60));
|
||||||
|
strFindReplace(result, "%radius", toString(radius));
|
||||||
|
strFindReplace(result, "%targetDisableTime", toString(targetDisableTime));
|
||||||
|
strFindReplace(result, "%userDisableTime", toString(userDisableTime));
|
||||||
|
|
||||||
|
effects += result;
|
||||||
|
effects += "\n";
|
||||||
|
}
|
||||||
|
|
||||||
if ( name == "SP_SAP_AURA" )
|
if ( name == "SP_SAP_AURA" )
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -165,6 +220,33 @@ void CItemConsumableEffectHelper::getItemConsumableEffectText(const CItemSheet *
|
||||||
effects += "\n";
|
effects += "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( name == "SP_SAP_AURA2" )
|
||||||
|
{
|
||||||
|
|
||||||
|
uint16 regenMod;
|
||||||
|
fromString(params[0].c_str(), regenMod);
|
||||||
|
uint32 bonus = regenMod * itemQuality;
|
||||||
|
uint32 duration;
|
||||||
|
fromString(params[1].c_str(), duration);
|
||||||
|
uint32 radius;
|
||||||
|
fromString(params[2].c_str(), radius);
|
||||||
|
uint32 targetDisableTime;
|
||||||
|
fromString(params[3].c_str(), targetDisableTime);
|
||||||
|
uint32 userDisableTime;
|
||||||
|
fromString(params[4].c_str(), userDisableTime);
|
||||||
|
|
||||||
|
ucstring result = CI18N::get("uiItemConsumableEffectSapAura");
|
||||||
|
strFindReplace(result, "%modifier", toString(bonus));
|
||||||
|
strFindReplace(result, "%minutes", toString(duration/60));
|
||||||
|
strFindReplace(result, "%secondes", toString(duration%60));
|
||||||
|
strFindReplace(result, "%radius", toString(radius));
|
||||||
|
strFindReplace(result, "%targetDisableTime", toString(targetDisableTime));
|
||||||
|
strFindReplace(result, "%userDisableTime", toString(userDisableTime));
|
||||||
|
|
||||||
|
effects += result;
|
||||||
|
effects += "\n";
|
||||||
|
}
|
||||||
|
|
||||||
// skill modifier consumables
|
// skill modifier consumables
|
||||||
//---------------------------
|
//---------------------------
|
||||||
ucstring result("");
|
ucstring result("");
|
||||||
|
|
|
@ -115,6 +115,7 @@
|
||||||
#include "game_share/scenario_entry_points.h"
|
#include "game_share/scenario_entry_points.h"
|
||||||
#include "game_share/bg_downloader_msg.h"
|
#include "game_share/bg_downloader_msg.h"
|
||||||
#include "game_share/constants.h"
|
#include "game_share/constants.h"
|
||||||
|
#include "game_share/visual_slot_manager.h"
|
||||||
|
|
||||||
#ifdef LUA_NEVRAX_VERSION
|
#ifdef LUA_NEVRAX_VERSION
|
||||||
#include "lua_ide_dll_nevrax/include/lua_ide_dll/ide_interface.h" // external debugger
|
#include "lua_ide_dll_nevrax/include/lua_ide_dll/ide_interface.h" // external debugger
|
||||||
|
@ -1368,6 +1369,8 @@ void CLuaIHM::registerIHM(CLuaState &ls)
|
||||||
ls.registerFunc("isPlayerNewbie", isPlayerNewbie);
|
ls.registerFunc("isPlayerNewbie", isPlayerNewbie);
|
||||||
ls.registerFunc("isInRingMode", isInRingMode);
|
ls.registerFunc("isInRingMode", isInRingMode);
|
||||||
ls.registerFunc("getUserRace", getUserRace);
|
ls.registerFunc("getUserRace", getUserRace);
|
||||||
|
ls.registerFunc("getSheet2idx", getSheet2idx);
|
||||||
|
|
||||||
// Through LUABind API
|
// Through LUABind API
|
||||||
lua_State *L= ls.getStatePointer();
|
lua_State *L= ls.getStatePointer();
|
||||||
|
|
||||||
|
@ -4412,3 +4415,25 @@ int CLuaIHM::getUserRace(CLuaState &ls)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ***************************************************************************
|
||||||
|
int CLuaIHM::getSheet2idx(CLuaState &ls)
|
||||||
|
{
|
||||||
|
CLuaIHM::checkArgCount(ls, "getSheet2idx", 2);
|
||||||
|
CLuaIHM::checkArgType(ls, "getSheet2idx", 1, LUA_TSTRING);
|
||||||
|
CLuaIHM::checkArgType(ls, "getSheet2idx", 2, LUA_TNUMBER);
|
||||||
|
|
||||||
|
const std::string & sheedtName = ls.toString(1);
|
||||||
|
uint32 slotId = (uint32)ls.toNumber(2);
|
||||||
|
|
||||||
|
NLMISC::CSheetId sheetId;
|
||||||
|
|
||||||
|
if (sheetId.buildSheetId(sheedtName))
|
||||||
|
{
|
||||||
|
uint32 idx = CVisualSlotManager::getInstance()->sheet2Index(sheetId, (SLOTTYPE::EVisualSlot)slotId);
|
||||||
|
ls.push((lua_Number)idx);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return 0;
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -351,6 +351,7 @@ private:
|
||||||
static int isPlayerNewbie(CLuaState &ls);
|
static int isPlayerNewbie(CLuaState &ls);
|
||||||
static int isInRingMode(CLuaState &ls);
|
static int isInRingMode(CLuaState &ls);
|
||||||
static int getUserRace(CLuaState &ls);
|
static int getUserRace(CLuaState &ls);
|
||||||
|
static int getSheet2idx(CLuaState &ls);
|
||||||
|
|
||||||
|
|
||||||
// LUA functions exported for Dev only (debug)
|
// LUA functions exported for Dev only (debug)
|
||||||
|
|
|
@ -999,7 +999,7 @@ class CHandlerChatGroupFilter : public IActionHandler
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
rCTF.setTargetGroup(PeopleInterraction.TheUserChat.Filter.getTargetGroup());
|
rCTF.setTargetGroup(PeopleInterraction.TheUserChat.Filter.getTargetGroup(), PeopleInterraction.TheUserChat.Filter.getTargetDynamicChannelDbIndex());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1813,8 +1813,6 @@ void CPeopleInterraction::setupUserChatFromSummary(const CFilteredChatSummary &s
|
||||||
//=================================================================================================================
|
//=================================================================================================================
|
||||||
void CPeopleInterraction::setupUserDynChatFromSummary(const CFilteredDynChatSummary &summary, CFilteredChat &dest)
|
void CPeopleInterraction::setupUserDynChatFromSummary(const CFilteredDynChatSummary &summary, CFilteredChat &dest)
|
||||||
{
|
{
|
||||||
// User Dest
|
|
||||||
dest.Filter.setTargetGroup(summary.Target, 0, false);
|
|
||||||
// src
|
// src
|
||||||
for (uint8 i = 0; i < CChatGroup::MaxDynChanPerPlayer; i++)
|
for (uint8 i = 0; i < CChatGroup::MaxDynChanPerPlayer; i++)
|
||||||
{
|
{
|
||||||
|
@ -2666,12 +2664,12 @@ class CHandlerChatTargetSelected : public IActionHandler
|
||||||
// Case of user chat in grouped chat window
|
// Case of user chat in grouped chat window
|
||||||
if (cw == PeopleInterraction.ChatGroup.Window)
|
if (cw == PeopleInterraction.ChatGroup.Window)
|
||||||
{
|
{
|
||||||
PeopleInterraction.TheUserChat.Filter.setTargetGroup(cf.getTargetGroup());
|
PeopleInterraction.TheUserChat.Filter.setTargetGroup(cf.getTargetGroup(), cf.getTargetDynamicChannelDbIndex());
|
||||||
CInterfaceManager::getInstance()->runActionHandler("chat_group_filter", NULL, "user");
|
CInterfaceManager::getInstance()->runActionHandler("chat_group_filter", NULL, "user");
|
||||||
}
|
}
|
||||||
if (cw == PeopleInterraction.TheUserChat.Window)
|
if (cw == PeopleInterraction.TheUserChat.Window)
|
||||||
{
|
{
|
||||||
PeopleInterraction.TheUserChat.Filter.setTargetGroup(cf.getTargetGroup());
|
PeopleInterraction.TheUserChat.Filter.setTargetGroup(cf.getTargetGroup(), cf.getTargetDynamicChannelDbIndex());
|
||||||
CInterfaceManager::getInstance()->runActionHandler("user_chat_active", NULL, "");
|
CInterfaceManager::getInstance()->runActionHandler("user_chat_active", NULL, "");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -441,7 +441,7 @@ void CPeopleList::setContactId(uint index, uint32 contactId)
|
||||||
}
|
}
|
||||||
|
|
||||||
//==================================================================
|
//==================================================================
|
||||||
void CPeopleList::displayLocalPlayerTell(uint index,const ucstring &msg,uint numBlinks /*=0*/)
|
void CPeopleList::displayLocalPlayerTell(const ucstring &receiver, uint index, const ucstring &msg,uint numBlinks /*=0*/)
|
||||||
{
|
{
|
||||||
if (_ContactType == CPeopleListDesc::Ignore)
|
if (_ContactType == CPeopleListDesc::Ignore)
|
||||||
{
|
{
|
||||||
|
@ -475,7 +475,12 @@ void CPeopleList::displayLocalPlayerTell(uint index,const ucstring &msg,uint num
|
||||||
// display msg with good color
|
// display msg with good color
|
||||||
CInterfaceProperty prop;
|
CInterfaceProperty prop;
|
||||||
prop.readRGBA("UI:SAVE:CHAT:COLORS:TELL"," ");
|
prop.readRGBA("UI:SAVE:CHAT:COLORS:TELL"," ");
|
||||||
|
|
||||||
|
ucstring s = CI18N::get("youTellPlayer");
|
||||||
|
strFindReplace(s, "%name", receiver);
|
||||||
|
strFindReplace(finalMsg, CI18N::get("youTell"), s);
|
||||||
gl->addChild(getChatTextMngr().createMsgText(finalMsg, prop.getRGBA()));
|
gl->addChild(getChatTextMngr().createMsgText(finalMsg, prop.getRGBA()));
|
||||||
|
CInterfaceManager::getInstance()->log(finalMsg);
|
||||||
|
|
||||||
// if the group is closed, make it blink
|
// if the group is closed, make it blink
|
||||||
if (!gc->isOpen())
|
if (!gc->isOpen())
|
||||||
|
@ -924,7 +929,7 @@ class CHandlerContactEntry : public IActionHandler
|
||||||
uint index;
|
uint index;
|
||||||
if (PeopleInterraction.getPeopleFromContainerID(str, peopleList, index))
|
if (PeopleInterraction.getPeopleFromContainerID(str, peopleList, index))
|
||||||
{
|
{
|
||||||
peopleList->displayLocalPlayerTell(index, text);
|
peopleList->displayLocalPlayerTell(str2, index, text);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -948,6 +953,11 @@ class CHandlerContactEntry : public IActionHandler
|
||||||
CChatWindow::encodeColorTag(prop.getRGBA(), final, true);
|
CChatWindow::encodeColorTag(prop.getRGBA(), final, true);
|
||||||
final += text;
|
final += text;
|
||||||
pWin->displayTellMessage(final, prop.getRGBA(), pWin->getFreeTellerName(str));
|
pWin->displayTellMessage(final, prop.getRGBA(), pWin->getFreeTellerName(str));
|
||||||
|
|
||||||
|
ucstring s = CI18N::get("youTellPlayer");
|
||||||
|
strFindReplace(s, "%name", pWin->getFreeTellerName(str));
|
||||||
|
strFindReplace(final, CI18N::get("youTell"), s);
|
||||||
|
CInterfaceManager::getInstance()->log(final);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -111,7 +111,7 @@ public:
|
||||||
* If the window is closed, it causes it to blink (and also the parent window)
|
* If the window is closed, it causes it to blink (and also the parent window)
|
||||||
*/
|
*/
|
||||||
void displayMessage(uint index, const ucstring &msg, NLMISC::CRGBA col, uint numBlinks = 0);
|
void displayMessage(uint index, const ucstring &msg, NLMISC::CRGBA col, uint numBlinks = 0);
|
||||||
void displayLocalPlayerTell(uint index, const ucstring &msg, uint numBlinks = 0);
|
void displayLocalPlayerTell(const ucstring &receiver, uint index, const ucstring &msg, uint numBlinks = 0);
|
||||||
// Is the given people window visible ?
|
// Is the given people window visible ?
|
||||||
bool isPeopleChatVisible(uint index) const;
|
bool isPeopleChatVisible(uint index) const;
|
||||||
// reset remove everything from the interface
|
// reset remove everything from the interface
|
||||||
|
|
|
@ -57,6 +57,7 @@ const std::string PhraseMemoryViewNextAction= "ui:interface:gestionsets:shortcu
|
||||||
const std::string PhraseMemoryViewCycleAction= "ui:interface:gestionsets:shortcuts:view_cycle_action";
|
const std::string PhraseMemoryViewCycleAction= "ui:interface:gestionsets:shortcuts:view_cycle_action";
|
||||||
const std::string PhraseMemoryViewSlotBase= "ui:interface:gestionsets:shortcuts:s";
|
const std::string PhraseMemoryViewSlotBase= "ui:interface:gestionsets:shortcuts:s";
|
||||||
const std::string PhraseMemoryCtrlBase= "ui:interface:gestionsets:shortcuts:s";
|
const std::string PhraseMemoryCtrlBase= "ui:interface:gestionsets:shortcuts:s";
|
||||||
|
const std::string PhraseMemoryAltCtrlBase= "ui:interface:gestionsets2:header_closed:shortcuts:s";
|
||||||
|
|
||||||
const std::string PhraseMemoryPhraseMenu= "ui:interface:cm_memory_phrase";
|
const std::string PhraseMemoryPhraseMenu= "ui:interface:cm_memory_phrase";
|
||||||
const std::string PhraseMemoryPhraseAction= "cast_phrase_or_create_new";
|
const std::string PhraseMemoryPhraseAction= "cast_phrase_or_create_new";
|
||||||
|
@ -118,11 +119,16 @@ void CSPhraseManager::initInGame()
|
||||||
_BookDbLeaves[i]= node;
|
_BookDbLeaves[i]= node;
|
||||||
}
|
}
|
||||||
_MemoryDbLeaves.resize(PHRASE_MAX_MEMORY_SLOT, NULL);
|
_MemoryDbLeaves.resize(PHRASE_MAX_MEMORY_SLOT, NULL);
|
||||||
|
_MemoryAltDbLeaves.resize(PHRASE_MAX_MEMORY_SLOT, NULL);
|
||||||
|
|
||||||
for(i=0;i<PHRASE_MAX_MEMORY_SLOT;i++)
|
for(i=0;i<PHRASE_MAX_MEMORY_SLOT;i++)
|
||||||
{
|
{
|
||||||
CCDBNodeLeaf *node= pIM->getDbProp(PHRASE_DB_MEMORY + ":" + toString(i) + ":PHRASE");
|
CCDBNodeLeaf *node= pIM->getDbProp(PHRASE_DB_MEMORY + ":" + toString(i) + ":PHRASE");
|
||||||
node->setValue32(0);
|
node->setValue32(0);
|
||||||
_MemoryDbLeaves[i]= node;
|
_MemoryDbLeaves[i]= node;
|
||||||
|
CCDBNodeLeaf *node_alt= pIM->getDbProp(PHRASE_DB_MEMORY_ALT + ":" + toString(i) + ":PHRASE");
|
||||||
|
node_alt->setValue32(0);
|
||||||
|
_MemoryAltDbLeaves[i]= node_alt;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Progression Db leaves
|
// Progression Db leaves
|
||||||
|
@ -497,6 +503,7 @@ void CSPhraseManager::updateMemoryDBAll()
|
||||||
for(uint i=0;i<PHRASE_MAX_MEMORY_SLOT;i++)
|
for(uint i=0;i<PHRASE_MAX_MEMORY_SLOT;i++)
|
||||||
{
|
{
|
||||||
_MemoryDbLeaves[i]->setValue32(0);
|
_MemoryDbLeaves[i]->setValue32(0);
|
||||||
|
_MemoryAltDbLeaves[i]->setValue32(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -508,6 +515,12 @@ void CSPhraseManager::updateMemoryDBAll()
|
||||||
_MemoryDbLeaves[i]->setValue32(0);
|
_MemoryDbLeaves[i]->setValue32(0);
|
||||||
else
|
else
|
||||||
_MemoryDbLeaves[i]->setValue32(slot.Id);
|
_MemoryDbLeaves[i]->setValue32(slot.Id);
|
||||||
|
|
||||||
|
CMemorySlot &slotAlt= _Memories[0].Slot[i];
|
||||||
|
if(!slotAlt.isPhrase())
|
||||||
|
_MemoryAltDbLeaves[i]->setValue32(0);
|
||||||
|
else
|
||||||
|
_MemoryAltDbLeaves[i]->setValue32(slotAlt.Id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -530,6 +543,15 @@ void CSPhraseManager::updateMemoryDBSlot(uint32 memorySlot)
|
||||||
else
|
else
|
||||||
_MemoryDbLeaves[memorySlot]->setValue32(slot.Id);
|
_MemoryDbLeaves[memorySlot]->setValue32(slot.Id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (_SelectedMemoryDB == 0)
|
||||||
|
{
|
||||||
|
CMemorySlot &slotAlt= _Memories[0].Slot[memorySlot];
|
||||||
|
if(!slotAlt.isPhrase())
|
||||||
|
_MemoryAltDbLeaves[memorySlot]->setValue32(0);
|
||||||
|
else
|
||||||
|
_MemoryAltDbLeaves[memorySlot]->setValue32(slotAlt.Id);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
|
@ -873,6 +895,7 @@ void CSPhraseManager::reset()
|
||||||
_LastProgressionNumDbFill[i]= 0;
|
_LastProgressionNumDbFill[i]= 0;
|
||||||
}
|
}
|
||||||
_MemoryDbLeaves.clear();
|
_MemoryDbLeaves.clear();
|
||||||
|
_MemoryAltDbLeaves.clear();
|
||||||
_NextExecuteLeaf= NULL;
|
_NextExecuteLeaf= NULL;
|
||||||
_NextExecuteIsCyclicLeaf= NULL;
|
_NextExecuteIsCyclicLeaf= NULL;
|
||||||
|
|
||||||
|
@ -2645,7 +2668,13 @@ static sint getRightHandEnchantValue()
|
||||||
void CSPhraseManager::updateMemoryCtrlRegenTickRange(uint memorySlot, CDBCtrlSheet *ctrl)
|
void CSPhraseManager::updateMemoryCtrlRegenTickRange(uint memorySlot, CDBCtrlSheet *ctrl)
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
uint memoryLine= getSelectedMemoryLineDB();
|
sint32 memoryLine;
|
||||||
|
if (ctrl->isShortCut())
|
||||||
|
memoryLine = getSelectedMemoryLineDB();
|
||||||
|
else
|
||||||
|
memoryLine = 0;
|
||||||
|
if (memoryLine < 0)
|
||||||
|
return;
|
||||||
sint32 phraseId= getMemorizedPhrase(memoryLine, memorySlot);
|
sint32 phraseId= getMemorizedPhrase(memoryLine, memorySlot);
|
||||||
//
|
//
|
||||||
if(phraseId)
|
if(phraseId)
|
||||||
|
@ -2780,8 +2809,12 @@ void CSPhraseManager::updateMemoryCtrlState(uint memorySlot, CDBCtrlSheet *ctrl,
|
||||||
CSBrickManager *pBM = CSBrickManager::getInstance();
|
CSBrickManager *pBM = CSBrickManager::getInstance();
|
||||||
CSkillManager *pSM = CSkillManager::getInstance();
|
CSkillManager *pSM = CSkillManager::getInstance();
|
||||||
|
|
||||||
|
uint memoryLine;
|
||||||
// get the slot info
|
// get the slot info
|
||||||
uint memoryLine= getSelectedMemoryLineDB();
|
if (ctrl->isShortCut()) // No memoryLine defined
|
||||||
|
memoryLine= getSelectedMemoryLineDB();
|
||||||
|
else
|
||||||
|
memoryLine= 0;
|
||||||
bool newIsMacro= isMemorizedMacro(memoryLine, memorySlot);
|
bool newIsMacro= isMemorizedMacro(memoryLine, memorySlot);
|
||||||
sint32 macroId= getMemorizedMacro(memoryLine, memorySlot);
|
sint32 macroId= getMemorizedMacro(memoryLine, memorySlot);
|
||||||
sint32 phraseId= getMemorizedPhrase(memoryLine, memorySlot);
|
sint32 phraseId= getMemorizedPhrase(memoryLine, memorySlot);
|
||||||
|
@ -3004,6 +3037,9 @@ void CSPhraseManager::updateAllMemoryCtrlState()
|
||||||
// update the valid state.
|
// update the valid state.
|
||||||
updateMemoryCtrlState(i, ctrl, itemSkill);
|
updateMemoryCtrlState(i, ctrl, itemSkill);
|
||||||
}
|
}
|
||||||
|
CDBCtrlSheet *ctrlAlt= dynamic_cast<CDBCtrlSheet*>(pIM->getElementFromId(PhraseMemoryAltCtrlBase + toString(i)) );
|
||||||
|
if(ctrlAlt)
|
||||||
|
updateMemoryCtrlState(i, ctrlAlt, itemSkill);
|
||||||
}
|
}
|
||||||
TTicks endTime = CTime::getPerformanceTime();
|
TTicks endTime = CTime::getPerformanceTime();
|
||||||
//nldebug("***** %d ms for CSPhraseManager::updateAllMemoryCtrlState", (int) (1000 * CTime::ticksToSecond(endTime - startTime)));
|
//nldebug("***** %d ms for CSPhraseManager::updateAllMemoryCtrlState", (int) (1000 * CTime::ticksToSecond(endTime - startTime)));
|
||||||
|
@ -3030,26 +3066,49 @@ CDBCtrlSheet *CSPhraseManager::getMemorySlotCtrl(uint memorySlot)
|
||||||
return dynamic_cast<CDBCtrlSheet*>(pIM->getElementFromId(PhraseMemoryCtrlBase + toString(memorySlot)));
|
return dynamic_cast<CDBCtrlSheet*>(pIM->getElementFromId(PhraseMemoryCtrlBase + toString(memorySlot)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ***************************************************************************
|
||||||
|
CDBCtrlSheet *CSPhraseManager::getMemoryAltSlotCtrl(uint memorySlot)
|
||||||
|
{
|
||||||
|
if(memorySlot>=PHRASE_MAX_MEMORY_SLOT)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
// Get the ctrl
|
||||||
|
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
||||||
|
return dynamic_cast<CDBCtrlSheet*>(pIM->getElementFromId(PhraseMemoryAltCtrlBase + toString(memorySlot)));
|
||||||
|
}
|
||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
void CSPhraseManager::updateMemoryCtrlState(uint memorySlot)
|
void CSPhraseManager::updateMemoryCtrlState(uint memorySlot)
|
||||||
{
|
{
|
||||||
CDBCtrlSheet *ctrl= getMemorySlotCtrl(memorySlot);
|
CDBCtrlSheet *ctrl= getMemorySlotCtrl(memorySlot);
|
||||||
|
CDBCtrlSheet *ctrlAlt= getMemoryAltSlotCtrl(memorySlot);
|
||||||
if(ctrl)
|
if(ctrl)
|
||||||
{
|
{
|
||||||
// update the valid state.
|
// update the valid state.
|
||||||
updateMemoryCtrlState(memorySlot, ctrl, getRightHandItemSkill());
|
updateMemoryCtrlState(memorySlot, ctrl, getRightHandItemSkill());
|
||||||
}
|
}
|
||||||
|
if(ctrlAlt)
|
||||||
|
{
|
||||||
|
// update the valid state.
|
||||||
|
updateMemoryCtrlState(memorySlot, ctrlAlt, getRightHandItemSkill());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
void CSPhraseManager::updateMemoryCtrlRegenTickRange(uint memorySlot)
|
void CSPhraseManager::updateMemoryCtrlRegenTickRange(uint memorySlot)
|
||||||
{
|
{
|
||||||
CDBCtrlSheet *ctrl= getMemorySlotCtrl(memorySlot);
|
CDBCtrlSheet *ctrl= getMemorySlotCtrl(memorySlot);
|
||||||
|
CDBCtrlSheet *ctrlAlt= getMemoryAltSlotCtrl(memorySlot);
|
||||||
if(ctrl)
|
if(ctrl)
|
||||||
{
|
{
|
||||||
// update the valid state.
|
// update the valid state.
|
||||||
updateMemoryCtrlRegenTickRange(memorySlot, ctrl);
|
updateMemoryCtrlRegenTickRange(memorySlot, ctrl);
|
||||||
}
|
}
|
||||||
|
if(ctrlAlt)
|
||||||
|
{
|
||||||
|
// update the valid state.
|
||||||
|
updateMemoryCtrlRegenTickRange(memorySlot, ctrlAlt);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
|
|
|
@ -34,6 +34,7 @@
|
||||||
const std::string PHRASE_DB_BOOK="UI:PHRASE:BOOK";
|
const std::string PHRASE_DB_BOOK="UI:PHRASE:BOOK";
|
||||||
const std::string PHRASE_DB_PROGRESSION[2]= {"UI:PHRASE:PROGRESS_ACTIONS", "UI:PHRASE:PROGRESS_UPGRADES"};
|
const std::string PHRASE_DB_PROGRESSION[2]= {"UI:PHRASE:PROGRESS_ACTIONS", "UI:PHRASE:PROGRESS_UPGRADES"};
|
||||||
const std::string PHRASE_DB_MEMORY="UI:PHRASE:MEMORY";
|
const std::string PHRASE_DB_MEMORY="UI:PHRASE:MEMORY";
|
||||||
|
const std::string PHRASE_DB_MEMORY_ALT="UI:PHRASE:MEMORY_ALT";
|
||||||
const std::string PHRASE_DB_EXECUTE_NEXT="UI:PHRASE:EXECUTE_NEXT:PHRASE";
|
const std::string PHRASE_DB_EXECUTE_NEXT="UI:PHRASE:EXECUTE_NEXT:PHRASE";
|
||||||
const std::string PHRASE_DB_EXECUTE_NEXT_IS_CYCLIC="UI:PHRASE:EXECUTE_NEXT:ISCYCLIC";
|
const std::string PHRASE_DB_EXECUTE_NEXT_IS_CYCLIC="UI:PHRASE:EXECUTE_NEXT:ISCYCLIC";
|
||||||
const std::string PHRASE_DB_BOTCHAT="LOCAL:TRADING";
|
const std::string PHRASE_DB_BOTCHAT="LOCAL:TRADING";
|
||||||
|
@ -458,6 +459,7 @@ private:
|
||||||
// Shortcut To Phrases Leaves
|
// Shortcut To Phrases Leaves
|
||||||
std::vector<CCDBNodeLeaf*> _BookDbLeaves;
|
std::vector<CCDBNodeLeaf*> _BookDbLeaves;
|
||||||
std::vector<CCDBNodeLeaf*> _MemoryDbLeaves;
|
std::vector<CCDBNodeLeaf*> _MemoryDbLeaves;
|
||||||
|
std::vector<CCDBNodeLeaf*> _MemoryAltDbLeaves;
|
||||||
CCDBNodeLeaf *_NextExecuteLeaf;
|
CCDBNodeLeaf *_NextExecuteLeaf;
|
||||||
CCDBNodeLeaf *_NextExecuteIsCyclicLeaf;
|
CCDBNodeLeaf *_NextExecuteIsCyclicLeaf;
|
||||||
|
|
||||||
|
@ -698,6 +700,7 @@ private:
|
||||||
void updateMemoryCtrlRegenTickRange(uint memorySlot);
|
void updateMemoryCtrlRegenTickRange(uint memorySlot);
|
||||||
|
|
||||||
CDBCtrlSheet *getMemorySlotCtrl(uint memorySlot);
|
CDBCtrlSheet *getMemorySlotCtrl(uint memorySlot);
|
||||||
|
CDBCtrlSheet *getMemoryAltSlotCtrl(uint memorySlot);
|
||||||
|
|
||||||
CTickRange getRegenTickRange(const CSPhraseCom &phrase) const;
|
CTickRange getRegenTickRange(const CSPhraseCom &phrase) const;
|
||||||
|
|
||||||
|
|
|
@ -218,6 +218,14 @@ HTAttr p_attr[] =
|
||||||
HTML_ATTR(P,QUICK_HELP_CONDITION),
|
HTML_ATTR(P,QUICK_HELP_CONDITION),
|
||||||
HTML_ATTR(P,QUICK_HELP_EVENTS),
|
HTML_ATTR(P,QUICK_HELP_EVENTS),
|
||||||
HTML_ATTR(P,QUICK_HELP_LINK),
|
HTML_ATTR(P,QUICK_HELP_LINK),
|
||||||
|
HTML_ATTR(P,NAME),
|
||||||
|
{ 0 }
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
HTAttr div_attr[] =
|
||||||
|
{
|
||||||
|
HTML_ATTR(DIV,NAME),
|
||||||
{ 0 }
|
{ 0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -684,6 +692,8 @@ void initLibWWW()
|
||||||
HTML_DTD->tags[HTML_A].number_of_attributes = sizeof(a_attr) / sizeof(HTAttr) - 1;
|
HTML_DTD->tags[HTML_A].number_of_attributes = sizeof(a_attr) / sizeof(HTAttr) - 1;
|
||||||
//HTML_DTD->tags[HTML_I].attributes = a_attr;
|
//HTML_DTD->tags[HTML_I].attributes = a_attr;
|
||||||
HTML_DTD->tags[HTML_I].number_of_attributes = 0;
|
HTML_DTD->tags[HTML_I].number_of_attributes = 0;
|
||||||
|
HTML_DTD->tags[HTML_DIV].attributes = div_attr;
|
||||||
|
HTML_DTD->tags[HTML_DIV].number_of_attributes = sizeof(div_attr) / sizeof(HTAttr) - 1;
|
||||||
|
|
||||||
// Set a request timeout
|
// Set a request timeout
|
||||||
// HTHost_setEventTimeout (30000);
|
// HTHost_setEventTimeout (30000);
|
||||||
|
|
|
@ -201,8 +201,15 @@ enum
|
||||||
HTML_ATTR(P,QUICK_HELP_CONDITION) = 0,
|
HTML_ATTR(P,QUICK_HELP_CONDITION) = 0,
|
||||||
HTML_ATTR(P,QUICK_HELP_EVENTS),
|
HTML_ATTR(P,QUICK_HELP_EVENTS),
|
||||||
HTML_ATTR(P,QUICK_HELP_LINK),
|
HTML_ATTR(P,QUICK_HELP_LINK),
|
||||||
|
HTML_ATTR(P,NAME),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
HTML_ATTR(DIV,NAME) = 0,
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
#undef HTML_ATTR
|
#undef HTML_ATTR
|
||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
|
|
|
@ -619,6 +619,7 @@ void CUserControls::commonMove()
|
||||||
// MOUSE WHEEL //
|
// MOUSE WHEEL //
|
||||||
CEventsListener::TWheelState wheelState = EventsListener.getWheelState(); // Done all the time, to reset the state
|
CEventsListener::TWheelState wheelState = EventsListener.getWheelState(); // Done all the time, to reset the state
|
||||||
View.changeCameraDist((wheelState == CEventsListener::foreward), (wheelState == CEventsListener::backward));
|
View.changeCameraDist((wheelState == CEventsListener::foreward), (wheelState == CEventsListener::backward));
|
||||||
|
View.changeCameraDist(Actions.valide("camera_foreward"), Actions.valide("camera_backward"));
|
||||||
// Camera Up/Down.
|
// Camera Up/Down.
|
||||||
View.changeCameraHeight(Actions.valide("camera_up"), Actions.valide("camera_down"));
|
View.changeCameraHeight(Actions.valide("camera_up"), Actions.valide("camera_down"));
|
||||||
//////////////////
|
//////////////////
|
||||||
|
|
|
@ -895,6 +895,7 @@ void CInterfaceChatDisplayer::displayTell(/*TDataSetIndex senderIndex, */const u
|
||||||
colorizeSender(finalString, senderPart, prop.getRGBA());
|
colorizeSender(finalString, senderPart, prop.getRGBA());
|
||||||
|
|
||||||
PeopleInterraction.ChatInput.Tell.displayTellMessage(/*senderIndex, */finalString, goodSenderName, prop.getRGBA(), 2, &windowVisible);
|
PeopleInterraction.ChatInput.Tell.displayTellMessage(/*senderIndex, */finalString, goodSenderName, prop.getRGBA(), 2, &windowVisible);
|
||||||
|
CInterfaceManager::getInstance()->log(finalString);
|
||||||
|
|
||||||
// Open the free teller window
|
// Open the free teller window
|
||||||
CChatGroupWindow *pCGW = PeopleInterraction.getChatGroupWindow();
|
CChatGroupWindow *pCGW = PeopleInterraction.getChatGroupWindow();
|
||||||
|
@ -3216,9 +3217,13 @@ private:
|
||||||
|
|
||||||
// get the content string (should have been received!)
|
// get the content string (should have been received!)
|
||||||
ucstring contentStr;
|
ucstring contentStr;
|
||||||
|
ucstring titleStr;
|
||||||
if(!pSMC->getDynString(_TextId[ContentType], contentStr))
|
if(!pSMC->getDynString(_TextId[ContentType], contentStr))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if(!pSMC->getDynString(_TextId[TitleType], titleStr))
|
||||||
|
return;
|
||||||
|
|
||||||
// if the string start with a @{Wxxxx} code, remove it and get the wanted window size
|
// if the string start with a @{Wxxxx} code, remove it and get the wanted window size
|
||||||
sint w = 256; // default size to 256 !!
|
sint w = 256; // default size to 256 !!
|
||||||
bool is_webig = false;
|
bool is_webig = false;
|
||||||
|
@ -3273,18 +3278,30 @@ private:
|
||||||
|
|
||||||
if (is_webig)
|
if (is_webig)
|
||||||
{
|
{
|
||||||
CGroupHTML *groupHtml = dynamic_cast<CGroupHTML*>(pIM->getElementFromId("ui:interface:webig:content:html"));
|
CGroupHTML *groupHtml;
|
||||||
|
string group = titleStr.toString();
|
||||||
|
// <missing:XXX>
|
||||||
|
group = group.substr(9, group.size()-10);
|
||||||
|
nlinfo("group = %s", group.c_str());
|
||||||
|
groupHtml = dynamic_cast<CGroupHTML*>(pIM->getElementFromId("ui:interface:"+group+":content:html"));
|
||||||
|
if (!groupHtml)
|
||||||
|
{
|
||||||
|
groupHtml = dynamic_cast<CGroupHTML*>(pIM->getElementFromId("ui:interface:webig:content:html"));
|
||||||
|
group = "webig";
|
||||||
|
}
|
||||||
|
|
||||||
if (groupHtml)
|
if (groupHtml)
|
||||||
{
|
{
|
||||||
|
CGroupContainer *pGC = dynamic_cast<CGroupContainer*>(pIM->getElementFromId("ui:interface:"+group));
|
||||||
CGroupContainer *pGC = dynamic_cast<CGroupContainer*>(pIM->getElementFromId("ui:interface:webig"));
|
if (pGC)
|
||||||
|
{
|
||||||
if (contentStr.empty())
|
if (contentStr.empty())
|
||||||
{
|
{
|
||||||
pGC->setActive(false);
|
pGC->setActive(false);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
if (group == "webig")
|
||||||
pGC->setActive(true);
|
pGC->setActive(true);
|
||||||
string url = contentStr.toString();
|
string url = contentStr.toString();
|
||||||
addWebIGParams(url);
|
addWebIGParams(url);
|
||||||
|
@ -3293,6 +3310,7 @@ private:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
CGroupContainer *pGC = dynamic_cast<CGroupContainer*>(pIM->getElementFromId("ui:interface:server_message_box"));
|
CGroupContainer *pGC = dynamic_cast<CGroupContainer*>(pIM->getElementFromId("ui:interface:server_message_box"));
|
||||||
|
|
|
@ -1641,8 +1641,6 @@ const ucchar *CStringManagerClient::getSquadLocalizedDescription(NLMISC::CSheetI
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
void CStringManagerClient::replaceSBrickName(NLMISC::CSheetId id, const ucstring &name, const ucstring &desc, const ucstring &desc2)
|
void CStringManagerClient::replaceSBrickName(NLMISC::CSheetId id, const ucstring &name, const ucstring &desc, const ucstring &desc2)
|
||||||
{
|
{
|
||||||
nlassert(!_SpecItem_MemoryCompressed);
|
|
||||||
|
|
||||||
std::string label= id.toString();
|
std::string label= id.toString();
|
||||||
if (label.empty())
|
if (label.empty())
|
||||||
{
|
{
|
||||||
|
@ -1654,15 +1652,58 @@ void CStringManagerClient::replaceSBrickName(NLMISC::CSheetId id, const ucstrin
|
||||||
lwrLabel= label;
|
lwrLabel= label;
|
||||||
strlwr(lwrLabel);
|
strlwr(lwrLabel);
|
||||||
|
|
||||||
map<string, CItem>::iterator it(_SpecItem_TempMap.find(lwrLabel));
|
if (_SpecItem_MemoryCompressed)
|
||||||
if (it == _SpecItem_TempMap.end())
|
{
|
||||||
return;
|
ucchar *strName = (ucchar *)name.c_str();
|
||||||
|
ucchar *strDesc = (ucchar *)desc.c_str();
|
||||||
|
ucchar *strDesc2 = (ucchar *)desc2.c_str();
|
||||||
|
CItemLight tmp;
|
||||||
|
tmp.Label = (char*)lwrLabel.c_str();
|
||||||
|
vector<CItemLight>::iterator it = lower_bound(_SpecItems.begin(), _SpecItems.end(), tmp, CItemLightComp());
|
||||||
|
|
||||||
// Then replace
|
if (it != _SpecItems.end())
|
||||||
|
{
|
||||||
|
if (strcmp(it->Label, lwrLabel.c_str()) == 0)
|
||||||
|
{
|
||||||
|
it->Name = strName;
|
||||||
|
it->Desc = strDesc;
|
||||||
|
it->Desc2 = strDesc2;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
it->Label = tmp.Label;
|
||||||
|
it->Name = strName;
|
||||||
|
it->Desc = strDesc;
|
||||||
|
it->Desc2 = strDesc2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
tmp.Name = strName;
|
||||||
|
tmp.Desc = strDesc;
|
||||||
|
tmp.Desc2 = strDesc2;
|
||||||
|
_SpecItems.push_back(tmp);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
map<string, CItem>::iterator it(_SpecItem_TempMap.find(lwrLabel));
|
||||||
|
if (it != _SpecItem_TempMap.end())
|
||||||
|
{
|
||||||
it->second.Name= name;
|
it->second.Name= name;
|
||||||
it->second.Desc= desc;
|
it->second.Desc= desc;
|
||||||
it->second.Desc2= desc2;
|
it->second.Desc2= desc2;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
CItem newItem;
|
||||||
|
newItem.Name = name;
|
||||||
|
newItem.Desc = desc;
|
||||||
|
newItem.Desc2 = desc2;
|
||||||
|
_SpecItem_TempMap.insert(pair<string,CItem>(lwrLabel,newItem));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
} // namespace STRING_MANAGER
|
} // namespace STRING_MANAGER
|
||||||
|
|
|
@ -38,6 +38,7 @@ namespace ACTNATURE
|
||||||
NL_STRING_CONVERSION_TABLE_ENTRY(DODGE)
|
NL_STRING_CONVERSION_TABLE_ENTRY(DODGE)
|
||||||
NL_STRING_CONVERSION_TABLE_ENTRY(PARRY)
|
NL_STRING_CONVERSION_TABLE_ENTRY(PARRY)
|
||||||
NL_STRING_CONVERSION_TABLE_ENTRY(SHIELD_USE)
|
NL_STRING_CONVERSION_TABLE_ENTRY(SHIELD_USE)
|
||||||
|
NL_STRING_CONVERSION_TABLE_ENTRY(RECHARGE)
|
||||||
NL_END_STRING_CONVERSION_TABLE(TActionNature, ActionNatureConversion, UNKNOWN)
|
NL_END_STRING_CONVERSION_TABLE(TActionNature, ActionNatureConversion, UNKNOWN)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -35,6 +35,7 @@ namespace ACTNATURE
|
||||||
DODGE,
|
DODGE,
|
||||||
PARRY,
|
PARRY,
|
||||||
SHIELD_USE,
|
SHIELD_USE,
|
||||||
|
RECHARGE,
|
||||||
|
|
||||||
NEUTRAL, //only for multi effect on spell,progression consider it as OFFENSIVE_MAGIC
|
NEUTRAL, //only for multi effect on spell,progression consider it as OFFENSIVE_MAGIC
|
||||||
|
|
||||||
|
|
|
@ -21,9 +21,7 @@
|
||||||
#ifndef CHARACTER_SYNC_ITF
|
#ifndef CHARACTER_SYNC_ITF
|
||||||
#define CHARACTER_SYNC_ITF
|
#define CHARACTER_SYNC_ITF
|
||||||
#include "nel/misc/types_nl.h"
|
#include "nel/misc/types_nl.h"
|
||||||
#if defined(NL_COMP_VC8) || defined(NL_COMP_VC9)
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#endif
|
|
||||||
#include "nel/misc/hierarchical_timer.h"
|
#include "nel/misc/hierarchical_timer.h"
|
||||||
#include "nel/misc/string_conversion.h"
|
#include "nel/misc/string_conversion.h"
|
||||||
#include "nel/net/message.h"
|
#include "nel/net/message.h"
|
||||||
|
|
|
@ -133,6 +133,9 @@ namespace MAGICFX
|
||||||
WaterWall = 11,
|
WaterWall = 11,
|
||||||
ThornWall = 12,
|
ThornWall = 12,
|
||||||
LightningWall = 13,
|
LightningWall = 13,
|
||||||
|
OtherFireWall = 14,
|
||||||
|
TeleportKami = 15, // No effect aura
|
||||||
|
TeleportKara = 16, // No effect aura
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1058,7 +1058,6 @@ struct _CCMirrorPropValueListIterator
|
||||||
typedef size_t size_type;
|
typedef size_t size_type;
|
||||||
typedef ptrdiff_t difference_type;
|
typedef ptrdiff_t difference_type;
|
||||||
// typedef typename std::forward_iterator_tag iterator_category;
|
// typedef typename std::forward_iterator_tag iterator_category;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -21,9 +21,7 @@
|
||||||
#ifndef MSG_AIS_EGS_GEN
|
#ifndef MSG_AIS_EGS_GEN
|
||||||
#define MSG_AIS_EGS_GEN
|
#define MSG_AIS_EGS_GEN
|
||||||
#include "nel/misc/types_nl.h"
|
#include "nel/misc/types_nl.h"
|
||||||
#if defined(NL_COMP_VC8) || defined(NL_COMP_VC9)
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#endif
|
|
||||||
#include "nel/misc/hierarchical_timer.h"
|
#include "nel/misc/hierarchical_timer.h"
|
||||||
#include "nel/misc/string_conversion.h"
|
#include "nel/misc/string_conversion.h"
|
||||||
#include "nel/net/message.h"
|
#include "nel/net/message.h"
|
||||||
|
|
|
@ -21,9 +21,7 @@
|
||||||
#ifndef R2_MODULES_ITF
|
#ifndef R2_MODULES_ITF
|
||||||
#define R2_MODULES_ITF
|
#define R2_MODULES_ITF
|
||||||
#include "nel/misc/types_nl.h"
|
#include "nel/misc/types_nl.h"
|
||||||
#if defined(NL_COMP_VC8) || defined(NL_COMP_VC9)
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#endif
|
|
||||||
#include "nel/misc/hierarchical_timer.h"
|
#include "nel/misc/hierarchical_timer.h"
|
||||||
#include "nel/misc/string_conversion.h"
|
#include "nel/misc/string_conversion.h"
|
||||||
#include "nel/net/message.h"
|
#include "nel/net/message.h"
|
||||||
|
|
|
@ -21,9 +21,7 @@
|
||||||
#ifndef R2_SHARE_ITF
|
#ifndef R2_SHARE_ITF
|
||||||
#define R2_SHARE_ITF
|
#define R2_SHARE_ITF
|
||||||
#include "nel/misc/types_nl.h"
|
#include "nel/misc/types_nl.h"
|
||||||
#if defined(NL_COMP_VC8) || defined(NL_COMP_VC9)
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#endif
|
|
||||||
#include "nel/misc/hierarchical_timer.h"
|
#include "nel/misc/hierarchical_timer.h"
|
||||||
#include "nel/misc/string_conversion.h"
|
#include "nel/misc/string_conversion.h"
|
||||||
#include "nel/net/message.h"
|
#include "nel/net/message.h"
|
||||||
|
|
|
@ -2437,7 +2437,7 @@ NLMISC_COMMAND(setGrpTimers,"set the timer values for a given group","<grp id> <
|
||||||
void cbTick();
|
void cbTick();
|
||||||
extern uint ForceTicks;
|
extern uint ForceTicks;
|
||||||
|
|
||||||
NLMISC_COMMAND(updateAI,"call CAIS::update() (simulate a tick off-line)","")
|
NLMISC_COMMAND(updateAI,"call CAIS::update() (simulate a tick off-line)","[tick]")
|
||||||
{
|
{
|
||||||
if(args.size() >1)
|
if(args.size() >1)
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -34,6 +34,7 @@
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <stddef.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -21,9 +21,7 @@
|
||||||
#ifndef GUILD_UNIFIER_ITF
|
#ifndef GUILD_UNIFIER_ITF
|
||||||
#define GUILD_UNIFIER_ITF
|
#define GUILD_UNIFIER_ITF
|
||||||
#include "nel/misc/types_nl.h"
|
#include "nel/misc/types_nl.h"
|
||||||
#if defined(NL_COMP_VC8) || defined(NL_COMP_VC9)
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#endif
|
|
||||||
#include "nel/misc/hierarchical_timer.h"
|
#include "nel/misc/hierarchical_timer.h"
|
||||||
#include "nel/misc/string_conversion.h"
|
#include "nel/misc/string_conversion.h"
|
||||||
#include "nel/net/message.h"
|
#include "nel/net/message.h"
|
||||||
|
|
|
@ -454,7 +454,7 @@ void CFaberPhrase::apply()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
neededMp = _RootFaberPlan->Faber->NeededMps.size();
|
neededMp = (uint32)_RootFaberPlan->Faber->NeededMps.size();
|
||||||
EGSPD::CPeople::TPeople civRestriction = _RootFaberPlan->CivRestriction;
|
EGSPD::CPeople::TPeople civRestriction = _RootFaberPlan->CivRestriction;
|
||||||
uint32 usedMp=0;
|
uint32 usedMp=0;
|
||||||
vector< const CStaticItem * > usedMps = _Mps;
|
vector< const CStaticItem * > usedMps = _Mps;
|
||||||
|
|
|
@ -52,10 +52,11 @@ struct CCyclicActionInfos
|
||||||
TDataSetRow TargetRowId;
|
TDataSetRow TargetRowId;
|
||||||
std::vector<NLMISC::CSheetId> CyclicActionBricks;
|
std::vector<NLMISC::CSheetId> CyclicActionBricks;
|
||||||
|
|
||||||
|
CCyclicActionInfos() { }
|
||||||
inline void reset() { CyclicActionBricks.clear(); }
|
inline void reset() { CyclicActionBricks.clear(); }
|
||||||
};
|
};
|
||||||
|
|
||||||
static const CCyclicActionInfos NoCyclicInfo;
|
static const CCyclicActionInfos NoCyclicInfo = CCyclicActionInfos();
|
||||||
|
|
||||||
class CPhraseManager;
|
class CPhraseManager;
|
||||||
|
|
||||||
|
|
|
@ -344,7 +344,6 @@ CCharacter::CCharacter(): CEntityBase(false),
|
||||||
_AggroableSave(true),
|
_AggroableSave(true),
|
||||||
_GodModeSave(false)
|
_GodModeSave(false)
|
||||||
{
|
{
|
||||||
|
|
||||||
// todo : uncomment that when sadge item api is plugged
|
// todo : uncomment that when sadge item api is plugged
|
||||||
_AggroCount = 0;
|
_AggroCount = 0;
|
||||||
// _Bulk = 0;
|
// _Bulk = 0;
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
#include <libxml/parser.h>
|
#include <libxml/parser.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <stddef.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
|
|
@ -549,13 +549,13 @@ public:
|
||||||
bool discreetPropertyHasChanged(const CPropertyHistory::CPropertyEntry& entry, const CMirrorPropValueRO<T>& currentValue, CLFECOMMON::TPropIndex propIndex, T* ) const
|
bool discreetPropertyHasChanged(const CPropertyHistory::CPropertyEntry& entry, const CMirrorPropValueRO<T>& currentValue, CLFECOMMON::TPropIndex propIndex, T* ) const
|
||||||
{
|
{
|
||||||
// Although the client should already know the sheet id of the controlled player, let's send it
|
// Although the client should already know the sheet id of the controlled player, let's send it
|
||||||
//if ( (propIndex==PROPERTY_SHEET) && (TVPNodeServer::PrioContext.Slot == 0) )
|
//if ( (propIndex==CLFECOMMON::PROPERTY_SHEET) && (TVPNodeServer::PrioContext.Slot == 0) )
|
||||||
// return false;
|
// return false;
|
||||||
|
|
||||||
if (entry.HasValue)
|
if (entry.HasValue)
|
||||||
{
|
{
|
||||||
#ifdef NL_DEBUG
|
#ifdef NL_DEBUG
|
||||||
if ( (propIndex==PROPERTY_SHEET) && (currentValue() != *((T*)&(entry.LastSent))) )
|
if ( (propIndex==CLFECOMMON::PROPERTY_SHEET) && (currentValue() != *((T*)&(entry.LastSent))) )
|
||||||
LOG_WHAT_IS_SENT( "C%hu S%hu: sheet changes from %u to %u", TVPNodeServer::PrioContext.ClientId, TVPNodeServer::PrioContext.Slot, (uint32)entry.LastSent, asUInt32<T>(currentValue()) );
|
LOG_WHAT_IS_SENT( "C%hu S%hu: sheet changes from %u to %u", TVPNodeServer::PrioContext.ClientId, TVPNodeServer::PrioContext.Slot, (uint32)entry.LastSent, asUInt32<T>(currentValue()) );
|
||||||
#endif
|
#endif
|
||||||
return (currentValue() != *((T*)&(entry.LastSent)));
|
return (currentValue() != *((T*)&(entry.LastSent)));
|
||||||
|
@ -569,7 +569,7 @@ public:
|
||||||
{
|
{
|
||||||
// Not sent yet
|
// Not sent yet
|
||||||
//nldebug( "No history yet for C%hu - slot %hu - prop %hu", TVPNodeServer::PrioContext.ClientHost->clientId(), (uint16)TVPNodeServer::PrioContext.Slot, propIndex );
|
//nldebug( "No history yet for C%hu - slot %hu - prop %hu", TVPNodeServer::PrioContext.ClientHost->clientId(), (uint16)TVPNodeServer::PrioContext.Slot, propIndex );
|
||||||
if ( (propIndex==PROPERTY_SHEET) )
|
if ( (propIndex==CLFECOMMON::PROPERTY_SHEET) )
|
||||||
{
|
{
|
||||||
CMirrorPropValueRO<T> currentValue( TheDataset, TVPNodeServer::PrioContext.EntityIndex, dsPropertyIndex );
|
CMirrorPropValueRO<T> currentValue( TheDataset, TVPNodeServer::PrioContext.EntityIndex, dsPropertyIndex );
|
||||||
LOG_WHAT_IS_SENT( "C%hu S%hu: sheet initializes to %u", TVPNodeServer::PrioContext.ClientId, TVPNodeServer::PrioContext.Slot, asUInt32<T>(currentValue()) );
|
LOG_WHAT_IS_SENT( "C%hu S%hu: sheet initializes to %u", TVPNodeServer::PrioContext.ClientId, TVPNodeServer::PrioContext.Slot, asUInt32<T>(currentValue()) );
|
||||||
|
@ -614,7 +614,7 @@ public:
|
||||||
bool discreetPropertyHasChanged(const CPropertyHistory::CPropertyEntry& entry, TPropIndex propIndex, T* ) const
|
bool discreetPropertyHasChanged(const CPropertyHistory::CPropertyEntry& entry, TPropIndex propIndex, T* ) const
|
||||||
{
|
{
|
||||||
// Although the client should already know the sheet id of the controlled player, let's send it
|
// Although the client should already know the sheet id of the controlled player, let's send it
|
||||||
//if ( (propIndex==PROPERTY_SHEET) && (TVPNodeServer::PrioContext.Slot == 0) )
|
//if ( (propIndex==CLFECOMMON::PROPERTY_SHEET) && (TVPNodeServer::PrioContext.Slot == 0) )
|
||||||
// return false;
|
// return false;
|
||||||
|
|
||||||
TPropertyIndex dsPropertyIndex = CEntityContainer::propertyIndexInDataSetToVisualPropIndex( propIndex );
|
TPropertyIndex dsPropertyIndex = CEntityContainer::propertyIndexInDataSetToVisualPropIndex( propIndex );
|
||||||
|
@ -625,7 +625,7 @@ public:
|
||||||
CMirrorPropValueRO<T> currentValue( TheDataset, TVPNodeServer::PrioContext.EntityIndex, dsPropertyIndex );
|
CMirrorPropValueRO<T> currentValue( TheDataset, TVPNodeServer::PrioContext.EntityIndex, dsPropertyIndex );
|
||||||
|
|
||||||
#ifdef NL_DEBUG
|
#ifdef NL_DEBUG
|
||||||
if ( (propIndex==PROPERTY_SHEET) && (currentValue() != *((T*)&(entry.LastSent))) )
|
if ( (propIndex==CLFECOMMON::PROPERTY_SHEET) && (currentValue() != *((T*)&(entry.LastSent))) )
|
||||||
LOG_WHAT_IS_SENT( "C%hu S%hu: sheet changes from %u to %u", TVPNodeServer::PrioContext.ClientId, TVPNodeServer::PrioContext.Slot, (uint32)entry.LastSent, asUInt32<T>(currentValue()) );
|
LOG_WHAT_IS_SENT( "C%hu S%hu: sheet changes from %u to %u", TVPNodeServer::PrioContext.ClientId, TVPNodeServer::PrioContext.Slot, (uint32)entry.LastSent, asUInt32<T>(currentValue()) );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -639,7 +639,7 @@ public:
|
||||||
{
|
{
|
||||||
// Not sent yet
|
// Not sent yet
|
||||||
//nldebug( "No history yet for C%hu - slot %hu - prop %hu", TVPNodeServer::PrioContext.ClientHost->clientId(), (uint16)TVPNodeServer::PrioContext.Slot, propIndex );
|
//nldebug( "No history yet for C%hu - slot %hu - prop %hu", TVPNodeServer::PrioContext.ClientHost->clientId(), (uint16)TVPNodeServer::PrioContext.Slot, propIndex );
|
||||||
if ( (propIndex==PROPERTY_SHEET) )
|
if ( (propIndex==CLFECOMMON::PROPERTY_SHEET) )
|
||||||
{
|
{
|
||||||
CMirrorPropValueRO<T> currentValue( TheDataset, TVPNodeServer::PrioContext.EntityIndex, dsPropertyIndex );
|
CMirrorPropValueRO<T> currentValue( TheDataset, TVPNodeServer::PrioContext.EntityIndex, dsPropertyIndex );
|
||||||
LOG_WHAT_IS_SENT( "C%hu S%hu: sheet initializes to %u", TVPNodeServer::PrioContext.ClientId, TVPNodeServer::PrioContext.Slot, asUInt32<T>(currentValue()) );
|
LOG_WHAT_IS_SENT( "C%hu S%hu: sheet initializes to %u", TVPNodeServer::PrioContext.ClientId, TVPNodeServer::PrioContext.Slot, asUInt32<T>(currentValue()) );
|
||||||
|
@ -681,7 +681,7 @@ public:
|
||||||
bool targetListHasChanged(const CPropertyHistory::CPropertyEntry& entry, CLFECOMMON::TPropIndex propIndex, T* ) const
|
bool targetListHasChanged(const CPropertyHistory::CPropertyEntry& entry, CLFECOMMON::TPropIndex propIndex, T* ) const
|
||||||
{
|
{
|
||||||
// Although the client should already know the sheet id of the controlled player, let's send it
|
// Although the client should already know the sheet id of the controlled player, let's send it
|
||||||
//if ( (propIndex==PROPERTY_SHEET) && (TVPNodeServer::PrioContext.Slot == 0) )
|
//if ( (propIndex==CLFECOMMON::PROPERTY_SHEET) && (TVPNodeServer::PrioContext.Slot == 0) )
|
||||||
// return false;
|
// return false;
|
||||||
|
|
||||||
TPropertyIndex dsPropertyIndex = CEntityContainer::propertyIndexInDataSetToVisualPropIndex( propIndex );
|
TPropertyIndex dsPropertyIndex = CEntityContainer::propertyIndexInDataSetToVisualPropIndex( propIndex );
|
||||||
|
|
|
@ -18,6 +18,7 @@
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <stddef.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
|
|
|
@ -20,4 +20,8 @@ NL_ADD_RUNTIME_FLAGS(ryzom_gpm_service)
|
||||||
|
|
||||||
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
|
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
|
||||||
|
|
||||||
|
IF(WITH_PCH)
|
||||||
|
ADD_NATIVE_PRECOMPILED_HEADER(ryzom_gpm_service ${CMAKE_CURRENT_SOURCE_DIR}/stdpch.h ${CMAKE_CURRENT_SOURCE_DIR}/stdpch.cpp)
|
||||||
|
ENDIF(WITH_PCH)
|
||||||
|
|
||||||
INSTALL(TARGETS ryzom_gpm_service RUNTIME DESTINATION sbin COMPONENT services)
|
INSTALL(TARGETS ryzom_gpm_service RUNTIME DESTINATION sbin COMPONENT services)
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#include "stdpch.h"
|
||||||
#include "cell.h"
|
#include "cell.h"
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
|
||||||
|
#include "stdpch.h"
|
||||||
|
|
||||||
// include files
|
// include files
|
||||||
#include "nel/misc/types_nl.h"
|
#include "nel/misc/types_nl.h"
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
|
||||||
|
#include "stdpch.h"
|
||||||
|
|
||||||
// Nel Misc
|
// Nel Misc
|
||||||
#include "nel/misc/command.h"
|
#include "nel/misc/command.h"
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
|
||||||
|
#include "stdpch.h"
|
||||||
|
|
||||||
// misc
|
// misc
|
||||||
#include "nel/misc/command.h"
|
#include "nel/misc/command.h"
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
// You should have received a copy of the GNU Affero General Public License
|
// You should have received a copy of the GNU Affero General Public License
|
||||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
#include "stdpch.h"
|
||||||
|
|
||||||
// include files
|
// include files
|
||||||
#include "nel/misc/types_nl.h"
|
#include "nel/misc/types_nl.h"
|
||||||
|
|
|
@ -14,6 +14,8 @@
|
||||||
// You should have received a copy of the GNU Affero General Public License
|
// You should have received a copy of the GNU Affero General Public License
|
||||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
#include "stdpch.h"
|
||||||
|
|
||||||
#include "nel/misc/common.h"
|
#include "nel/misc/common.h"
|
||||||
|
|
||||||
#include "game_share/utils.h"
|
#include "game_share/utils.h"
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
|
||||||
|
#include "stdpch.h"
|
||||||
|
|
||||||
#include "patat_grid.h"
|
#include "patat_grid.h"
|
||||||
|
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
|
||||||
|
#include "stdpch.h"
|
||||||
|
|
||||||
#include "patat_subscribe_manager.h"
|
#include "patat_subscribe_manager.h"
|
||||||
|
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#include "stdpch.h"
|
||||||
|
|
||||||
// Misc
|
// Misc
|
||||||
#include "nel/misc/path.h"
|
#include "nel/misc/path.h"
|
||||||
|
|
17
code/ryzom/server/src/gpm_service/stdpch.cpp
Normal file
17
code/ryzom/server/src/gpm_service/stdpch.cpp
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
|
||||||
|
// Copyright (C) 2010 Winch Gate Property Limited
|
||||||
|
//
|
||||||
|
// This program is free software: you can redistribute it and/or modify
|
||||||
|
// it under the terms of the GNU Affero General Public License as
|
||||||
|
// published by the Free Software Foundation, either version 3 of the
|
||||||
|
// License, or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// This program is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU Affero General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Affero General Public License
|
||||||
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
#include "stdpch.h"
|
98
code/ryzom/server/src/gpm_service/stdpch.h
Normal file
98
code/ryzom/server/src/gpm_service/stdpch.h
Normal file
|
@ -0,0 +1,98 @@
|
||||||
|
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
|
||||||
|
// Copyright (C) 2010 Winch Gate Property Limited
|
||||||
|
//
|
||||||
|
// This program is free software: you can redistribute it and/or modify
|
||||||
|
// it under the terms of the GNU Affero General Public License as
|
||||||
|
// published by the Free Software Foundation, either version 3 of the
|
||||||
|
// License, or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// This program is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU Affero General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Affero General Public License
|
||||||
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
#include "nel/misc/types_nl.h"
|
||||||
|
|
||||||
|
#include <errno.h>
|
||||||
|
#include <fcntl.h>
|
||||||
|
#include <libxml/parser.h>
|
||||||
|
#include <math.h>
|
||||||
|
#include <stddef.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
// STL
|
||||||
|
#include <algorithm>
|
||||||
|
#include <deque>
|
||||||
|
#include <exception>
|
||||||
|
#include <fstream>
|
||||||
|
#include <iostream>
|
||||||
|
#include <limits>
|
||||||
|
#include <list>
|
||||||
|
#include <map>
|
||||||
|
#include <set>
|
||||||
|
#include <string>
|
||||||
|
#include <utility>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
|
// NeL georges
|
||||||
|
#include "nel/georges/u_form.h"
|
||||||
|
#include "nel/georges/u_form_elm.h"
|
||||||
|
|
||||||
|
// NeL ligo
|
||||||
|
#include "nel/ligo/ligo_config.h"
|
||||||
|
#include "nel/ligo/primitive.h"
|
||||||
|
|
||||||
|
// NeL misc
|
||||||
|
#include "nel/misc/aabbox.h"
|
||||||
|
#include "nel/misc/block_memory.h"
|
||||||
|
#include "nel/misc/command.h"
|
||||||
|
#include "nel/misc/common.h"
|
||||||
|
#include "nel/misc/debug.h"
|
||||||
|
#include "nel/misc/entity_id.h"
|
||||||
|
#include "nel/misc/file.h"
|
||||||
|
#include "nel/misc/hierarchical_timer.h"
|
||||||
|
#include "nel/misc/i_xml.h"
|
||||||
|
#include "nel/misc/path.h"
|
||||||
|
#include "nel/misc/sheet_id.h"
|
||||||
|
#include "nel/misc/smart_ptr.h"
|
||||||
|
#include "nel/misc/stream.h"
|
||||||
|
#include "nel/misc/time_nl.h"
|
||||||
|
#include "nel/misc/variable.h"
|
||||||
|
#include "nel/misc/vector.h"
|
||||||
|
#include "nel/misc/vector_2d.h"
|
||||||
|
#include "nel/misc/vectord.h"
|
||||||
|
|
||||||
|
// NeL net
|
||||||
|
#include "nel/net/message.h"
|
||||||
|
#include "nel/net/service.h"
|
||||||
|
#include "nel/net/unified_network.h"
|
||||||
|
|
||||||
|
// NeL pacs
|
||||||
|
#include "nel/pacs/u_collision_desc.h"
|
||||||
|
#include "nel/pacs/u_global_position.h"
|
||||||
|
#include "nel/pacs/u_global_retriever.h"
|
||||||
|
#include "nel/pacs/u_move_container.h"
|
||||||
|
#include "nel/pacs/u_move_primitive.h"
|
||||||
|
#include "nel/pacs/u_primitive_block.h"
|
||||||
|
|
||||||
|
// GameShare
|
||||||
|
#include "game_share/mirror_prop_value.h"
|
||||||
|
#include "game_share/player_vision_delta.h"
|
||||||
|
#include "game_share/ryzom_entity_id.h"
|
||||||
|
#include "game_share/ryzom_mirror_properties.h"
|
||||||
|
#include "game_share/synchronised_message.h"
|
||||||
|
#include "game_share/tick_event_handler.h"
|
||||||
|
#include "game_share/utils.h"
|
||||||
|
|
||||||
|
// ServerShare
|
||||||
|
#include "server_share/effect_manager.h"
|
||||||
|
#include "server_share/msg_gpm_service.h"
|
||||||
|
#include "server_share/pet_interface_msg.h"
|
||||||
|
#include "server_share/r2_variables.h"
|
||||||
|
#include "server_share/r2_vision.h"
|
||||||
|
#include "server_share/used_continent.h"
|
|
@ -15,6 +15,7 @@
|
||||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
|
||||||
|
#include "stdpch.h"
|
||||||
|
|
||||||
#include "variables.h"
|
#include "variables.h"
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,8 @@
|
||||||
// You should have received a copy of the GNU Affero General Public License
|
// You should have received a copy of the GNU Affero General Public License
|
||||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
#include "stdpch.h"
|
||||||
|
|
||||||
#include "nel/net/unified_network.h"
|
#include "nel/net/unified_network.h"
|
||||||
#include "vision_delta_manager.h"
|
#include "vision_delta_manager.h"
|
||||||
#include "gpm_service.h"
|
#include "gpm_service.h"
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
|
||||||
|
#include "stdpch.h"
|
||||||
|
|
||||||
#include "world_entity.h"
|
#include "world_entity.h"
|
||||||
#include "sheets.h"
|
#include "sheets.h"
|
||||||
|
|
|
@ -14,6 +14,8 @@
|
||||||
// You should have received a copy of the GNU Affero General Public License
|
// You should have received a copy of the GNU Affero General Public License
|
||||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
#include "stdpch.h"
|
||||||
|
|
||||||
// Nel Misc
|
// Nel Misc
|
||||||
#include "nel/misc/types_nl.h"
|
#include "nel/misc/types_nl.h"
|
||||||
#include "nel/misc/file.h"
|
#include "nel/misc/file.h"
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
#include <stddef.h>
|
||||||
|
|
||||||
#include "nel/georges/load_form.h"
|
#include "nel/georges/load_form.h"
|
||||||
#include "nel/georges/u_form.h"
|
#include "nel/georges/u_form.h"
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
FILE(GLOB SRC *.cpp *.h)
|
FILE(GLOB SRC *.cpp *.h)
|
||||||
|
|
||||||
ADD_EXECUTABLE(monitor_service WIN32 ${SRC})
|
ADD_EXECUTABLE(ryzom_monitor_service WIN32 ${SRC})
|
||||||
|
|
||||||
INCLUDE_DIRECTORIES(${RZ_SERVER_SRC_DIR} ${LIBXML2_INCLUDE_DIR} ${MYSQL_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR})
|
INCLUDE_DIRECTORIES(${RZ_SERVER_SRC_DIR} ${LIBXML2_INCLUDE_DIR} ${MYSQL_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR})
|
||||||
TARGET_LINK_LIBRARIES(monitor_service
|
TARGET_LINK_LIBRARIES(ryzom_monitor_service
|
||||||
ryzom_gameshare
|
ryzom_gameshare
|
||||||
${LIBXML2_LIBRARIES}
|
${LIBXML2_LIBRARIES}
|
||||||
${ZLIB_LIBRARY}
|
${ZLIB_LIBRARY}
|
||||||
|
@ -12,15 +12,15 @@ TARGET_LINK_LIBRARIES(monitor_service
|
||||||
nelnet
|
nelnet
|
||||||
nelgeorges)
|
nelgeorges)
|
||||||
|
|
||||||
NL_DEFAULT_PROPS(monitor_service "Ryzom, Services: Monitor Service (MOS)")
|
NL_DEFAULT_PROPS(ryzom_monitor_service "Ryzom, Services: Monitor Service (MOS)")
|
||||||
NL_ADD_RUNTIME_FLAGS(monitor_service)
|
NL_ADD_RUNTIME_FLAGS(ryzom_monitor_service)
|
||||||
|
|
||||||
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
|
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
|
||||||
|
|
||||||
IF(WITH_PCH)
|
IF(WITH_PCH)
|
||||||
ADD_NATIVE_PRECOMPILED_HEADER(monitor_service ${CMAKE_CURRENT_SOURCE_DIR}/stdpch.h ${CMAKE_CURRENT_SOURCE_DIR}/stdpch.cpp)
|
ADD_NATIVE_PRECOMPILED_HEADER(ryzom_monitor_service ${CMAKE_CURRENT_SOURCE_DIR}/stdpch.h ${CMAKE_CURRENT_SOURCE_DIR}/stdpch.cpp)
|
||||||
ENDIF(WITH_PCH)
|
ENDIF(WITH_PCH)
|
||||||
|
|
||||||
INSTALL(TARGETS monitor_service RUNTIME DESTINATION sbin COMPONENT services)
|
INSTALL(TARGETS ryzom_monitor_service RUNTIME DESTINATION sbin COMPONENT services)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -32,6 +32,7 @@
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <stddef.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
|
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue