Merge with develop

--HG--
branch : qt5
hg/feature/qt5
kaetemi 10 years ago
commit 9faa981d82

@ -14,6 +14,8 @@
**.font = native **.font = native
**.scheme = native **.scheme = native
**.tpl = native
**.xsd = native **.xsd = native
**.dox = native **.dox = native

@ -6,3 +6,5 @@ fedf2aa443d09707beed814b0f499c6a5519cc84 ryzomcore/v0.10.0
edaa3624a56420b02ccc64c26059801a389927ee ryzomcore/v0.11.0 edaa3624a56420b02ccc64c26059801a389927ee ryzomcore/v0.11.0
e3fe4855f22c3e75722e015dc33c091c340b3ad7 ryzomcore/v0.11.1 e3fe4855f22c3e75722e015dc33c091c340b3ad7 ryzomcore/v0.11.1
9e583b717fd63be0be9fd60b99087abf1691ea49 ryzomcore/v0.11.2 9e583b717fd63be0be9fd60b99087abf1691ea49 ryzomcore/v0.11.2
bfe5628e14a024ba7ea32e4b326ae433a07856b9 ryzomcore/v0.11.3
9a6120735daa97c96ac5d85ca35c7f21f607bd87 ryzomcore/v0.12.0

@ -2,7 +2,7 @@
# #
# Ryzom Core # Ryzom Core
# Authors: Nevrax and the Ryzom Core Community # Authors: Nevrax and the Ryzom Core Community
# Version: 0.11.2 # Version: 0.12.0
# #
# Notes: # Notes:
# * Changing install location: add -DCMAKE_INSTALL_PREFIX:PATH=/my/new/path # * Changing install location: add -DCMAKE_INSTALL_PREFIX:PATH=/my/new/path
@ -47,8 +47,8 @@ CHECK_OUT_OF_SOURCE()
CMAKE_MINIMUM_REQUIRED(VERSION 2.6) CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
PROJECT(RyzomCore CXX C) PROJECT(RyzomCore CXX C)
SET(NL_VERSION_MAJOR 0) SET(NL_VERSION_MAJOR 0)
SET(NL_VERSION_MINOR 11) SET(NL_VERSION_MINOR 12)
SET(NL_VERSION_PATCH 2) SET(NL_VERSION_PATCH 0)
SET(NL_VERSION "${NL_VERSION_MAJOR}.${NL_VERSION_MINOR}.${NL_VERSION_PATCH}") SET(NL_VERSION "${NL_VERSION_MAJOR}.${NL_VERSION_MINOR}.${NL_VERSION_PATCH}")
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
@ -160,7 +160,6 @@ IF(WITH_NEL)
ENDIF(WITH_NEL_TESTS) ENDIF(WITH_NEL_TESTS)
IF(WITH_GUI) IF(WITH_GUI)
FIND_PACKAGE(Libwww REQUIRED)
FIND_PACKAGE(Luabind REQUIRED) FIND_PACKAGE(Luabind REQUIRED)
FIND_PACKAGE(CURL REQUIRED) FIND_PACKAGE(CURL REQUIRED)

@ -1,190 +0,0 @@
#
# Find the W3C libwww includes and library
#
# This module defines
# LIBWWW_INCLUDE_DIR, where to find tiff.h, etc.
# LIBWWW_LIBRARY, where to find the Libwww library.
# LIBWWW_FOUND, If false, do not try to use Libwww.
OPTION(WITH_LIBWWW_STATIC "Use only static libraries for libwww" OFF)
# also defined, but not for general use are
IF(LIBWWW_LIBRARIES AND LIBWWW_INCLUDE_DIR)
# in cache already
SET(Libwww_FIND_QUIETLY TRUE)
ENDIF(LIBWWW_LIBRARIES AND LIBWWW_INCLUDE_DIR)
FIND_PATH(LIBWWW_INCLUDE_DIR
WWWInit.h
PATHS
/usr/local/include
/usr/include
/sw/include
/opt/local/include
/opt/csw/include
/opt/include
PATH_SUFFIXES libwww w3c-libwww
)
# when installing libwww on mac os x using macports the file wwwconf.h resides
# in /opt/local/include and not in the real libwww include dir :/
FIND_PATH(LIBWWW_ADDITIONAL_INCLUDE_DIR
wwwconf.h
PATHS
/usr/local/include
/usr/include
/sw/include
/opt/local/include
/opt/csw/include
/opt/include
)
# combine both include directories into one variable
IF(LIBWWW_ADDITIONAL_INCLUDE_DIR)
SET(LIBWWW_INCLUDE_DIR ${LIBWWW_INCLUDE_DIR} ${LIBWWW_ADDITIONAL_INCLUDE_DIR})
ENDIF(LIBWWW_ADDITIONAL_INCLUDE_DIR)
# helper to find all the libwww sub libraries
MACRO(FIND_WWW_LIBRARY MYLIBRARY OPTION FILE)
IF(WITH_LIBWWW_STATIC AND UNIX AND NOT APPLE AND NOT WITH_STATIC_EXTERNAL)
SET(CMAKE_FIND_LIBRARY_SUFFIXES_OLD ${CMAKE_FIND_LIBRARY_SUFFIXES})
SET(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
ENDIF(WITH_LIBWWW_STATIC AND UNIX AND NOT APPLE AND NOT WITH_STATIC_EXTERNAL)
FIND_LIBRARY(${MYLIBRARY}_RELEASE
NAMES ${FILE}
PATHS
/usr/local/lib
/usr/lib
/usr/lib/x86_64-linux-gnu
/usr/local/X11R6/lib
/usr/X11R6/lib
/sw/lib
/opt/local/lib
/opt/csw/lib
/opt/lib
/usr/freeware/lib64
)
FIND_LIBRARY(${MYLIBRARY}_DEBUG
NAMES ${FILE}d
PATHS
/usr/local/lib
/usr/lib
/usr/lib/x86_64-linux-gnu
/usr/local/X11R6/lib
/usr/X11R6/lib
/sw/lib
/opt/local/lib
/opt/csw/lib
/opt/lib
/usr/freeware/lib64
)
IF(CMAKE_FIND_LIBRARY_SUFFIXES_OLD)
SET(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES_OLD})
ENDIF(CMAKE_FIND_LIBRARY_SUFFIXES_OLD)
IF(${MYLIBRARY}_RELEASE AND ${MYLIBRARY}_DEBUG)
IF(${OPTION} STREQUAL REQUIRED OR WITH_STATIC OR WITH_LIBWWW_STATIC)
SET(LIBWWW_LIBRARIES ${LIBWWW_LIBRARIES} optimized ${${MYLIBRARY}_RELEASE} debug ${${MYLIBRARY}_DEBUG})
ENDIF(${OPTION} STREQUAL REQUIRED OR WITH_STATIC OR WITH_LIBWWW_STATIC)
ELSEIF(${MYLIBRARY}_RELEASE)
IF(${OPTION} STREQUAL REQUIRED OR WITH_STATIC OR WITH_LIBWWW_STATIC)
SET(LIBWWW_LIBRARIES ${LIBWWW_LIBRARIES} ${${MYLIBRARY}_RELEASE})
ENDIF(${OPTION} STREQUAL REQUIRED OR WITH_STATIC OR WITH_LIBWWW_STATIC)
ELSEIF(${MYLIBRARY}_DEBUG)
IF(${OPTION} STREQUAL REQUIRED OR WITH_STATIC OR WITH_LIBWWW_STATIC)
SET(LIBWWW_LIBRARIES ${LIBWWW_LIBRARIES} ${${MYLIBRARY}_DEBUG})
ENDIF(${OPTION} STREQUAL REQUIRED OR WITH_STATIC OR WITH_LIBWWW_STATIC)
ELSE(${MYLIBRARY}_RELEASE AND ${MYLIBRARY}_DEBUG)
IF(NOT Libwww_FIND_QUIETLY AND NOT WIN32)
MESSAGE(STATUS "Warning: Libwww: Library not found: ${MYLIBRARY}")
ENDIF(NOT Libwww_FIND_QUIETLY AND NOT WIN32)
ENDIF(${MYLIBRARY}_RELEASE AND ${MYLIBRARY}_DEBUG)
MARK_AS_ADVANCED(${MYLIBRARY}_RELEASE ${MYLIBRARY}_DEBUG)
ENDMACRO(FIND_WWW_LIBRARY)
MACRO(LINK_WWW_LIBRARY MYLIBRARY OTHERLIBRARY SYMBOL)
IF(NOT WITH_LIBWWW_STATIC AND NOT WITH_STATIC_EXTERNAL)
LINK_DEPENDS(LIBWWW_LIBRARIES ${MYLIBRARY} ${OTHERLIBRARY} ${SYMBOL})
ENDIF(NOT WITH_LIBWWW_STATIC AND NOT WITH_STATIC_EXTERNAL)
ENDMACRO(LINK_WWW_LIBRARY)
# Find and link required libs for static or dynamic
FIND_WWW_LIBRARY(LIBWWWAPP_LIBRARY REQUIRED wwwapp) # cache core file ftp gopher html http mime news stream telnet trans utils zip xml xmlparse
FIND_WWW_LIBRARY(LIBWWWCORE_LIBRARY REQUIRED wwwcore) # utils
FIND_WWW_LIBRARY(LIBWWWFILE_LIBRARY REQUIRED wwwfile) # core trans utils html
FIND_WWW_LIBRARY(LIBWWWHTML_LIBRARY REQUIRED wwwhtml) # core utils
FIND_WWW_LIBRARY(LIBWWWHTTP_LIBRARY REQUIRED wwwhttp) # md5 core mime stream utils
FIND_WWW_LIBRARY(LIBWWWMIME_LIBRARY REQUIRED wwwmime) # core cache stream utils
# Required for static or if underlinking
FIND_WWW_LIBRARY(LIBWWWCACHE_LIBRARY OPTIONAL wwwcache) # core trans utils
FIND_WWW_LIBRARY(LIBWWWSTREAM_LIBRARY OPTIONAL wwwstream) # core file utils
FIND_WWW_LIBRARY(LIBWWWTRANS_LIBRARY REQUIRED wwwtrans) # core utils
FIND_WWW_LIBRARY(LIBWWWUTILS_LIBRARY REQUIRED wwwutils)
# Required only if underlinking
# Unused protocols
FIND_WWW_LIBRARY(LIBWWWFTP_LIBRARY OPTIONAL wwwftp) # core file utils
FIND_WWW_LIBRARY(LIBWWWGOPHER_LIBRARY OPTIONAL wwwgopher) # core html utils file
FIND_WWW_LIBRARY(LIBWWWNEWS_LIBRARY OPTIONAL wwwnews) # core html mime stream utils
FIND_WWW_LIBRARY(LIBWWWTELNET_LIBRARY OPTIONAL wwwtelnet) # core utils
# Other used by app
FIND_WWW_LIBRARY(LIBWWWDIR_LIBRARY OPTIONAL wwwdir) # file
FIND_WWW_LIBRARY(LIBWWWINIT_LIBRARY OPTIONAL wwwinit) # app cache core file html utils
FIND_WWW_LIBRARY(LIBWWWMUX_LIBRARY OPTIONAL wwwmux) # core stream trans utils
FIND_WWW_LIBRARY(LIBWWWXML_LIBRARY OPTIONAL wwwxml) # core utils xmlparse
FIND_WWW_LIBRARY(LIBWWWZIP_LIBRARY OPTIONAL wwwzip) # core utils
FIND_WWW_LIBRARY(LIBXMLPARSE_LIBRARY OPTIONAL xmlparse) # xmltok
# Other used by other
FIND_WWW_LIBRARY(LIBXMLTOK_LIBRARY OPTIONAL xmltok)
FIND_WWW_LIBRARY(LIBWWWSSL_LIBRARY OPTIONAL wwwssl)
FIND_WWW_LIBRARY(LIBMD5_LIBRARY OPTIONAL md5)
FIND_WWW_LIBRARY(LIBPICS_LIBRARY OPTIONAL pics)
# Other external libraries
FIND_PACKAGE(EXPAT QUIET)
FIND_PACKAGE(OpenSSL QUIET)
FIND_WWW_LIBRARY(LIBREGEX_LIBRARY OPTIONAL gnu_regex)
# Now link all libs together
LINK_WWW_LIBRARY(LIBWWWAPP_LIBRARY LIBWWWCACHE_LIBRARY HTLoadCache)
LINK_WWW_LIBRARY(LIBWWWAPP_LIBRARY LIBWWWCACHE_LIBRARY HTCacheAppend)
LINK_WWW_LIBRARY(LIBWWWAPP_LIBRARY LIBWWWFTP_LIBRARY HTLoadFTP)
LINK_WWW_LIBRARY(LIBWWWAPP_LIBRARY LIBWWWGOPHER_LIBRARY HTLoadGopher)
LINK_WWW_LIBRARY(LIBWWWAPP_LIBRARY LIBWWWNEWS_LIBRARY HTLoadNews)
LINK_WWW_LIBRARY(LIBWWWAPP_LIBRARY LIBWWWTELNET_LIBRARY HTLoadTelnet)
LINK_WWW_LIBRARY(LIBWWWAPP_LIBRARY LIBWWWSTREAM_LIBRARY HTStreamToChunk)
LINK_WWW_LIBRARY(LIBWWWAPP_LIBRARY LIBWWWSTREAM_LIBRARY HTGuess_new)
LINK_WWW_LIBRARY(LIBWWWFILE_LIBRARY LIBWWWDIR_LIBRARY HTDir_new)
LINK_WWW_LIBRARY(LIBWWWAPP_LIBRARY LIBWWWINIT_LIBRARY HTProtocolInit)
LINK_WWW_LIBRARY(LIBWWWAPP_LIBRARY LIBWWWXML_LIBRARY HTXML_new)
LINK_WWW_LIBRARY(LIBWWWAPP_LIBRARY LIBWWWZIP_LIBRARY HTZLib_inflate)
# libwwwxml can be linked to xmlparse or expat
LINK_WWW_LIBRARY(LIBWWWXML_LIBRARY LIBXMLPARSE_LIBRARY XML_ParserCreate)
IF(LIBXMLPARSE_LIBRARY_LINKED)
LINK_WWW_LIBRARY(LIBXMLPARSE_LIBRARY EXPAT_LIBRARY XmlInitEncoding)
ELSE(LIBXMLPARSE_LIBRARY_LINKED)
LINK_WWW_LIBRARY(LIBWWWXML_LIBRARY EXPAT_LIBRARY XML_ParserCreate)
ENDIF(LIBXMLPARSE_LIBRARY_LINKED)
LINK_WWW_LIBRARY(LIBWWWHTTP_LIBRARY LIBMD5_LIBRARY MD5Init)
LINK_WWW_LIBRARY(LIBWWWAPP_LIBRARY LIBREGEX_LIBRARY regexec)
LINK_WWW_LIBRARY(LIBWWWAPP_LIBRARY OPENSSL_LIBRARIES SSL_new)
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Libwww DEFAULT_MSG
LIBWWW_LIBRARIES
LIBWWW_INCLUDE_DIR
)

@ -37,7 +37,7 @@ MACRO(DETECT_WINSDK_VERSION _VERSION)
ENDIF(NOT WINSDK${_VERSION}_FOUND) ENDIF(NOT WINSDK${_VERSION}_FOUND)
ENDMACRO(DETECT_WINSDK_VERSION) ENDMACRO(DETECT_WINSDK_VERSION)
SET(WINSDK_VERSIONS "8.0" "8.0A" "7.1" "7.1A" "7.0" "7.0A" "6.1" "6.0" "6.0A") SET(WINSDK_VERSIONS "8.1" "8.0" "7.1" "7.1A" "7.0" "7.0A" "6.1" "6.0" "6.0A")
SET(WINSDK_DETECTED_VERSIONS) SET(WINSDK_DETECTED_VERSIONS)
# Search all supported Windows SDKs # Search all supported Windows SDKs
@ -82,12 +82,23 @@ MACRO(FIND_WINSDK_VERSION_HEADERS)
) )
IF(_MSI_FILE) IF(_MSI_FILE)
# Look for Windows SDK 8.0 IF(NOT WINSDK_VERSION)
FILE(STRINGS ${_MSI_FILE} _CONTENT REGEX "^#ifndef NTDDI_WIN8") # Look for Windows SDK 8.1
FILE(STRINGS ${_MSI_FILE} _CONTENT REGEX "^#ifndef NTDDI_WINBLUE")
IF(_CONTENT) IF(_CONTENT)
SET(WINSDK_VERSION "8.0") SET(WINSDK_VERSION "8.1")
ENDIF(_CONTENT) ENDIF(_CONTENT)
ENDIF(NOT WINSDK_VERSION)
IF(NOT WINSDK_VERSION)
# Look for Windows SDK 8.0
FILE(STRINGS ${_MSI_FILE} _CONTENT REGEX "^#ifndef NTDDI_WIN8")
IF(_CONTENT)
SET(WINSDK_VERSION "8.0")
ENDIF(_CONTENT)
ENDIF(NOT WINSDK_VERSION)
IF(NOT WINSDK_VERSION) IF(NOT WINSDK_VERSION)
# Look for Windows SDK 7.0 # Look for Windows SDK 7.0
@ -206,9 +217,9 @@ MACRO(USE_CURRENT_WINSDK)
IF(NOT WINSDK_DIR) IF(NOT WINSDK_DIR)
# Use Windows SDK versions installed with VC++ when possible # Use Windows SDK versions installed with VC++ when possible
IF(MSVC12) IF(MSVC12)
SET(WINSDK_VERSION "8.1A") SET(WINSDK_VERSION "8.1")
ELSEIF(MSVC11) ELSEIF(MSVC11)
SET(WINSDK_VERSION "8.0A") SET(WINSDK_VERSION "8.0")
ELSEIF(MSVC10) ELSEIF(MSVC10)
IF(NOT TARGET_X64 OR NOT MSVC_EXPRESS) IF(NOT TARGET_X64 OR NOT MSVC_EXPRESS)
SET(WINSDK_VERSION "7.0A") SET(WINSDK_VERSION "7.0A")
@ -228,7 +239,11 @@ MACRO(USE_CURRENT_WINSDK)
# Use installed Windows SDK # Use installed Windows SDK
IF(NOT WINSDK_VERSION) IF(NOT WINSDK_VERSION)
IF(WINSDK7.1_FOUND) IF(WINSDK8.1_FOUND)
SET(WINSDK_VERSION "8.1")
ELSEIF(WINSDK8.0_FOUND)
SET(WINSDK_VERSION "8.0")
ELSEIF(WINSDK7.1_FOUND)
SET(WINSDK_VERSION "7.1") SET(WINSDK_VERSION "7.1")
ELSEIF(WINSDK7.0_FOUND) ELSEIF(WINSDK7.0_FOUND)
SET(WINSDK_VERSION "7.0") SET(WINSDK_VERSION "7.0")
@ -286,6 +301,7 @@ FIND_PATH(WINSDK_SHARED_INCLUDE_DIR d3d9.h
# directory where OpenGL headers are found # directory where OpenGL headers are found
FIND_PATH(WINSDK_OPENGL_INCLUDE_DIR GL.h FIND_PATH(WINSDK_OPENGL_INCLUDE_DIR GL.h
HINTS HINTS
${WINSDK_DIR}/Include/um/gl
${WINSDK_DIR}/Include/gl ${WINSDK_DIR}/Include/gl
${WINSDK_DIR}/Include ${WINSDK_DIR}/Include
) )
@ -293,6 +309,7 @@ FIND_PATH(WINSDK_OPENGL_INCLUDE_DIR GL.h
# directory where all libraries are found # directory where all libraries are found
FIND_PATH(WINSDK_LIBRARY_DIR ComCtl32.lib FIND_PATH(WINSDK_LIBRARY_DIR ComCtl32.lib
HINTS HINTS
${WINSDK_DIR}/Lib/winv6.3/um/${WINSDK8_SUFFIX}
${WINSDK_DIR}/Lib/win8/um/${WINSDK8_SUFFIX} ${WINSDK_DIR}/Lib/win8/um/${WINSDK8_SUFFIX}
${WINSDK_DIR}/Lib/${WINSDK_SUFFIX} ${WINSDK_DIR}/Lib/${WINSDK_SUFFIX}
) )
@ -300,6 +317,7 @@ FIND_PATH(WINSDK_LIBRARY_DIR ComCtl32.lib
# signtool is used to sign executables # signtool is used to sign executables
FIND_PROGRAM(WINSDK_SIGNTOOL signtool FIND_PROGRAM(WINSDK_SIGNTOOL signtool
HINTS HINTS
${WINSDK_DIR}/Bin/${WINSDK8_SUFFIX}
${WINSDK_DIR}/Bin/x86 ${WINSDK_DIR}/Bin/x86
${WINSDK_DIR}/Bin ${WINSDK_DIR}/Bin
) )
@ -307,6 +325,7 @@ FIND_PROGRAM(WINSDK_SIGNTOOL signtool
# midl is used to generate IDL interfaces # midl is used to generate IDL interfaces
FIND_PROGRAM(WINSDK_MIDL midl FIND_PROGRAM(WINSDK_MIDL midl
HINTS HINTS
${WINSDK_DIR}/Bin/${WINSDK8_SUFFIX}
${WINSDK_DIR}/Bin/x86 ${WINSDK_DIR}/Bin/x86
${WINSDK_DIR}/Bin ${WINSDK_DIR}/Bin
) )
@ -315,7 +334,7 @@ IF(WINSDK_INCLUDE_DIR)
SET(WINSDK_FOUND ON) SET(WINSDK_FOUND ON)
SET(WINSDK_INCLUDE_DIRS ${WINSDK_INCLUDE_DIR} ${WINSDK_SHARED_INCLUDE_DIR} ${WINSDK_OPENGL_INCLUDE_DIR}) SET(WINSDK_INCLUDE_DIRS ${WINSDK_INCLUDE_DIR} ${WINSDK_SHARED_INCLUDE_DIR} ${WINSDK_OPENGL_INCLUDE_DIR})
SET(CMAKE_LIBRARY_PATH ${WINSDK_LIBRARY_DIR} ${CMAKE_LIBRARY_PATH}) SET(CMAKE_LIBRARY_PATH ${WINSDK_LIBRARY_DIR} ${CMAKE_LIBRARY_PATH})
INCLUDE_DIRECTORIES(${WINSDK_INCLUDE_DIRS}) INCLUDE_DIRECTORIES(${WINSDK_INCLUDE_DIRS}) # TODO: Move this after all other includes somehow...
# Fix for using Windows SDK 7.1 with Visual C++ 2012 # Fix for using Windows SDK 7.1 with Visual C++ 2012
IF(WINSDK_VERSION STREQUAL "7.1" AND MSVC11) IF(WINSDK_VERSION STREQUAL "7.1" AND MSVC11)

@ -1148,6 +1148,14 @@ MACRO(SETUP_EXTERNAL)
INCLUDE_DIRECTORIES(${STLPORT_INCLUDE_DIR}) INCLUDE_DIRECTORIES(${STLPORT_INCLUDE_DIR})
ENDIF(WITH_STLPORT) ENDIF(WITH_STLPORT)
IF(WIN32)
# Must include DXSDK before WINSDK
FIND_PACKAGE(DirectXSDK REQUIRED)
# IF(DXSDK_INCLUDE_DIR)
# INCLUDE_DIRECTORIES(${DXSDK_INCLUDE_DIR})
# ENDIF()
ENDIF(WIN32)
IF(MSVC) IF(MSVC)
FIND_PACKAGE(MSVC REQUIRED) FIND_PACKAGE(MSVC REQUIRED)
FIND_PACKAGE(WindowsSDK REQUIRED) FIND_PACKAGE(WindowsSDK REQUIRED)

@ -4,11 +4,7 @@ IF(WITH_STATIC_DRIVERS)
ADD_DEFINITIONS(-DNL_STATIC) ADD_DEFINITIONS(-DNL_STATIC)
ENDIF(WITH_STATIC_DRIVERS) ENDIF(WITH_STATIC_DRIVERS)
# On Windows we need to find DirectInput for NLMISC.
# This is how we get events.
IF(WIN32) IF(WIN32)
FIND_PACKAGE(DirectXSDK REQUIRED)
# On Win32 we can also build the MAX plugins. # On Win32 we can also build the MAX plugins.
IF(WITH_NEL_MAXPLUGIN) IF(WITH_NEL_MAXPLUGIN)
FIND_PACKAGE(3dsMaxSDK) FIND_PACKAGE(3dsMaxSDK)

@ -54,11 +54,13 @@ public:
/** generate and return a bitmap /** generate and return a bitmap
* \param c the unicode char * \param c the unicode char
* \param size size of the generated font in ??? format * \param size size of the generated font in ??? format
* \param embolden set embolden style (bold)
* \param oblique set oblique style (slanted, italic)
* \param width width of the generated bitmap, this value is set by this function * \param width width of the generated bitmap, this value is set by this function
* \param height height of the generated bitmap, this value is set by this function * \param height height of the generated bitmap, this value is set by this function
* \param pitch pitch of the generated bitmap (+ or - the number of bytes per row), this value is set by this function * \param pitch pitch of the generated bitmap (+ or - the number of bytes per row), this value is set by this function
*/ */
uint8 *getBitmap (ucchar c, uint32 size, uint32 &width, uint32 &height, uint32 &pitch, sint32 &left, sint32 &top, sint32 &advx, uint32 &glyphIndex); uint8 *getBitmap (ucchar c, uint32 size, bool embolden, bool oblique, uint32 &width, uint32 &height, uint32 &pitch, sint32 &left, sint32 &top, sint32 &advx, uint32 &glyphIndex);
/** returns the width and height of a character using a specific size and /** returns the width and height of a character using a specific size and
* *

@ -102,6 +102,8 @@ public:
* \param fontGen font generator * \param fontGen font generator
* \param color primitive blocks color * \param color primitive blocks color
* \param fontSize font size * \param fontSize font size
* \param embolden font style bold
* \param oblique font style slanted (italic)
* \param desc display descriptor (screen size, font ratio) * \param desc display descriptor (screen size, font ratio)
* \param output computed string * \param output computed string
* \param keep800x600Ratio true if you want that CFontManager look at Driver window size, and resize fontSize so it keeps same size... * \param keep800x600Ratio true if you want that CFontManager look at Driver window size, and resize fontSize so it keeps same size...
@ -110,6 +112,8 @@ public:
CFontGenerator *fontGen, CFontGenerator *fontGen,
const NLMISC::CRGBA &color, const NLMISC::CRGBA &color,
uint32 fontSize, uint32 fontSize,
bool embolden,
bool oblique,
IDriver *driver, IDriver *driver,
CComputedString& output, CComputedString& output,
bool keep800x600Ratio= true); bool keep800x600Ratio= true);
@ -121,6 +125,8 @@ public:
CFontGenerator *fontGen, CFontGenerator *fontGen,
const NLMISC::CRGBA &color, const NLMISC::CRGBA &color,
uint32 fontSize, uint32 fontSize,
bool embolden,
bool oblique,
IDriver *driver, IDriver *driver,
CComputedString &output, CComputedString &output,
bool keep800x600Ratio= true); bool keep800x600Ratio= true);
@ -132,6 +138,8 @@ public:
CFontGenerator *fontGen, CFontGenerator *fontGen,
const NLMISC::CRGBA &color, const NLMISC::CRGBA &color,
uint32 fontSize, uint32 fontSize,
bool embolden,
bool oblique,
IDriver *driver, IDriver *driver,
CComputedString &output, CComputedString &output,
bool keep800x600Ratio= true); bool keep800x600Ratio= true);

@ -74,6 +74,10 @@ public:
void setFontSize (uint32 fontSize) { _FontSize = fontSize; } void setFontSize (uint32 fontSize) { _FontSize = fontSize; }
void setEmbolden (bool b) { _Embolden = b; }
void setOblique (bool b) { _Oblique = b; }
void setHotSpot (CComputedString::THotSpot hotSpot) { _HotSpot = hotSpot; } void setHotSpot (CComputedString::THotSpot hotSpot) { _HotSpot = hotSpot; }
void setScaleX (float scaleX) { _ScaleX = scaleX; } void setScaleX (float scaleX) { _ScaleX = scaleX; }
@ -101,6 +105,10 @@ public:
uint32 getFontSize () const { return _FontSize; } uint32 getFontSize () const { return _FontSize; }
bool getEmbolden () const { return _Embolden; }
bool getOblique () const { return _Oblique; }
CComputedString::THotSpot getHotSpot() const { return _HotSpot; } CComputedString::THotSpot getHotSpot() const { return _HotSpot; }
float getScaleX() const { return _ScaleX; } float getScaleX() const { return _ScaleX; }
@ -240,7 +248,7 @@ public:
nlassert(_FontGen); nlassert(_FontGen);
// compute the string just one time // compute the string just one time
_FontManager->computeString (ucstr, _FontGen, _Color, _FontSize, _Driver, _TempString, _Keep800x600Ratio); _FontManager->computeString (ucstr, _FontGen, _Color, _FontSize, _Embolden, _Oblique, _Driver, _TempString, _Keep800x600Ratio);
// draw shaded // draw shaded
if (_Shaded) if (_Shaded)
@ -279,7 +287,7 @@ public:
// compute the string just one time // compute the string just one time
char *str; char *str;
NLMISC_CONVERT_VARGS (str, format, NLMISC::MaxCStringSize); NLMISC_CONVERT_VARGS (str, format, NLMISC::MaxCStringSize);
_FontManager->computeString (str, _FontGen, _Color, _FontSize, _Driver, _TempString, _Keep800x600Ratio); _FontManager->computeString (str, _FontGen, _Color, _FontSize, _Embolden, _Oblique, _Driver, _TempString, _Keep800x600Ratio);
// draw shaded // draw shaded
if (_Shaded) if (_Shaded)
@ -334,7 +342,7 @@ public:
*/ */
void computeString (const std::string& s, CComputedString& output) void computeString (const std::string& s, CComputedString& output)
{ {
_FontManager->computeString (s, _FontGen, _Color, _FontSize, _Driver, output, _Keep800x600Ratio); _FontManager->computeString (s, _FontGen, _Color, _FontSize, _Embolden, _Oblique, _Driver, output, _Keep800x600Ratio);
} }
/** /**
@ -345,12 +353,12 @@ public:
*/ */
void computeString (const ucstring& s, CComputedString& output) void computeString (const ucstring& s, CComputedString& output)
{ {
_FontManager->computeString (s, _FontGen, _Color, _FontSize, _Driver, output, _Keep800x600Ratio); _FontManager->computeString (s, _FontGen, _Color, _FontSize, _Embolden, _Oblique, _Driver, output, _Keep800x600Ratio);
} }
void computeStringInfo (const ucstring& s, CComputedString& output) void computeStringInfo (const ucstring& s, CComputedString& output)
{ {
_FontManager->computeStringInfo (s, _FontGen, _Color, _FontSize, _Driver, output, _Keep800x600Ratio); _FontManager->computeStringInfo (s, _FontGen, _Color, _FontSize, _Embolden, _Oblique, _Driver, output, _Keep800x600Ratio);
} }
/// Debug : write to the disk the texture cache /// Debug : write to the disk the texture cache
@ -381,6 +389,10 @@ private:
/// Font size; /// Font size;
uint32 _FontSize; uint32 _FontSize;
bool _Embolden;
bool _Oblique;
/// Current text color /// Current text color
NLMISC::CRGBA _Color; NLMISC::CRGBA _Color;

@ -66,6 +66,10 @@ public:
void setColor(NLMISC::CRGBA color); void setColor(NLMISC::CRGBA color);
void setFontSize(uint32 fontSize); void setFontSize(uint32 fontSize);
uint32 getFontSize() const; uint32 getFontSize() const;
void setEmbolden(bool b);
bool getEmbolden() const;
void setOblique(bool b);
bool getOblique() const;
void setHotSpot(THotSpot hotSpot); void setHotSpot(THotSpot hotSpot);
THotSpot getHotSpot() const; THotSpot getHotSpot() const;
void setScaleX(float scaleX); void setScaleX(float scaleX);

@ -43,6 +43,8 @@ public:
ucchar Char; ucchar Char;
CFontGenerator *FontGenerator; CFontGenerator *FontGenerator;
sint Size; sint Size;
bool Embolden;
bool Oblique;
// The less recently used infos // The less recently used infos
@ -66,6 +68,8 @@ public:
ucchar Char; ucchar Char;
CFontGenerator *FontGenerator; CFontGenerator *FontGenerator;
sint Size; sint Size;
bool Embolden;
bool Oblique;
uint32 getVal(); uint32 getVal();
//bool operator < (const SLetterKey&k) const; //bool operator < (const SLetterKey&k) const;

@ -137,6 +137,24 @@ public:
* \return the font size * \return the font size
*/ */
virtual uint32 getFontSize () const = 0; virtual uint32 getFontSize () const = 0;
/**
* set embolden (bold) state
* \param embolden the embbolden state
*/
virtual void setEmbolden (bool b) = 0;
/**
* \return the embolden state
*/
virtual bool getEmbolden () const = 0;
/**
* set oblique (italic) state
* \param oblique the oblique state
*/
virtual void setOblique (bool b) = 0;
/**
* \return the oblique state
*/
virtual bool getOblique () const = 0;
/** /**
* set the hot spot * set the hot spot
* \param fonSize the font size * \param fonSize the font size

@ -25,14 +25,10 @@
#include "nel/gui/group_tree.h" #include "nel/gui/group_tree.h"
#include "nel/gui/ctrl_button.h" #include "nel/gui/ctrl_button.h"
#include "nel/gui/group_table.h" #include "nel/gui/group_table.h"
#include "nel/gui/libwww_types.h"
typedef std::map<std::string, std::string> TStyle; typedef std::map<std::string, std::string> TStyle;
extern "C"
{
#include "WWWInit.h"
}
namespace NLGUI namespace NLGUI
{ {
class CCtrlButton; class CCtrlButton;
@ -41,7 +37,8 @@ namespace NLGUI
class CDBGroupComboBox; class CDBGroupComboBox;
class CGroupParagraph; class CGroupParagraph;
extern std::string CurrentCookie;
extern std::string HTTPCurrentDomain;
// HTML group // HTML group
/** /**
@ -55,15 +52,6 @@ namespace NLGUI
public: public:
DECLARE_UI_CLASS( CGroupHTML ) DECLARE_UI_CLASS( CGroupHTML )
friend void TextAdd (struct _HText *me, const char * buf, int len);
friend void TextBeginElement (_HText *me, int element_number, const BOOL *present, const char ** value);
friend void TextEndElement (_HText *me, int element_number);
friend void TextLink (struct _HText *me, int element_number, int attribute_number, struct _HTChildAnchor *anchor, const BOOL *present, const char **value);
friend void TextBuild (HText * me, HTextStatus status);
friend void TextBeginUnparsedElement(HText *me, const char *buffer, int length);
friend void TextEndUnparsedElement(HText *me, const char *buffer, int length);
friend int requestTerminater (HTRequest * request, HTResponse * response, void * param, int status);
/// Web browser options for CGroupHTML /// Web browser options for CGroupHTML
struct SWebOptions struct SWebOptions
{ {
@ -102,6 +90,9 @@ namespace NLGUI
// Browse // Browse
virtual void browse (const char *url); virtual void browse (const char *url);
// parse html string using libxml2 parser
virtual bool parseHtml(std::string htmlString);
// Refresh // Refresh
void refresh(); void refresh();
@ -172,9 +163,40 @@ namespace NLGUI
std::string DefaultCheckBoxBitmapNormal; std::string DefaultCheckBoxBitmapNormal;
std::string DefaultCheckBoxBitmapPushed; std::string DefaultCheckBoxBitmapPushed;
std::string DefaultCheckBoxBitmapOver; std::string DefaultCheckBoxBitmapOver;
std::string DefaultRadioButtonBitmapNormal;
std::string DefaultRadioButtonBitmapPushed;
std::string DefaultRadioButtonBitmapOver;
std::string DefaultBackgroundBitmapView; std::string DefaultBackgroundBitmapView;
std::string CurrentLinkTitle; std::string CurrentLinkTitle;
struct TFormField {
public:
TFormField(const std::string &k, const std::string &v)
:name(k),value(v)
{}
std::string name;
std::string value;
};
struct SFormFields {
public:
SFormFields()
{
}
void clear()
{
Values.clear();
}
void add(const std::string &key, const std::string &value)
{
Values.push_back(TFormField(key, value));
}
std::vector<TFormField> Values;
};
// Browser home // Browser home
std::string Home; std::string Home;
@ -199,6 +221,7 @@ namespace NLGUI
int luaBeginElement(CLuaState &ls); int luaBeginElement(CLuaState &ls);
int luaEndElement(CLuaState &ls); int luaEndElement(CLuaState &ls);
int luaShowDiv(CLuaState &ls); int luaShowDiv(CLuaState &ls);
int luaParseHtml(CLuaState &ls);
REFLECT_EXPORT_START(CGroupHTML, CGroupScrollText) REFLECT_EXPORT_START(CGroupHTML, CGroupScrollText)
REFLECT_LUA_METHOD("browse", luaBrowse) REFLECT_LUA_METHOD("browse", luaBrowse)
@ -210,6 +233,7 @@ namespace NLGUI
REFLECT_LUA_METHOD("beginElement", luaBeginElement) REFLECT_LUA_METHOD("beginElement", luaBeginElement)
REFLECT_LUA_METHOD("endElement", luaEndElement) REFLECT_LUA_METHOD("endElement", luaEndElement)
REFLECT_LUA_METHOD("showDiv", luaShowDiv) REFLECT_LUA_METHOD("showDiv", luaShowDiv)
REFLECT_LUA_METHOD("parseHtml", luaParseHtml)
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
@ -228,10 +252,10 @@ namespace NLGUI
virtual void addText (const char * buf, int len); virtual void addText (const char * buf, int len);
// A link has been parsed // A link has been parsed
virtual void addLink (uint element_number, uint attribute_number, HTChildAnchor *anchor, const BOOL *present, const char **value); virtual void addLink (uint element_number, const std::vector<bool> &present, const std::vector<const char *> &value);
// A new begin HTML element has been parsed (<IMG> for exemple) // A new begin HTML element has been parsed (<IMG> for exemple)
virtual void beginElement (uint element_number, const BOOL *present, const char **value); virtual void beginElement (uint element_number, const std::vector<bool> &present, const std::vector<const char *> &value);
// A new end HTML element has been parsed (</IMG> for exemple) // A new end HTML element has been parsed (</IMG> for exemple)
virtual void endElement (uint element_number); virtual void endElement (uint element_number);
@ -246,10 +270,14 @@ namespace NLGUI
virtual void addHTTPGetParams (std::string &url, bool trustedDomain); virtual void addHTTPGetParams (std::string &url, bool trustedDomain);
// Add POST params to the libwww list // Add POST params to the libwww list
virtual void addHTTPPostParams (HTAssocList *formfields, bool trustedDomain); virtual void addHTTPPostParams (SFormFields &formfields, bool trustedDomain);
// the current request is terminated // the current request is terminated
virtual void requestTerminated(HTRequest *request); virtual void requestTerminated();
// libxml2 html parser functions
void htmlElement(xmlNode *node, int element_number);
void htmlWalkDOM(xmlNode *a_node);
// Get Home URL // Get Home URL
virtual std::string home(); virtual std::string home();
@ -338,6 +366,7 @@ namespace NLGUI
bool _Connecting; bool _Connecting;
double _TimeoutValue; // the timeout in seconds double _TimeoutValue; // the timeout in seconds
double _ConnectingTimeout; double _ConnectingTimeout;
uint32 _RedirectsRemaining;
// minimal embeded lua script support // minimal embeded lua script support
// Note : any embeded script is executed immediately after the closing // Note : any embeded script is executed immediately after the closing
@ -351,11 +380,8 @@ namespace NLGUI
bool _Object; bool _Object;
std::string _ObjectScript; std::string _ObjectScript;
// Someone is conecting. We got problem with libwww : 2 connection requests can deadlock the client. // Data container for active curl transfer
static CGroupHTML *_ConnectingLock; class CCurlWWWData * _CurlWWW;
// LibWWW data
class CLibWWWData *_LibWWW;
// Current paragraph // Current paragraph
std::string _DivName; std::string _DivName;
@ -425,6 +451,38 @@ namespace NLGUI
return _FontSize.back(); return _FontSize.back();
} }
std::vector<uint> _FontWeight;
inline uint getFontWeight() const
{
if (_FontWeight.empty())
return 400;
return _FontWeight.back();
}
std::vector<bool> _FontOblique;
inline bool getFontOblique() const
{
if (_FontOblique.empty())
return false;
return _FontOblique.back();
}
std::vector<bool> _FontUnderlined;
inline bool getFontUnderlined() const
{
if (_FontUnderlined.empty())
return false;
return _FontUnderlined.back();
}
std::vector<bool> _FontStrikeThrough;
inline bool getFontStrikeThrough() const
{
if (_FontStrikeThrough.empty())
return false;
return _FontStrikeThrough.back();
}
// Current link // Current link
std::vector<std::string> _Link; std::vector<std::string> _Link;
inline const char *getLink() const inline const char *getLink() const
@ -544,6 +602,26 @@ namespace NLGUI
}; };
std::vector<CCellParams> _CellParams; std::vector<CCellParams> _CellParams;
class CStyleParams
{
public:
CStyleParams () : TextColor(255,255,255,255)
{
FontSize=10;
FontWeight=400;
FontOblique=false;
Underlined=false;
StrikeThrough=false;
}
uint FontSize;
uint FontWeight;
bool FontOblique;
NLMISC::CRGBA TextColor;
bool Underlined;
bool StrikeThrough;
};
// Indentation // Indentation
uint _Indent; uint _Indent;
@ -613,8 +691,22 @@ namespace NLGUI
typedef std::map<uint32, NLMISC::CRefPtr<CGroupHTML> > TGroupHtmlByUIDMap; typedef std::map<uint32, NLMISC::CRefPtr<CGroupHTML> > TGroupHtmlByUIDMap;
static TGroupHtmlByUIDMap _GroupHtmlByUID; static TGroupHtmlByUIDMap _GroupHtmlByUID;
private: // read style attribute
void getStyleParams(const std::string &styleString, CStyleParams &style, bool inherit = true);
// load and render local html file (from bnp for example)
void doBrowseLocalFile(const std::string &filename);
// load remote content using either GET or POST
void doBrowseRemoteUrl(const std::string &url, const std::string &referer, bool doPost = false, const SFormFields &formfields = SFormFields());
// render html string as new browser page
bool renderHtmlString(const std::string &html);
// initialize formfields list from form elements on page
void buildHTTPPostParams (SFormFields &formfields);
private:
// decode all HTML entities // decode all HTML entities
static ucstring decodeHTMLEntities(const ucstring &str); static ucstring decodeHTMLEntities(const ucstring &str);
@ -623,13 +715,16 @@ namespace NLGUI
struct CDataDownload struct CDataDownload
{ {
CDataDownload(CURL *c, const std::string &u, FILE *f, TDataType t, CViewBase *i, const std::string &s, const std::string &m) : curl(c), url(u), luaScript(s), md5sum(m), type(t), fp(f) public:
CDataDownload(CURL *c, const std::string &u, const std::string &d, FILE *f, TDataType t, CViewBase *i, const std::string &s, const std::string &m) : curl(c), url(u), dest(d), luaScript(s), md5sum(m), type(t), fp(f)
{ {
if (t == ImgType) imgs.push_back(i); if (t == ImgType) imgs.push_back(i);
} }
public:
CURL *curl; CURL *curl;
std::string url; std::string url;
std::string dest;
std::string luaScript; std::string luaScript;
std::string md5sum; std::string md5sum;
TDataType type; TDataType type;
@ -645,6 +740,7 @@ namespace NLGUI
void checkImageDownload(); void checkImageDownload();
void addImageDownload(const std::string &url, CViewBase *img); void addImageDownload(const std::string &url, CViewBase *img);
std::string localImageName(const std::string &url); std::string localImageName(const std::string &url);
std::string getAbsoluteUrl(const std::string &url);
bool isTrustedDomain(const std::string &domain); bool isTrustedDomain(const std::string &domain);
void setImage(CViewBase *view, const std::string &file); void setImage(CViewBase *view, const std::string &file);
@ -658,6 +754,13 @@ namespace NLGUI
void releaseDownloads(); void releaseDownloads();
void checkDownloads(); void checkDownloads();
// HtmlType download finished
void htmlDownloadFinished(const std::string &content, const std::string &type, long code);
// cURL transfer callbacks
static size_t curlHeaderCallback(char *buffer, size_t size, size_t nmemb, void *pCCurlWWWData);
static size_t curlDataCallback(char *buffer, size_t size, size_t nmemb, void *pCCurlWWWData);
static size_t curlProgressCallback(void *pCCurlWWWData, curl_off_t dltotal, curl_off_t dlnow, curl_off_t ultotal, curl_off_t ulnow);
}; };
// adapter group that store y offset for inputs inside an html form // adapter group that store y offset for inputs inside an html form
@ -671,7 +774,6 @@ namespace NLGUI
xmlNodePtr serialize( xmlNodePtr parentNode, const char *type ) const; xmlNodePtr serialize( xmlNodePtr parentNode, const char *type ) const;
virtual bool parse (xmlNodePtr cur, CInterfaceGroup *parentGroup); virtual bool parse (xmlNodePtr cur, CInterfaceGroup *parentGroup);
}; };
} }
#endif #endif

@ -20,12 +20,10 @@
#ifndef CL_LIB_WWW_H #ifndef CL_LIB_WWW_H
#define CL_LIB_WWW_H #define CL_LIB_WWW_H
extern "C" #include <curl/curl.h>
{
#include "WWWInit.h"
}
#include "nel/misc/rgba.h" #include "nel/misc/rgba.h"
#include "nel/gui/libwww_types.h"
namespace NLGUI namespace NLGUI
{ {
@ -35,14 +33,12 @@ namespace NLGUI
// *************************************************************************** // ***************************************************************************
// Legacy function from libwww
SGML_dtd * HTML_dtd (void);
// Init the libwww // Init the libwww
void initLibWWW(); void initLibWWW();
// Get an url and setup a local domain
const std::string &setCurrentDomain(const std::string &url);
extern std::string CurrentCookie;
// *************************************************************************** // ***************************************************************************
// Some DTD table // Some DTD table
@ -218,49 +214,16 @@ namespace NLGUI
HTML_ATTR(DIV,STYLE), HTML_ATTR(DIV,STYLE),
}; };
enum
#undef HTML_ATTR
// ***************************************************************************
// A smart ptr for LibWWW strings
class C3WSmartPtr
{ {
public: HTML_ATTR(SPAN,CLASS) = 0,
C3WSmartPtr () HTML_ATTR(SPAN,ID),
{ HTML_ATTR(SPAN,STYLE),
_Ptr = NULL;
}
C3WSmartPtr (const char *ptr)
{
_Ptr = ptr;
}
~C3WSmartPtr ()
{
clear();
}
void operator=(const char *str)
{
clear ();
_Ptr = str;
}
operator const char *() const
{
return _Ptr;
}
void clear()
{
if (_Ptr)
{
void *ptr = (void*)_Ptr;
HT_FREE(ptr);
}
_Ptr = NULL;
}
private:
const char *_Ptr;
}; };
#undef HTML_ATTR
// *************************************************************************** // ***************************************************************************
// Read a width HTML parameter. "100" or "100%". Returns true if percent (0 ~ 1) else false // Read a width HTML parameter. "100" or "100%". Returns true if percent (0 ~ 1) else false
@ -273,15 +236,10 @@ namespace NLGUI
// *************************************************************************** // ***************************************************************************
void _VerifyLibWWW(const char *function, bool ok, const char *file, int line); const std::string &setCurrentDomain(const std::string &uri);
#define VerifyLibWWW(a,b) _VerifyLibWWW(a,(b)!=FALSE,__FILE__,__LINE__) void receiveCookies (CURL *curl, const std::string &domain, bool trusted);
void sendCookies(CURL *curl, const std::string &domain, bool trusted);
// ***************************************************************************
// Standard request terminator
int requestTerminater (HTRequest * request, HTResponse * response, void * param, int status) ;
// ***************************************************************************
} }
#endif #endif

@ -1,28 +0,0 @@
// 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/>.
#ifndef LIBWWW_NEL_STREAM_H
#define LIBWWW_NEL_STREAM_H
#include "HTProt.h"
extern "C" HTProtCallback HTLoadNeLFile;
extern "C" PUBLIC HTInputStream * HTNeLReader_new (HTHost * host, HTChannel * ch, void * param, int mode);
#endif // LIBWWW_NEL_STREAM_H

File diff suppressed because it is too large Load Diff

@ -0,0 +1,63 @@
// 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/>.
#ifndef CL_URL_PARSER_H
#define CL_URL_PARSER_H
#include <string>
namespace NLGUI
{
/**
* Simple URL parser
* \author Meelis Mägi
* \date 2015
*/
class CUrlParser
{
public:
CUrlParser(){}
// parse uri to components
CUrlParser(const std::string &url);
// parse uri to components
void parse(std::string uri);
// serialize URL back to string
std::string toString() const;
// inherit scheme, domain, path from given url
void inherit(const std::string &url);
// if current parts can compose absolute url or not
bool isAbsolute() const;
// resolve relative path like './a/../b' to absolute path '/a/b'
static void resolveRelativePath(std::string &path);
public:
std::string scheme;
std::string domain;
std::string path;
std::string query;
std::string hash;
};
}// namespace
#endif // CL_URL_PARSER_H

@ -81,6 +81,8 @@ namespace NLGUI
void setText (const ucstring &text); void setText (const ucstring &text);
void setFontSize (sint nFontSize); void setFontSize (sint nFontSize);
void setEmbolden (bool nEmbolden);
void setOblique (bool nOblique);
void setColor (const NLMISC::CRGBA &color); void setColor (const NLMISC::CRGBA &color);
void setShadow (bool bShadow); void setShadow (bool bShadow);
void setShadowOutline (bool bShadowOutline); void setShadowOutline (bool bShadowOutline);
@ -101,6 +103,8 @@ namespace NLGUI
ucstring getText() const { return _Text; } ucstring getText() const { return _Text; }
sint getFontSize() const; sint getFontSize() const;
bool getEmbolden() { return _Embolden; }
bool getOblique() { return _Oblique; }
NLMISC::CRGBA getColor() { return _Color; } NLMISC::CRGBA getColor() { return _Color; }
bool getShadow() { return _Shadow; } bool getShadow() { return _Shadow; }
bool getShadowOutline() { return _ShadowOutline; } bool getShadowOutline() { return _ShadowOutline; }
@ -125,6 +129,8 @@ namespace NLGUI
uint getLastLineW () const; uint getLastLineW () const;
void setUnderlined (bool underlined) { _Underlined = underlined; } void setUnderlined (bool underlined) { _Underlined = underlined; }
bool getUnderlined () const { return _Underlined; } bool getUnderlined () const { return _Underlined; }
void setStrikeThrough (bool linethrough) { _StrikeThrough = linethrough; }
bool getStrikeThrough () const { return _StrikeThrough; }
// true if the viewText is a single line clamped. // true if the viewText is a single line clamped.
bool isSingleLineTextClamped() const {return _SingleLineTextClamped;} bool isSingleLineTextClamped() const {return _SingleLineTextClamped;}
@ -220,6 +226,8 @@ namespace NLGUI
NL3D::UTextContext::CStringInfo _Info; NL3D::UTextContext::CStringInfo _Info;
/// the font size /// the font size
sint _FontSize; sint _FontSize;
bool _Embolden;
bool _Oblique;
// width of the font in pixel. Just a Hint for tabing format (computed with '_') // width of the font in pixel. Just a Hint for tabing format (computed with '_')
uint _FontWidth; uint _FontWidth;
// height of the font in pixel. // height of the font in pixel.
@ -374,6 +382,7 @@ namespace NLGUI
bool _TextSelection : 1; bool _TextSelection : 1;
bool _InvalidTextContext : 1; bool _InvalidTextContext : 1;
bool _Underlined : 1; bool _Underlined : 1;
bool _StrikeThrough : 1;
bool _ContinuousUpdate : 1; bool _ContinuousUpdate : 1;
bool _Setuped : 1; bool _Setuped : 1;

@ -347,7 +347,7 @@ std::string formatThousands(const std::string& s);
/// This function executes a program in the background and returns instantly (used for example to launch services in AES). /// This function executes a program in the background and returns instantly (used for example to launch services in AES).
/// The program will be launched in the current directory /// The program will be launched in the current directory
bool launchProgram (const std::string &programName, const std::string &arguments); bool launchProgram (const std::string &programName, const std::string &arguments, bool log = true);
/// This function kills a program using his pid (on unix, it uses the kill() POSIX function) /// This function kills a program using his pid (on unix, it uses the kill() POSIX function)
bool killProgram(uint32 pid); bool killProgram(uint32 pid);

@ -580,7 +580,11 @@ struct CEntityIdHashMapTraits
size_t operator() (const NLMISC::CEntityId &id ) const size_t operator() (const NLMISC::CEntityId &id ) const
{ {
uint64 hash64 = id.getUniqueId(); uint64 hash64 = id.getUniqueId();
return size_t(hash64) ^ size_t( hash64 >> 32 ); #if (HAVE_X86_64)
return (size_t)hash64;
#else
return (size_t)hash64 ^ (size_t)(hash64 >> 32);
#endif
//return size_t(id.getShortId()); //return size_t(id.getShortId());
} }
bool operator() (const NLMISC::CEntityId &id1, const NLMISC::CEntityId &id2) const bool operator() (const NLMISC::CEntityId &id1, const NLMISC::CEntityId &id2) const

@ -20,6 +20,7 @@
#include "types_nl.h" #include "types_nl.h"
#include <cstdio> #include <cstdio>
#include <cstring>
#include <cstdarg> #include <cstdarg>
#include <errno.h> #include <errno.h>

@ -77,6 +77,10 @@ public:
/// Get desktop current color depth without using UDriver. /// Get desktop current color depth without using UDriver.
static uint getCurrentColorDepth(); static uint getCurrentColorDepth();
/// Detect whether the current process is a windowed application. Return true if definitely yes, false if unknown
static bool detectWindowedApplication();
}; };
} // NLMISC } // NLMISC

@ -417,12 +417,12 @@ extern void operator delete[](void *p) throw();
# define CHashMap stdext::hash_map # define CHashMap stdext::hash_map
# define CHashSet stdext::hash_set # define CHashSet stdext::hash_set
# define CHashMultiMap stdext::hash_multimap # define CHashMultiMap stdext::hash_multimap
#elif defined(NL_COMP_VC) && (NL_COMP_VC_VERSION >= 120) #elif defined(NL_COMP_VC) && (NL_COMP_VC_VERSION >= 100)
# include <hash_map> # include <unordered_map>
# include <hash_set> # include <unordered_set>
# define CHashMap ::std::hash_map # define CHashMap ::std::unordered_map
# define CHashSet ::std::hash_set # define CHashSet ::std::unordered_set
# define CHashMultiMap ::std::hash_multimap # define CHashMultiMap ::std::unordered_multimap
#elif defined(NL_COMP_GCC) // GCC4 #elif defined(NL_COMP_GCC) // GCC4
# include <ext/hash_map> # include <ext/hash_map>
# include <ext/hash_set> # include <ext/hash_set>

@ -363,7 +363,7 @@ struct CUCStringHashMapTraits
} }
bool operator() (const ucstring &id1, const ucstring &id2) const bool operator() (const ucstring &id1, const ucstring &id2) const
{ {
return id1.size() < id2.size(); return id1 < id2;
} }
}; };

@ -0,0 +1,74 @@
// Public domain hash functions
#ifndef NLMISC_WANG_HASH_H
#define NLMISC_WANG_HASH_H
#include "types_nl.h"
namespace NLMISC {
// http://burtleburtle.net/bob/hash/integer.html
inline uint32 wangHash(uint32 a)
{
a = (a ^ 61) ^ (a >> 16);
a = a + (a << 3);
a = a ^ (a >> 4);
a = a * 0x27d4eb2d;
a = a ^ (a >> 15);
return a;
}
// http://naml.us/blog/2012/03
inline uint64 wangHash64(uint64 key)
{
key = (~key) + (key << 21); // key = (key << 21) - key - 1;
key = key ^ (key >> 24);
key = (key + (key << 3)) + (key << 8); // key * 265
key = key ^ (key >> 14);
key = (key + (key << 2)) + (key << 4); // key * 21
key = key ^ (key >> 28);
key = key + (key << 31);
return key;
}
// http://naml.us/blog/2012/03 Inverse 64-bit wang hash
inline uint64 wangHash64Inv(uint64 key)
{
uint64 tmp;
// Invert key = key + (key << 31)
tmp = key - (key << 31);
key = key - (tmp << 31);
// Invert key = key ^ (key >> 28)
tmp = key^key >> 28;
key = key^tmp >> 28;
// Invert key *= 21
key *= 14933078535860113213u;
// Invert key = key ^ (key >> 14)
tmp = key^key >> 14;
tmp = key^tmp >> 14;
tmp = key^tmp >> 14;
key = key^tmp >> 14;
// Invert key *= 265
key *= 15244667743933553977u;
// Invert key = key ^ (key >> 24)
tmp = key^key >> 24;
key = key^tmp >> 24;
// Invert key = (~key) + (key << 21)
tmp = ~key;
tmp = ~(key - (tmp << 21));
tmp = ~(key - (tmp << 21));
key = ~(key - (tmp << 21));
return key;
}
} /* namespace NLMISC */
#endif // NLMISC_WANG_HASH_H

@ -71,6 +71,19 @@ struct CContextMatcher
return memcmp(JokersValues, other.JokersValues, sizeof(uint32)*NbJoker) == 0; return memcmp(JokersValues, other.JokersValues, sizeof(uint32)*NbJoker) == 0;
} }
bool operator<(const CContextMatcher &other) const
{
if (UseRandom)
if (RandomValue != other.RandomValue)
return RandomValue < other.RandomValue;
int cmp = memcmp(JokersValues, other.JokersValues, sizeof(uint32) * NbJoker);
if (cmp != 0)
return cmp < 0;
return false;
}
size_t getHashValue() const size_t getHashValue() const
{ {
return size_t(HashValue); return size_t(HashValue);
@ -89,10 +102,9 @@ struct CContextMatcher
} }
bool operator() (const CContextMatcher &patternMatcher1, const CContextMatcher &patternMatcher2) const bool operator() (const CContextMatcher &patternMatcher1, const CContextMatcher &patternMatcher2) const
{ {
return patternMatcher1.getHashValue() < patternMatcher2.getHashValue(); return patternMatcher1 < patternMatcher2;
} }
}; };
}; };

@ -79,16 +79,16 @@ int main(int argc, char **argv)
// 4th is the size of the font. 5th is a pointer to the video driver. // 4th is the size of the font. 5th is a pointer to the video driver.
// 6th is the resulting computed string. // 6th is the resulting computed string.
CComputedString csRotation; CComputedString csRotation;
fontManager.computeString ("cs Rotation", tc.getFontGenerator(), CRGBA(255,255,255), 70, CNELU::Driver, csRotation); fontManager.computeString ("cs Rotation", tc.getFontGenerator(), CRGBA(255,255,255), 70, false, false, CNELU::Driver, csRotation);
CComputedString cs3d; CComputedString cs3d;
fontManager.computeString ("cs 3d", tc.getFontGenerator(), CRGBA(255,127,0), 75, CNELU::Driver, cs3d); fontManager.computeString ("cs 3d", tc.getFontGenerator(), CRGBA(255,127,0), 75, false, false, CNELU::Driver, cs3d);
// generate an Unicode string. // generate an Unicode string.
ucstring ucs("cs Unicode String"); ucstring ucs("cs Unicode String");
CComputedString csUnicode; CComputedString csUnicode;
fontManager.computeString (ucs, tc.getFontGenerator(), CRGBA(32,64,127), 75, CNELU::Driver, csUnicode); fontManager.computeString (ucs, tc.getFontGenerator(), CRGBA(32,64,127), 75, false, false, CNELU::Driver, csUnicode);
// look at event example // look at event example
CNELU::EventServer.addEmitter(CNELU::Driver->getEventEmitter()); CNELU::EventServer.addEmitter(CNELU::Driver->getEventEmitter());

@ -715,7 +715,8 @@ SOURCE_GROUP(Stereo FILES
NL_TARGET_LIB(nel3d ${HEADERS} ${SRC}) NL_TARGET_LIB(nel3d ${HEADERS} ${SRC})
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR} ${FREETYPE_INCLUDE_DIRS} ${LIBOVR_INCLUDE_DIR} ${LIBVR_INCLUDE_DIR}) INCLUDE_DIRECTORIES(BEFORE ${FREETYPE_INCLUDE_DIRS})
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR} ${LIBOVR_INCLUDE_DIR} ${LIBVR_INCLUDE_DIR})
TARGET_LINK_LIBRARIES(nel3d nelmisc ${FREETYPE_LIBRARIES} ${LIBOVR_LIBRARIES} ${LIBVR_LIBRARY}) TARGET_LINK_LIBRARIES(nel3d nelmisc ${FREETYPE_LIBRARIES} ${LIBOVR_LIBRARIES} ${LIBVR_LIBRARY})
SET_TARGET_PROPERTIES(nel3d PROPERTIES LINK_INTERFACE_LIBRARIES "") SET_TARGET_PROPERTIES(nel3d PROPERTIES LINK_INTERFACE_LIBRARIES "")

@ -2,7 +2,7 @@ FILE(GLOB SRC *.cpp *.h *.def)
NL_TARGET_DRIVER(nel_drv_direct3d_win ${SRC}) NL_TARGET_DRIVER(nel_drv_direct3d_win ${SRC})
INCLUDE_DIRECTORIES(${DXSDK_INCLUDE_DIR}) INCLUDE_DIRECTORIES(BEFORE ${DXSDK_INCLUDE_DIR})
TARGET_LINK_LIBRARIES(nel_drv_direct3d_win nel3d nelmisc ${DXSDK_D3DX9_LIBRARY} ${DXSDK_D3D9_LIBRARY} ${DXSDK_DINPUT_LIBRARY} ${DXSDK_GUID_LIBRARY}) TARGET_LINK_LIBRARIES(nel_drv_direct3d_win nel3d nelmisc ${DXSDK_D3DX9_LIBRARY} ${DXSDK_D3D9_LIBRARY} ${DXSDK_DINPUT_LIBRARY} ${DXSDK_GUID_LIBRARY})

@ -1327,6 +1327,10 @@ const D3DFORMAT FinalPixelFormat[ITexture::UploadFormatCount][CDriverD3D::FinalP
bool CDriverD3D::setDisplay(nlWindow wnd, const GfxMode& mode, bool show, bool resizeable) throw(EBadDisplay) bool CDriverD3D::setDisplay(nlWindow wnd, const GfxMode& mode, bool show, bool resizeable) throw(EBadDisplay)
{ {
H_AUTO_D3D(CDriver3D_setDisplay); H_AUTO_D3D(CDriver3D_setDisplay);
if (!mode.OffScreen)
NLMISC::INelContext::getInstance().setWindowedApplication(true);
if (!_D3D) if (!_D3D)
return false; return false;
#ifndef NL_NO_ASM #ifndef NL_NO_ASM

@ -35,7 +35,7 @@ NL_ADD_LIB_SUFFIX(${NLDRV_OGL_LIB})
NL_ADD_RUNTIME_FLAGS(${NLDRV_OGL_LIB}) NL_ADD_RUNTIME_FLAGS(${NLDRV_OGL_LIB})
IF(WIN32) IF(WIN32)
INCLUDE_DIRECTORIES(${DXSDK_INCLUDE_DIR}) INCLUDE_DIRECTORIES(BEFORE ${DXSDK_INCLUDE_DIR})
TARGET_LINK_LIBRARIES(${NLDRV_OGL_LIB} ${DXSDK_DINPUT_LIBRARY} ${DXSDK_GUID_LIBRARY}) TARGET_LINK_LIBRARIES(${NLDRV_OGL_LIB} ${DXSDK_DINPUT_LIBRARY} ${DXSDK_GUID_LIBRARY})
ADD_DEFINITIONS(-DDRIVER_OPENGL_EXPORTS) ADD_DEFINITIONS(-DDRIVER_OPENGL_EXPORTS)
ENDIF(WIN32) ENDIF(WIN32)
@ -67,6 +67,16 @@ IF(UNIX AND NOT APPLE)
ADD_DEFINITIONS(-DHAVE_XCURSOR) ADD_DEFINITIONS(-DHAVE_XCURSOR)
TARGET_LINK_LIBRARIES(${NLDRV_OGL_LIB} ${X11_Xcursor_LIB}) TARGET_LINK_LIBRARIES(${NLDRV_OGL_LIB} ${X11_Xcursor_LIB})
ENDIF(X11_Xcursor_FOUND) ENDIF(X11_Xcursor_FOUND)
IF(X11_Xext_FOUND)
TARGET_LINK_LIBRARIES(${NLDRV_OGL_LIB} ${X11_Xext_LIB})
ENDIF(X11_Xext_FOUND)
# libraries needed to be linked while linking to static X11 libraries
FIND_LIBRARY(XCB_LIBRARY
NAMES xcb
HINTS ${X11_LIB_SEARCH_PATH})
IF(XCB_LIBRARY)
TARGET_LINK_LIBRARIES(${NLDRV_OGL_LIB} ${XCB_LIBRARY})
ENDIF(XCB_LIBRARY)
ENDIF(UNIX AND NOT APPLE) ENDIF(UNIX AND NOT APPLE)
IF(WITH_PCH) IF(WITH_PCH)

@ -603,6 +603,9 @@ bool CDriverGL::setDisplay(nlWindow wnd, const GfxMode &mode, bool show, bool re
{ {
H_AUTO_OGL(CDriverGL_setDisplay) H_AUTO_OGL(CDriverGL_setDisplay)
if (!mode.OffScreen)
NLMISC::INelContext::getInstance().setWindowedApplication(true);
_win = EmptyWindow; _win = EmptyWindow;
_CurrentMode = mode; _CurrentMode = mode;

@ -38,7 +38,7 @@ NL_ADD_LIB_SUFFIX(${NLDRV_OGLES_LIB})
NL_ADD_RUNTIME_FLAGS(${NLDRV_OGLES_LIB}) NL_ADD_RUNTIME_FLAGS(${NLDRV_OGLES_LIB})
IF(WIN32) IF(WIN32)
INCLUDE_DIRECTORIES(${DXSDK_INCLUDE_DIR}) INCLUDE_DIRECTORIES(BEFORE ${DXSDK_INCLUDE_DIR})
TARGET_LINK_LIBRARIES(${NLDRV_OGLES_LIB} ${DXSDK_DINPUT_LIBRARY} ${DXSDK_GUID_LIBRARY}) TARGET_LINK_LIBRARIES(${NLDRV_OGLES_LIB} ${DXSDK_DINPUT_LIBRARY} ${DXSDK_GUID_LIBRARY})
ADD_DEFINITIONS(/DDRIVER_OPENGLES_EXPORTS) ADD_DEFINITIONS(/DDRIVER_OPENGLES_EXPORTS)
ENDIF(WIN32) ENDIF(WIN32)

@ -31,6 +31,7 @@ using namespace std;
#include <ft2build.h> #include <ft2build.h>
#include FT_FREETYPE_H #include FT_FREETYPE_H
#include FT_SYNTHESIS_H
// for freetype 2.0 // for freetype 2.0
#ifdef FTERRORS_H #ifdef FTERRORS_H
@ -75,7 +76,10 @@ const char *CFontGenerator::getFT2Error(FT_Error fte)
return ukn; return ukn;
} }
CFontGenerator *newCFontGenerator(const std::string &fontFileName)
{
return new CFontGenerator(fontFileName);
}
/* /*
* Constructor * Constructor
@ -171,7 +175,7 @@ void CFontGenerator::getSizes (ucchar c, uint32 size, uint32 &width, uint32 &hei
height = _Face->glyph->metrics.height >> 6; height = _Face->glyph->metrics.height >> 6;
} }
uint8 *CFontGenerator::getBitmap (ucchar c, uint32 size, uint32 &width, uint32 &height, uint32 &pitch, sint32 &left, sint32 &top, sint32 &advx, uint32 &glyphIndex) uint8 *CFontGenerator::getBitmap (ucchar c, uint32 size, bool embolden, bool oblique, uint32 &width, uint32 &height, uint32 &pitch, sint32 &left, sint32 &top, sint32 &advx, uint32 &glyphIndex)
{ {
FT_Error error; FT_Error error;
@ -209,6 +213,16 @@ uint8 *CFontGenerator::getBitmap (ucchar c, uint32 size, uint32 &width, uint32 &
return NULL; return NULL;
} }
if (embolden)
{
FT_GlyphSlot_Embolden(_Face->glyph);
}
if (oblique)
{
FT_GlyphSlot_Oblique(_Face->glyph);
}
// convert to an anti-aliased bitmap // convert to an anti-aliased bitmap
error = FT_Render_Glyph (_Face->glyph, ft_render_mode_normal); error = FT_Render_Glyph (_Face->glyph, ft_render_mode_normal);
if (error) if (error)
@ -389,7 +403,7 @@ void CFontGenerator::getSizes (ucchar c, uint32 size, uint32 &width, uint32 &hei
HFONT hFont = NULL; HFONT hFont = NULL;
uint32 CurrentFontSize = 0; uint32 CurrentFontSize = 0;
uint8 *CFontGenerator::getBitmap (ucchar c, uint32 size, uint32 &width, uint32 &height, uint32 &pitch, sint32 &left, sint32 &top, sint32 &advx, uint32 &glyphIndex) uint8 *CFontGenerator::getBitmap (ucchar c, uint32 size, bool embolden, bool oblique, uint32 &width, uint32 &height, uint32 &pitch, sint32 &left, sint32 &top, sint32 &advx, uint32 &glyphIndex)
{ {
/* FT_Error error; /* FT_Error error;

@ -64,6 +64,8 @@ void CFontManager::computeString (const std::string &s,
CFontGenerator *fontGen, CFontGenerator *fontGen,
const NLMISC::CRGBA &color, const NLMISC::CRGBA &color,
uint32 fontSize, uint32 fontSize,
bool embolden,
bool oblique,
IDriver *driver, IDriver *driver,
CComputedString &output, CComputedString &output,
bool keep800x600Ratio) bool keep800x600Ratio)
@ -71,7 +73,7 @@ void CFontManager::computeString (const std::string &s,
// static to avoid reallocation // static to avoid reallocation
static ucstring ucs; static ucstring ucs;
ucs= s; ucs= s;
computeString(ucs, fontGen, color, fontSize, driver, output, keep800x600Ratio); computeString(ucs, fontGen, color, fontSize, embolden, oblique, driver, output, keep800x600Ratio);
} }
@ -80,6 +82,8 @@ void CFontManager::computeString (const ucstring &s,
CFontGenerator *fontGen, CFontGenerator *fontGen,
const NLMISC::CRGBA &color, const NLMISC::CRGBA &color,
uint32 fontSize, uint32 fontSize,
bool embolden,
bool oblique,
IDriver *driver, IDriver *driver,
CComputedString &output, CComputedString &output,
bool keep800x600Ratio) bool keep800x600Ratio)
@ -147,6 +151,8 @@ void CFontManager::computeString (const ucstring &s,
k.Char = s[i]; k.Char = s[i];
k.FontGenerator = fontGen; k.FontGenerator = fontGen;
k.Size = fontSize; k.Size = fontSize;
k.Embolden = embolden;
k.Oblique = oblique;
CTextureFont::SLetterInfo *pLI = pTexFont->getLetterInfo (k); CTextureFont::SLetterInfo *pLI = pTexFont->getLetterInfo (k);
if(pLI != NULL) if(pLI != NULL)
{ {
@ -227,6 +233,8 @@ void CFontManager::computeStringInfo ( const ucstring &s,
CFontGenerator *fontGen, CFontGenerator *fontGen,
const NLMISC::CRGBA &color, const NLMISC::CRGBA &color,
uint32 fontSize, uint32 fontSize,
bool embolden,
bool oblique,
IDriver *driver, IDriver *driver,
CComputedString &output, CComputedString &output,
bool keep800x600Ratio ) bool keep800x600Ratio )
@ -259,6 +267,8 @@ void CFontManager::computeStringInfo ( const ucstring &s,
k.Char = s[i]; k.Char = s[i];
k.FontGenerator = fontGen; k.FontGenerator = fontGen;
k.Size = fontSize; k.Size = fontSize;
k.Embolden = embolden;
k.Oblique = oblique;
pLI = pTexFont->getLetterInfo (k); pLI = pTexFont->getLetterInfo (k);
if(pLI != NULL) if(pLI != NULL)
{ {

@ -277,6 +277,8 @@ void CPSUtil::print(IDriver *driver, const std::string &text, CFontGenerator &fg
&fg, &fg,
col, col,
16, 16,
false,
false,
driver, driver,
cptedString); cptedString);

@ -31,6 +31,8 @@ CTextContext::CTextContext()
_FontGen = NULL; _FontGen = NULL;
_FontSize = 12; _FontSize = 12;
_Embolden = false;
_Oblique = false;
_Color = NLMISC::CRGBA(0,0,0); _Color = NLMISC::CRGBA(0,0,0);
@ -81,7 +83,7 @@ uint32 CTextContext::textPush (const char *format, ...)
// compute the string. // compute the string.
uint32 index = _CacheFreePlaces[_CacheNbFreePlaces-1]; uint32 index = _CacheFreePlaces[_CacheNbFreePlaces-1];
CComputedString &strToFill = _CacheStrings[index]; CComputedString &strToFill = _CacheStrings[index];
_FontManager->computeString (str, _FontGen, _Color, _FontSize, _Driver, strToFill, _Keep800x600Ratio); _FontManager->computeString (str, _FontGen, _Color, _FontSize, _Embolden, _Oblique, _Driver, strToFill, _Keep800x600Ratio);
_CacheNbFreePlaces--; _CacheNbFreePlaces--;
@ -109,7 +111,7 @@ uint32 CTextContext::textPush (const ucstring &str)
nlassert (index < _CacheStrings.size()); nlassert (index < _CacheStrings.size());
CComputedString &strToFill = _CacheStrings[index]; CComputedString &strToFill = _CacheStrings[index];
_FontManager->computeString (str, _FontGen, _Color _FontManager->computeString (str, _FontGen, _Color
, _FontSize, _Driver, strToFill, _Keep800x600Ratio); , _FontSize, _Embolden, _Oblique, _Driver, strToFill, _Keep800x600Ratio);
_CacheNbFreePlaces--; _CacheNbFreePlaces--;

@ -100,6 +100,30 @@ uint32 CTextContextUser::getFontSize() const
return _TextContext.getFontSize(); return _TextContext.getFontSize();
} }
void CTextContextUser::setEmbolden(bool b)
{
H_AUTO2;
_TextContext.setEmbolden(b);
}
bool CTextContextUser::getEmbolden() const
{
H_AUTO2;
return _TextContext.getEmbolden();
}
void CTextContextUser::setOblique(bool b)
{
H_AUTO2;
_TextContext.setOblique(b);
}
bool CTextContextUser::getOblique() const
{
H_AUTO2;
return _TextContext.getOblique();
}
void CTextContextUser::setHotSpot(THotSpot hotSpot) void CTextContextUser::setHotSpot(THotSpot hotSpot)
{ {
H_AUTO2; H_AUTO2;

@ -47,11 +47,14 @@ const int NbLine[TEXTUREFONT_NBCATEGORY] = { 4, 6, 4, 1 }; // Based on textsize
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
inline uint32 CTextureFont::SLetterKey::getVal() inline uint32 CTextureFont::SLetterKey::getVal()
{ {
// this limits Size to 6bits
// Large sizes already render wrong when many
// different glyphs are used due to limited texture atlas
uint8 eb = ((uint)Embolden) + ((uint)Oblique << 1);
if (FontGenerator == NULL) if (FontGenerator == NULL)
return Char + ((Size&255)<<16); return Char + ((Size&255)<<16) + (eb << 22);
else else
return Char + ((Size&255)<<16) + ((FontGenerator->getUID()&0xFF)<<24); return Char + ((Size&255)<<16) + (eb << 22) + ((FontGenerator->getUID()&0xFF)<<24);
} }
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
@ -86,6 +89,8 @@ CTextureFont::CTextureFont()
rLetter.Char = 0xffff; rLetter.Char = 0xffff;
rLetter.FontGenerator = NULL; rLetter.FontGenerator = NULL;
rLetter.Size= 0; rLetter.Size= 0;
rLetter.Embolden = false;
rLetter.Oblique = false;
// The less recently used infos // The less recently used infos
if (j < Letters[i].size()-1) if (j < Letters[i].size()-1)
@ -164,7 +169,7 @@ void CTextureFont::rebuildLetter (sint cat, sint x, sint y)
sint posy = catTopY + y * Categories[cat]; sint posy = catTopY + y * Categories[cat];
uint32 pitch = 0; uint32 pitch = 0;
uint8 *bitmap = rLetter.FontGenerator->getBitmap ( rLetter.Char, rLetter.Size, uint8 *bitmap = rLetter.FontGenerator->getBitmap ( rLetter.Char, rLetter.Size, rLetter.Embolden, rLetter.Oblique,
rLetter.CharWidth, rLetter.CharHeight, rLetter.CharWidth, rLetter.CharHeight,
pitch, rLetter.Left, rLetter.Top, pitch, rLetter.Left, rLetter.Top,
rLetter.AdvX, rLetter.GlyphIndex ); rLetter.AdvX, rLetter.GlyphIndex );
@ -303,7 +308,7 @@ CTextureFont::SLetterInfo* CTextureFont::getLetterInfo (SLetterKey& k)
// \todo mat : Temp !!! Try to use freetype cache // \todo mat : Temp !!! Try to use freetype cache
uint32 nPitch, nGlyphIndex; uint32 nPitch, nGlyphIndex;
sint32 nLeft, nTop, nAdvX; sint32 nLeft, nTop, nAdvX;
k.FontGenerator->getBitmap (k.Char, k.Size, width, height, nPitch, nLeft, nTop, k.FontGenerator->getBitmap (k.Char, k.Size, k.Embolden, k.Oblique, width, height, nPitch, nLeft, nTop,
nAdvX, nGlyphIndex ); nAdvX, nGlyphIndex );
// Add 1 pixel space for black border to get correct category // Add 1 pixel space for black border to get correct category
@ -323,6 +328,8 @@ CTextureFont::SLetterInfo* CTextureFont::getLetterInfo (SLetterKey& k)
k2.Char = Back[cat]->Char; k2.Char = Back[cat]->Char;
k2.FontGenerator = Back[cat]->FontGenerator; k2.FontGenerator = Back[cat]->FontGenerator;
k2.Size = Back[cat]->Size; k2.Size = Back[cat]->Size;
k2.Embolden = Back[cat]->Embolden;
k2.Oblique = Back[cat]->Oblique;
itAccel = Accel.find (k2.getVal()); itAccel = Accel.find (k2.getVal());
if (itAccel != Accel.end()) if (itAccel != Accel.end())
@ -336,6 +343,8 @@ CTextureFont::SLetterInfo* CTextureFont::getLetterInfo (SLetterKey& k)
Back[cat]->Char = k.Char; Back[cat]->Char = k.Char;
Back[cat]->FontGenerator = k.FontGenerator; Back[cat]->FontGenerator = k.FontGenerator;
Back[cat]->Size = k.Size; Back[cat]->Size = k.Size;
Back[cat]->Embolden = k.Embolden;
Back[cat]->Oblique = k.Oblique;
Back[cat]->CharWidth = width; Back[cat]->CharWidth = width;
Back[cat]->CharHeight = height; Back[cat]->CharHeight = height;
Back[cat]->Top = nTop; Back[cat]->Top = nTop;

@ -3,7 +3,8 @@ FILE(GLOB HEADERS ../../include/nel/cegui/*.h)
ADD_LIBRARY(nelceguirenderer SHARED ${HEADERS} ${SRC} nelceguirenderer.def) ADD_LIBRARY(nelceguirenderer SHARED ${HEADERS} ${SRC} nelceguirenderer.def)
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR} ${FREETYPE_INC} ${CEGUI_INCLUDE_DIRS}) INCLUDE_DIRECTORIES(BEFORE ${FREETYPE_INCLUDE_DIRS})
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR} ${CEGUI_INCLUDE_DIRS})
TARGET_LINK_LIBRARIES(nelceguirenderer nelmisc nel3d ${CEGUI_LIBRARY}) TARGET_LINK_LIBRARIES(nelceguirenderer nelmisc nel3d ${CEGUI_LIBRARY})
NL_DEFAULT_PROPS(nelceguirenderer "NeL, Library: CEGUI Renderer") NL_DEFAULT_PROPS(nelceguirenderer "NeL, Library: CEGUI Renderer")
NL_ADD_RUNTIME_FLAGS(nelceguirenderer) NL_ADD_RUNTIME_FLAGS(nelceguirenderer)

@ -6,9 +6,9 @@ SOURCE_GROUP("src" FILES ${SRC})
NL_TARGET_LIB(nelgui ${SRC} ${HEADERS}) NL_TARGET_LIB(nelgui ${SRC} ${HEADERS})
INCLUDE_DIRECTORIES(${LUA_INCLUDE_DIR} ${LUABIND_INCLUDE_DIR} ${LIBWWW_INCLUDE_DIR} ${CURL_INCLUDE_DIRS}) INCLUDE_DIRECTORIES(${LUA_INCLUDE_DIR} ${LUABIND_INCLUDE_DIR} ${CURL_INCLUDE_DIRS})
TARGET_LINK_LIBRARIES(nelgui nelmisc nel3d ${LUA_LIBRARIES} ${LUABIND_LIBRARIES} ${LIBXML2_LIBRARIES} ${LIBWWW_LIBRARIES} ${CURL_LIBRARIES}) TARGET_LINK_LIBRARIES(nelgui nelmisc nel3d ${LUA_LIBRARIES} ${LUABIND_LIBRARIES} ${LIBXML2_LIBRARIES} ${CURL_LIBRARIES})
SET_TARGET_PROPERTIES(nelgui PROPERTIES LINK_INTERFACE_LIBRARIES "") SET_TARGET_PROPERTIES(nelgui PROPERTIES LINK_INTERFACE_LIBRARIES "")
NL_DEFAULT_PROPS(nelgui "NeL, Library: NeL GUI") NL_DEFAULT_PROPS(nelgui "NeL, Library: NeL GUI")
NL_ADD_RUNTIME_FLAGS(nelgui) NL_ADD_RUNTIME_FLAGS(nelgui)

File diff suppressed because it is too large Load Diff

@ -0,0 +1,312 @@
// 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"
#include <string>
#include <libxml/HTMLparser.h>
#include "nel/misc/types_nl.h"
#include "nel/gui/libwww.h"
#include "nel/gui/group_html.h"
#include "nel/gui/lua_ihm.h"
using namespace std;
using namespace NLMISC;
namespace NLGUI
{
// ***************************************************************************
void CGroupHTML::htmlElement(xmlNode *node, int element_number)
{
SGML_dtd *HTML_DTD = HTML_dtd ();
if (element_number < HTML_ELEMENTS)
{
CXMLAutoPtr ptr;
// load attributes into libwww structs
std::vector<bool> present;
std::vector<const char *>value;
std::string strvalues[MAX_ATTRIBUTES];
present.resize(30, false);
value.resize(30);
uint nbAttributes = std::min(MAX_ATTRIBUTES, HTML_DTD->tags[element_number].number_of_attributes);
for(uint i=0; i<nbAttributes; i++)
{
std::string name;
name = toLower(std::string(HTML_DTD->tags[element_number].attributes[i].name));
ptr = xmlGetProp(node, (const xmlChar *)name.c_str());
if (ptr)
{
// copy xmlChar to string (xmlChar will be released)
strvalues[i] = (const char *)(ptr);
// now use string pointer in value[] array
value[i] = strvalues[i].c_str();
present[i] = true;
}
}
if (element_number == HTML_A)
{
addLink(element_number, present, value);
}
beginElement(element_number, present, value);
}
else
{
beginUnparsedElement((const char *)(node->name), xmlStrlen(node->name));
}
// recursive - text content / child nodes
htmlWalkDOM(node->children);
// closing tag
if (element_number < HTML_ELEMENTS)
{
endElement(element_number);
}
else
{
endUnparsedElement((const char *)(node->name), xmlStrlen(node->name));
}
}
// ***************************************************************************
// recursive function to walk html document
void CGroupHTML::htmlWalkDOM(xmlNode *a_node)
{
SGML_dtd *HTML_DTD = HTML_dtd ();
uint element_number;
xmlNode *node = a_node;
while(node)
{
if (node->type == XML_TEXT_NODE)
{
addText((const char *)(node->content), xmlStrlen(node->content));
}
else
if (node->type == XML_ELEMENT_NODE)
{
// find libwww tag
for(element_number = 0; element_number<HTML_ELEMENTS; ++element_number)
{
if (xmlStrncasecmp(node->name, (const xmlChar *)HTML_DTD->tags[element_number].name.c_str(), xmlStrlen(node->name)) == 0)
break;
}
htmlElement(node, element_number);
}
// move into next sibling
node = node->next;
}
}
// ***************************************************************************
// http://stackoverflow.com/a/18335183
static std::string correct_non_utf_8(const std::string &str)
{
int i,f_size=str.size();
unsigned char c,c2,c3,c4;
std::string to;
to.reserve(f_size);
for(i=0 ; i<f_size ; i++){
c=(unsigned char)(str[i]);
if(c<32){//control char
if(c==9 || c==10 || c==13){//allow only \t \n \r
to.append(1,c);
}
continue;
}else if(c<127){//normal ASCII
to.append(1,c);
continue;
}else if(c<160){//control char (nothing should be defined here either ASCI, ISO_8859-1 or UTF8, so skipping)
if(c==128){//fix microsoft mess, add euro
to.append(1,226);
to.append(1,130);
to.append(1,172);
}
if(c==133){//fix IBM mess, add NEL = \n\r
to.append(1,10);
to.append(1,13);
}
continue;
}else if(c<192){//invalid for UTF8, converting ASCII
to.append(1,(unsigned char)194);
to.append(1,c);
continue;
}else if(c<194){//invalid for UTF8, converting ASCII
to.append(1,(unsigned char)195);
to.append(1,c-64);
continue;
}else if(c<224 && i+1<f_size){//possibly 2byte UTF8
c2=(unsigned char)(str[i+1]);
if(c2>127 && c2<192){//valid 2byte UTF8
if(c==194 && c2<160){//control char, skipping
;
}else{
to.append(1,c);
to.append(1,c2);
}
i++;
continue;
}
}else if(c<240 && i+2<f_size){//possibly 3byte UTF8
c2=(unsigned char)(str[i+1]);
c3=(unsigned char)(str[i+2]);
if(c2>127 && c2<192 && c3>127 && c3<192){//valid 3byte UTF8
to.append(1,c);
to.append(1,c2);
to.append(1,c3);
i+=2;
continue;
}
}else if(c<245 && i+3<f_size){//possibly 4byte UTF8
c2=(unsigned char)(str[i+1]);
c3=(unsigned char)(str[i+2]);
c4=(unsigned char)(str[i+3]);
if(c2>127 && c2<192 && c3>127 && c3<192 && c4>127 && c4<192){//valid 4byte UTF8
to.append(1,c);
to.append(1,c2);
to.append(1,c3);
to.append(1,c4);
i+=3;
continue;
}
}
//invalid UTF8, converting ASCII (c>245 || string too short for multi-byte))
to.append(1,(unsigned char)195);
to.append(1,c-64);
}
return to;
}
// ***************************************************************************
static void patchHtmlQuirks(std::string &htmlString)
{
size_t npos = std::string::npos;
size_t pos;
// get rid of BOM (some ingame help files does not show up otherwise)
if (htmlString.substr(0, 3) == "\xEF\xBB\xBF")
{
htmlString.erase(0, 3);
}
// if any element is before <html>, then parser adds <html><body>
// and original tags are ignored (their attributes not processed)
//
// only fix situation when there is <body> tag with attributes
//
// tags are considered to be lowercase
pos = htmlString.find("<body ");
if (pos != npos)
{
size_t start = htmlString.find("<");
// skip <!doctype html>
if (htmlString.substr(start, 2) == "<!")
start = htmlString.find("<", start + 1);
// if there is no html tag, then abort
size_t end = htmlString.find("<html>");
if (end != npos && start < end && end < pos)
{
// body tag end position
size_t insert = htmlString.find(">", pos);
if (insert != npos)
{
std::string str = htmlString.substr(start, end - start);
htmlString.insert(insert+1, str);
htmlString.erase(start, str.size());
}
}
}
// make sure </html> (if present) is last in document or tags coming after it are ignored
pos = htmlString.find("</html>");
if (pos != npos && htmlString.find("<", pos+1) > pos)
{
htmlString.erase(pos, 7);
htmlString += "</html>";
}
// if there is invalid utf-8 chars, then libxml will break everything after first it finds.
htmlString = correct_non_utf_8(htmlString);
}
// ***************************************************************************
bool CGroupHTML::parseHtml(std::string htmlString)
{
htmlParserCtxtPtr parser = htmlCreatePushParserCtxt(NULL, NULL, NULL, 0, NULL, XML_CHAR_ENCODING_UTF8);
if (!parser)
{
nlwarning("Creating html parser context failed");
return false;
}
htmlCtxtUseOptions(parser, HTML_PARSE_NOBLANKS | HTML_PARSE_NOERROR | HTML_PARSE_NOWARNING | HTML_PARSE_NONET);
// parser is little strict on tag order, so fix whats needed
patchHtmlQuirks(htmlString);
htmlParseChunk(parser, htmlString.c_str(), htmlString.size(), 0);
htmlParseChunk(parser, "", 0, 1);
bool success = true;
if (parser->myDoc)
{
xmlNode *root = xmlDocGetRootElement(parser->myDoc);
if (root)
{
htmlWalkDOM(root);
}
else
{
nlwarning("html root node failed");
success = false;
}
}
else
{
nlwarning("htmlstring parsing failed");
success = false;
}
htmlFreeParserCtxt(parser);
return success;
}
// ***************************************************************************
int CGroupHTML::luaParseHtml(CLuaState &ls)
{
const char *funcName = "parseHtml";
CLuaIHM::checkArgCount(ls, funcName, 1);
CLuaIHM::checkArgType(ls, funcName, 1, LUA_TSTRING);
std::string html = ls.toString(1);
parseHtml(html);
return 0;
}
}

@ -55,7 +55,7 @@ namespace NLGUI
if (ptr) _Dynamic = CInterfaceElement::convertBool (ptr); if (ptr) _Dynamic = CInterfaceElement::convertBool (ptr);
ptr = xmlGetProp (cur, (xmlChar*)"type"); ptr = xmlGetProp (cur, (xmlChar*)"type");
string sTmp = ptr; string sTmp = ptr.str();
sTmp = strlwr(sTmp); sTmp = strlwr(sTmp);
if (sTmp == "linear") if (sTmp == "linear")
_Type = Track_Linear; _Type = Track_Linear;
@ -194,7 +194,7 @@ namespace NLGUI
fromString((const char*)time, fAnimTime); fromString((const char*)time, fAnimTime);
TAnimationTime animTime = fAnimTime * CWidgetManager::getInstance()->getSystemOption(CWidgetManager::OptionMulCoefAnim).getValFloat(); TAnimationTime animTime = fAnimTime * CWidgetManager::getInstance()->getSystemOption(CWidgetManager::OptionMulCoefAnim).getValFloat();
double animValue; double animValue;
fromString(value, animValue); fromString(value.str(), animValue);
// Depending on the type of the track add the key // Depending on the type of the track add the key
switch(_Type) switch(_Type)

@ -312,7 +312,7 @@ namespace NLGUI
ptr = (char*) xmlGetProp( cur, (xmlChar*)"max_sizeparent" ); ptr = (char*) xmlGetProp( cur, (xmlChar*)"max_sizeparent" );
if (ptr) if (ptr)
{ {
string idparent = ptr; string idparent = ptr.str();
idparent = NLMISC::strlwr(idparent); idparent = NLMISC::strlwr(idparent);
if (idparent != "parent") if (idparent != "parent")
{ {

@ -664,7 +664,7 @@ namespace NLGUI
//if it begins with a #, it is a reference in the instance attribute //if it begins with a #, it is a reference in the instance attribute
if (strchr(ptr, '#') != NULL) if (strchr(ptr, '#') != NULL)
{ {
string LastProp = ptr; string LastProp = ptr.str();
string NewProp =""; string NewProp ="";
string RepProp; string RepProp;
@ -796,7 +796,7 @@ namespace NLGUI
return false; return false;
} }
sint32 size; sint32 size;
fromString(cSize, size); fromString(cSize.str(), size);
if (size <= 0) if (size <= 0)
{ {
// todo hulud interface syntax error // todo hulud interface syntax error
@ -929,7 +929,7 @@ namespace NLGUI
nlwarning("<CInterfaceParser::parseLink> Can't read the expression for a link node"); nlwarning("<CInterfaceParser::parseLink> Can't read the expression for a link node");
return false; return false;
} }
std::string expr = ptr; std::string expr = ptr.str();
std::vector<CInterfaceLink::CTargetInfo> targets; std::vector<CInterfaceLink::CTargetInfo> targets;
@ -1119,13 +1119,13 @@ namespace NLGUI
nlinfo ("options has no name"); nlinfo ("options has no name");
return false; return false;
} }
string optionsName = ptr; string optionsName = ptr.str();
// herit if possible // herit if possible
ptr = (char*) xmlGetProp( cur, (xmlChar*)"herit" ); ptr = (char*) xmlGetProp( cur, (xmlChar*)"herit" );
if (ptr) if (ptr)
{ {
string optionsParentName = ptr; string optionsParentName = ptr.str();
CInterfaceOptions *io = wm->getOptions( optionsParentName ); CInterfaceOptions *io = wm->getOptions( optionsParentName );
if( io != NULL ) if( io != NULL )
options->copyBasicMap( *io ); options->copyBasicMap( *io );
@ -1807,7 +1807,7 @@ namespace NLGUI
nlwarning ("no id in a procedure"); nlwarning ("no id in a procedure");
return false; return false;
} }
string procId= ptr; string procId= ptr.str();
if (_ProcedureMap.find(procId) != _ProcedureMap.end()) if (_ProcedureMap.find(procId) != _ProcedureMap.end())
{ {
@ -2171,7 +2171,7 @@ namespace NLGUI
//get the property value //get the property value
ptr = (char*)xmlGetProp( cur, props->name); ptr = (char*)xmlGetProp( cur, props->name);
nlassert(ptr); nlassert(ptr);
string propVal= ptr; string propVal= ptr.str();
string newPropVal; string newPropVal;
// solve define of this prop // solve define of this prop
@ -2328,7 +2328,7 @@ namespace NLGUI
nlinfo ("anim has no id"); nlinfo ("anim has no id");
return false; return false;
} }
string animId = ptr; string animId = ptr.str();
pAnim = new CInterfaceAnim; pAnim = new CInterfaceAnim;
if (pAnim->parse (cur, parentGroup)) if (pAnim->parse (cur, parentGroup))

@ -16,35 +16,21 @@
#include "stdpch.h" #include "stdpch.h"
#include "nel/gui/libwww.h"
#include "nel/gui/group_html.h" #include "nel/gui/group_html.h"
// LibWWW
extern "C"
{
#include "WWWLib.h" /* Global Library Include file */
#include "WWWApp.h"
#include "WWWInit.h"
}
#include "nel/gui/group_html.h"
#include "nel/gui/libwww_nel_stream.h"
using namespace NLMISC; using namespace NLMISC;
// The HText structure for libwww
struct _HText
{
NLGUI::CGroupHTML *Parent;
};
namespace NLGUI namespace NLGUI
{ {
// ***************************************************************************
/// the cookie value for session identification (nel cookie) /// the cookie value for session identification (nel cookie)
std::string CurrentCookie; std::string CurrentCookie;
/// store all cookies we receive and resent them depending of the domain /// store all cookies we receive and resent them depending of the domain
std::map<std::string, std::map<std::string, std::string> > HTTPCookies; static std::map<std::string, std::map<std::string, std::string> > HTTPCookies;
std::string HTTPCurrentDomain; // The current domain that will be used to get which cookies to send std::string HTTPCurrentDomain; // The current domain that will be used to get which cookies to send
// *************************************************************************** // ***************************************************************************
@ -213,7 +199,6 @@ namespace NLGUI
{ 0 } { 0 }
}; };
HTAttr p_attr[] = HTAttr p_attr[] =
{ {
HTML_ATTR(P,QUICK_HELP_CONDITION), HTML_ATTR(P,QUICK_HELP_CONDITION),
@ -233,89 +218,13 @@ namespace NLGUI
{ 0 } { 0 }
}; };
// *************************************************************************** HTAttr span_attr[] =
void _VerifyLibWWW(const char *function, bool ok, const char *file, int line)
{ {
if (!ok) HTML_ATTR(SPAN,CLASS),
nlwarning("%s(%d) : LIBWWW %s returned a bad status", file, line, function); HTML_ATTR(SPAN,ID),
} HTML_ATTR(SPAN,STYLE),
#define VerifyLibWWW(a,b) _VerifyLibWWW(a,(b)!=FALSE,__FILE__,__LINE__) { 0 }
};
// ***************************************************************************
int NelPrinter (const char * fmt, va_list pArgs)
{
char info[1024];
int ret;
ret = vsnprintf(info, sizeof(info), fmt, pArgs);
nlinfo("%s", info);
return ret;
}
// ***************************************************************************
int NelTracer (const char * fmt, va_list pArgs)
{
char err[1024];
int ret;
ret = vsnprintf(err, sizeof(err), fmt, pArgs);
nlwarning ("%s", err);
return ret;
}
// ***************************************************************************
HText * TextNew (HTRequest * request,
HTParentAnchor * /* anchor */,
HTStream * /* output_stream */)
{
HText *text = new HText;
text->Parent = (CGroupHTML *) HTRequest_context(request);
return text;
}
// ***************************************************************************
BOOL TextDelete (HText * me)
{
delete me;
return YES;
}
// ***************************************************************************
void TextBuild (HText * me, HTextStatus status)
{
// Do the work in the class
if (status == HTEXT_BEGIN)
me->Parent->beginBuild ();
else if (status == HTEXT_END)
me->Parent->endBuild ();
}
// ***************************************************************************
void TextAdd (HText * me, const char * buf, int len)
{
// Do the work in the class
me->Parent->addText (buf, len);
}
// ***************************************************************************
void TextLink (HText * me,
int element_number,
int attribute_number,
HTChildAnchor * anchor,
const BOOL * present,
const char ** value)
{
// Do the work in the class
me->Parent->addLink (element_number, attribute_number, anchor, present, value);
}
// *************************************************************************** // ***************************************************************************
@ -375,307 +284,146 @@ namespace NLGUI
return dst; return dst;
} }
// *************************************************************************** // set current HTTPCurrentDomain for cookie selection, return new domain
const std::string &setCurrentDomain(const std::string &uri)
void TextBeginElement (HText *me, int element_number, const BOOL *present, const char **value)
{ {
// Do the work in the class if (uri.find("http://") == 0)
me->Parent->beginElement (element_number, present, value); HTTPCurrentDomain = uri.substr(7, uri.find("/", 7) - 7);
} else
if (uri.find("https://") == 0)
// *************************************************************************** HTTPCurrentDomain = uri.substr(8, uri.find("/", 8) - 8);
else
void TextEndElement (HText *me, int element_number) if (uri.find("//") == 0)
{ HTTPCurrentDomain = uri.substr(2, uri.find("/", 2) - 2);
// Do the work in the class else
me->Parent->endElement (element_number); if (uri.find("/") != std::string::npos)
} HTTPCurrentDomain = uri.substr(0, uri.find("/") - 1);
// ***************************************************************************
void TextBeginUnparsedElement(HText *me, const char *buffer, int length)
{
me->Parent->beginUnparsedElement(buffer, length);
}
// ***************************************************************************
void TextEndUnparsedElement(HText *me, const char *buffer, int length)
{
me->Parent->endUnparsedElement(buffer, length);
}
// *************************************************************************** return HTTPCurrentDomain;
void TextUnparsedEntity (HText * /* HText */, const char *buffer, int length)
{
std::string str(buffer, buffer+length);
nlinfo("Unparsed entity '%s'", str.c_str());
} }
// *************************************************************************** // update HTTPCookies list
int requestTerminater (HTRequest * request, HTResponse * /* response */, static void receiveCookie(const char *nsformat, const std::string &domain, bool trusted)
void * param, int /* status */)
{ {
/* // 0 1 2 3 4 5 6
Yoyo and Boris: we had to make the request terminate by UID and not by pointer (param is an uid). // domain tailmatch path secure expires name value
Because this method was called at mainLoop time, but for GroupHTML created/deleted at login time !!! // .app.ryzom.com TRUE / FALSE 1234 ryzomId AAAAAAAA|BBBBBBBB|CCCCCCCC
=> Memory Crash. // #HttpOnly_app.ryzom.com FALSE / FALSE 0 PHPSESSID sess-id-value
*/ std::string cookie(nsformat);
// TestYoyo std::vector<std::string> chunks;
//nlinfo("** requestTerminater(): uid%d", (uint32)param); splitString(cookie, "\t", chunks);
if (chunks.size() < 6)
// the parameter is actually an uint32
if (param != 0)
{ {
CGroupHTML::TGroupHtmlByUIDMap::iterator it= CGroupHTML::_GroupHtmlByUID.find((uint32)(size_t)param); nlwarning("invalid cookie format '%s'", cookie.c_str());
if(it!=CGroupHTML::_GroupHtmlByUID.end())
{
// get the pointer. NB: the refptr should not be NULL
// since object removed from map when deleted
CGroupHTML *gh = it->second;
nlassert(gh);
// callback the browser
gh->requestTerminated(request);
}
} }
return HT_OK;
}
// callback called when receiving a cookie if (chunks[0].find("#HttpOnly_") == 0)
BOOL receiveCookie (HTRequest * /* request */, HTCookie * cookie, void * /* param */)
{
if (strcmp(HTCookie_name(cookie), "ryzomId") == 0)
{ {
// we receive the ryzom id cookie, store it chunks[0] = chunks[0].substr(10);
CurrentCookie = HTCookie_value(cookie);
} }
else
{
// store the id/value cookie
HTTPCookies[HTTPCurrentDomain][HTCookie_name(cookie)] = HTCookie_value(cookie);
// nlwarning("get cookie for domain %s %s=%s", HTTPCurrentDomain.c_str(), HTCookie_name(cookie), HTCookie_value(cookie));
}
return YES;
}
// callback called to add cookie to a request before sending it to the server if (chunks[0] != domain && chunks[0] != std::string("." + domain))
HTAssocList *sendCookie (HTRequest * /* request */, void * /* param */)
{
HTAssocList * alist = 0;
if (!CurrentCookie.empty())
{ {
if(alist == 0) alist = HTAssocList_new(); /* Is deleted by the cookie module */ // cookie is for different domain
HTAssocList_addObject(alist, "ryzomId", CurrentCookie.c_str()); //nlinfo("cookie for different domain ('%s')", nsformat);
return;
} }
if(!HTTPCookies[HTTPCurrentDomain].empty()) if (chunks[5] == "ryzomId")
{ {
if(alist == 0) alist = HTAssocList_new(); // we receive this cookie because we are telling curl about this on send
for(std::map<std::string, std::string>::iterator it = HTTPCookies[HTTPCurrentDomain].begin(); it != HTTPCookies[HTTPCurrentDomain].end(); it++) // normally, this cookie should be set from client and not from headers
// it's used for R2 sessions
if (trusted && CurrentCookie != chunks[6])
{ {
HTAssocList_addObject(alist, it->first.c_str(), it->second.c_str()); CurrentCookie = chunks[6];
// nlwarning("set cookie for domain '%s' %s=%s", HTTPCurrentDomain.c_str(), it->first.c_str(), it->second.c_str()); nlwarning("received ryzomId cookie '%s' from trusted domain '%s'", CurrentCookie.c_str(), domain.c_str());
} }
} }
return alist; else
} {
uint32 expires = 0;
fromString(chunks[4], expires);
// *************************************************************************** // expires == 0 is session cookie
if (expires > 0)
{
time_t now;
time(&now);
if (expires < now)
{
nlwarning("cookie expired, remove from list '%s'", nsformat);
HTTPCookies[domain].erase(chunks[5]);
return;
}
}
HTAnchor * TextFindAnchor (HText * /* me */, int /* index */) // this overrides cookies with same name, but different paths
{ //nlwarning("save domain '%s' cookie '%s' value '%s'", domain.c_str(), chunks[5].c_str(), nsformat);
return NULL; HTTPCookies[domain][chunks[5]] = nsformat;
}
} }
int HTMIME_location_custom (HTRequest * request, HTResponse * response, char * token, char * value) // update HTTPCookies with cookies received from curl
void receiveCookies (CURL *curl, const std::string &domain, bool trusted)
{ {
char * location = HTStrip(value); struct curl_slist *cookies = NULL;
if (curl_easy_getinfo(curl, CURLINFO_COOKIELIST, &cookies) == CURLE_OK)
std::string finalLocation;
//nlinfo("redirect to '%s' '%s'", value, location);
// If not absolute URI (Error) then find the base
if (!HTURL_isAbsolute(location))
{ {
char * base = HTAnchor_address((HTAnchor *) HTRequest_anchor(request)); struct curl_slist *nc;
location = HTParse(location, base, PARSE_ALL); nc = cookies;
//redirection = HTAnchor_findAddress(location); while(nc)
finalLocation = location; {
HT_FREE(base); //nlwarning("received cookie '%s'", nc->data);
HT_FREE(location); receiveCookie(nc->data, domain, trusted);
} nc = nc->next;
else }
{
finalLocation = location;
}
//nlinfo("final location '%s'", finalLocation.c_str());
CGroupHTML *gh = (CGroupHTML *) HTRequest_context(request);
gh->setURL(finalLocation);
return HT_OK; curl_slist_free_all(cookies);
}
} }
// add all cookies for domain to curl handle
void sendCookies(CURL *curl, const std::string &domain, bool trusted)
{
// enable curl cookie engine
curl_easy_setopt(curl, CURLOPT_COOKIELIST, "");
// *************************************************************************** if (domain.empty())
return;
const std::string &setCurrentDomain(const std::string &url) if (trusted && !CurrentCookie.empty())
{
if(url.find("http://") == 0)
{ {
HTTPCurrentDomain = url.substr(7, url.find('/', 7)-7); // domain tailmatch path secure expires name value
// nlinfo("****cd: %s", HTTPCurrentDomain.c_str()); // .app.ryzom.com TRUE / FALSE 1234 ryzomId AAAAAAAA|BBBBBBBB|CCCCCCCC
// #HttpOnly_app.ryzom.com FALSE / FALSE 0 PHPSESSID sess-id-value
std::string cookie;
// set tailmatch
if (domain[0] != '.' && domain[0] != '#')
cookie = "." + domain + "\tTRUE";
else
cookie = domain + "\tFALSE";
cookie += "\t/\tFALSE\t0\tryzomId\t" + CurrentCookie;
curl_easy_setopt(curl, CURLOPT_COOKIELIST, cookie.c_str());
//nlwarning("domain '%s', cookie '%s'", domain.c_str(), cookie.c_str());
} }
else
if(!HTTPCookies[domain].empty())
{ {
HTTPCurrentDomain.clear(); for(std::map<std::string, std::string>::iterator it = HTTPCookies[domain].begin(); it != HTTPCookies[domain].end(); it++)
// nlinfo("****cd: clear the domain"); {
curl_easy_setopt(curl, CURLOPT_COOKIELIST, it->second.c_str());
//nlwarning("set domain '%s' cookie '%s'", domain.c_str(), it->second.c_str());
}
} }
return HTTPCurrentDomain;
} }
void initLibWWW() void initLibWWW()
{ {
static bool initialized = false; static bool initialized = false;
if (!initialized) if (!initialized)
{ {
//HTProfile_newNoCacheClient("Ryzom", "1.1");
/* Need our own trace and print functions */
HTPrint_setCallback(NelPrinter);
HTTrace_setCallback(NelTracer);
/* Initiate libwww */
HTLib_setAppName( CGroupHTML::options.appName.c_str() );
HTLib_setAppVersion( CGroupHTML::options.appVersion.c_str() );
/* Set up TCP as transport */
VerifyLibWWW("HTTransport_add", HTTransport_add("buffered_tcp", HT_TP_SINGLE, HTReader_new, HTBufferWriter_new));
VerifyLibWWW("HTTransport_add", HTTransport_add("local", HT_TP_SINGLE, HTNeLReader_new, HTWriter_new));
// VerifyLibWWW("HTTransport_add", HTTransport_add("local", HT_TP_SINGLE, HTANSIReader_new, HTWriter_new));
// VerifyLibWWW("HTTransport_add", HTTransport_add("local", HT_TP_SINGLE, HTReader_new, HTWriter_new));
/* Set up HTTP as protocol */
VerifyLibWWW("HTProtocol_add", HTProtocol_add("http", "buffered_tcp", 80, NO, HTLoadHTTP, NULL));
VerifyLibWWW("HTProtocol_add", HTProtocol_add("file", "local", 0, YES, HTLoadNeLFile, NULL));
//VerifyLibWWW("HTProtocol_add", HTProtocol_add("file", "local", 0, YES, HTLoadFile, NULL));
// HTProtocol_add("cache", "local", 0, NO, HTLoadCache, NULL);
HTBind_init();
// HTCacheInit(NULL, 20);
/* Setup up transfer coders */
HTFormat_addTransferCoding((char*)"chunked", HTChunkedEncoder, HTChunkedDecoder, 1.0);
/* Setup MIME stream converters */
HTFormat_addConversion("message/rfc822", "*/*", HTMIMEConvert, 1.0, 0.0, 0.0);
HTFormat_addConversion("message/x-rfc822-foot", "*/*", HTMIMEFooter, 1.0, 0.0, 0.0);
HTFormat_addConversion("message/x-rfc822-head", "*/*", HTMIMEHeader, 1.0, 0.0, 0.0);
HTFormat_addConversion("message/x-rfc822-cont", "*/*", HTMIMEContinue, 1.0, 0.0, 0.0);
HTFormat_addConversion("message/x-rfc822-partial","*/*", HTMIMEPartial, 1.0, 0.0, 0.0);
HTFormat_addConversion("multipart/*", "*/*", HTBoundary, 1.0, 0.0, 0.0);
/* Setup HTTP protocol stream */
HTFormat_addConversion("text/x-http", "*/*", HTTPStatus_new, 1.0, 0.0, 0.0);
/* Setup the HTML parser */
HTFormat_addConversion("text/html", "www/present", HTMLPresent, 1.0, 0.0, 0.0);
/* Setup black hole stream */
HTFormat_addConversion("*/*", "www/debug", HTBlackHoleConverter, 1.0, 0.0, 0.0);
HTFormat_addConversion("*/*", "www/present", HTBlackHoleConverter, 0.3, 0.0, 0.0);
/* Set max number of sockets we want open simultaneously */
HTNet_setMaxSocket(32);
/* Register our HTML parser callbacks */
VerifyLibWWW("HText_registerCDCallback", HText_registerCDCallback (TextNew, TextDelete));
VerifyLibWWW("HText_registerBuildCallback", HText_registerBuildCallback (TextBuild));
VerifyLibWWW("HText_registerTextCallback", HText_registerTextCallback(TextAdd));
VerifyLibWWW("HText_registerLinkCallback", HText_registerLinkCallback (TextLink));
VerifyLibWWW("HText_registerElementCallback", HText_registerElementCallback (TextBeginElement, TextEndElement));
VerifyLibWWW("HText_registerUnparsedElementCallback", HText_registerUnparsedElementCallback(TextBeginUnparsedElement, TextEndUnparsedElement));
VerifyLibWWW("HText_registerUnparsedEntityCallback ", HText_registerUnparsedEntityCallback (TextUnparsedEntity ));
/* Register the default set of MIME header parsers */
struct {
const char * string;
HTParserCallback * pHandler;
} fixedHandlers[] = {
{"accept", &HTMIME_accept},
{"accept-charset", &HTMIME_acceptCharset},
{"accept-encoding", &HTMIME_acceptEncoding},
{"accept-language", &HTMIME_acceptLanguage},
{"accept-ranges", &HTMIME_acceptRanges},
{"authorization", NULL},
{"cache-control", &HTMIME_cacheControl},
{"connection", &HTMIME_connection},
{"content-encoding", &HTMIME_contentEncoding},
{"content-length", &HTMIME_contentLength},
{"content-range", &HTMIME_contentRange},
{"content-transfer-encoding", &HTMIME_contentTransferEncoding},
{"content-type", &HTMIME_contentType},
{"digest-MessageDigest", &HTMIME_messageDigest},
{"keep-alive", &HTMIME_keepAlive},
{"link", &HTMIME_link},
{"location", &HTMIME_location_custom},
{"max-forwards", &HTMIME_maxForwards},
{"mime-version", NULL},
{"pragma", &HTMIME_pragma},
{"protocol", &HTMIME_protocol},
{"protocol-info", &HTMIME_protocolInfo},
{"protocol-request", &HTMIME_protocolRequest},
{"proxy-authenticate", &HTMIME_authenticate},
{"proxy-authorization", &HTMIME_proxyAuthorization},
{"public", &HTMIME_public},
{"range", &HTMIME_range},
{"referer", &HTMIME_referer},
{"retry-after", &HTMIME_retryAfter},
{"server", &HTMIME_server},
{"trailer", &HTMIME_trailer},
{"transfer-encoding", &HTMIME_transferEncoding},
{"upgrade", &HTMIME_upgrade},
{"user-agent", &HTMIME_userAgent},
{"vary", &HTMIME_vary},
{"via", &HTMIME_via},
{"warning", &HTMIME_warning},
{"www-authenticate", &HTMIME_authenticate},
{"authentication-info", &HTMIME_authenticationInfo},
{"proxy-authentication-info", &HTMIME_proxyAuthenticationInfo}
};
for (uint i = 0; i < sizeof(fixedHandlers)/sizeof(fixedHandlers[0]); i++)
HTHeader_addParser(fixedHandlers[i].string, NO, fixedHandlers[i].pHandler);
/* Set up default event loop */
HTEventInit();
/* Add our own request terminate handler */
HTNet_addAfter(requestTerminater, NULL, 0, HT_ALL, HT_FILTER_LAST);
/* Setup cookies */
HTCookie_init();
HTCookie_setCookieMode(HTCookieMode(HT_COOKIE_ACCEPT | HT_COOKIE_SEND));
HTCookie_setCallbacks(receiveCookie, NULL, sendCookie, NULL);
/* Start the first request */
/* Go into the event loop... */
// HTEventList_newLoop();
// App_delete(app);
HTBind_add("htm", "text/html", NULL, "8bit", NULL, 1.0); /* HTML */
HTBind_add("html", "text/html", NULL, "8bit", NULL, 1.0); /* HTML */
HTBind_caseSensitive(NO);
// Change the HTML DTD // Change the HTML DTD
SGML_dtd *HTML_DTD = HTML_dtd (); SGML_dtd *HTML_DTD = HTML_dtd ();
@ -699,17 +447,9 @@ namespace NLGUI
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].attributes = div_attr;
HTML_DTD->tags[HTML_DIV].number_of_attributes = sizeof(div_attr) / sizeof(HTAttr) - 1; HTML_DTD->tags[HTML_DIV].number_of_attributes = sizeof(div_attr) / sizeof(HTAttr) - 1;
HTML_DTD->tags[HTML_SPAN].attributes = span_attr;
HTML_DTD->tags[HTML_SPAN].number_of_attributes = sizeof(span_attr) / sizeof(HTAttr) - 1;
// Set a request timeout
// HTHost_setEventTimeout (30000);
// HTHost_setActiveTimeout (30000);
// HTHost_setPersistTimeout (30000);
// libwww default value is 2000ms for POST/PUT requests on the first and 3000 on the second, smallest allowed value is 21ms
// too small values may create timeout problems but we want it low as possible
// second value is the timeout for the second try to we set that high
HTTP_setBodyWriteDelay(250, 3000);
// Initialized // Initialized
initialized = true; initialized = true;
} }

@ -1,633 +0,0 @@
// 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"
#include <nel/misc/file.h>
extern "C"
{
/* Library Includes */
#include "wwwsys.h"
#include "WWWUtil.h"
#include "WWWCore.h"
#include "WWWDir.h"
#include "WWWTrans.h"
#include "HTReqMan.h"
#include "HTBind.h"
#include "HTMulti.h"
#include "HTNetMan.h"
#include "HTChannl.h"
#include "nel/gui/libwww_nel_stream.h" /* Implemented here */
}
using namespace std;
using namespace NLMISC;
extern "C"
{
/* Final states have negative value */
typedef enum _FileState
{
FS_RETRY = -4,
FS_ERROR = -3,
FS_NO_DATA = -2,
FS_GOT_DATA = -1,
FS_BEGIN = 0,
FS_PENDING,
FS_DO_CN,
FS_NEED_OPEN_FILE,
FS_NEED_BODY,
FS_PARSE_DIR,
FS_TRY_FTP
} FileState;
/* This is the context structure for the this module */
typedef struct _file_info
{
FileState state; /* Current state of the connection */
char * local; /* Local representation of file name */
struct stat stat_info; /* Contains actual file chosen */
HTNet * net;
HTTimer * timer;
} file_info;
struct _HTStream
{
const HTStreamClass * isa;
};
struct _HTInputStream
{
const HTInputStreamClass * isa;
HTChannel * ch;
HTHost * host;
char * write; /* Last byte written */
char * read; /* Last byte read */
int b_read;
char data [INPUT_BUFFER_SIZE]; /* buffer */
};
PRIVATE int FileCleanup (HTRequest *req, int status)
{
HTNet * net = HTRequest_net(req);
file_info * file = (file_info *) HTNet_context(net);
HTStream * input = HTRequest_inputStream(req);
/* Free stream with data TO Local file system */
if (input)
{
if (status == HT_INTERRUPTED)
(*input->isa->abort)(input, NULL);
else
(*input->isa->_free)(input);
HTRequest_setInputStream(req, NULL);
}
/*
** Remove if we have registered a timer function as a callback
*/
if (file->timer)
{
HTTimer_delete(file->timer);
file->timer = NULL;
}
if (file)
{
HT_FREE(file->local);
HT_FREE(file);
}
HTNet_delete(net, status);
return YES;
}
PRIVATE int FileEvent (SOCKET soc, void * pVoid, HTEventType type);
PUBLIC int HTLoadNeLFile (SOCKET soc, HTRequest * request)
{
file_info *file; /* Specific access information */
HTNet * net = HTRequest_net(request);
HTParentAnchor * anchor = HTRequest_anchor(request);
HTTRACE(PROT_TRACE, "HTLoadFile.. Looking for `%s\'\n" _ HTAnchor_physical(anchor));
if ((file = (file_info *) HT_CALLOC(1, sizeof(file_info))) == NULL) HT_OUTOFMEM("HTLoadFILE");
file->state = FS_BEGIN;
file->net = net;
HTNet_setContext(net, file);
HTNet_setEventCallback(net, FileEvent);
HTNet_setEventParam(net, file); /* callbacks get http* */
return FileEvent(soc, file, HTEvent_BEGIN); /* get it started - ops is ignored */
}
PRIVATE int ReturnEvent (HTTimer * timer, void * param, HTEventType /* type */)
{
file_info * file = (file_info *) param;
if (timer != file->timer) HTDEBUGBREAK("File timer %p not in sync\n" _ timer);
HTTRACE(PROT_TRACE, "HTLoadFile.. Continuing %p with timer %p\n" _ file _ timer);
/*
** Delete the timer
*/
HTTimer_delete(file->timer);
file->timer = NULL;
/*
** Now call the event again
*/
return FileEvent(INVSOC, file, HTEvent_READ);
}
PUBLIC int HTNeLFileOpen (HTNet * net, char * local, HTLocalMode /* mode */)
{
HTRequest * request = HTNet_request(net);
HTHost * host = HTNet_host(net);
CIFile* fp = new CIFile;
if (!fp->open (local))
{
HTRequest_addSystemError(request, ERR_FATAL, errno, NO, "CIFile::open");
return HT_ERROR;
}
HTHost_setChannel(host, HTChannel_new(INVSOC, (FILE*)fp, YES));
HTHost_getInput(host, HTNet_transport(net), NULL, 0);
HTHost_getOutput(host, HTNet_transport(net), NULL, 0);
return HT_OK;
}
PRIVATE int FileEvent (SOCKET /* soc */, void * pVoid, HTEventType type)
{
file_info *file = (file_info *)pVoid; /* Specific access information */
int status = HT_ERROR;
HTNet * net = file->net;
HTRequest * request = HTNet_request(net);
HTParentAnchor * anchor = HTRequest_anchor(request);
if (type == HTEvent_CLOSE)
{
/* Interrupted */
HTRequest_addError(request, ERR_FATAL, NO, HTERR_INTERRUPTED,
NULL, 0, "HTLoadFile");
FileCleanup(request, HT_INTERRUPTED);
return HT_OK;
}
/* Now jump into the machine. We know the state from the previous run */
for(;;)
{
switch (file->state)
{
case FS_BEGIN:
/* We only support safe (GET, HEAD, etc) methods for the moment */
if (!HTMethod_isSafe(HTRequest_method(request))) {
HTRequest_addError(request, ERR_FATAL, NO, HTERR_NOT_ALLOWED,
NULL, 0, "HTLoadFile");
file->state = FS_ERROR;
break;
}
/* Check whether we have access to local disk at all */
if (HTLib_secure())
{
HTTRACE(PROT_TRACE, "LoadFile.... No access to local file system\n");
file->state = FS_TRY_FTP;
break;
}
/*file->local = HTWWWToLocal(HTAnchor_physical(anchor), "",
HTRequest_userProfile(request));*/
{
string tmp = HTAnchor_physical(anchor);
if (strlwr(tmp).find("file:/") == 0)
{
tmp = tmp.substr(6, tmp.size()-6);
}
StrAllocCopy(file->local, tmp.c_str());
}
if (!file->local)
{
file->state = FS_TRY_FTP;
break;
}
/* Create a new host object and link it to the net object */
{
HTHost * host = NULL;
if ((host = HTHost_new("localhost", 0)) == NULL) return HT_ERROR;
HTNet_setHost(net, host);
if (HTHost_addNet(host, net) == HT_PENDING)
{
HTTRACE(PROT_TRACE, "HTLoadFile.. Pending...\n");
/* move to the hack state */
file->state = FS_PENDING;
return HT_OK;
}
}
file->state = FS_DO_CN;
break;
case FS_PENDING:
{
HTHost * host = NULL;
if ((host = HTHost_new((char*)"localhost", 0)) == NULL) return HT_ERROR;
HTNet_setHost(net, host);
if (HTHost_addNet(host, net) == HT_PENDING)
{
HTTRACE(PROT_TRACE, "HTLoadFile.. Pending...\n");
file->state = FS_PENDING;
return HT_OK;
}
}
file->state = FS_DO_CN;
break;
case FS_DO_CN:
if (HTRequest_negotiation(request) &&
HTMethod_isSafe(HTRequest_method(request)))
{
HTAnchor_setPhysical(anchor, file->local);
HTTRACE(PROT_TRACE, "Load File... Found `%s\'\n" _ file->local);
}
else
{
if (HT_STAT(file->local, &file->stat_info) == -1)
{
HTTRACE(PROT_TRACE, "Load File... Not found `%s\'\n" _ file->local);
HTRequest_addError(request, ERR_FATAL, NO, HTERR_NOT_FOUND, NULL, 0, "HTLoadFile");
file->state = FS_ERROR;
break;
}
}
if (((file->stat_info.st_mode) & S_IFMT) == S_IFDIR)
{
if (HTRequest_method(request) == METHOD_GET)
{
file->state = FS_PARSE_DIR;
}
else
{
HTRequest_addError(request, ERR_INFO, NO, HTERR_NO_CONTENT, NULL, 0, "HTLoadFile");
file->state = FS_NO_DATA;
}
break;
}
{
BOOL editable = FALSE;
HTBind_getAnchorBindings(anchor);
if (editable) HTAnchor_appendAllow(anchor, METHOD_PUT);
/* Set the file size */
CIFile nelFile;
if (nelFile.open (file->local))
{
file->stat_info.st_size = nelFile.getFileSize();
}
nelFile.close();
if (file->stat_info.st_size)
HTAnchor_setLength(anchor, file->stat_info.st_size);
/* Set the file last modified time stamp */
if (file->stat_info.st_mtime > 0)
HTAnchor_setLastModified(anchor, file->stat_info.st_mtime);
/* Check to see if we can edit it */
if (!editable && !file->stat_info.st_size)
{
HTRequest_addError(request, ERR_INFO, NO, HTERR_NO_CONTENT, NULL, 0, "HTLoadFile");
file->state = FS_NO_DATA;
}
else
{
file->state = (HTRequest_method(request)==METHOD_GET) ? FS_NEED_OPEN_FILE : FS_GOT_DATA;
}
}
break;
case FS_NEED_OPEN_FILE:
status = HTNeLFileOpen(net, file->local, HT_FB_RDONLY);
if (status == HT_OK)
{
{
HTStream * rstream = HTStreamStack(HTAnchor_format(anchor),
HTRequest_outputFormat(request),
HTRequest_outputStream(request),
request, YES);
HTNet_setReadStream(net, rstream);
HTRequest_setOutputConnected(request, YES);
}
{
HTOutputStream * output = HTNet_getOutput(net, NULL, 0);
HTRequest_setInputStream(request, (HTStream *) output);
}
if (HTRequest_isSource(request) && !HTRequest_destinationsReady(request)) return HT_OK;
HTRequest_addError(request, ERR_INFO, NO, HTERR_OK, NULL, 0, "HTLoadFile");
file->state = FS_NEED_BODY;
if (HTEvent_isCallbacksRegistered())
{
if (!HTRequest_preemptive(request))
{
if (!HTNet_preemptive(net))
{
HTTRACE(PROT_TRACE, "HTLoadFile.. Returning\n");
HTHost_register(HTNet_host(net), net, HTEvent_READ);
}
else if (!file->timer)
{
HTTRACE(PROT_TRACE, "HTLoadFile.. Returning\n");
file->timer = HTTimer_new(NULL, ReturnEvent, file, 1, YES, NO);
}
return HT_OK;
}
}
}
else if (status == HT_WOULD_BLOCK || status == HT_PENDING)
{
return HT_OK;
}
else
{
HTRequest_addError(request, ERR_INFO, NO, HTERR_INTERNAL, NULL, 0, "HTLoadFile");
file->state = FS_ERROR; /* Error or interrupt */
}
break;
case FS_NEED_BODY:
status = HTHost_read(HTNet_host(net), net);
if (status == HT_WOULD_BLOCK)
{
return HT_OK;
}
else if (status == HT_LOADED || status == HT_CLOSED)
{
file->state = FS_GOT_DATA;
}
else
{
HTRequest_addError(request, ERR_INFO, NO, HTERR_FORBIDDEN, NULL, 0, "HTLoadFile");
file->state = FS_ERROR;
}
break;
case FS_TRY_FTP:
{
char *url = HTAnchor_physical(anchor);
HTAnchor *anchor;
char *newname = NULL;
StrAllocCopy(newname, "ftp:");
if (!strncmp(url, "file:", 5))
{
StrAllocCat(newname, url+5);
}
else
{
StrAllocCat(newname, url);
}
anchor = HTAnchor_findAddress(newname);
HTRequest_setAnchor(request, anchor);
HT_FREE(newname);
FileCleanup(request, HT_IGNORE);
return HTLoad(request, YES);
}
break;
case FS_GOT_DATA:
FileCleanup(request, HT_LOADED);
return HT_OK;
break;
case FS_NO_DATA:
FileCleanup(request, HT_NO_DATA);
return HT_OK;
break;
case FS_RETRY:
FileCleanup(request, HT_RETRY);
return HT_OK;
break;
case FS_ERROR:
FileCleanup(request, HT_ERROR);
return HT_OK;
break;
default:
break;
}
} /* End of while(1) */
}
// *************************************************************************
// HTNeLReader
// *************************************************************************
size_t nel_fread (void *buffer, uint size, FILE *fp)
{
CIFile *file = (CIFile *)fp;
int toRead = std::min ((int)(file->getFileSize () - file->getPos ()), (int)size);
file->serialBuffer((uint8*)buffer, toRead);
return toRead;
}
PRIVATE int HTNeLReader_read (HTInputStream * me)
{
FILE * fp = HTChannel_file(me->ch);
HTNet * net = HTHost_getReadNet(me->host);
int status;
/* Read the file desriptor */
while (fp)
{
if ((me->b_read = (int)nel_fread(me->data, FILE_BUFFER_SIZE, fp)) == 0)
{
HTAlertCallback *cbf = HTAlert_find(HT_PROG_DONE);
// HTTRACE(PROT_TRACE, "ANSI read... Finished loading file %p\n" _ fp);
if (cbf)
(*cbf)(net->request, HT_PROG_DONE, HT_MSG_NULL,NULL,NULL,NULL);
return HT_CLOSED;
}
/* Remember how much we have read from the input socket */
HTTRACEDATA(me->data, me->b_read, "HTANSIReader_read me->data:");
me->write = me->data;
me->read = me->data + me->b_read;
{
HTAlertCallback * cbf = HTAlert_find(HT_PROG_READ);
HTNet_addBytesRead(net, me->b_read);
if (cbf)
{
int tr = HTNet_bytesRead(net);
(*cbf)(net->request, HT_PROG_READ, HT_MSG_NULL, NULL, &tr, NULL);
}
}
if (!net->readStream)
return HT_ERROR;
/* Now push the data down the stream */
if ((status = (*net->readStream->isa->put_block)
(net->readStream, me->data, me->b_read)) != HT_OK)
{
if (status == HT_WOULD_BLOCK)
{
HTTRACE(PROT_TRACE, "ANSI read... Target WOULD BLOCK\n");
return HT_WOULD_BLOCK;
}
else if (status == HT_PAUSE)
{
HTTRACE(PROT_TRACE, "ANSI read... Target PAUSED\n");
return HT_PAUSE;
}
else if (status > 0)
{
/* Stream specific return code */
HTTRACE(PROT_TRACE, "ANSI read... Target returns %d\n" _ status);
me->write = me->data + me->b_read;
return status;
}
else
{
/* We have a real error */
HTTRACE(PROT_TRACE, "ANSI read... Target ERROR\n");
return status;
}
}
me->write = me->data + me->b_read;
}
HTTRACE(PROT_TRACE, "ANSI read... File descriptor is NULL...\n");
return HT_ERROR;
}
PRIVATE int HTNeLReader_close (HTInputStream * me)
{
CIFile *file = (CIFile *)HTChannel_file(me->ch);
if (file)
{
file->close();
}
int status = HT_OK;
HTNet * net = HTHost_getReadNet(me->host);
if (net && net->readStream)
{
if ((status = (*net->readStream->isa->_free)(net->readStream))==HT_WOULD_BLOCK) return HT_WOULD_BLOCK;
net->readStream = NULL;
}
HTTRACE(STREAM_TRACE, "Socket read. FREEING....\n");
HT_FREE(me);
return status;
}
PUBLIC int HTNeLReader_consumed (HTInputStream * me, size_t bytes)
{
me->write += bytes;
me->b_read -= (int)bytes;
HTHost_setRemainingRead(me->host, me->b_read);
return HT_OK;
}
PRIVATE int HTNeLReader_flush (HTInputStream * me)
{
HTNet * net = HTHost_getReadNet(me->host);
return net && net->readStream ? (*net->readStream->isa->flush)(net->readStream) : HT_OK;
}
PRIVATE int HTNeLReader_free (HTInputStream * me)
{
CIFile *file = (CIFile *)HTChannel_file(me->ch);
if (file)
{
delete file;
HTChannel_setFile (me->ch, NULL);
}
HTNet * net = HTHost_getReadNet(me->host);
if (net && net->readStream)
{
int status = (*net->readStream->isa->_free)(net->readStream);
if (status == HT_OK) net->readStream = NULL;
return status;
}
return HT_OK;
}
PRIVATE int HTNeLReader_abort (HTInputStream * me, HTList * /* e */)
{
HTNet * net = HTHost_getReadNet(me->host);
if (net && net->readStream)
{
int status = (*net->readStream->isa->abort)(net->readStream, NULL);
if (status != HT_IGNORE) net->readStream = NULL;
}
return HT_ERROR;
}
PRIVATE const HTInputStreamClass HTNeLReader =
{
"SocketReader",
HTNeLReader_flush,
HTNeLReader_free,
HTNeLReader_abort,
HTNeLReader_read,
HTNeLReader_close,
HTNeLReader_consumed
};
PUBLIC HTInputStream * HTNeLReader_new (HTHost * host, HTChannel * ch, void * /* param */, int /* mode */)
{
if (host && ch)
{
HTInputStream * me = HTChannel_input(ch);
if (me == NULL)
{
if ((me=(HTInputStream *) HT_CALLOC(1, sizeof(HTInputStream))) == NULL) HT_OUTOFMEM("HTNeLReader_new");
me->isa = &HTNeLReader;
me->ch = ch;
me->host = host;
HTTRACE(STREAM_TRACE, "Reader...... Created reader stream %p\n" _ me);
}
return me;
}
return NULL;
}
//PUBLIC unsigned int WWW_TraceFlag = 0;
} // extern "C"

@ -0,0 +1,797 @@
/**
libwww Copyright Notice
[This notice should be placed within redistributed or derivative software
code when appropriate. This particular formulation of W3C's notice for
inclusion in libwww code became active on August 14 1998.]
LIBWWW COPYRIGHT NOTICE
libwww: W3C's implementation of HTTP can be found at:
http://www.w3.org/Library/
Copyright ¨ 1995-2002 World Wide Web Consortium,
(Massachusetts Institute of Technology, Institut
National de Recherche en Informatique et en
Automatique, Keio University). All Rights Reserved.
This program is distributed under the W3C's
Intellectual Property License. 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 W3C License
http://www.w3.org/Consortium/Legal/ for more details.
Copyright ¨ 1995 CERN. "This product includes computer
software created and made available by CERN. This
acknowledgment shall be mentioned in full in any
product which includes the CERN computer software
included herein or parts thereof."
****************************************************************************/
#include "nel/gui/libwww_types.h"
namespace NLGUI
{
/*
** ATTRIBUTE DEFINITION MACROS (see HTMLPDTD.h)
*/
/*
* redefine the macros, so that the "stringized" attribute name
* is generated
*/
#undef HTML_ATTR
#define HTML_ATTR(t,a) { (char *) #a }
#undef HTML_ATTRIBUTES
#define HTML_ATTRIBUTES(t) { 0 }
/*
** ATTRIBUTE LISTS
*/
static HTAttr no_attr[1] = {
{ 0 }
};
static HTAttr body_attr[HTML_BODY_ATTRIBUTES+1] = { /* to catch images */
HTML_ATTR(BODY,ALINK),
HTML_ATTR(BODY,BACKGROUND),
HTML_ATTR(BODY,BGCOLOR),
HTML_ATTR(BODY,CLASS),
HTML_ATTR(BODY,DIR),
HTML_ATTR(BODY,ID),
HTML_ATTR(BODY,LANG),
HTML_ATTR(BODY,LINK),
HTML_ATTR(BODY,STYLE),
HTML_ATTR(BODY,TEXT),
HTML_ATTR(BODY,TITLE),
HTML_ATTR(BODY,VLINK),
HTML_ATTRIBUTES(BODY)
};
static HTAttr frame_attr[HTML_FRAME_ATTRIBUTES+1] = { /* frame attributes */
HTML_ATTR(FRAME,CLASS),
HTML_ATTR(FRAME,FRAMEBORDER),
HTML_ATTR(FRAME,ID),
HTML_ATTR(FRAME,NAME),
HTML_ATTR(FRAME,MARGINHEIGHT),
HTML_ATTR(FRAME,MARGINWIDTH),
HTML_ATTR(FRAME,NORESIZE),
HTML_ATTR(FRAME,LONGDESC),
HTML_ATTR(FRAME,SCROLLING),
HTML_ATTR(FRAME,SRC),
HTML_ATTR(FRAME,STYLE),
HTML_ATTR(FRAME,TARGET),
HTML_ATTR(FRAME,TITLE),
HTML_ATTRIBUTES(FRAME)
};
static HTAttr frameset_attr[HTML_FRAMESET_ATTRIBUTES+1] = { /* frameset attributes */
HTML_ATTR(FRAMESET,CLASS),
HTML_ATTR(FRAMESET,COLS),
HTML_ATTR(FRAMESET,ID),
HTML_ATTR(FRAMESET,ROWS),
HTML_ATTR(FRAMESET,STYLE),
HTML_ATTR(FRAMESET,TITLE),
HTML_ATTRIBUTES(FRAMESET)
};
static HTAttr a_attr[HTML_A_ATTRIBUTES+1] = { /* Anchor attributes */
HTML_ATTR(A,ACCESSKEY),
HTML_ATTR(A,CHARSET),
HTML_ATTR(A,CLASS),
HTML_ATTR(A,COORDS),
HTML_ATTR(A,DIR),
HTML_ATTR(A,HREF),
HTML_ATTR(A,HREFLANG),
HTML_ATTR(A,ID),
HTML_ATTR(A,NAME),
HTML_ATTR(A,REL),
HTML_ATTR(A,REV),
HTML_ATTR(A,SHAPE),
HTML_ATTR(A,STYLE),
HTML_ATTR(A,TABINDEX),
HTML_ATTR(A,TARGET),
HTML_ATTR(A,TYPE),
HTML_ATTR(A,TITLE),
HTML_ATTRIBUTES(A)
};
static HTAttr applet_attr[HTML_APPLET_ATTRIBUTES+1] = {
HTML_ATTR(APPLET,ALIGN),
HTML_ATTR(APPLET,ALT),
HTML_ATTR(APPLET,ARCHIVE),
HTML_ATTR(APPLET,CLASS),
HTML_ATTR(APPLET,CODE),
HTML_ATTR(APPLET,CODEBASE),
HTML_ATTR(APPLET,HEIGHT),
HTML_ATTR(APPLET,HSPACE),
HTML_ATTR(APPLET,ID),
HTML_ATTR(APPLET,NAME),
HTML_ATTR(APPLET,OBJECT),
HTML_ATTR(APPLET,STYLE),
HTML_ATTR(APPLET,TITLE),
HTML_ATTR(APPLET,VSPACE),
HTML_ATTR(APPLET,WIDTH),
HTML_ATTRIBUTES(APPLET)
};
static HTAttr area_attr[HTML_AREA_ATTRIBUTES+1] = { /* Area attributes */
HTML_ATTR(AREA,ACCESSKEY),
HTML_ATTR(AREA,ALT),
HTML_ATTR(AREA,CLASS),
HTML_ATTR(AREA,COORDS),
HTML_ATTR(AREA,DIR),
HTML_ATTR(AREA,HREF),
HTML_ATTR(AREA,ID),
HTML_ATTR(AREA,NAME),
HTML_ATTR(AREA,NOHREF),
HTML_ATTR(AREA,LANG),
HTML_ATTR(AREA,SHAPE),
HTML_ATTR(AREA,STYLE),
HTML_ATTR(AREA,TABINDEX),
HTML_ATTR(AREA,TARGET),
HTML_ATTR(AREA,TITLE),
HTML_ATTRIBUTES(AREA)
};
static HTAttr base_attr[HTML_BASE_ATTRIBUTES+1] = { /* BASE attributes */
HTML_ATTR(BASE,HREF),
HTML_ATTR(BASE,TARGET),
HTML_ATTRIBUTES(BASE)
};
static HTAttr bdo_attr[HTML_BDO_ATTRIBUTES+1] = {
HTML_ATTR(BDO,CLASS),
HTML_ATTR(BDO,DIR),
HTML_ATTR(BDO,ID),
HTML_ATTR(BDO,LANG),
HTML_ATTR(BDO,STYLE),
HTML_ATTR(BDO,TITLE),
HTML_ATTRIBUTES(BDO)
};
static HTAttr bq_attr[HTML_BQ_ATTRIBUTES+1] = {
HTML_ATTR(BQ,CITE),
HTML_ATTR(BQ,CLASS),
HTML_ATTR(BQ,DIR),
HTML_ATTR(BQ,ID),
HTML_ATTR(BQ,LANG),
HTML_ATTR(BQ,STYLE),
HTML_ATTR(BQ,TITLE),
HTML_ATTRIBUTES(BQ)
};
static HTAttr br_attr[HTML_BR_ATTRIBUTES+1] = {
HTML_ATTR(BR,CLASS),
HTML_ATTR(BR,CLEAR),
HTML_ATTR(BR,ID),
HTML_ATTR(BR,STYLE),
HTML_ATTR(BR,TITLE),
HTML_ATTRIBUTES(BR)
};
static HTAttr button_attr[HTML_BUTTON_ATTRIBUTES+1] = {
HTML_ATTR(BUTTON,ACCESSKEY),
HTML_ATTR(BUTTON,CLASS),
HTML_ATTR(BUTTON,DIR),
HTML_ATTR(BUTTON,DISABLED),
HTML_ATTR(BUTTON,ID),
HTML_ATTR(BUTTON,LANG),
HTML_ATTR(BUTTON,NAME),
HTML_ATTR(BUTTON,STYLE),
HTML_ATTR(BUTTON,TABINDEX),
HTML_ATTR(BUTTON,TITLE),
HTML_ATTR(BUTTON,TYPE),
HTML_ATTR(BUTTON,VALUE),
HTML_ATTRIBUTES(BUTTON),
};
static HTAttr col_attr[HTML_COL_ATTRIBUTES+1] = {
HTML_ATTR(COL,CLASS),
HTML_ATTR(COL,DIR),
HTML_ATTR(COL,ID),
HTML_ATTR(COL,LANG),
HTML_ATTR(COL,SPAN),
HTML_ATTR(COL,STYLE),
HTML_ATTR(COL,TITLE),
HTML_ATTR(COL,WIDTH),
HTML_ATTRIBUTES(COL)
};
static HTAttr changes_attr[HTML_CHANGES_ATTRIBUTES+1] = {
HTML_ATTR(CHANGES,CITE),
HTML_ATTR(CHANGES,CLASS),
HTML_ATTR(CHANGES,DATETIME),
HTML_ATTR(CHANGES,DIR),
HTML_ATTR(CHANGES,ID),
HTML_ATTR(CHANGES,LANG),
HTML_ATTR(CHANGES,STYLE),
HTML_ATTR(CHANGES,TITLE),
HTML_ATTRIBUTES(CHANGES)
};
static HTAttr font_attr[HTML_FONT_ATTRIBUTES+1] = {
HTML_ATTR(FONT,CLASS),
HTML_ATTR(FONT,COLOR),
HTML_ATTR(FONT,DIR),
HTML_ATTR(FONT,FACE),
HTML_ATTR(FONT,ID),
HTML_ATTR(FONT,LANG),
HTML_ATTR(FONT,SIZE),
HTML_ATTR(FONT,STYLE),
HTML_ATTR(FONT,TITLE),
HTML_ATTRIBUTES(FONT)
};
static HTAttr form_attr[HTML_FORM_ATTRIBUTES+1] = {
HTML_ATTR(FORM,ACCEPT),
{ (char *) "ACCEPT-CHARSET" }, /* HTML_ATTR(FORM,ACCEPT_CHARSET) */
HTML_ATTR(FORM,ACTION),
HTML_ATTR(FORM,CLASS),
HTML_ATTR(FORM,DIR),
HTML_ATTR(FORM,ENCTYPE),
HTML_ATTR(FORM,ID),
HTML_ATTR(FORM,LANG),
HTML_ATTR(FORM,METHOD),
HTML_ATTR(FORM,STYLE),
HTML_ATTR(FORM,TARGET),
HTML_ATTR(FORM,TITLE),
HTML_ATTRIBUTES(FORM)
};
static HTAttr gen_attr[HTML_GEN_ATTRIBUTES+1] = { /* General, for many things */
HTML_ATTR(GEN,CLASS),
HTML_ATTR(GEN,DIR),
HTML_ATTR(GEN,ID),
HTML_ATTR(GEN,LANG),
HTML_ATTR(GEN,STYLE),
HTML_ATTR(GEN,TITLE),
HTML_ATTRIBUTES(GEN)
};
static HTAttr block_attr[HTML_BLOCK_ATTRIBUTES+1] = { /* DIV, SPAN, H1-H6 */
HTML_ATTR(BLOCK,ALIGN),
HTML_ATTR(BLOCK,CLASS),
HTML_ATTR(BLOCK,DIR),
HTML_ATTR(BLOCK,ID),
HTML_ATTR(BLOCK,LANG),
HTML_ATTR(BLOCK,STYLE),
HTML_ATTR(BLOCK,TITLE),
HTML_ATTRIBUTES(BLOCK)
};
static HTAttr head_attr[HTML_HEAD_ATTRIBUTES+1] = {
HTML_ATTR(HEAD,DIR),
HTML_ATTR(HEAD,LANG),
HTML_ATTR(HEAD,PROFILE),
HTML_ATTRIBUTES(HEAD)
};
static HTAttr hr_attr[HTML_HR_ATTRIBUTES+1] = {
HTML_ATTR(HR,ALIGN),
HTML_ATTR(HR,CLASS),
HTML_ATTR(HR,DIR),
HTML_ATTR(HR,ID),
HTML_ATTR(HR,LANG),
HTML_ATTR(HR,NOSHADE),
HTML_ATTR(HR,SIZE),
HTML_ATTR(HR,STYLE),
HTML_ATTR(HR,TITLE),
HTML_ATTR(HR,WIDTH),
HTML_ATTRIBUTES(HR)
};
static HTAttr html_attr[HTML_HTML_ATTRIBUTES+1] = {
HTML_ATTR(HTML,DIR),
HTML_ATTR(HTML,LANG),
HTML_ATTR(HTML,VERSION),
HTML_ATTRIBUTES(HTML)
};
static HTAttr iframe_attr[HTML_IFRAME_ATTRIBUTES+1] = {
HTML_ATTR(IFRAME,ALIGN),
HTML_ATTR(IFRAME,CLASS),
HTML_ATTR(IFRAME,FRAMEBORDER),
HTML_ATTR(IFRAME,HEIGHT),
HTML_ATTR(IFRAME,ID),
HTML_ATTR(IFRAME,LONGDESC),
HTML_ATTR(IFRAME,MARGINHEIGHT),
HTML_ATTR(IFRAME,MARGINWIDTH),
HTML_ATTR(IFRAME,NAME),
HTML_ATTR(IFRAME,SCROLLING),
HTML_ATTR(IFRAME,SRC),
HTML_ATTR(IFRAME,STYLE),
HTML_ATTR(IFRAME,TARGET),
HTML_ATTR(IFRAME,TITLE),
HTML_ATTR(IFRAME,WIDTH),
HTML_ATTRIBUTES(IFRAME)
};
static HTAttr img_attr[HTML_IMG_ATTRIBUTES+1] = { /* IMG attributes */
HTML_ATTR(IMG,ALIGN),
HTML_ATTR(IMG,ALT),
HTML_ATTR(IMG,BORDER),
HTML_ATTR(IMG,CLASS),
HTML_ATTR(IMG,DIR),
HTML_ATTR(IMG,HEIGHT),
HTML_ATTR(IMG,HSPACE),
HTML_ATTR(IMG,ID),
HTML_ATTR(IMG,ISMAP),
HTML_ATTR(IMG,LANG),
HTML_ATTR(IMG,LONGDESC),
HTML_ATTR(IMG,SRC),
HTML_ATTR(IMG,STYLE),
HTML_ATTR(IMG,TITLE),
HTML_ATTR(IMG,USEMAP),
HTML_ATTR(IMG,VSPACE),
HTML_ATTR(IMG,WIDTH),
HTML_ATTRIBUTES(IMG)
};
static HTAttr input_attr[HTML_INPUT_ATTRIBUTES+1] = {
HTML_ATTR(INPUT,ACCEPT),
HTML_ATTR(INPUT,ACCESSKEY),
HTML_ATTR(INPUT,ALIGN),
HTML_ATTR(INPUT,ALT),
HTML_ATTR(INPUT,CHECKED),
HTML_ATTR(INPUT,CLASS),
HTML_ATTR(INPUT,DIR),
HTML_ATTR(INPUT,DISABLED),
HTML_ATTR(INPUT,ID),
HTML_ATTR(INPUT,LANG),
HTML_ATTR(INPUT,MAXLENGTH),
HTML_ATTR(INPUT,NAME),
HTML_ATTR(INPUT,READONLY),
HTML_ATTR(INPUT,SIZE),
HTML_ATTR(INPUT,SRC),
HTML_ATTR(INPUT,STYLE),
HTML_ATTR(INPUT,TABINDEX),
HTML_ATTR(INPUT,TITLE),
HTML_ATTR(INPUT,TYPE),
HTML_ATTR(INPUT,USEMAP),
HTML_ATTR(INPUT,VALUE),
HTML_ATTRIBUTES(INPUT)
};
static HTAttr isindex_attr[HTML_ISINDEX_ATTRIBUTES+1] = {
HTML_ATTR(ISINDEX,CLASS),
HTML_ATTR(ISINDEX,DIR),
HTML_ATTR(ISINDEX,ID),
HTML_ATTR(ISINDEX,LANG),
HTML_ATTR(ISINDEX,PROMPT),
HTML_ATTR(ISINDEX,STYLE),
HTML_ATTR(ISINDEX,TITLE),
HTML_ATTRIBUTES(ISINDEX)
};
static HTAttr label_attr[HTML_LABEL_ATTRIBUTES+1] = {
HTML_ATTR(LABEL,ACCESSKEY),
HTML_ATTR(LABEL,CLASS),
HTML_ATTR(LABEL,DIR),
HTML_ATTR(LABEL,FOR),
HTML_ATTR(LABEL,ID),
HTML_ATTR(LABEL,LANG),
HTML_ATTR(LABEL,STYLE),
HTML_ATTR(LABEL,TITLE),
HTML_ATTRIBUTES(LABEL)
};
static HTAttr legend_attr[HTML_LEGEND_ATTRIBUTES+1] = {
HTML_ATTR(LEGEND,ACCESSKEY),
HTML_ATTR(LEGEND,ALIGN),
HTML_ATTR(LEGEND,CLASS),
HTML_ATTR(LEGEND,DIR),
HTML_ATTR(LEGEND,ID),
HTML_ATTR(LEGEND,LANG),
HTML_ATTR(LEGEND,STYLE),
HTML_ATTR(LEGEND,TITLE),
HTML_ATTRIBUTES(LEGEND)
};
static HTAttr li_attr[HTML_LI_ATTRIBUTES+1] = {
HTML_ATTR(LI,CLASS),
HTML_ATTR(LI,COMPACT),
HTML_ATTR(LI,DIR),
HTML_ATTR(LI,ID),
HTML_ATTR(LI,LANG),
HTML_ATTR(LI,STYLE),
HTML_ATTR(LI,TITLE),
HTML_ATTR(LI,TYPE),
HTML_ATTR(LI,VALUE),
HTML_ATTRIBUTES(LI)
};
static HTAttr link_attr[HTML_LINK_ATTRIBUTES+1] = { /* link attributes */
HTML_ATTR(LINK,CHARSET),
HTML_ATTR(LINK,CLASS),
HTML_ATTR(LINK,DIR),
HTML_ATTR(LINK,HREF),
HTML_ATTR(LINK,HREFLANG),
HTML_ATTR(LINK,ID),
HTML_ATTR(LINK,LANG),
HTML_ATTR(LINK,MEDIA),
HTML_ATTR(LINK,REL),
HTML_ATTR(LINK,REV),
HTML_ATTR(LINK,STYLE),
HTML_ATTR(LINK,TARGET),
HTML_ATTR(LINK,TITLE),
HTML_ATTR(LINK,TYPE),
HTML_ATTRIBUTES(LINK)
};
static HTAttr map_attr[HTML_MAP_ATTRIBUTES+1] = {
HTML_ATTR(MAP,CLASS),
HTML_ATTR(MAP,DIR),
HTML_ATTR(MAP,ID),
HTML_ATTR(MAP,LANG),
HTML_ATTR(MAP,NAME),
HTML_ATTR(MAP,STYLE),
HTML_ATTR(MAP,TITLE),
HTML_ATTRIBUTES(MAP)
};
static HTAttr meta_attr[HTML_META_ATTRIBUTES+1] = {
HTML_ATTR(META,CONTENT),
HTML_ATTR(META,DIR),
{ (char *)"HTTP-EQUIV" }, /* HTML_ATTR(META,HTTP_EQUIV) */
HTML_ATTR(META,LANG),
HTML_ATTR(META,NAME),
HTML_ATTR(META,SCHEME),
HTML_ATTRIBUTES(META)
};
static HTAttr nextid_attr[HTML_NEXTID_ATTRIBUTES+1] = {
{ (char *)"N" },
{ 0 } /* Terminate list */
};
static HTAttr object_attr[HTML_OBJECT_ATTRIBUTES+1] = { /* object attributes */
HTML_ATTR(OBJECT,ALIGN),
HTML_ATTR(OBJECT,ARCHIVE),
HTML_ATTR(OBJECT,BORDER),
HTML_ATTR(OBJECT,CLASS),
HTML_ATTR(OBJECT,CLASSID),
HTML_ATTR(OBJECT,CODEBASE),
HTML_ATTR(OBJECT,CODETYPE),
HTML_ATTR(OBJECT,DATA),
HTML_ATTR(OBJECT,DECLARE),
HTML_ATTR(OBJECT,DIR),
HTML_ATTR(OBJECT,HEIGHT),
HTML_ATTR(OBJECT,HSPACE),
HTML_ATTR(OBJECT,ID),
HTML_ATTR(OBJECT,LANG),
HTML_ATTR(OBJECT,NAME),
HTML_ATTR(OBJECT,STANDBY),
HTML_ATTR(OBJECT,STYLE),
HTML_ATTR(OBJECT,TABINDEX),
HTML_ATTR(OBJECT,TITLE),
HTML_ATTR(OBJECT,TYPE),
HTML_ATTR(OBJECT,USEMAP),
HTML_ATTR(OBJECT,VSPACE),
HTML_ATTR(OBJECT,WIDTH),
HTML_ATTRIBUTES(OBJECT)
};
static HTAttr ol_attr[HTML_OL_ATTRIBUTES+1] = {
HTML_ATTR(OL,CLASS),
HTML_ATTR(OL,COMPACT),
HTML_ATTR(OL,DIR),
HTML_ATTR(OL,ID),
HTML_ATTR(OL,LANG),
HTML_ATTR(OL,START),
HTML_ATTR(OL,STYLE),
HTML_ATTR(OL,TITLE),
HTML_ATTR(OL,TYPE),
HTML_ATTRIBUTES(OL)
};
static HTAttr optgroup_attr[HTML_OPTGROUP_ATTRIBUTES+1] = {
HTML_ATTR(OPTGROUP,CLASS),
HTML_ATTR(OPTGROUP,DISABLED),
HTML_ATTR(OPTGROUP,DIR),
HTML_ATTR(OPTGROUP,ID),
HTML_ATTR(OPTGROUP,LABEL),
HTML_ATTR(OPTGROUP,LANG),
HTML_ATTR(OPTGROUP,STYLE),
HTML_ATTR(OPTGROUP,TITLE),
HTML_ATTRIBUTES(OPTGROUP)
};
static HTAttr option_attr[HTML_OPTION_ATTRIBUTES+1] = {
HTML_ATTR(OPTION,CLASS),
HTML_ATTR(OPTION,DISABLED),
HTML_ATTR(OPTION,DIR),
HTML_ATTR(OPTION,ID),
HTML_ATTR(OPTION,LABEL),
HTML_ATTR(OPTION,LANG),
HTML_ATTR(OPTION,SELECTED),
HTML_ATTR(OPTION,STYLE),
HTML_ATTR(OPTION,TITLE),
HTML_ATTR(OPTION,VALUE),
HTML_ATTRIBUTES(OPTION)
};
static HTAttr param_attr[HTML_PARAM_ATTRIBUTES+1] = {
HTML_ATTR(PARAM,ID),
HTML_ATTR(PARAM,NAME),
HTML_ATTR(PARAM,TYPE),
HTML_ATTR(PARAM,VALUE),
HTML_ATTR(PARAM,VALUETYPE),
HTML_ATTRIBUTES(PARAM)
};
static HTAttr pre_attr[HTML_PRE_ATTRIBUTES+1] = {
HTML_ATTR(PRE,CLASS),
HTML_ATTR(PRE,DIR),
HTML_ATTR(PRE,ID),
HTML_ATTR(PRE,LANG),
HTML_ATTR(PRE,STYLE),
HTML_ATTR(PRE,TITLE),
HTML_ATTR(PRE,WIDTH),
HTML_ATTRIBUTES(PRE)
};
static HTAttr script_attr[HTML_SCRIPT_ATTRIBUTES+1] = {
HTML_ATTR(SCRIPT,CHARSET),
HTML_ATTR(SCRIPT,DEFER),
HTML_ATTR(SCRIPT,LANGUAGE),
HTML_ATTR(SCRIPT,SRC),
HTML_ATTR(SCRIPT,TYPE),
HTML_ATTRIBUTES(SCRIPT)
};
static HTAttr select_attr[HTML_SELECT_ATTRIBUTES+1] = {
HTML_ATTR(SELECT,CLASS),
HTML_ATTR(SELECT,DIR),
HTML_ATTR(SELECT,DISABLED),
HTML_ATTR(SELECT,ID),
HTML_ATTR(SELECT,LANG),
HTML_ATTR(SELECT,MULTIPLE),
HTML_ATTR(SELECT,NAME),
HTML_ATTR(SELECT,SIZE),
HTML_ATTR(SELECT,STYLE),
HTML_ATTR(SELECT,TABINDEX),
HTML_ATTR(SELECT,TITLE),
HTML_ATTRIBUTES(SELECT)
};
static HTAttr style_attr[HTML_STYLE_ATTRIBUTES+1] = {
HTML_ATTR(STYLE,DIR),
HTML_ATTR(STYLE,LANG),
HTML_ATTR(STYLE,MEDIA),
HTML_ATTR(STYLE,TITLE),
HTML_ATTR(STYLE,TYPE),
HTML_ATTRIBUTES(STYLE)
};
static HTAttr table_attr[HTML_TABLE_ATTRIBUTES+1] = {
HTML_ATTR(TABLE,ALIGN),
HTML_ATTR(TABLE,BGCOLOR),
HTML_ATTR(TABLE,BORDER),
HTML_ATTR(TABLE,CELLPADDING),
HTML_ATTR(TABLE,CELLSPACING),
HTML_ATTR(TABLE,CLASS),
HTML_ATTR(TABLE,DIR),
HTML_ATTR(TABLE,FRAME),
HTML_ATTR(TABLE,ID),
HTML_ATTR(TABLE,LANG),
HTML_ATTR(TABLE,RULES),
HTML_ATTR(TABLE,SUMMARY),
HTML_ATTR(TABLE,STYLE),
HTML_ATTR(TABLE,TITLE),
HTML_ATTR(TABLE,WIDTH),
HTML_ATTRIBUTES(TABLE)
};
static HTAttr tele_attr[HTML_TELE_ATTRIBUTES+1] = {
HTML_ATTR(TELE,ALIGN),
HTML_ATTR(TELE,CHAR),
HTML_ATTR(TELE,CHAROFF),
HTML_ATTR(TELE,CLASS),
HTML_ATTR(TELE,DIR),
HTML_ATTR(TELE,ID),
HTML_ATTR(TELE,LANG),
HTML_ATTR(TELE,STYLE),
HTML_ATTR(TELE,TITLE),
HTML_ATTR(TELE,VALIGN),
HTML_ATTRIBUTES(TELE)
};
static HTAttr td_attr[HTML_TD_ATTRIBUTES+1] = {
HTML_ATTR(TD,ABBR),
HTML_ATTR(TD,ALIGN),
HTML_ATTR(TD,AXIS),
HTML_ATTR(TD,BGCOLOR),
HTML_ATTR(TD,CHAR),
HTML_ATTR(TD,CHAROFF),
HTML_ATTR(TD,CLASS),
HTML_ATTR(TD,COLSPAN),
HTML_ATTR(TD,DIR),
HTML_ATTR(TD,ID),
HTML_ATTR(TD,HEADERS),
HTML_ATTR(TD,HEIGHT),
HTML_ATTR(TD,LANG),
HTML_ATTR(TD,NOWRAP),
HTML_ATTR(TD,ROWSPAN),
HTML_ATTR(TD,SCOPE),
HTML_ATTR(TD,STYLE),
HTML_ATTR(TD,TITLE),
HTML_ATTR(TD,VALIGN),
HTML_ATTR(TD,WIDTH),
HTML_ATTRIBUTES(TD)
};
static HTAttr textarea_attr[HTML_TEXTAREA_ATTRIBUTES+1] = {
HTML_ATTR(TEXTAREA,CLASS),
HTML_ATTR(TEXTAREA,COLS),
HTML_ATTR(TEXTAREA,DIR),
HTML_ATTR(TEXTAREA,DISABLED),
HTML_ATTR(TEXTAREA,ID),
HTML_ATTR(TEXTAREA,LANG),
HTML_ATTR(TEXTAREA,NAME),
HTML_ATTR(TEXTAREA,READONLY),
HTML_ATTR(TEXTAREA,ROWS),
HTML_ATTR(TEXTAREA,STYLE),
HTML_ATTR(TEXTAREA,TABINDEX),
HTML_ATTR(TEXTAREA,TITLE),
HTML_ATTRIBUTES(TEXTAREA)
};
static HTAttr title_attr[HTML_TITLE_ATTRIBUTES+1] = {
HTML_ATTR(TITLE,DIR),
HTML_ATTR(TITLE,LANG),
HTML_ATTRIBUTES(TITLE)
};
static HTAttr ul_attr[HTML_UL_ATTRIBUTES+1] = {
HTML_ATTR(UL,CLASS),
HTML_ATTR(UL,COMPACT),
HTML_ATTR(UL,DIR),
HTML_ATTR(UL,ID),
HTML_ATTR(UL,LANG),
HTML_ATTR(UL,STYLE),
HTML_ATTR(UL,TITLE),
HTML_ATTR(UL,TYPE),
HTML_ATTRIBUTES(UL)
};
/*
** ELEMENTS
** Must match definitions in HTMLPDTD.html!
** Must be in alphabetical order.
**
** Name, Attributes, content
*/
static HTTag tags[HTML_ELEMENTS] = {
{ "A" , a_attr, HTML_A_ATTRIBUTES },
{ "ABBR" , gen_attr, HTML_GEN_ATTRIBUTES },
{ "ACRONYM" , gen_attr, HTML_GEN_ATTRIBUTES },
{ "ADDRESS" , gen_attr, HTML_GEN_ATTRIBUTES },
{ "APPLET" , applet_attr, HTML_APPLET_ATTRIBUTES },
{ "AREA" , area_attr, HTML_AREA_ATTRIBUTES },
{ "B" , gen_attr, HTML_GEN_ATTRIBUTES },
{ "BASE" , base_attr, HTML_BASE_ATTRIBUTES },
{ "BASEFONT", font_attr, HTML_FONT_ATTRIBUTES },
{ "BDO" , bdo_attr, HTML_BDO_ATTRIBUTES },
{ "BIG" , gen_attr, HTML_GEN_ATTRIBUTES },
{ "BLOCKQUOTE", bq_attr, HTML_BQ_ATTRIBUTES },
{ "BODY" , body_attr, HTML_BODY_ATTRIBUTES },
{ "BR" , br_attr, HTML_BR_ATTRIBUTES },
{ "BUTTON" , button_attr, HTML_BUTTON_ATTRIBUTES },
{ "CAPTION" , block_attr, HTML_BLOCK_ATTRIBUTES },
{ "CENTER" , no_attr, 0 },
{ "CITE" , gen_attr, HTML_GEN_ATTRIBUTES },
{ "CODE" , gen_attr, HTML_GEN_ATTRIBUTES },
{ "COL" , col_attr, HTML_COL_ATTRIBUTES },
{ "COLGROUP", col_attr, HTML_COL_ATTRIBUTES },
{ "DD" , gen_attr, HTML_GEN_ATTRIBUTES },
{ "DEL" , changes_attr, HTML_CHANGES_ATTRIBUTES },
{ "DFN" , gen_attr, HTML_GEN_ATTRIBUTES },
{ "DIR" , gen_attr, HTML_GEN_ATTRIBUTES },
{ "DIV" , block_attr, HTML_BLOCK_ATTRIBUTES },
{ "DL" , gen_attr, HTML_GEN_ATTRIBUTES },
{ "DT" , gen_attr, HTML_GEN_ATTRIBUTES },
{ "EM" , gen_attr, HTML_GEN_ATTRIBUTES },
{ "FIELDSET", gen_attr, HTML_GEN_ATTRIBUTES },
{ "FONT" , font_attr, HTML_FONT_ATTRIBUTES },
{ "FORM" , form_attr, HTML_FORM_ATTRIBUTES },
{ "FRAME" , frame_attr, HTML_FRAME_ATTRIBUTES },
{ "FRAMESET", frameset_attr,HTML_FRAMESET_ATTRIBUTES },
{ "H1" , block_attr, HTML_BLOCK_ATTRIBUTES },
{ "H2" , block_attr, HTML_BLOCK_ATTRIBUTES },
{ "H3" , block_attr, HTML_BLOCK_ATTRIBUTES },
{ "H4" , block_attr, HTML_BLOCK_ATTRIBUTES },
{ "H5" , block_attr, HTML_BLOCK_ATTRIBUTES },
{ "H6" , block_attr, HTML_BLOCK_ATTRIBUTES },
{ "HEAD" , head_attr, HTML_HEAD_ATTRIBUTES },
{ "HR" , hr_attr, HTML_HR_ATTRIBUTES },
{ "HTML" , html_attr, HTML_HTML_ATTRIBUTES },
{ "I" , gen_attr, HTML_GEN_ATTRIBUTES },
{ "IFRAME" , iframe_attr, HTML_IFRAME_ATTRIBUTES },
{ "IMG" , img_attr, HTML_IMG_ATTRIBUTES },
{ "INPUT" , input_attr, HTML_INPUT_ATTRIBUTES },
{ "INS" , changes_attr, HTML_CHANGES_ATTRIBUTES },
{ "ISINDEX" , isindex_attr, HTML_ISINDEX_ATTRIBUTES },
{ "KBD" , gen_attr, HTML_GEN_ATTRIBUTES },
{ "LABEL" , label_attr, HTML_LABEL_ATTRIBUTES },
{ "LEGEND" , legend_attr, HTML_LEGEND_ATTRIBUTES },
{ "LI" , li_attr, HTML_LI_ATTRIBUTES },
{ "LINK" , link_attr, HTML_LINK_ATTRIBUTES },
{ "MAP" , map_attr, HTML_MAP_ATTRIBUTES },
{ "MENU" , gen_attr, HTML_GEN_ATTRIBUTES },
{ "META" , meta_attr, HTML_META_ATTRIBUTES },
{ "NEXTID" , nextid_attr, 1 },
{ "NOFRAMES", gen_attr, HTML_GEN_ATTRIBUTES },
{ "NOSCRIPT", gen_attr, HTML_GEN_ATTRIBUTES },
{ "OBJECT" , object_attr, HTML_OBJECT_ATTRIBUTES },
{ "OL" , ol_attr, HTML_OL_ATTRIBUTES },
{ "OPTGROUP", optgroup_attr,HTML_OPTGROUP_ATTRIBUTES },
{ "OPTION" , option_attr, HTML_OPTION_ATTRIBUTES },
{ "P" , block_attr, HTML_BLOCK_ATTRIBUTES },
{ "PARAM" , param_attr, HTML_PARAM_ATTRIBUTES },
{ "PRE" , pre_attr, HTML_PRE_ATTRIBUTES },
{ "Q" , gen_attr, HTML_GEN_ATTRIBUTES },
{ "S" , gen_attr, HTML_GEN_ATTRIBUTES },
{ "SAMP" , gen_attr, HTML_GEN_ATTRIBUTES },
{ "SCRIPT" , script_attr, HTML_SCRIPT_ATTRIBUTES },
{ "SELECT" , select_attr, HTML_SELECT_ATTRIBUTES },
{ "SMALL" , gen_attr, HTML_GEN_ATTRIBUTES },
{ "SPAN" , block_attr, HTML_BLOCK_ATTRIBUTES },
{ "STRIKE" , gen_attr, HTML_GEN_ATTRIBUTES },
{ "STRONG" , gen_attr, HTML_GEN_ATTRIBUTES },
{ "STYLE" , style_attr, HTML_STYLE_ATTRIBUTES },
{ "SUB" , gen_attr, HTML_GEN_ATTRIBUTES },
{ "SUP" , gen_attr, HTML_GEN_ATTRIBUTES },
{ "TABLE" , table_attr, HTML_TABLE_ATTRIBUTES },
{ "TBODY" , tele_attr, HTML_TELE_ATTRIBUTES },
{ "TD" , td_attr, HTML_TD_ATTRIBUTES },
{ "TEXTAREA", textarea_attr,HTML_TEXTAREA_ATTRIBUTES },
{ "TFOOT" , tele_attr, HTML_TELE_ATTRIBUTES },
{ "TH" , td_attr, HTML_TD_ATTRIBUTES },
{ "THEAD" , tele_attr, HTML_TELE_ATTRIBUTES },
{ "TITLE" , title_attr, HTML_TITLE_ATTRIBUTES },
{ "TR" , tele_attr, HTML_TELE_ATTRIBUTES },
{ "TT" , gen_attr, HTML_GEN_ATTRIBUTES },
{ "U" , gen_attr, HTML_GEN_ATTRIBUTES },
{ "UL" , ul_attr, HTML_UL_ATTRIBUTES },
{ "VAR" , gen_attr, HTML_GEN_ATTRIBUTES },
};
static SGML_dtd HTMLP_dtd = {
tags,
HTML_ELEMENTS
};
static SGML_dtd * DTD = &HTMLP_dtd;
SGML_dtd * HTML_dtd (void)
{
return DTD;
}
}// namespace

@ -0,0 +1,222 @@
// 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 <string>
#include "nel/misc/types_nl.h"
#include "nel/gui/url_parser.h"
using namespace std;
namespace NLGUI
{
// ***************************************************************************
CUrlParser::CUrlParser(const std::string &uri)
{
parse(uri);
}
// ***************************************************************************
void CUrlParser::parse(std::string uri)
{
const size_t npos = std::string::npos;
size_t pos;
size_t offset = 0;
// strip fragment if present
pos = uri.find("#");
if (pos != npos)
{
hash = uri.substr(pos + 1);
uri = uri.substr(0, pos);
}
// scan for scheme
pos = uri.find(":");
if (pos != npos && pos >= 1)
{
for (uint i=0; i<pos; i++)
{
if (!isalnum(uri[i]))
{
pos = npos;
break;
}
}
if (pos != npos)
{
scheme = uri.substr(0, pos);
uri = uri.substr(pos + 1);
}
}
// scan for domain
if (uri.substr(0, 2) == "//")
{
pos = uri.find("/", 3);
domain = uri.substr(0, pos);
if (pos != npos)
uri = uri.substr(pos);
else
uri.clear();
}
// scan for query
pos = uri.find("?");
if (pos != npos)
{
query = uri.substr(pos + 1);
uri = uri.substr(0, pos);
}
// all that is remaining is path
path = uri;
}
void CUrlParser::inherit(const std::string &url)
{
// we have scheme, so we already absolute url
if (!scheme.empty())
return;
const size_t npos = std::string::npos;
size_t pos;
CUrlParser base(url);
scheme = base.scheme;
// if we already have domain, then ignore base path
if (!domain.empty())
return;
domain = base.domain;
if (path.empty())
{
path = base.path;
if (query.empty())
query = base.query;
}
else
if (path[0] != '/')
{
// find start of last path segment from base path
// if not found, then dont inherit base path at all
pos = base.path.find_last_of("/");
if (pos != npos)
path = base.path.substr(0, pos) + "/" + path;
}
resolveRelativePath(path);
}
void CUrlParser::resolveRelativePath(std::string &path)
{
const size_t npos = std::string::npos;
// no relative components in path. filename.ext is also matched, but that's fine
size_t pos = path.find(".");
if (pos == npos)
return;
// normalize path
size_t lhp = 0;
while(pos < path.size())
{
if (path[pos] == '.')
{
// scan ahead to see what we have
std::string sub = path.substr(pos, 2);
if (sub == "./" || sub == ".")
{
// starts with
if (pos == 0)
path.replace(pos, sub.size(), "/");
else
{
// full or last segment
sub = path.substr(pos-1, 3);
if (sub == "/./" || sub == "/.")
{
path.replace(pos, sub.size()-1, "");
// we just removed char that pos was pointing, so rewind
pos--;
}
}
}
else
if (sub == "..")
{
// starts with
if (pos == 0 && path.substr(pos, 3) == "../")
path.replace(pos, 3, "/");
else
if (pos > 0)
{
// full or last segment
sub = path.substr(pos-1, 4);
if (sub == "/../" || sub == "/..")
{
if (pos > 1)
lhp = path.find_last_of("/", pos - 2);
else
lhp = 0;
// pos points to first dot in ..
// lhp points to start slash (/) of last segment
pos += sub.size() - 1;
path.replace(lhp, pos - lhp, "/");
pos = lhp;
}
}
}// sub == ".."
} // path[pos] == '.'
pos++;
}// while
}
bool CUrlParser::isAbsolute() const
{
return !scheme.empty() && !domain.empty();
}
// serialize URL back to string
std::string CUrlParser::toString() const
{
std::string result;
if (!scheme.empty())
result += scheme + ":";
if (!domain.empty())
{
result += domain;
}
// path already has leading slash
if (!path.empty())
result += path;
if (!query.empty())
result += "?" + query;
if (!hash.empty())
result += "#" + hash;
return result;
}
}// namespace

@ -252,7 +252,7 @@ namespace NLGUI
if (vLink->getMouseOverShape(tooltip, rot, col)) if (vLink->getMouseOverShape(tooltip, rot, col))
{ {
setString(ucstring(tooltip)); setString(ucstring::makeFromUtf8(tooltip));
sint32 texId = rVR.getTextureIdFromName ("curs_pick.tga"); sint32 texId = rVR.getTextureIdFromName ("curs_pick.tga");
CInterfaceGroup *stringCursor = hwMouse ? _StringCursorHardware : _StringCursor; CInterfaceGroup *stringCursor = hwMouse ? _StringCursorHardware : _StringCursor;
@ -408,7 +408,7 @@ namespace NLGUI
splitString(tooltipInfos, "@", tooltipInfosList); splitString(tooltipInfos, "@", tooltipInfosList);
texName = tooltipInfosList[0]; texName = tooltipInfosList[0];
tooltip = tooltipInfosList[1]; tooltip = tooltipInfosList[1];
setString(ucstring(tooltip)); setString(ucstring::makeFromUtf8(tooltip));
CViewRenderer &rVR = *CViewRenderer::getInstance(); CViewRenderer &rVR = *CViewRenderer::getInstance();
sint32 texId = rVR.getTextureIdFromName (texName); sint32 texId = rVR.getTextureIdFromName (texName);

@ -44,6 +44,7 @@ namespace NLGUI
{ {
_CaseMode = CaseNormal; _CaseMode = CaseNormal;
_Underlined = false; _Underlined = false;
_StrikeThrough = false;
_ContinuousUpdate = false; _ContinuousUpdate = false;
_Active = true; _Active = true;
_X = 0; _X = 0;
@ -58,6 +59,8 @@ namespace NLGUI
_FontSize = 12 + _FontSize = 12 +
CWidgetManager::getInstance()->getSystemOption( CWidgetManager::OptionAddCoefFont ).getValSInt32(); CWidgetManager::getInstance()->getSystemOption( CWidgetManager::OptionAddCoefFont ).getValSInt32();
_Embolden = false;
_Oblique = false;
_Color = CRGBA(255,255,255,255); _Color = CRGBA(255,255,255,255);
_Shadow = false; _Shadow = false;
_ShadowOutline = false; _ShadowOutline = false;
@ -157,6 +160,10 @@ namespace NLGUI
_PosRef = vt._PosRef; _PosRef = vt._PosRef;
_FontSize = vt._FontSize; _FontSize = vt._FontSize;
_Embolden = vt._Embolden;
_Oblique = vt._Oblique;
_Underlined = vt._Underlined;
_StrikeThrough = vt._StrikeThrough;
_Color = vt._Color; _Color = vt._Color;
_Shadow = vt._Shadow; _Shadow = vt._Shadow;
_ShadowOutline = vt._ShadowOutline; _ShadowOutline = vt._ShadowOutline;
@ -221,6 +228,21 @@ namespace NLGUI
); );
} }
else else
if( name == "fontweight" )
{
if (_Embolden)
return "bold";
return "normal";
}
if( name == "fontstyle" )
{
if (_Oblique)
return "oblique";
return "normal";
}
else
if( name == "shadow" ) if( name == "shadow" )
{ {
return toString( _Shadow ); return toString( _Shadow );
@ -286,6 +308,11 @@ namespace NLGUI
return toString( _Underlined ); return toString( _Underlined );
} }
else else
if( name == "strikthrough" )
{
return toString( _StrikeThrough );
}
else
if( name == "case_mode" ) if( name == "case_mode" )
{ {
return toString( uint32( _CaseMode ) ); return toString( uint32( _CaseMode ) );
@ -358,6 +385,20 @@ namespace NLGUI
return true; return true;
} }
else else
if( name == "fontweight" )
{
if (value == "bold")
_Embolden = true;
return true;
}
if( name == "fontstyle" )
{
if( value == "oblique" )
_Oblique = true;
return true;
}
else
if( name == "shadow" ) if( name == "shadow" )
{ {
bool b; bool b;
@ -444,6 +485,14 @@ namespace NLGUI
return true; return true;
} }
else else
if( name == "strikethrough" )
{
bool b;
if( fromString( value, b ) )
_StrikeThrough = b;
return true;
}
else
if( name == "case_mode" ) if( name == "case_mode" )
{ {
uint32 i; uint32 i;
@ -533,6 +582,16 @@ namespace NLGUI
_FontSize - CWidgetManager::getInstance()->getSystemOption( CWidgetManager::OptionAddCoefFont ).getValSInt32() _FontSize - CWidgetManager::getInstance()->getSystemOption( CWidgetManager::OptionAddCoefFont ).getValSInt32()
).c_str() ); ).c_str() );
std::string fontweight("normal");
if (_Embolden)
fontweight = "bold";
xmlSetProp( node, BAD_CAST "fontweight", BAD_CAST fontweight.c_str() );
std::string fontstyle("normal");
if (_Oblique)
fontstyle = "oblique";
xmlSetProp( node, BAD_CAST "fontstyle", BAD_CAST fontstyle.c_str() );
xmlSetProp( node, BAD_CAST "shadow", BAD_CAST toString( _Shadow ).c_str() ); xmlSetProp( node, BAD_CAST "shadow", BAD_CAST toString( _Shadow ).c_str() );
xmlSetProp( node, BAD_CAST "shadow_outline", BAD_CAST toString( _ShadowOutline ).c_str() ); xmlSetProp( node, BAD_CAST "shadow_outline", BAD_CAST toString( _ShadowOutline ).c_str() );
xmlSetProp( node, BAD_CAST "shadow_color", BAD_CAST toString( _ShadowColor ).c_str() ); xmlSetProp( node, BAD_CAST "shadow_color", BAD_CAST toString( _ShadowColor ).c_str() );
@ -561,6 +620,7 @@ namespace NLGUI
xmlSetProp( node, BAD_CAST "multi_line_maxw_only", BAD_CAST toString( _MultiLineMaxWOnly ).c_str() ); xmlSetProp( node, BAD_CAST "multi_line_maxw_only", BAD_CAST toString( _MultiLineMaxWOnly ).c_str() );
xmlSetProp( node, BAD_CAST "multi_max_line", BAD_CAST toString( _MultiMaxLine ).c_str() ); xmlSetProp( node, BAD_CAST "multi_max_line", BAD_CAST toString( _MultiMaxLine ).c_str() );
xmlSetProp( node, BAD_CAST "underlined", BAD_CAST toString( _Underlined ).c_str() ); xmlSetProp( node, BAD_CAST "underlined", BAD_CAST toString( _Underlined ).c_str() );
xmlSetProp( node, BAD_CAST "strikethrough", BAD_CAST toString( _StrikeThrough ).c_str() );
xmlSetProp( node, BAD_CAST "case_mode", BAD_CAST toString( uint32( _CaseMode ) ).c_str() ); xmlSetProp( node, BAD_CAST "case_mode", BAD_CAST toString( uint32( _CaseMode ) ).c_str() );
xmlSetProp( node, BAD_CAST "over_extend_view_text", BAD_CAST toString( _OverExtendViewText ).c_str() ); xmlSetProp( node, BAD_CAST "over_extend_view_text", BAD_CAST toString( _OverExtendViewText ).c_str() );
xmlSetProp( node, BAD_CAST "over_extend_parent_rect", xmlSetProp( node, BAD_CAST "over_extend_parent_rect",
@ -614,6 +674,22 @@ namespace NLGUI
_FontSize += CWidgetManager::getInstance()->getSystemOption( CWidgetManager::OptionAddCoefFont).getValSInt32(); _FontSize += CWidgetManager::getInstance()->getSystemOption( CWidgetManager::OptionAddCoefFont).getValSInt32();
} }
prop = (char*) xmlGetProp( cur, (xmlChar*)"fontweight" );
_Embolden = false;
if (prop)
{
if (nlstricmp("bold", (const char*)prop) == 0) _Embolden = true;
else nlwarning("<CViewText::parse> bad fontweight '%s'", (const char *)prop);
}
prop = (char*) xmlGetProp( cur, (xmlChar*)"fontstyle" );
_Oblique = false;
if (prop)
{
if (nlstricmp("oblique", (const char *) prop) == 0) _Oblique = true;
else nlwarning("<CViewText::parse> bad fontstyle '%s'", (const char *)prop);
}
prop = (char*) xmlGetProp( cur, (xmlChar*)"shadow" ); prop = (char*) xmlGetProp( cur, (xmlChar*)"shadow" );
_Shadow = false; _Shadow = false;
if (prop) if (prop)
@ -668,6 +744,11 @@ namespace NLGUI
if (prop) if (prop)
_Underlined = convertBool(prop); _Underlined = convertBool(prop);
prop = (char*) xmlGetProp( cur, (xmlChar*)"strikethrough" );
_StrikeThrough = false;
if (prop)
_StrikeThrough = convertBool(prop);
prop = (char*) xmlGetProp( cur, (xmlChar*)"case_mode" ); prop = (char*) xmlGetProp( cur, (xmlChar*)"case_mode" );
_CaseMode = CaseNormal; _CaseMode = CaseNormal;
if (prop) if (prop)
@ -887,6 +968,8 @@ namespace NLGUI
TextContext->setShadeOutline (_ShadowOutline); TextContext->setShadeOutline (_ShadowOutline);
TextContext->setShadeColor (shcol); TextContext->setShadeColor (shcol);
TextContext->setFontSize (_FontSize); TextContext->setFontSize (_FontSize);
TextContext->setEmbolden (_Embolden);
TextContext->setOblique (_Oblique);
float y = (float)(_YReal) * ooh; // y is expressed in scree, coordinates [0..1] float y = (float)(_YReal) * ooh; // y is expressed in scree, coordinates [0..1]
//y += _LinesInfos[_LinesInfos.size()-1].StringLine / h; //y += _LinesInfos[_LinesInfos.size()-1].StringLine / h;
@ -953,7 +1036,7 @@ namespace NLGUI
// skip spaces before current word // skip spaces before current word
float firstSpace = currWord.NumSpaces * currLine.getSpaceWidth(); float firstSpace = currWord.NumSpaces * currLine.getSpaceWidth();
sint line_width = 0; sint line_width = 0;
if (_Underlined) if (_Underlined || _StrikeThrough)
{ {
line_width = (sint)floorf(currLine.getWidthWithoutSpaces() + currLine.getSpaceWidth()); line_width = (sint)floorf(currLine.getWidthWithoutSpaces() + currLine.getSpaceWidth());
line_width -= (sint)floorf(firstSpace); line_width -= (sint)floorf(firstSpace);
@ -971,6 +1054,9 @@ namespace NLGUI
if (_Underlined) if (_Underlined)
rVR.drawRotFlipBitmap (_RenderLayer, (sint)floorf(px), y_line, line_width, 1, 0, false, rVR.getBlankTextureId(), col); rVR.drawRotFlipBitmap (_RenderLayer, (sint)floorf(px), y_line, line_width, 1, 0, false, rVR.getBlankTextureId(), col);
if (_StrikeThrough)
rVR.drawRotFlipBitmap (_RenderLayer, (sint)floorf(px), y_line + (_FontHeight / 2), line_width, 1, 0, false, rVR.getBlankTextureId(), col);
// skip word // skip word
px += currWord.Info.StringWidth; px += currWord.Info.StringWidth;
} }
@ -1002,6 +1088,8 @@ namespace NLGUI
TextContext->setShadeOutline (_ShadowOutline); TextContext->setShadeOutline (_ShadowOutline);
TextContext->setShadeColor (shcol); TextContext->setShadeColor (shcol);
TextContext->setFontSize (_FontSize); TextContext->setFontSize (_FontSize);
TextContext->setEmbolden (_Embolden);
TextContext->setOblique (_Oblique);
if(_LetterColors!=NULL && !TextContext->isSameLetterColors(_LetterColors, _Index)) if(_LetterColors!=NULL && !TextContext->isSameLetterColors(_LetterColors, _Index))
@ -1032,6 +1120,9 @@ namespace NLGUI
if (_Underlined) if (_Underlined)
rVR.drawRotFlipBitmap (_RenderLayer, _XReal, _YReal+_FontLegHeight-2, _WReal, 1, 0, false, rVR.getBlankTextureId(), col); rVR.drawRotFlipBitmap (_RenderLayer, _XReal, _YReal+_FontLegHeight-2, _WReal, 1, 0, false, rVR.getBlankTextureId(), col);
if (_StrikeThrough)
rVR.drawRotFlipBitmap (_RenderLayer, _XReal, _YReal+(_FontLegHeight/2), _WReal, 1, 0, false, rVR.getBlankTextureId(), col);
// reset selection // reset selection
if(_TextSelection) if(_TextSelection)
TextContext->resetStringSelection(_Index); TextContext->resetStringSelection(_Index);
@ -1154,6 +1245,22 @@ namespace NLGUI
return _FontSize - CWidgetManager::getInstance()->getSystemOption( CWidgetManager::OptionAddCoefFont).getValSInt32(); return _FontSize - CWidgetManager::getInstance()->getSystemOption( CWidgetManager::OptionAddCoefFont).getValSInt32();
} }
// ***************************************************************************
void CViewText::setEmbolden (bool embolden)
{
_Embolden = embolden;
computeFontSize ();
invalidateContent();
}
// ***************************************************************************
void CViewText::setOblique (bool oblique)
{
_Oblique = oblique;
computeFontSize ();
invalidateContent();
}
// *************************************************************************** // ***************************************************************************
void CViewText::setColor(const NLMISC::CRGBA & color) void CViewText::setColor(const NLMISC::CRGBA & color)
{ {
@ -1679,6 +1786,8 @@ namespace NLGUI
TextContext->setShaded (_Shadow); TextContext->setShaded (_Shadow);
TextContext->setShadeOutline (_ShadowOutline); TextContext->setShadeOutline (_ShadowOutline);
TextContext->setFontSize (_FontSize); TextContext->setFontSize (_FontSize);
TextContext->setEmbolden (_Embolden);
TextContext->setOblique (_Oblique);
// default state // default state
_SingleLineTextClamped= false; _SingleLineTextClamped= false;
@ -2000,6 +2109,8 @@ namespace NLGUI
TextContext->setShaded (_Shadow); TextContext->setShaded (_Shadow);
TextContext->setShadeOutline (_ShadowOutline); TextContext->setShadeOutline (_ShadowOutline);
TextContext->setFontSize (_FontSize); TextContext->setFontSize (_FontSize);
TextContext->setEmbolden (_Embolden);
TextContext->setOblique (_Oblique);
// CViewRenderer &rVR = *CViewRenderer::getInstance(); // CViewRenderer &rVR = *CViewRenderer::getInstance();
height = getFontHeight(); height = getFontHeight();
// //
@ -2132,6 +2243,8 @@ namespace NLGUI
TextContext->setShaded (_Shadow); TextContext->setShaded (_Shadow);
TextContext->setShadeOutline (_ShadowOutline); TextContext->setShadeOutline (_ShadowOutline);
TextContext->setFontSize (_FontSize); TextContext->setFontSize (_FontSize);
TextContext->setEmbolden (_Embolden);
TextContext->setOblique (_Oblique);
// find the line where the character is // find the line where the character is
// CViewRenderer &rVR = *CViewRenderer::getInstance(); // CViewRenderer &rVR = *CViewRenderer::getInstance();
uint charPos = 0; uint charPos = 0;
@ -2407,6 +2520,8 @@ namespace NLGUI
TextContext->setShaded (_Shadow); TextContext->setShaded (_Shadow);
TextContext->setShadeOutline (_ShadowOutline); TextContext->setShadeOutline (_ShadowOutline);
TextContext->setFontSize (_FontSize); TextContext->setFontSize (_FontSize);
TextContext->setEmbolden (_Embolden);
TextContext->setOblique (_Oblique);
TCharPos linePos = 0; TCharPos linePos = 0;
while (linePos < _Text.length()) while (linePos < _Text.length())
@ -2492,6 +2607,8 @@ namespace NLGUI
TextContext->setShaded (_Shadow); TextContext->setShaded (_Shadow);
TextContext->setShadeOutline (_ShadowOutline); TextContext->setShadeOutline (_ShadowOutline);
TextContext->setFontSize (_FontSize); TextContext->setFontSize (_FontSize);
TextContext->setEmbolden (_Embolden);
TextContext->setOblique (_Oblique);
// Current position in text // Current position in text
TCharPos currPos = 0; TCharPos currPos = 0;
@ -2544,6 +2661,8 @@ namespace NLGUI
TextContext->setShaded (_Shadow); TextContext->setShaded (_Shadow);
TextContext->setShadeOutline (_ShadowOutline); TextContext->setShadeOutline (_ShadowOutline);
TextContext->setFontSize (_FontSize); TextContext->setFontSize (_FontSize);
TextContext->setEmbolden (_Embolden);
TextContext->setOblique (_Oblique);
// Letter size // Letter size
UTextContext::CStringInfo si = TextContext->getStringInfo(ucstring("|")); // for now we can't now that directly from UTextContext UTextContext::CStringInfo si = TextContext->getStringInfo(ucstring("|")); // for now we can't now that directly from UTextContext

@ -196,7 +196,7 @@ ENDIF(WITH_STATIC OR WIN32)
# For DirectInput (di_event_emitter) # For DirectInput (di_event_emitter)
IF(WIN32) IF(WIN32)
INCLUDE_DIRECTORIES(${DXSDK_INCLUDE_DIR}) INCLUDE_DIRECTORIES(BEFORE ${DXSDK_INCLUDE_DIR})
TARGET_LINK_LIBRARIES(nelmisc ${DXSDK_DINPUT_LIBRARY} ${DXSDK_GUID_LIBRARY} winmm dbghelp) TARGET_LINK_LIBRARIES(nelmisc ${DXSDK_DINPUT_LIBRARY} ${DXSDK_GUID_LIBRARY} winmm dbghelp)
ENDIF(WIN32) ENDIF(WIN32)

@ -667,7 +667,7 @@ bool abortProgram(uint32 pid)
#endif #endif
} }
bool launchProgram (const std::string &programName, const std::string &arguments) bool launchProgram(const std::string &programName, const std::string &arguments, bool log)
{ {
#ifdef NL_OS_WINDOWS #ifdef NL_OS_WINDOWS
@ -719,7 +719,8 @@ bool launchProgram (const std::string &programName, const std::string &arguments
{ {
LPVOID lpMsgBuf; LPVOID lpMsgBuf;
FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, GetLastError(), MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR) &lpMsgBuf, 0, NULL); FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, GetLastError(), MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR) &lpMsgBuf, 0, NULL);
nlwarning("LAUNCH: Failed launched '%s' with arg '%s' err %d: '%s'", programName.c_str(), arguments.c_str(), GetLastError (), lpMsgBuf); if (log)
nlwarning("LAUNCH: Failed launched '%s' with arg '%s' err %d: '%s'", programName.c_str(), arguments.c_str(), GetLastError(), lpMsgBuf);
LocalFree(lpMsgBuf); LocalFree(lpMsgBuf);
CloseHandle( pi.hProcess ); CloseHandle( pi.hProcess );
CloseHandle( pi.hThread ); CloseHandle( pi.hThread );
@ -776,7 +777,8 @@ bool launchProgram (const std::string &programName, const std::string &arguments
if (status == -1) if (status == -1)
{ {
char *err = strerror (errno); char *err = strerror (errno);
nlwarning("LAUNCH: Failed launched '%s' with arg '%s' err %d: '%s'", programName.c_str(), arguments.c_str(), errno, err); if (log)
nlwarning("LAUNCH: Failed launched '%s' with arg '%s' err %d: '%s'", programName.c_str(), arguments.c_str(), errno, err);
} }
else if (status == 0) else if (status == 0)
{ {
@ -796,7 +798,8 @@ bool launchProgram (const std::string &programName, const std::string &arguments
return true; return true;
} }
#else #else
nlwarning ("LAUNCH: launchProgram() not implemented"); if (log)
nlwarning ("LAUNCH: launchProgram() not implemented");
#endif #endif
return false; return false;

@ -53,6 +53,7 @@
#include "nel/misc/path.h" #include "nel/misc/path.h"
#include "nel/misc/variable.h" #include "nel/misc/variable.h"
#include "nel/misc/system_info.h" #include "nel/misc/system_info.h"
#include "nel/misc/system_utils.h"
#define NL_NO_DEBUG_FILES 1 #define NL_NO_DEBUG_FILES 1
@ -1223,10 +1224,8 @@ void createDebug (const char *logPath, bool logInFile, bool eraseLastLog)
#endif // LOG_IN_FILE #endif // LOG_IN_FILE
DefaultMemDisplayer = new CMemDisplayer ("DEFAULT_MD"); DefaultMemDisplayer = new CMemDisplayer ("DEFAULT_MD");
#ifdef NL_OS_WINDOWS if (NLMISC::CSystemUtils::detectWindowedApplication())
if (GetConsoleWindow() == NULL)
INelContext::getInstance().setWindowedApplication(true); INelContext::getInstance().setWindowedApplication(true);
#endif
initDebug2(logInFile); initDebug2(logInFile);

@ -898,10 +898,10 @@ void CFileContainer::getPathContent (const string &path, bool recurse, bool want
if (isdirectory(de)) if (isdirectory(de))
{ {
// skip CVS and .svn directory // skip CVS, .svn and .hg directory
if ((!showEverything) && (fn == "CVS" || fn == ".svn")) if ((!showEverything) && (fn == "CVS" || fn == ".svn" || fn == ".hg"))
{ {
NL_DISPLAY_PATH("PATH: CPath::getPathContent(%s, %d, %d, %d): skip CVS and .svn directory", path.c_str(), recurse, wantDir, wantFile); NL_DISPLAY_PATH("PATH: CPath::getPathContent(%s, %d, %d, %d): skip CVS, .svn and .hg directory", path.c_str(), recurse, wantDir, wantFile);
continue; continue;
} }
@ -937,10 +937,10 @@ void CFileContainer::getPathContent (const string &path, bool recurse, bool want
closedir (dir); closedir (dir);
#ifndef NL_OS_WINDOWS #ifndef NL_OS_WINDOWS
BasePathgetPathContent = ""; BasePathgetPathContent.clear();
#endif #endif
// let s recurse // let's recurse
for (uint i = 0; i < recursPath.size (); i++) for (uint i = 0; i < recursPath.size (); i++)
{ {
// Progress bar // Progress bar
@ -1033,6 +1033,9 @@ void CFileContainer::addSearchPath (const string &path, bool recurse, bool alter
{ {
// find all path and subpath // find all path and subpath
getPathContent (newPath, recurse, true, false, pathsToProcess, progressCallBack); getPathContent (newPath, recurse, true, false, pathsToProcess, progressCallBack);
// sort files
sort(pathsToProcess.begin(), pathsToProcess.end());
} }
for (uint p = 0; p < pathsToProcess.size(); p++) for (uint p = 0; p < pathsToProcess.size(); p++)
@ -1078,7 +1081,10 @@ void CFileContainer::addSearchPath (const string &path, bool recurse, bool alter
// find all files in the path and subpaths // find all files in the path and subpaths
getPathContent (newPath, recurse, false, true, filesToProcess, progressCallBack); getPathContent (newPath, recurse, false, true, filesToProcess, progressCallBack);
// Progree bar // sort files
sort(filesToProcess.begin(), filesToProcess.end());
// Progress bar
if (progressCallBack) if (progressCallBack)
{ {
progressCallBack->popCropedValues (); progressCallBack->popCropedValues ();

@ -25,6 +25,7 @@
#include "nel/misc/report.h" #include "nel/misc/report.h"
#include "nel/misc/path.h" #include "nel/misc/path.h"
#include "nel/misc/file.h" #include "nel/misc/file.h"
#include "nel/misc/system_utils.h"
#ifdef DEBUG_NEW #ifdef DEBUG_NEW
#define new DEBUG_NEW #define new DEBUG_NEW
@ -102,8 +103,9 @@ TReportResult report(const std::string &title, const std::string &subject, const
} }
} }
if (INelContext::isContextInitialised() if (((INelContext::isContextInitialised()
&& INelContext::getInstance().isWindowedApplication() && INelContext::getInstance().isWindowedApplication())
|| CSystemUtils::detectWindowedApplication())
&& CFile::isExists(NL_CRASH_REPORT_TOOL)) && CFile::isExists(NL_CRASH_REPORT_TOOL))
{ {
std::stringstream params; std::stringstream params;
@ -151,7 +153,8 @@ TReportResult report(const std::string &title, const std::string &subject, const
} }
else else
{ {
NLMISC::launchProgram(NL_CRASH_REPORT_TOOL, paramsStr); // FIXME: Don't use this function, it uses logging, etc, so may loop infinitely! NLMISC::launchProgram(NL_CRASH_REPORT_TOOL, paramsStr,
NL_DEBUG_REPORT ? INelContext::isContextInitialised() : false); // Only log if required, avoid infinite loop
return defaultResult; return defaultResult;
} }
} }

@ -355,4 +355,14 @@ uint CSystemUtils::getCurrentColorDepth()
return depth; return depth;
} }
/// Detect whether the current process is a windowed application. Return true if definitely yes, false if unknown
bool CSystemUtils::detectWindowedApplication()
{
#ifdef NL_OS_WINDOWS
if (GetConsoleWindow() == NULL)
return true;
#endif
return false;
}
} // NLMISC } // NLMISC

@ -2,7 +2,7 @@ FILE(GLOB SRC *.cpp *.h *.def)
NL_TARGET_DRIVER(nel_drv_dsound_win ${SRC}) NL_TARGET_DRIVER(nel_drv_dsound_win ${SRC})
INCLUDE_DIRECTORIES(${DXSDK_INCLUDE_DIR}) INCLUDE_DIRECTORIES(BEFORE ${DXSDK_INCLUDE_DIR})
TARGET_LINK_LIBRARIES(nel_drv_dsound_win nelmisc nelsnd_lowlevel ${DXSDK_DSOUND_LIBRARY} ${DXSDK_GUID_LIBRARY}) TARGET_LINK_LIBRARIES(nel_drv_dsound_win nelmisc nelsnd_lowlevel ${DXSDK_DSOUND_LIBRARY} ${DXSDK_GUID_LIBRARY})
NL_DEFAULT_PROPS(nel_drv_dsound_win "NeL, Driver, Sound: DirectSound") NL_DEFAULT_PROPS(nel_drv_dsound_win "NeL, Driver, Sound: DirectSound")

@ -28,7 +28,7 @@ SOURCE_GROUP(efx FILES
NL_TARGET_DRIVER(nel_drv_xaudio2_win ${SRC}) NL_TARGET_DRIVER(nel_drv_xaudio2_win ${SRC})
INCLUDE_DIRECTORIES(${DXSDK_INCLUDE_DIR}) INCLUDE_DIRECTORIES(BEFORE ${DXSDK_INCLUDE_DIR})
TARGET_LINK_LIBRARIES(nel_drv_xaudio2_win nelmisc nelsnd_lowlevel ${DXSDK_XAUDIO_LIBRARY} ${DXSDK_GUID_LIBRARY}) TARGET_LINK_LIBRARIES(nel_drv_xaudio2_win nelmisc nelsnd_lowlevel ${DXSDK_XAUDIO_LIBRARY} ${DXSDK_GUID_LIBRARY})

@ -36,7 +36,6 @@
#include "nel/3d/scene_group.h" #include "nel/3d/scene_group.h"
#include "nel/3d/animation_playlist.h" #include "nel/3d/animation_playlist.h"
#include "nel/3d/track_keyframer.h" #include "nel/3d/track_keyframer.h"
#include "nel/3d/font_generator.h"
#include "nel/3d/register_3d.h" #include "nel/3d/register_3d.h"
#include "nel/3d/seg_remanence.h" #include "nel/3d/seg_remanence.h"
@ -592,6 +591,12 @@ void CObjectViewer::initCamera ()
// *************************************************************************** // ***************************************************************************
namespace NL3D {
CFontGenerator *newCFontGenerator(const std::string &fontFileName);
}
// ***************************************************************************
bool CObjectViewer::initUI (HWND parent) bool CObjectViewer::initUI (HWND parent)
{ {
AFX_MANAGE_STATE(AfxGetStaticModuleState()); AFX_MANAGE_STATE(AfxGetStaticModuleState());
@ -616,7 +621,7 @@ bool CObjectViewer::initUI (HWND parent)
_FontPath+="\\fonts\\arial.ttf"; _FontPath+="\\fonts\\arial.ttf";
// The font generator // The font generator
_FontGenerator = new NL3D::CFontGenerator ( _FontPath ); _FontGenerator = NL3D::newCFontGenerator ( _FontPath );
delete[] wd; delete[] wd;
// The viewport // The viewport

@ -44,7 +44,6 @@
#include "nel/3d/texture_grouped.h" #include "nel/3d/texture_grouped.h"
#include "nel/3d/nelu.h" #include "nel/3d/nelu.h"
#include "nel/3d/font_manager.h" #include "nel/3d/font_manager.h"
#include "nel/3d/font_generator.h"
// //
#include "nel/misc/file.h" #include "nel/misc/file.h"
#include "start_stop_particle_system.h" #include "start_stop_particle_system.h"

@ -23,8 +23,8 @@
#endif // _MSC_VER > 1000 #endif // _MSC_VER > 1000
#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers #define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
#define NOMINMAX #define NOMINMAX
#define _WIN32_WINNT 0x0501
#include <afxwin.h> // MFC core and standard components #include <afxwin.h> // MFC core and standard components
#include <afxext.h> // MFC extensions #include <afxext.h> // MFC extensions

@ -23,8 +23,9 @@
#endif // _MSC_VER > 1000 #endif // _MSC_VER > 1000
#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers #define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
#define NOMINMAX #define NOMINMAX
#define _WIN32_WINNT 0x0501
#include <windows.h> #include <windows.h>
#endif #endif

@ -68,6 +68,7 @@ NEL_3DSMAX_SHARED_API NLMISC::INelContext &GetSharedNelContext()
{ {
new NLMISC::CApplicationContext(); new NLMISC::CApplicationContext();
NLMISC::createDebug(); NLMISC::createDebug();
NLMISC::INelContext::getInstance().setWindowedApplication(true);
} }
return NLMISC::INelContext::getInstance(); return NLMISC::INelContext::getInstance();
} }

@ -1,4 +1,4 @@
//Microsoft Developer Studio generated resource script. // Microsoft Visual C++ generated resource script.
// //
#include "resource.h" #include "resource.h"
@ -7,7 +7,7 @@
// //
// Generated from the TEXTINCLUDE 2 resource. // Generated from the TEXTINCLUDE 2 resource.
// //
#include <windows.h> #include "afxres.h"
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS #undef APSTUDIO_READONLY_SYMBOLS
@ -26,141 +26,109 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
// Dialog // Dialog
// //
IDD_PANEL DIALOG DISCARDABLE 0, 0, 108, 251 IDD_PANEL DIALOG 0, 0, 108, 251
STYLE WS_CHILD | WS_VISIBLE STYLE DS_SETFONT | WS_CHILD | WS_VISIBLE
FONT 8, "MS Sans Serif" FONT 8, "MS Sans Serif"
BEGIN BEGIN
PUSHBUTTON "Export model",ID_SAVEMODEL,10,10,85,15 PUSHBUTTON "Export model",ID_SAVEMODEL,10,10,85,15
PUSHBUTTON "Export model animations",ID_SAVE_MODEL_ANIM,10,90,85,15 PUSHBUTTON "Export model animations",ID_SAVE_MODEL_ANIM,10,90,85,15
PUSHBUTTON "View the scene",ID_VIEW,10,152,85,15 PUSHBUTTON "View the scene",ID_VIEW,10,152,85,15
PUSHBUTTON "Export scene animations",ID_SAVE_SCENE_ANIM,10,110,85, PUSHBUTTON "Export scene animations",ID_SAVE_SCENE_ANIM,10,110,85,15
15
PUSHBUTTON "Export skeleton weights",ID_SAVESWT,10,50,85,15 PUSHBUTTON "Export skeleton weights",ID_SAVESWT,10,50,85,15
PUSHBUTTON "Export Instance Group",ID_EXPORTINSTANCEGROUP,10,70,85, PUSHBUTTON "Export Instance Group",ID_EXPORTINSTANCEGROUP,10,70,85,15
15
PUSHBUTTON "Export skeleton",ID_SAVESKELETON,10,30,85,15 PUSHBUTTON "Export skeleton",ID_SAVESKELETON,10,30,85,15
PUSHBUTTON "Options",ID_OPTIONS,10,173,85,15 PUSHBUTTON "Options",ID_OPTIONS,10,173,85,15
PUSHBUTTON "Node properties",ID_NODE_PROPERTIES,10,194,85,15 PUSHBUTTON "Node properties",ID_NODE_PROPERTIES,10,194,85,15
PUSHBUTTON "Export Collision",ID_SAVECOLLISION,10,131,85,15 PUSHBUTTON "Export Collision",ID_SAVECOLLISION,10,131,85,15
CTEXT "Can't read the version",IDC_VERSION,15,234,75,10 CTEXT "Can't read the version",IDC_VERSION,15,234,75,10
PUSHBUTTON "Test interface mesh",ID_TEST_INTERFACE_MESH,10,215,85, PUSHBUTTON "Test interface mesh",ID_TEST_INTERFACE_MESH,10,215,85,15
15
END END
IDD_SWT DIALOG DISCARDABLE 0, 0, 186, 63 IDD_SWT DIALOG 0, 0, 186, 63
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION
CAPTION "Choose the channel to export" CAPTION "Choose the channel to export"
FONT 8, "MS Sans Serif" FONT 8, "MS Sans Serif"
BEGIN BEGIN
DEFPUSHBUTTON "OK",IDOK,129,7,50,14 DEFPUSHBUTTON "OK",IDOK,129,7,50,14
PUSHBUTTON "Cancel",IDCANCEL,129,42,50,14 PUSHBUTTON "Cancel",IDCANCEL,129,42,50,14
CONTROL "All",IDC_ALLCHANNEL,"Button",BS_AUTOCHECKBOX | CONTROL "All",IDC_ALLCHANNEL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,7,23,10
WS_TABSTOP,7,7,23,10 CONTROL "Channel Position",IDC_CHANNELPOS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,23,69,10
CONTROL "Channel Position",IDC_CHANNELPOS,"Button", CONTROL "Channel Rotation",IDC_CHANNELROT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,34,71,10
BS_AUTOCHECKBOX | WS_TABSTOP,7,23,69,10 CONTROL "Channel Scale",IDC_CHANNELSCA,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,46,62,10
CONTROL "Channel Rotation",IDC_CHANNELROT,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP,7,34,71,10
CONTROL "Channel Scale",IDC_CHANNELSCA,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP,7,46,62,10
END END
IDD_EXPORTSCENE DIALOG DISCARDABLE 0, 0, 171, 255 IDD_EXPORTSCENE DIALOG 0, 0, 171, 255
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "Options" CAPTION "Options"
FONT 8, "MS Sans Serif" FONT 8, "MS Sans Serif"
BEGIN BEGIN
DEFPUSHBUTTON "OK",IDOK,115,173,50,14 DEFPUSHBUTTON "OK",IDOK,115,173,50,14
PUSHBUTTON "Cancel",IDCANCEL,115,190,50,14 PUSHBUTTON "Cancel",IDCANCEL,115,190,50,14
CONTROL "Export Lighting",IDC_CHECKEXPORTLIGHTING,"Button", CONTROL "Export Lighting",IDC_CHECKEXPORTLIGHTING,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,18,63,10
BS_AUTOCHECKBOX | WS_TABSTOP,7,18,63,10
GROUPBOX "Light Method",IDC_STATIC,7,60,74,39,WS_GROUP GROUPBOX "Light Method",IDC_STATIC,7,60,74,39,WS_GROUP
CONTROL "Raytrace",IDC_RADIONORMALEXPORTLIGHTING,"Button", CONTROL "Raytrace",IDC_RADIONORMALEXPORTLIGHTING,"Button",BS_AUTORADIOBUTTON,15,74,45,10
BS_AUTORADIOBUTTON,15,74,45,10 CONTROL "Soft Shadow",IDC_RADIORADIOSITYEXPORTLIGHTING,"Button",BS_AUTORADIOBUTTON,15,84,57,10
CONTROL "Soft Shadow",IDC_RADIORADIOSITYEXPORTLIGHTING,"Button",
BS_AUTORADIOBUTTON,15,84,57,10
EDITTEXT IDC_EDITEXPORTLIGHTING,7,42,137,14,ES_AUTOHSCROLL EDITTEXT IDC_EDITEXPORTLIGHTING,7,42,137,14,ES_AUTOHSCROLL
PUSHBUTTON "...",IDC_BUTTONEXPORTLIGHTING,151,42,13,14 PUSHBUTTON "...",IDC_BUTTONEXPORTLIGHTING,151,42,13,14
LTEXT "Lumel Size in meter",IDC_STATIC,90,63,62,8 LTEXT "Lumel Size in meter",IDC_STATIC,90,63,62,8
EDITTEXT IDC_EDITLUMELSIZE,90,73,40,14,ES_AUTOHSCROLL EDITTEXT IDC_EDITLUMELSIZE,90,73,40,14,ES_AUTOHSCROLL
GROUPBOX "OverSampling",IDC_STATIC,7,104,60,54,WS_GROUP GROUPBOX "OverSampling",IDC_STATIC,7,104,60,54,WS_GROUP
CONTROL "None",IDC_RADIOSS1,"Button",BS_AUTORADIOBUTTON,15,113, CONTROL "None",IDC_RADIOSS1,"Button",BS_AUTORADIOBUTTON,15,113,33,10
33,10 CONTROL "4x",IDC_RADIOSS2,"Button",BS_AUTORADIOBUTTON,15,124,23,10
CONTROL "4x",IDC_RADIOSS2,"Button",BS_AUTORADIOBUTTON,15,124,23, CONTROL "16x",IDC_RADIOSS3,"Button",BS_AUTORADIOBUTTON,15,135,27,10
10 CONTROL "64x",IDC_RADIOSS4,"Button",BS_AUTORADIOBUTTON,15,146,27,10
CONTROL "16x",IDC_RADIOSS3,"Button",BS_AUTORADIOBUTTON,15,135,27, CONTROL "Shadow",IDC_SHADOW,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,81,18,42,10
10
CONTROL "64x",IDC_RADIOSS4,"Button",BS_AUTORADIOBUTTON,15,146,27,
10
CONTROL "Shadow",IDC_SHADOW,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP,81,18,42,10
CONTROL "Exclude non selected nodes from lighting",IDC_EXCLUDE, CONTROL "Exclude non selected nodes from lighting",IDC_EXCLUDE,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,7,145,10 "Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,7,145,10
CONTROL "Show Lumel",IDC_SHOWLUMEL,"Button",BS_AUTOCHECKBOX | CONTROL "Show Lumel",IDC_SHOWLUMEL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,91,100,55,10
WS_TABSTOP,91,100,55,10 CONTROL "Export bg color",IDC_EXPORT_BG_COLOR,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,91,115,63,10
CONTROL "Export bg color",IDC_EXPORT_BG_COLOR,"Button", CONTROL "Test Surface Lighting",IDC_TEST_SURFACE_LIGHT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,173,84,10
BS_AUTOCHECKBOX | WS_TABSTOP,91,115,63,10
CONTROL "Test Surface Lighting",IDC_TEST_SURFACE_LIGHT,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP,15,173,84,10
EDITTEXT IDC_EDITCELLSIZE,15,198,65,15,ES_AUTOHSCROLL EDITTEXT IDC_EDITCELLSIZE,15,198,65,15,ES_AUTOHSCROLL
LTEXT "Surface CellSize (in meter)",IDC_STATIC,15,188,85,10 LTEXT "Surface CellSize (in meter)",IDC_STATIC,15,188,85,10
EDITTEXT IDC_EDITCELLDELTAZ,15,228,65,15,ES_AUTOHSCROLL EDITTEXT IDC_EDITCELLDELTAZ,15,228,65,15,ES_AUTOHSCROLL
LTEXT "Surface DeltaZ (in meter)",IDC_STATIC2,15,218,85,10 LTEXT "Surface DeltaZ (in meter)",IDC_STATIC2,15,218,85,10
GROUPBOX "Surface Lighting",IDC_STATIC,7,163,98,85 GROUPBOX "Surface Lighting",IDC_STATIC,7,163,98,85
CONTROL "Output lightmap log",IDC_CHECKOUTPUTLIGHTMAPLOG,"Button", CONTROL "Output lightmap log",IDC_CHECKOUTPUTLIGHTMAPLOG,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,29,77,10
BS_AUTOCHECKBOX | WS_TABSTOP,7,29,77,10
END END
IDD_CALCULATING DIALOG DISCARDABLE 0, 0, 186, 181 IDD_CALCULATING DIALOG 0, 0, 186, 181
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION
CAPTION "Calculating..." CAPTION "Calculating..."
FONT 8, "MS Sans Serif" FONT 8, "MS Sans Serif"
BEGIN BEGIN
CONTROL "Progress1",IDC_PROGRESS1,"msctls_progress32",WS_BORDER, CONTROL "Progress1",IDC_PROGRESS1,"msctls_progress32",WS_BORDER,7,41,172,14
7,41,172,14 LTEXT "Please wait intializing...",IDC_STATICTIMELEFT,7,7,172,8
LTEXT "Please wait intializing...",IDC_STATICTIMELEFT,7,7,172,
8
PUSHBUTTON "Interrupt",IDC_BUTTONCANCEL,129,23,50,14,BS_NOTIFY PUSHBUTTON "Interrupt",IDC_BUTTONCANCEL,129,23,50,14,BS_NOTIFY
LTEXT "Object progression",IDC_STATIC,7,28,79,8 LTEXT "Object progression",IDC_STATIC,7,28,79,8
LTEXT "Lightmaps Information...",IDC_STATICINFO,7,60,172,114 LTEXT "Lightmaps Information...",IDC_STATICINFO,7,60,172,114
END END
IDD_LOD DIALOG DISCARDABLE 0, 0, 360, 200 IDD_LOD DIALOG 0, 0, 360, 200
STYLE WS_CHILD STYLE DS_SETFONT | WS_CHILD
FONT 8, "MS Sans Serif" FONT 8, "MS Sans Serif"
BEGIN BEGIN
GROUPBOX "LOD Root Properties",IDC_STATIC,5,5,172,95 GROUPBOX "LOD Root Properties",IDC_STATIC,5,5,172,95
LTEXT "List of lod mesh (ungrowing order):",IDC_STATIC,15,15, LTEXT "List of lod mesh (ungrowing order):",IDC_STATIC,15,15,108,10,SS_CENTERIMAGE
108,10,SS_CENTERIMAGE LISTBOX IDC_LIST1,15,25,111,70,LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
LISTBOX IDC_LIST1,15,25,111,70,LBS_NOINTEGRALHEIGHT | WS_VSCROLL |
WS_TABSTOP
PUSHBUTTON "Add..",IDC_ADD,131,25,40,14 PUSHBUTTON "Add..",IDC_ADD,131,25,40,14
PUSHBUTTON "Remove",IDC_REMOVE,131,39,40,14 PUSHBUTTON "Remove",IDC_REMOVE,131,39,40,14
PUSHBUTTON "Up",IDC_UP,131,54,40,14 PUSHBUTTON "Up",IDC_UP,131,54,40,14
PUSHBUTTON "Down",IDC_DOWN,131,68,40,14 PUSHBUTTON "Down",IDC_DOWN,131,68,40,14
GROUPBOX "LOD Properties",IDC_STATIC,5,105,172,50 GROUPBOX "LOD Properties",IDC_STATIC,5,105,172,50
CONTROL "Blend in",IDC_BLEND_IN,"Button",BS_AUTO3STATE | CONTROL "Blend in",IDC_BLEND_IN,"Button",BS_AUTO3STATE | WS_TABSTOP,15,121,40,10
WS_TABSTOP,15,121,40,10 CONTROL "Blend out",IDC_BLEND_OUT,"Button",BS_AUTO3STATE | WS_TABSTOP,15,130,45,10
CONTROL "Blend out",IDC_BLEND_OUT,"Button",BS_AUTO3STATE | CONTROL "Coarse mesh",IDC_COARSE_MESH,"Button",BS_AUTO3STATE | WS_TABSTOP,15,140,55,10
WS_TABSTOP,15,130,45,10 CONTROL "Dynamic mesh",IDC_DYNAMIC_MESH,"Button",BS_AUTO3STATE | WS_TABSTOP,80,120,60,10
CONTROL "Coarse mesh",IDC_COARSE_MESH,"Button",BS_AUTO3STATE |
WS_TABSTOP,15,140,55,10
CONTROL "Dynamic mesh",IDC_DYNAMIC_MESH,"Button",BS_AUTO3STATE |
WS_TABSTOP,80,120,60,10
LTEXT "Dist Max:",IDC_STATIC,5,160,45,13,SS_CENTERIMAGE LTEXT "Dist Max:",IDC_STATIC,5,160,45,13,SS_CENTERIMAGE
EDITTEXT IDC_DIST_MAX,51,160,45,12,ES_AUTOHSCROLL | ES_NUMBER EDITTEXT IDC_DIST_MAX,51,160,45,12,ES_AUTOHSCROLL | ES_NUMBER
LTEXT "Blend length:",IDC_STATIC,80,135,45,13,SS_CENTERIMAGE LTEXT "Blend length:",IDC_STATIC,80,135,45,13,SS_CENTERIMAGE
EDITTEXT IDC_BLEND_LENGTH,125,135,45,12,ES_AUTOHSCROLL | EDITTEXT IDC_BLEND_LENGTH,125,135,45,12,ES_AUTOHSCROLL | ES_NUMBER
ES_NUMBER
GROUPBOX "MRM properties",IDC_STATIC,185,5,172,95 GROUPBOX "MRM properties",IDC_STATIC,185,5,172,95
CONTROL "Active MRM",IDC_ACTIVE_MRM,"Button",BS_AUTO3STATE | CONTROL "Active MRM",IDC_ACTIVE_MRM,"Button",BS_AUTO3STATE | WS_TABSTOP,195,20,60,10
WS_TABSTOP,195,20,60,10
LTEXT "Skin reduction",IDC_STATIC,195,35,50,10,SS_CENTERIMAGE LTEXT "Skin reduction",IDC_STATIC,195,35,50,10,SS_CENTERIMAGE
CONTROL "Min",IDC_SKIN_REDUCTION_MIN,"Button",BS_AUTORADIOBUTTON, CONTROL "Min",IDC_SKIN_REDUCTION_MIN,"Button",BS_AUTORADIOBUTTON,195,45,45,8
195,45,45,8 CONTROL "Max",IDC_SKIN_REDUCTION_MAX,"Button",BS_AUTORADIOBUTTON,195,55,45,8
CONTROL "Max",IDC_SKIN_REDUCTION_MAX,"Button",BS_AUTORADIOBUTTON, CONTROL "Best",IDC_SKIN_REDUCTION_BEST,"Button",BS_AUTORADIOBUTTON,195,65,45,8
195,55,45,8
CONTROL "Best",IDC_SKIN_REDUCTION_BEST,"Button",
BS_AUTORADIOBUTTON,195,65,45,8
LTEXT "Steps count:",IDC_STATIC,260,20,45,13,SS_CENTERIMAGE LTEXT "Steps count:",IDC_STATIC,260,20,45,13,SS_CENTERIMAGE
EDITTEXT IDC_NB_LOD,305,20,45,12,ES_AUTOHSCROLL | ES_NUMBER EDITTEXT IDC_NB_LOD,305,20,45,12,ES_AUTOHSCROLL | ES_NUMBER
LTEXT "Divisor poly:",IDC_STATIC,260,35,45,13,SS_CENTERIMAGE LTEXT "Divisor poly:",IDC_STATIC,260,35,45,13,SS_CENTERIMAGE
@ -170,128 +138,91 @@ BEGIN
LTEXT "Dist middle:",IDC_STATIC,260,65,45,13,SS_CENTERIMAGE LTEXT "Dist middle:",IDC_STATIC,260,65,45,13,SS_CENTERIMAGE
EDITTEXT IDC_DIST_MIDDLE,305,65,45,12,ES_AUTOHSCROLL | ES_NUMBER EDITTEXT IDC_DIST_MIDDLE,305,65,45,12,ES_AUTOHSCROLL | ES_NUMBER
LTEXT "Dist coarsest:",IDC_STATIC,260,80,45,13,SS_CENTERIMAGE LTEXT "Dist coarsest:",IDC_STATIC,260,80,45,13,SS_CENTERIMAGE
EDITTEXT IDC_DIST_COARSEST,305,80,45,12,ES_AUTOHSCROLL | EDITTEXT IDC_DIST_COARSEST,305,80,45,12,ES_AUTOHSCROLL | ES_NUMBER
ES_NUMBER
GROUPBOX "LOD Bones",IDC_STATIC,185,105,170,45 GROUPBOX "LOD Bones",IDC_STATIC,185,105,170,45
LTEXT "Disable Distance (0 means always activated) :", LTEXT "Disable Distance (0 means always activated) :",IDC_STATIC,190,120,160,10
IDC_STATIC,190,120,160,10 EDITTEXT IDC_BONE_LOD_DISTANCE,190,130,45,12,ES_AUTOHSCROLL | ES_NUMBER
EDITTEXT IDC_BONE_LOD_DISTANCE,190,130,45,12,ES_AUTOHSCROLL | CONTROL "Export as Lod character (.clod)",IDC_EXPORT_CLOD,"Button",BS_AUTO3STATE | WS_TABSTOP,190,160,150,10
ES_NUMBER
CONTROL "Export as Lod character (.clod)",IDC_EXPORT_CLOD,"Button",
BS_AUTO3STATE | WS_TABSTOP,190,160,150,10
END END
IDD_ACCEL DIALOG DISCARDABLE 0, 0, 360, 200 IDD_ACCEL DIALOG 0, 0, 360, 200
STYLE WS_CHILD STYLE DS_SETFONT | WS_CHILD
FONT 8, "MS Sans Serif" FONT 8, "MS Sans Serif"
BEGIN BEGIN
CONTROL "Not an accelerator",IDC_RADIOACCELNO,"Button", CONTROL "Not an accelerator",IDC_RADIOACCELNO,"Button",BS_AUTORADIOBUTTON,5,5,75,10
BS_AUTORADIOBUTTON,5,5,75,10 CONTROL "Portal",IDC_RADIOACCELPORTAL,"Button",BS_AUTORADIOBUTTON,5,21,34,10
CONTROL "Portal",IDC_RADIOACCELPORTAL,"Button", CONTROL "Cluster",IDC_RADIOACCELCLUSTER,"Button",BS_AUTORADIOBUTTON,5,70,37,10
BS_AUTORADIOBUTTON,5,21,34,10 CONTROL "Father visible",IDC_FATHER_VISIBLE,"Button",BS_AUTO3STATE | WS_TABSTOP,27,81,57,10
CONTROL "Cluster",IDC_RADIOACCELCLUSTER,"Button", CONTROL "Visible from father",IDC_VISIBLE_FROM_FATHER,"Button",BS_AUTO3STATE | WS_TABSTOP,27,92,71,10
BS_AUTORADIOBUTTON,5,70,37,10 CONTROL "Dynamic Portal",IDC_DYNAMIC_PORTAL,"Button",BS_AUTO3STATE | WS_TABSTOP,27,44,63,10
CONTROL "Father visible",IDC_FATHER_VISIBLE,"Button", CONTROL "Clusterize",IDC_CLUSTERIZE,"Button",BS_AUTO3STATE | WS_TABSTOP,93,5,46,10
BS_AUTO3STATE | WS_TABSTOP,27,81,57,10 COMBOBOX IDC_OCC_MODEL,209,30,123,134,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
CONTROL "Visible from father",IDC_VISIBLE_FROM_FATHER,"Button",
BS_AUTO3STATE | WS_TABSTOP,27,92,71,10
CONTROL "Dynamic Portal",IDC_DYNAMIC_PORTAL,"Button",
BS_AUTO3STATE | WS_TABSTOP,27,44,63,10
CONTROL "Clusterize",IDC_CLUSTERIZE,"Button",BS_AUTO3STATE |
WS_TABSTOP,93,5,46,10
COMBOBOX IDC_OCC_MODEL,209,30,123,134,CBS_DROPDOWNLIST |
WS_VSCROLL | WS_TABSTOP
RTEXT "Occlusion model",IDC_STATIC,134,30,68,12,SS_CENTERIMAGE RTEXT "Occlusion model",IDC_STATIC,134,30,68,12,SS_CENTERIMAGE
COMBOBOX IDC_OPEN_OCC_MODEL,209,44,123,116,CBS_DROPDOWNLIST | COMBOBOX IDC_OPEN_OCC_MODEL,209,44,123,116,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
WS_VSCROLL | WS_TABSTOP RTEXT "Open portal occlusion model",IDC_STATIC,112,44,89,10,SS_CENTERIMAGE
RTEXT "Open portal occlusion model",IDC_STATIC,112,44,89,10,
SS_CENTERIMAGE
GROUPBOX "Audio properties",IDC_STATIC,105,19,237,141 GROUPBOX "Audio properties",IDC_STATIC,105,19,237,141
RTEXT "Sound group",IDC_STATIC,111,86,90,14 RTEXT "Sound group",IDC_STATIC,111,86,90,14
COMBOBOX IDC_ENV_FX,209,106,123,87,CBS_DROPDOWNLIST | WS_VSCROLL | COMBOBOX IDC_ENV_FX,209,106,123,87,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
WS_TABSTOP
RTEXT "Environment FX",IDC_STATIC,112,106,89,10,SS_CENTERIMAGE RTEXT "Environment FX",IDC_STATIC,112,106,89,10,SS_CENTERIMAGE
COMBOBOX IDC_SOUND_GROUP,209,86,123,101,CBS_DROPDOWN | CBS_SORT | COMBOBOX IDC_SOUND_GROUP,209,86,123,101,CBS_DROPDOWN | CBS_SORT | WS_VSCROLL | WS_TABSTOP
WS_VSCROLL | WS_TABSTOP CONTROL "Father audible",IDC_FATHER_AUDIBLE,"Button",BS_AUTO3STATE | WS_TABSTOP,210,135,61,10
CONTROL "Father audible",IDC_FATHER_AUDIBLE,"Button", CONTROL "Audible from father",IDC_AUDIBLE_FROM_FATHER,"Button",BS_AUTO3STATE | WS_TABSTOP,210,145,81,10
BS_AUTO3STATE | WS_TABSTOP,210,135,61,10 CONTROL "Audible like visible",IDC_AUDIBLE_LIKE_VISIBLE,"Button",BS_AUTO3STATE | WS_TABSTOP,210,125,73,10
CONTROL "Audible from father",IDC_AUDIBLE_FROM_FATHER,"Button",
BS_AUTO3STATE | WS_TABSTOP,210,145,81,10
CONTROL "Audible like visible",IDC_AUDIBLE_LIKE_VISIBLE,"Button",
BS_AUTO3STATE | WS_TABSTOP,210,125,73,10
END END
IDD_LIGHTMAP DIALOG DISCARDABLE 0, 0, 360, 211 IDD_LIGHTMAP DIALOGEX 0, 0, 360, 211
STYLE WS_CHILD STYLE DS_SETFONT | WS_CHILD
FONT 8, "MS Sans Serif" FONT 8, "MS Sans Serif", 0, 0, 0x0
BEGIN BEGIN
GROUPBOX "Properties for objects with lightmaps",IDC_STATIC,5,5, GROUPBOX "Properties for objects with lightmaps",IDC_STATIC,5,5,150,70
150,70 LTEXT "Lumel Size Multiplier",IDC_STATIC,10,15,64,13,SS_CENTERIMAGE
LTEXT "Lumel Size Multiplier",IDC_STATIC,10,15,64,13,
SS_CENTERIMAGE
EDITTEXT IDC_EDIT_LUMELSIZEMUL,96,15,40,14,ES_AUTOHSCROLL EDITTEXT IDC_EDIT_LUMELSIZEMUL,96,15,40,14,ES_AUTOHSCROLL
LTEXT "Soft Shadow Radius",IDC_STATIC,10,35,66,13, LTEXT "Soft Shadow Radius",IDC_STATIC,10,35,66,13,SS_CENTERIMAGE
SS_CENTERIMAGE
EDITTEXT IDC_EDIT_SOFTSHADOW_RADIUS,96,35,40,14,ES_AUTOHSCROLL EDITTEXT IDC_EDIT_SOFTSHADOW_RADIUS,96,35,40,14,ES_AUTOHSCROLL
LTEXT "Soft Shadow Cone Length",IDC_STATIC,10,55,84,13, LTEXT "Soft Shadow Cone Length",IDC_STATIC,10,55,84,13,SS_CENTERIMAGE
SS_CENTERIMAGE EDITTEXT IDC_EDIT_SOFTSHADOW_CONELENGTH,96,55,40,14,ES_AUTOHSCROLL
EDITTEXT IDC_EDIT_SOFTSHADOW_CONELENGTH,96,55,40,14, GROUPBOX "Properties for objects without lightmaps",IDC_STATIC,5,80,150,60
ES_AUTOHSCROLL CONTROL "If checked, use per vertex lighting attenuation else use global lighting attenuation for the object. Doesn't work with per pixel lighting shader.",IDC_USE_LIGHT_LOCAL_ATTENUATION,
GROUPBOX "Properties for objects without lightmaps",IDC_STATIC,5, "Button",BS_AUTO3STATE | BS_TOP | BS_MULTILINE | WS_TABSTOP,18,96,120,41
80,150,60
CONTROL "If checked, use per vertex lighting attenuation else use global lighting attenuation for the object. Doesn't work with per pixel lighting shader.",
IDC_USE_LIGHT_LOCAL_ATTENUATION,"Button",BS_AUTO3STATE |
BS_TOP | BS_MULTILINE | WS_TABSTOP,15,95,120,41
GROUPBOX "Properties for lights",IDC_STATIC,160,5,185,200 GROUPBOX "Properties for lights",IDC_STATIC,160,5,185,200
CONTROL "RealTime Light. If set, this light will light scene objects.", CONTROL "RealTime Light. If set, this light will light scene objects.",IDC_EXPORT_REALTIME_LIGHT,
IDC_EXPORT_REALTIME_LIGHT,"Button",BS_AUTO3STATE | "Button",BS_AUTO3STATE | BS_TOP | BS_MULTILINE | WS_TABSTOP,174,18,168,18
BS_TOP | BS_MULTILINE | WS_TABSTOP,170,15,165,20 CONTROL "RealTime Sun Light. If set, this DIRECTIONNAL light will be used as sun light to light scene objects.",IDC_EXPORT_AS_SUN_LIGHT,
CONTROL "RealTime Sun Light. If set, this DIRECTIONNAL light will be used as sun light to light scene objects.", "Button",BS_AUTO3STATE | BS_TOP | BS_MULTILINE | WS_TABSTOP,174,36,168,24
IDC_EXPORT_AS_SUN_LIGHT,"Button",BS_AUTO3STATE | BS_TOP | CONTROL "LightMap Light. If set, this light will be used to compute the lightmaps of the project objects.",IDC_EXPORT_LIGHTMAP_LIGHT,
BS_MULTILINE | WS_TABSTOP,170,34,170,25 "Button",BS_AUTO3STATE | BS_TOP | BS_MULTILINE | WS_TABSTOP,174,60,168,18
CONTROL "LightMap Light. If set, this light will be used to compute the lightmaps of the project objects.", LTEXT "LightMap Animation Name. This is the name of the animation used to flick the light color.",IDC_STATIC,174,138,170,20
IDC_EXPORT_LIGHTMAP_LIGHT,"Button",BS_AUTO3STATE | EDITTEXT IDC_EXPORT_LIGHTMAP_NAME,174,156,85,15,ES_AUTOHSCROLL
BS_TOP | BS_MULTILINE | WS_TABSTOP,170,60,170,20
LTEXT "LightMap Animation Name. This is the name of the animation used to flick the light color.",
IDC_STATIC,170,135,170,20
EDITTEXT IDC_EXPORT_LIGHTMAP_NAME,170,155,85,15,ES_AUTOHSCROLL
CONTROL "Animated Dynamic Light",IDC_EXPORT_LIGHTMAP_ANIMATED, CONTROL "Animated Dynamic Light",IDC_EXPORT_LIGHTMAP_ANIMATED,
"Button",BS_AUTO3STATE | WS_TABSTOP,170,175,125,10 "Button",BS_AUTO3STATE | WS_TABSTOP,174,177,125,10
CONTROL "Always group",IDC_LIGHT_GROUP_ALWAYS,"Button", CONTROL "Always on lightgroup (0)",IDC_LIGHT_GROUP_ALWAYS,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,174,90,156,12
BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,170,80,150,15 CONTROL "Day cycle (3)",IDC_LIGHT_GROUP_DAY_CYCLE,"Button",BS_AUTORADIOBUTTON,174,102,66,12
CONTROL "Sun group",IDC_LIGHT_GROUP_DAY,"Button", CONTROL "Night cycle (2)",IDC_LIGHT_GROUP_NIGHT_CYCLE,"Button",BS_AUTORADIOBUTTON,174,114,66,12
BS_AUTORADIOBUTTON,170,95,150,15
CONTROL "Night group",IDC_LIGHT_GROUP_NIGHT,"Button",
BS_AUTORADIOBUTTON,170,110,150,15
GROUPBOX "Misc",IDC_STATIC,5,145,150,60 GROUPBOX "Misc",IDC_STATIC,5,145,150,60
CONTROL "Don't cast shadow for Interior. Known as Trick of the ""Matis serre""", CONTROL "Don't cast shadow for Interior. Known as Trick of the ""Matis serre""",IDC_LIGHT_DONT_CAST_SHADOW_INTERIOR,
IDC_LIGHT_DONT_CAST_SHADOW_INTERIOR,"Button", "Button",BS_AUTO3STATE | BS_TOP | BS_MULTILINE | WS_TABSTOP,15,155,135,20
BS_AUTO3STATE | BS_TOP | BS_MULTILINE | WS_TABSTOP,15, CONTROL "Don't cast shadow for Exterior. Known as Trick of the ""Matis serre""",IDC_LIGHT_DONT_CAST_SHADOW_EXTERIOR,
155,135,20 "Button",BS_AUTO3STATE | BS_TOP | BS_MULTILINE | WS_TABSTOP,15,175,135,20
CONTROL "Don't cast shadow for Exterior. Known as Trick of the ""Matis serre""", CONTROL "Add Realtime Ambient Light With sun Ambient",IDC_REALTIME_LIGHT_AMBIENT_ADD_SUN,
IDC_LIGHT_DONT_CAST_SHADOW_EXTERIOR,"Button", "Button",BS_AUTOCHECKBOX | WS_TABSTOP,174,192,160,10
BS_AUTO3STATE | BS_TOP | BS_MULTILINE | WS_TABSTOP,15, CONTROL "Landscape Diffuse (Sun) (1)",IDC_LIGHT_GROUP_LANDSCAPE_DIFFUSE,
175,135,20 "Button",BS_AUTORADIOBUTTON,240,102,102,12
CONTROL "Add Realtime Ambient Light With sun Ambient", CONTROL "Landscape Ambient (4)",IDC_LIGHT_GROUP_LANDSCAPE_AMBIENT,
IDC_REALTIME_LIGHT_AMBIENT_ADD_SUN,"Button", "Button",BS_AUTORADIOBUTTON,240,114,102,12
BS_AUTOCHECKBOX | WS_TABSTOP,170,190,160,10
END END
IDD_MISC DIALOG DISCARDABLE 0, 0, 360, 221 IDD_MISC DIALOG 0, 0, 360, 221
STYLE WS_CHILD STYLE DS_SETFONT | WS_CHILD
FONT 8, "MS Sans Serif" FONT 8, "MS Sans Serif"
BEGIN BEGIN
CONTROL "Floating Object",IDC_FLOATING_OBJECT,"Button", CONTROL "Floating Object",IDC_FLOATING_OBJECT,"Button",BS_AUTO3STATE | WS_TABSTOP,5,5,65,12
BS_AUTO3STATE | WS_TABSTOP,5,5,65,12
GROUPBOX "Ligoscape",IDC_STATIC,5,100,120,45 GROUPBOX "Ligoscape",IDC_STATIC,5,100,120,45
CONTROL "Symmetry",IDC_LIGO_SYMMETRY,"Button",BS_AUTO3STATE | CONTROL "Symmetry",IDC_LIGO_SYMMETRY,"Button",BS_AUTO3STATE | WS_TABSTOP,11,110,44,12
WS_TABSTOP,11,110,44,12
LTEXT "Rotation:",IDC_STATIC,11,125,30,13,SS_CENTERIMAGE LTEXT "Rotation:",IDC_STATIC,11,125,30,13,SS_CENTERIMAGE
EDITTEXT IDC_LIGO_ROTATE,60,126,57,14,ES_AUTOHSCROLL EDITTEXT IDC_LIGO_ROTATE,60,126,57,14,ES_AUTOHSCROLL
LTEXT "Weight (0~1):",IDC_STATIC,10,75,43,13,SS_CENTERIMAGE LTEXT "Weight (0~1):",IDC_STATIC,10,75,43,13,SS_CENTERIMAGE
EDITTEXT IDC_SWT_WEIGHT,60,75,60,14,ES_AUTOHSCROLL EDITTEXT IDC_SWT_WEIGHT,60,75,60,14,ES_AUTOHSCROLL
CONTROL "Enable",IDC_SWT,"Button",BS_AUTO3STATE | WS_TABSTOP,10, CONTROL "Enable",IDC_SWT,"Button",BS_AUTO3STATE | WS_TABSTOP,10,60,40,10
60,40,10
GROUPBOX "Skeleton template weight",IDC_STATIC,5,50,120,45 GROUPBOX "Skeleton template weight",IDC_STATIC,5,50,120,45
GROUPBOX "Radial Normals",IDC_STATIC,135,5,130,105 GROUPBOX "Radial Normals",IDC_STATIC,135,5,130,105
LTEXT "Smooth group 29",IDC_STATIC,140,45,55,13,SS_CENTERIMAGE LTEXT "Smooth group 29",IDC_STATIC,140,45,55,13,SS_CENTERIMAGE
@ -302,144 +233,104 @@ BEGIN
EDITTEXT IDC_RADIAL_NORMAL_31,200,75,57,14,ES_AUTOHSCROLL EDITTEXT IDC_RADIAL_NORMAL_31,200,75,57,14,ES_AUTOHSCROLL
LTEXT "Smooth group 32",IDC_STATIC,140,90,55,13,SS_CENTERIMAGE LTEXT "Smooth group 32",IDC_STATIC,140,90,55,13,SS_CENTERIMAGE
EDITTEXT IDC_RADIAL_NORMAL_32,200,90,57,14,ES_AUTOHSCROLL EDITTEXT IDC_RADIAL_NORMAL_32,200,90,57,14,ES_AUTOHSCROLL
LTEXT "For the 4 last smoothing group, choose the node you want to use the position to compute radial normals from it.", LTEXT "For the 4 last smoothing group, choose the node you want to use the position to compute radial normals from it.",IDC_STATIC,140,15,120,25
IDC_STATIC,140,15,120,25
GROUPBOX "Mesh interfaces",IDC_STATIC,134,110,219,56 GROUPBOX "Mesh interfaces",IDC_STATIC,134,110,219,56
LTEXT "Interface .max file",IDC_STATIC,141,120,61,15, LTEXT "Interface .max file",IDC_STATIC,141,120,61,15,SS_CENTERIMAGE
SS_CENTERIMAGE
EDITTEXT IDC_EDIT_INTERFACE_FILE,221,120,110,14,ES_AUTOHSCROLL EDITTEXT IDC_EDIT_INTERFACE_FILE,221,120,110,14,ES_AUTOHSCROLL
LTEXT "Interface weld threshold",IDC_STATIC,141,137,77,15, LTEXT "Interface weld threshold",IDC_STATIC,141,137,77,15,SS_CENTERIMAGE
SS_CENTERIMAGE EDITTEXT IDC_EDIT_INTERFACE_THRESHOLD,221,137,110,14,ES_AUTOHSCROLL
EDITTEXT IDC_EDIT_INTERFACE_THRESHOLD,221,137,110,14,
ES_AUTOHSCROLL
GROUPBOX "Bone Scale",IDC_STATIC,5,150,120,60 GROUPBOX "Bone Scale",IDC_STATIC,5,150,120,60
CONTROL "Enable",IDC_EXPORT_BONE_SCALE,"Button",BS_AUTO3STATE | CONTROL "Enable",IDC_EXPORT_BONE_SCALE,"Button",BS_AUTO3STATE | WS_TABSTOP,10,160,38,10
WS_TABSTOP,10,160,38,10 LTEXT "Bone Reference Name extension:",IDC_STATIC,10,175,110,13,SS_CENTERIMAGE
LTEXT "Bone Reference Name extension:",IDC_STATIC,10,175,110, EDITTEXT IDC_EXPORT_BONE_SCALE_NAME_EXT,10,190,75,14,ES_AUTOHSCROLL
13,SS_CENTERIMAGE CONTROL "Get interface normals from scene objects",IDC_GET_INTERFACE_NORMAL_FROM_SCENE_OBJECTS,
EDITTEXT IDC_EXPORT_BONE_SCALE_NAME_EXT,10,190,75,14, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,142,151,145,15
ES_AUTOHSCROLL
CONTROL "Get interface normals from scene objects",
IDC_GET_INTERFACE_NORMAL_FROM_SCENE_OBJECTS,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP,142,151,145,15
GROUPBOX "Remanence",IDC_STATIC,134,169,219,45 GROUPBOX "Remanence",IDC_STATIC,134,169,219,45
CONTROL "Use remanence",IDC_USE_REMANENCE,"Button", CONTROL "Use remanence",IDC_USE_REMANENCE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,137,178,66,9
BS_AUTOCHECKBOX | WS_TABSTOP,137,178,66,9
LTEXT "Slice number :",IDC_STATIC,138,191,47,10,SS_CENTERIMAGE LTEXT "Slice number :",IDC_STATIC,138,191,47,10,SS_CENTERIMAGE
EDITTEXT IDC_REMANENCE_SLICE_NUMBER,186,189,19,14,ES_AUTOHSCROLL EDITTEXT IDC_REMANENCE_SLICE_NUMBER,186,189,19,14,ES_AUTOHSCROLL
LTEXT "Sampling period :",IDC_STATIC,210,192,54,10, LTEXT "Sampling period :",IDC_STATIC,210,192,54,10,SS_CENTERIMAGE
SS_CENTERIMAGE EDITTEXT IDC_REMANENCE_SAMPLING_PERIOD,266,190,20,14,ES_AUTOHSCROLL
EDITTEXT IDC_REMANENCE_SAMPLING_PERIOD,266,190,20,14, CONTROL "Shift texture at start of animation",IDC_REMANENCE_SHIFTING_TEXTURE,
ES_AUTOHSCROLL "Button",BS_AUTOCHECKBOX | WS_TABSTOP,207,178,116,9
CONTROL "Shift texture at start of animation",
IDC_REMANENCE_SHIFTING_TEXTURE,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP,207,178,116,9
LTEXT "Rollup ratio :",IDC_ROLLUP_RATIO,290,192,41,8 LTEXT "Rollup ratio :",IDC_ROLLUP_RATIO,290,192,41,8
EDITTEXT IDC_REMANENCE_ROLLUP_RATIO,332,190,16,14,ES_AUTOHSCROLL EDITTEXT IDC_REMANENCE_ROLLUP_RATIO,332,190,16,14,ES_AUTOHSCROLL
END END
IDD_VEGETABLE DIALOG DISCARDABLE 0, 0, 360, 200 IDD_VEGETABLE DIALOG 0, 0, 360, 200
STYLE WS_CHILD STYLE DS_SETFONT | WS_CHILD
FONT 8, "MS Sans Serif" FONT 8, "MS Sans Serif"
BEGIN BEGIN
CONTROL "Vegetable",IDC_VEGETABLE,"Button",BS_AUTO3STATE | CONTROL "Vegetable",IDC_VEGETABLE,"Button",BS_AUTO3STATE | WS_TABSTOP,5,5,50,12
WS_TABSTOP,5,5,50,12 CONTROL "Alpha Blend ON (double sided)",IDC_VEGETABLE_ALPHA_BLEND_ON,
CONTROL "Alpha Blend ON (double sided)", "Button",BS_AUTORADIOBUTTON | WS_GROUP,21,30,112,15
IDC_VEGETABLE_ALPHA_BLEND_ON,"Button",BS_AUTORADIOBUTTON | CONTROL "Alpha Blend OFF",IDC_VEGETABLE_ALPHA_BLEND_OFF,"Button",BS_AUTORADIOBUTTON,20,74,85,15
WS_GROUP,21,30,112,15 CONTROL "Lighted - precomputed",IDC_VEGETABLE_AB_ON_LIGHTED_PRECOMPUTED,
CONTROL "Alpha Blend OFF",IDC_VEGETABLE_ALPHA_BLEND_OFF,"Button", "Button",BS_AUTORADIOBUTTON | WS_GROUP,50,45,85,15
BS_AUTORADIOBUTTON,20,74,85,15 CONTROL "Unlighted",IDC_VEGETABLE_AB_ON_UNLIGHTED,"Button",BS_AUTORADIOBUTTON,50,61,90,15
CONTROL "Lighted - precomputed", CONTROL "Lighted - precomputed",IDC_VEGETABLE_AB_OFF_LIGHTED_PRECOMPUTED,
IDC_VEGETABLE_AB_ON_LIGHTED_PRECOMPUTED,"Button", "Button",BS_AUTORADIOBUTTON | WS_GROUP,50,90,85,15
BS_AUTORADIOBUTTON | WS_GROUP,50,45,85,15
CONTROL "Unlighted",IDC_VEGETABLE_AB_ON_UNLIGHTED,"Button",
BS_AUTORADIOBUTTON,50,61,90,15
CONTROL "Lighted - precomputed",
IDC_VEGETABLE_AB_OFF_LIGHTED_PRECOMPUTED,"Button",
BS_AUTORADIOBUTTON | WS_GROUP,50,90,85,15
CONTROL "Lighted - dynamic",IDC_VEGETABLE_AB_OFF_LIGHTED_DYNAMIC, CONTROL "Lighted - dynamic",IDC_VEGETABLE_AB_OFF_LIGHTED_DYNAMIC,
"Button",BS_AUTORADIOBUTTON,50,105,90,15 "Button",BS_AUTORADIOBUTTON,50,105,90,15
CONTROL "Unighted",IDC_VEGETABLE_AB_OFF_UNLIGHTED,"Button", CONTROL "Unighted",IDC_VEGETABLE_AB_OFF_UNLIGHTED,"Button",BS_AUTORADIOBUTTON,50,120,85,15
BS_AUTORADIOBUTTON,50,120,85,15 CONTROL "Double sided",IDC_VEGETABLE_AB_OFF_DOUBLE_SIDED,"Button",BS_AUTO3STATE | WS_TABSTOP,50,135,85,15
CONTROL "Double sided",IDC_VEGETABLE_AB_OFF_DOUBLE_SIDED,"Button",
BS_AUTO3STATE | WS_TABSTOP,50,135,85,15
GROUPBOX "Alpha mode",IDC_STATIC,15,20,135,155 GROUPBOX "Alpha mode",IDC_STATIC,15,20,135,155
GROUPBOX "Bend center",IDC_STATIC,160,20,105,45 GROUPBOX "Bend center",IDC_STATIC,160,20,105,45
CONTROL "Center Null",IDC_CENTER_NULL,"Button", CONTROL "Center Null",IDC_CENTER_NULL,"Button",BS_AUTORADIOBUTTON | WS_GROUP,166,30,50,15
BS_AUTORADIOBUTTON | WS_GROUP,166,30,50,15 CONTROL "Center Z",IDC_CENTER_Z,"Button",BS_AUTORADIOBUTTON,166,45,50,15
CONTROL "Center Z",IDC_CENTER_Z,"Button",BS_AUTORADIOBUTTON,166,
45,50,15
LTEXT "Bend Factor (0 - 1)",IDC_STATIC,160,75,60,8 LTEXT "Bend Factor (0 - 1)",IDC_STATIC,160,75,60,8
EDITTEXT IDC_VEGETABLE_BEND_FACTOR,226,70,40,14,ES_AUTOHSCROLL EDITTEXT IDC_VEGETABLE_BEND_FACTOR,226,70,40,14,ES_AUTOHSCROLL
CONTROL "Force Best Sided Lighting", CONTROL "Force Best Sided Lighting",IDC_VEGETABLE_FORCE_BEST_SIDED_LIGHTING,
IDC_VEGETABLE_FORCE_BEST_SIDED_LIGHTING,"Button", "Button",BS_AUTO3STATE | WS_TABSTOP,20,155,120,15
BS_AUTO3STATE | WS_TABSTOP,20,155,120,15
END END
IDD_INSTANCE DIALOG DISCARDABLE 0, 0, 360, 226 IDD_INSTANCE DIALOG 0, 0, 360, 226
STYLE WS_CHILD STYLE DS_SETFONT | WS_CHILD
FONT 8, "MS Sans Serif" FONT 8, "MS Sans Serif"
BEGIN BEGIN
LTEXT "Instance shape",IDC_STATIC,5,5,51,15,SS_CENTERIMAGE LTEXT "Instance shape",IDC_STATIC,5,5,51,15,SS_CENTERIMAGE
EDITTEXT IDC_EDIT_INSTANCE_GROUP_SHAPE,80,5,110,14,ES_AUTOHSCROLL EDITTEXT IDC_EDIT_INSTANCE_GROUP_SHAPE,80,5,110,14,ES_AUTOHSCROLL
LTEXT "Name of the instancied object. (ex: ""table.shape"").", LTEXT "Name of the instancied object. (ex: ""table.shape"").",IDC_STATIC,195,5,160,8,SS_CENTERIMAGE
IDC_STATIC,195,5,160,8,SS_CENTERIMAGE
LTEXT "Instance name",IDC_STATIC,5,25,49,15,SS_CENTERIMAGE LTEXT "Instance name",IDC_STATIC,5,25,49,15,SS_CENTERIMAGE
EDITTEXT IDC_EDIT_INSTANCE_NAME,80,25,110,14,ES_AUTOHSCROLL EDITTEXT IDC_EDIT_INSTANCE_NAME,80,25,110,14,ES_AUTOHSCROLL
LTEXT "String associed with the instance in the instance group file. Enter ... to erase all.", LTEXT "String associed with the instance in the instance group file. Enter ... to erase all.",IDC_STATIC,195,26,160,16
IDC_STATIC,195,26,160,16 LTEXT "Instance group name",IDC_STATIC,5,45,70,15,SS_CENTERIMAGE
LTEXT "Instance group name",IDC_STATIC,5,45,70,15,
SS_CENTERIMAGE
EDITTEXT IDC_EDIT_INSTANCE_GROUP_NAME,80,45,110,14,ES_AUTOHSCROLL EDITTEXT IDC_EDIT_INSTANCE_GROUP_NAME,80,45,110,14,ES_AUTOHSCROLL
LTEXT "Name of the instance group where this instance will be inserted. Enter ... to erase all", LTEXT "Name of the instance group where this instance will be inserted. Enter ... to erase all",IDC_STATIC,195,45,160,15
IDC_STATIC,195,45,160,15 CONTROL "Don't add to scene. If checked, this instance will not be added in the scene.",IDC_DONT_ADD_TO_SCENE,
CONTROL "Don't add to scene. If checked, this instance will not be added in the scene.", "Button",BS_AUTO3STATE | WS_TABSTOP,5,71,255,10
IDC_DONT_ADD_TO_SCENE,"Button",BS_AUTO3STATE | CONTROL "Don't export the shape. If checked, no shape file will be exported from this object.",IDC_DONT_EXPORT,
WS_TABSTOP,5,71,255,10 "Button",BS_AUTO3STATE | WS_TABSTOP,5,86,271,10
CONTROL "Don't export the shape. If checked, no shape file will be exported from this object.",
IDC_DONT_EXPORT,"Button",BS_AUTO3STATE | WS_TABSTOP,5,86,
271,10
GROUPBOX "Collision",IDC_STATIC,5,180,170,40 GROUPBOX "Collision",IDC_STATIC,5,180,170,40
CONTROL "Collision Mesh",IDC_CHECK_COLLISION,"Button", CONTROL "Collision Mesh",IDC_CHECK_COLLISION,"Button",BS_AUTO3STATE | WS_TABSTOP,15,191,110,10
BS_AUTO3STATE | WS_TABSTOP,15,191,110,10
CONTROL "Collision Mesh Exterior",IDC_CHECK_COLLISION_EXTERIOR, CONTROL "Collision Mesh Exterior",IDC_CHECK_COLLISION_EXTERIOR,
"Button",BS_AUTO3STATE | WS_TABSTOP,15,204,110,10 "Button",BS_AUTO3STATE | WS_TABSTOP,15,204,110,10
LTEXT "Enter ... to erase all.",IDC_STATIC,195,15,108,10 LTEXT "Enter ... to erase all.",IDC_STATIC,195,15,108,10
GROUPBOX "Camera Collision",IDC_STATIC,5,105,270,70 GROUPBOX "Camera Collision",IDC_STATIC,5,105,270,70
CONTROL "Automatic (collision only if mesh is lightmapped)", CONTROL "Automatic (collision only if mesh is lightmapped)",IDC_CAMERA_COL_RADIO1,
IDC_CAMERA_COL_RADIO1,"Button",BS_AUTORADIOBUTTON,15,115, "Button",BS_AUTORADIOBUTTON,15,115,230,10
230,10 CONTROL "Disable (don't collision with camera)",IDC_CAMERA_COL_RADIO2,
CONTROL "Disable (don't collision with camera)", "Button",BS_AUTORADIOBUTTON,15,130,230,10
IDC_CAMERA_COL_RADIO2,"Button",BS_AUTORADIOBUTTON,15,130, CONTROL "Forced (collision with camera, even if not lightmapped)",IDC_CAMERA_COL_RADIO3,
230,10 "Button",BS_AUTORADIOBUTTON,15,145,230,10
CONTROL "Forced (collision with camera, even if not lightmapped)", CONTROL "Camera collision only (mesh not displayed)",IDC_CAMERA_COL_RADIO4,
IDC_CAMERA_COL_RADIO3,"Button",BS_AUTORADIOBUTTON,15,145, "Button",BS_AUTORADIOBUTTON,15,160,230,10
230,10
CONTROL "Camera collision only (mesh not displayed)",
IDC_CAMERA_COL_RADIO4,"Button",BS_AUTORADIOBUTTON,15,160,
230,10
END END
IDD_ANIM DIALOG DISCARDABLE 0, 0, 360, 221 IDD_ANIM DIALOG 0, 0, 360, 221
STYLE WS_CHILD STYLE DS_SETFONT | WS_CHILD
FONT 8, "MS Sans Serif" FONT 8, "MS Sans Serif"
BEGIN BEGIN
CONTROL "Export note track",IDC_EXPORT_NOTE_TRACK,"Button", CONTROL "Export note track",IDC_EXPORT_NOTE_TRACK,"Button",BS_AUTO3STATE | WS_TABSTOP,5,50,75,10
BS_AUTO3STATE | WS_TABSTOP,5,50,75,10 CONTROL "Export animated materials",IDC_EXPORT_ANIMATED_MATERIALS,
CONTROL "Export animated materials", "Button",BS_AUTO3STATE | WS_TABSTOP,5,35,98,10
IDC_EXPORT_ANIMATED_MATERIALS,"Button",BS_AUTO3STATE | CONTROL "Export node animation",IDC_EXPORT_NODE_ANIMATION,"Button",BS_AUTO3STATE | WS_TABSTOP,5,5,98,10
WS_TABSTOP,5,35,98,10 CONTROL "Prefixe tracks with node name (Instance name or, if emtpy, node name)",IDC_EXPORT_ANIMATION_PREFIXE_NAME,
CONTROL "Export node animation",IDC_EXPORT_NODE_ANIMATION,"Button", "Button",BS_AUTO3STATE | BS_MULTILINE | WS_TABSTOP,5,20,245,10
BS_AUTO3STATE | WS_TABSTOP,5,5,98,10 CONTROL "Allow automatic animation. If the shape is ""obj.shape"", then it will bind ""obj.anim"" automatically.",IDC_AUTOMATIC_ANIM,
CONTROL "Prefixe tracks with node name (Instance name or, if emtpy, node name)", "Button",BS_AUTO3STATE | BS_MULTILINE | WS_TABSTOP,5,65,315,10
IDC_EXPORT_ANIMATION_PREFIXE_NAME,"Button",BS_AUTO3STATE | CONTROL "Export SSS track (Skeleton Spawn Script)",IDC_EXPORT_SSS_TRACK,
BS_MULTILINE | WS_TABSTOP,5,20,245,10 "Button",BS_AUTO3STATE | WS_TABSTOP,5,80,310,10
CONTROL "Allow automatic animation. If the shape is ""obj.shape"", then it will bind ""obj.anim"" automatically.",
IDC_AUTOMATIC_ANIM,"Button",BS_AUTO3STATE | BS_MULTILINE |
WS_TABSTOP,5,65,315,10
CONTROL "Export SSS track (Skeleton Spawn Script)",
IDC_EXPORT_SSS_TRACK,"Button",BS_AUTO3STATE | WS_TABSTOP,
5,80,310,10
END END
@ -449,7 +340,7 @@ END
// //
#ifdef APSTUDIO_INVOKED #ifdef APSTUDIO_INVOKED
GUIDELINES DESIGNINFO DISCARDABLE GUIDELINES DESIGNINFO
BEGIN BEGIN
IDD_PANEL, DIALOG IDD_PANEL, DIALOG
BEGIN BEGIN
@ -548,18 +439,18 @@ END
// TEXTINCLUDE // TEXTINCLUDE
// //
1 TEXTINCLUDE DISCARDABLE 1 TEXTINCLUDE
BEGIN BEGIN
"resource.h\0" "resource.h\0"
END END
2 TEXTINCLUDE DISCARDABLE 2 TEXTINCLUDE
BEGIN BEGIN
"#include ""afxres.h""\r\n" "#include ""afxres.h""\r\n"
"\0" "\0"
END END
3 TEXTINCLUDE DISCARDABLE 3 TEXTINCLUDE
BEGIN BEGIN
"\r\n" "\r\n"
"\0" "\0"
@ -568,15 +459,14 @@ END
#endif // APSTUDIO_INVOKED #endif // APSTUDIO_INVOKED
#ifndef _MAC
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// //
// Version // Version
// //
VS_VERSION_INFO VERSIONINFO VS_VERSION_INFO VERSIONINFO
FILEVERSION 0, 11, 0, 0 FILEVERSION 0, 12, 0, 0
PRODUCTVERSION 0, 11, 0, 0 PRODUCTVERSION 0, 12, 0, 0
FILEFLAGSMASK 0x3fL FILEFLAGSMASK 0x3fL
#ifdef _DEBUG #ifdef _DEBUG
FILEFLAGS 0x1L FILEFLAGS 0x1L
@ -591,17 +481,13 @@ BEGIN
BEGIN BEGIN
BLOCK "040904b0" BLOCK "040904b0"
BEGIN BEGIN
VALUE "Comments", "Based on Kinetix 3D Studio Max 3.0 plugin sample\0" VALUE "Comments", "Based on Kinetix 3D Studio Max 3.0 plugin sample"
VALUE "CompanyName", "Ryzom Core\0" VALUE "CompanyName", "Ryzom Core"
VALUE "FileVersion", "0.11.0\0" VALUE "FileVersion", "0.12.0\0"
VALUE "InternalName", "CNelExport\0" VALUE "InternalName", "CNelExport"
VALUE "LegalCopyright", "\0" VALUE "OriginalFilename", "CNelExport.dlu"
VALUE "LegalTrademarks", "\0" VALUE "ProductName", "Ryzom Core"
VALUE "OriginalFilename", "CNelExport.dlu\0" VALUE "ProductVersion", "0.12.0\0"
VALUE "PrivateBuild", "\0"
VALUE "ProductName", "Ryzom Core\0"
VALUE "ProductVersion", "0.11.0\0"
VALUE "SpecialBuild", "\0"
END END
END END
BLOCK "VarFileInfo" BLOCK "VarFileInfo"
@ -610,15 +496,13 @@ BEGIN
END END
END END
#endif // !_MAC
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// //
// String Table // String Table
// //
STRINGTABLE DISCARDABLE STRINGTABLE
BEGIN BEGIN
IDS_LIBDESCRIPTION "Geometry Export/View" IDS_LIBDESCRIPTION "Geometry Export/View"
IDS_CATEGORY "Nel Tools" IDS_CATEGORY "Nel Tools"
@ -645,8 +529,8 @@ LANGUAGE LANG_FRENCH, SUBLANG_FRENCH
// Dialog // Dialog
// //
IDD_NODE_PROPERTIES_PANEL DIALOG DISCARDABLE 0, 0, 384, 290 IDD_NODE_PROPERTIES_PANEL DIALOG 0, 0, 384, 290
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Node properties" CAPTION "Node properties"
FONT 8, "MS Sans Serif" FONT 8, "MS Sans Serif"
BEGIN BEGIN
@ -655,76 +539,57 @@ BEGIN
PUSHBUTTON "Cancel",IDCANCEL,327,267,50,15 PUSHBUTTON "Cancel",IDCANCEL,327,267,50,15
END END
IDD_VERTEX_PROGRAM DIALOG DISCARDABLE 0, 0, 361, 211 IDD_VERTEX_PROGRAM DIALOG 0, 0, 361, 211
STYLE WS_CHILD STYLE DS_SETFONT | WS_CHILD
FONT 8, "MS Sans Serif" FONT 8, "MS Sans Serif"
BEGIN BEGIN
LTEXT "VertexProgram :",IDC_VP_TEXT,5,5,70,10 LTEXT "VertexProgram :",IDC_VP_TEXT,5,5,70,10
COMBOBOX IDC_COMBO_VP,80,0,105,55,CBS_DROPDOWNLIST | WS_TABSTOP COMBOBOX IDC_COMBO_VP,80,0,105,55,CBS_DROPDOWNLIST | WS_TABSTOP
LTEXT "Can't use vp (needed by material shader)",IDC_BYPASS_VP, LTEXT "Can't use vp (needed by material shader)",IDC_BYPASS_VP,196,3,132,9
196,3,132,9
END END
IDD_VP_WINDTREE DIALOG DISCARDABLE 0, 0, 356, 191 IDD_VP_WINDTREE DIALOG 0, 0, 356, 191
STYLE WS_CHILD STYLE DS_SETFONT | WS_CHILD
FONT 8, "MS Sans Serif" FONT 8, "MS Sans Serif"
BEGIN BEGIN
CONTROL "Use VP SpecularLighting",IDC_CHECK_VP_SPECLIGHT,"Button", CONTROL "Use VP SpecularLighting",IDC_CHECK_VP_SPECLIGHT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,5,105,10
BS_AUTOCHECKBOX | WS_TABSTOP,10,5,105,10
LTEXT "Frequency Scale :",IDC_STATIC,120,5,60,10 LTEXT "Frequency Scale :",IDC_STATIC,120,5,60,10
LTEXT "Distance Scale :",IDC_STATIC,245,5,60,10 LTEXT "Distance Scale :",IDC_STATIC,245,5,60,10
EDITTEXT IDC_EDIT_VPWT_FREQ_SCALE,190,5,35,12,ES_MULTILINE | EDITTEXT IDC_EDIT_VPWT_FREQ_SCALE,190,5,35,12,ES_MULTILINE | ES_AUTOVSCROLL | ES_AUTOHSCROLL | ES_WANTRETURN
ES_AUTOVSCROLL | ES_AUTOHSCROLL | ES_WANTRETURN EDITTEXT IDC_EDIT_VPWT_DIST_SCALE,305,5,35,12,ES_MULTILINE | ES_AUTOVSCROLL | ES_AUTOHSCROLL | ES_WANTRETURN
EDITTEXT IDC_EDIT_VPWT_DIST_SCALE,305,5,35,12,ES_MULTILINE |
ES_AUTOVSCROLL | ES_AUTOHSCROLL | ES_WANTRETURN
GROUPBOX "Level 0 (eg: Tree Trunk)",IDC_STATIC,0,20,355,50 GROUPBOX "Level 0 (eg: Tree Trunk)",IDC_STATIC,0,20,355,50
GROUPBOX "Level 1 (eg: branch)",IDC_STATIC,0,75,355,55 GROUPBOX "Level 1 (eg: branch)",IDC_STATIC,0,75,355,55
GROUPBOX "Level 2 (eg: leaves)",IDC_STATIC,0,135,355,55 GROUPBOX "Level 2 (eg: leaves)",IDC_STATIC,0,135,355,55
LTEXT "Frequency :",IDC_STATIC,5,31,50,10 LTEXT "Frequency :",IDC_STATIC,5,31,50,10
LTEXT "DistanceXY :",IDC_STATIC,5,41,50,10 LTEXT "DistanceXY :",IDC_STATIC,5,41,50,10
LTEXT "Distance Bias :",IDC_STATIC,5,51,50,10 LTEXT "Distance Bias :",IDC_STATIC,5,51,50,10
CONTROL "Slider1",IDC_SLIDER_VPWT_FREQ_L0,"msctls_trackbar32", CONTROL "Slider1",IDC_SLIDER_VPWT_FREQ_L0,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,55,30,100,11
TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,55,30,100,11 CONTROL "Slider1",IDC_SLIDER_VPWT_DISTXY_L0,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,55,41,100,11
CONTROL "Slider1",IDC_SLIDER_VPWT_DISTXY_L0,"msctls_trackbar32",
TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,55,41,100,11
LTEXT "FreqWindDep :",IDC_STATIC,180,31,50,10 LTEXT "FreqWindDep :",IDC_STATIC,180,31,50,10
LTEXT "DistanceZ :",IDC_STATIC,180,40,50,10 LTEXT "DistanceZ :",IDC_STATIC,180,40,50,10
CONTROL "Slider1",IDC_SLIDER_VPWT_FREQWD_L0,"msctls_trackbar32", CONTROL "Slider1",IDC_SLIDER_VPWT_FREQWD_L0,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,230,30,100,11
TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,230,30,100,11 CONTROL "Slider1",IDC_SLIDER_VPWT_DISTZ_L0,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,230,40,100,11
CONTROL "Slider1",IDC_SLIDER_VPWT_DISTZ_L0,"msctls_trackbar32", CONTROL "Slider1",IDC_SLIDER_VPWT_BIAS_L0,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,55,51,100,11
TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,230,40,100,11
CONTROL "Slider1",IDC_SLIDER_VPWT_BIAS_L0,"msctls_trackbar32",
TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,55,51,100,11
LTEXT "Frequency :",IDC_STATIC,5,90,50,10 LTEXT "Frequency :",IDC_STATIC,5,90,50,10
LTEXT "DistanceXY :",IDC_STATIC,5,101,50,10 LTEXT "DistanceXY :",IDC_STATIC,5,101,50,10
LTEXT "Distance Bias :",IDC_STATIC,5,112,50,10 LTEXT "Distance Bias :",IDC_STATIC,5,112,50,10
CONTROL "Slider1",IDC_SLIDER_VPWT_FREQ_L1,"msctls_trackbar32", CONTROL "Slider1",IDC_SLIDER_VPWT_FREQ_L1,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,55,91,100,11
TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,55,91,100,11 CONTROL "Slider1",IDC_SLIDER_VPWT_DISTXY_L1,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,55,101,100,11
CONTROL "Slider1",IDC_SLIDER_VPWT_DISTXY_L1,"msctls_trackbar32",
TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,55,101,100,11
LTEXT "FreqWindDep :",IDC_STATIC,180,92,50,10 LTEXT "FreqWindDep :",IDC_STATIC,180,92,50,10
LTEXT "DistanceZ :",IDC_STATIC,180,100,50,10 LTEXT "DistanceZ :",IDC_STATIC,180,100,50,10
CONTROL "Slider1",IDC_SLIDER_VPWT_FREQWD_L1,"msctls_trackbar32", CONTROL "Slider1",IDC_SLIDER_VPWT_FREQWD_L1,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,230,90,100,11
TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,230,90,100,11 CONTROL "Slider1",IDC_SLIDER_VPWT_DISTZ_L1,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,230,100,100,11
CONTROL "Slider1",IDC_SLIDER_VPWT_DISTZ_L1,"msctls_trackbar32", CONTROL "Slider1",IDC_SLIDER_VPWT_BIAS_L1,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,55,112,100,11
TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,230,100,100,11
CONTROL "Slider1",IDC_SLIDER_VPWT_BIAS_L1,"msctls_trackbar32",
TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,55,112,100,11
LTEXT "Frequency :",IDC_STATIC,5,150,50,10 LTEXT "Frequency :",IDC_STATIC,5,150,50,10
LTEXT "DistanceXY :",IDC_STATIC,5,160,50,10 LTEXT "DistanceXY :",IDC_STATIC,5,160,50,10
LTEXT "Distance Bias :",IDC_STATIC,5,170,50,10 LTEXT "Distance Bias :",IDC_STATIC,5,170,50,10
CONTROL "Slider1",IDC_SLIDER_VPWT_FREQ_L2,"msctls_trackbar32", CONTROL "Slider1",IDC_SLIDER_VPWT_FREQ_L2,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,55,150,100,11
TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,55,150,100,11 CONTROL "Slider1",IDC_SLIDER_VPWT_DISTXY_L2,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,55,160,100,11
CONTROL "Slider1",IDC_SLIDER_VPWT_DISTXY_L2,"msctls_trackbar32",
TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,55,160,100,11
LTEXT "FreqWindDep :",IDC_STATIC,180,153,50,10 LTEXT "FreqWindDep :",IDC_STATIC,180,153,50,10
LTEXT "DistanceZ :",IDC_STATIC,180,162,50,10 LTEXT "DistanceZ :",IDC_STATIC,180,162,50,10
CONTROL "Slider1",IDC_SLIDER_VPWT_FREQWD_L2,"msctls_trackbar32", CONTROL "Slider1",IDC_SLIDER_VPWT_FREQWD_L2,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,230,151,100,11
TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,230,151,100,11 CONTROL "Slider1",IDC_SLIDER_VPWT_DISTZ_L2,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,230,162,100,11
CONTROL "Slider1",IDC_SLIDER_VPWT_DISTZ_L2,"msctls_trackbar32", CONTROL "Slider1",IDC_SLIDER_VPWT_BIAS_L2,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,55,170,100,11
TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,230,162,100,11
CONTROL "Slider1",IDC_SLIDER_VPWT_BIAS_L2,"msctls_trackbar32",
TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,55,170,100,11
LTEXT "-0.12",IDC_STATIC_VPWT_FREQ_L0,155,31,20,10,SS_SUNKEN LTEXT "-0.12",IDC_STATIC_VPWT_FREQ_L0,155,31,20,10,SS_SUNKEN
LTEXT "0.12",IDC_STATIC_VPWT_DISTXY_L0,155,41,20,10,SS_SUNKEN LTEXT "0.12",IDC_STATIC_VPWT_DISTXY_L0,155,41,20,10,SS_SUNKEN
LTEXT "0.12",IDC_STATIC_VPWT_BIAS_L0,155,51,20,10,SS_SUNKEN LTEXT "0.12",IDC_STATIC_VPWT_BIAS_L0,155,51,20,10,SS_SUNKEN
@ -748,8 +613,8 @@ BEGIN
LTEXT "+2",IDC_STATIC,145,180,10,8 LTEXT "+2",IDC_STATIC,145,180,10,8
END END
IDD_LIGHTMAP2 DIALOG DISCARDABLE 0, 0, 361, 211 IDD_LIGHTMAP2 DIALOG 0, 0, 361, 211
STYLE WS_CHILD STYLE DS_SETFONT | WS_CHILD
FONT 8, "MS Sans Serif" FONT 8, "MS Sans Serif"
BEGIN BEGIN
GROUPBOX "LMC: 8Bits Lightmap compression",IDC_STATIC,5,5,195,190 GROUPBOX "LMC: 8Bits Lightmap compression",IDC_STATIC,5,5,195,190
@ -757,67 +622,45 @@ BEGIN
LTEXT "Sun Group",IDC_LMC_STATIC3,10,115,40,10 LTEXT "Sun Group",IDC_LMC_STATIC3,10,115,40,10
LTEXT "Night Group",IDC_LMC_STATIC6,10,155,45,10 LTEXT "Night Group",IDC_LMC_STATIC6,10,155,45,10
LTEXT "Ambient:",IDC_LMC_STATIC1,10,90,45,10 LTEXT "Ambient:",IDC_LMC_STATIC1,10,90,45,10
CONTROL "Custom1",IDC_LM_ALWAYS_AMBIENT,"ColorSwatch",WS_TABSTOP, CONTROL "Custom1",IDC_LM_ALWAYS_AMBIENT,"ColorSwatch",WS_TABSTOP,65,85,30,15
65,85,30,15
LTEXT "Diffuse:",IDC_LMC_STATIC2,105,90,45,10 LTEXT "Diffuse:",IDC_LMC_STATIC2,105,90,45,10
CONTROL "Custom1",IDC_LM_ALWAYS_DIFFUSE,"ColorSwatch",WS_TABSTOP, CONTROL "Custom1",IDC_LM_ALWAYS_DIFFUSE,"ColorSwatch",WS_TABSTOP,160,85,30,15
160,85,30,15
LTEXT "Ambient:",IDC_LMC_STATIC4,10,130,45,10 LTEXT "Ambient:",IDC_LMC_STATIC4,10,130,45,10
CONTROL "Custom1",IDC_LM_DAY_AMBIENT,"ColorSwatch",WS_TABSTOP,65, CONTROL "Custom1",IDC_LM_DAY_AMBIENT,"ColorSwatch",WS_TABSTOP,65,125,30,15
125,30,15
LTEXT "Diffuse:",IDC_LMC_STATIC5,105,130,45,10 LTEXT "Diffuse:",IDC_LMC_STATIC5,105,130,45,10
CONTROL "Custom1",IDC_LM_DAY_DIFFUSE,"ColorSwatch",WS_TABSTOP, CONTROL "Custom1",IDC_LM_DAY_DIFFUSE,"ColorSwatch",WS_TABSTOP,160,125,30,15
160,125,30,15
LTEXT "Ambient:",IDC_LMC_STATIC7,10,170,45,10 LTEXT "Ambient:",IDC_LMC_STATIC7,10,170,45,10
CONTROL "Custom1",IDC_LM_NIGHT_AMBIENT,"ColorSwatch",WS_TABSTOP, CONTROL "Custom1",IDC_LM_NIGHT_AMBIENT,"ColorSwatch",WS_TABSTOP,65,165,30,15
65,165,30,15
LTEXT "Diffuse:",IDC_LMC_STATIC8,105,170,45,10 LTEXT "Diffuse:",IDC_LMC_STATIC8,105,170,45,10
CONTROL "Custom1",IDC_LM_NIGHT_DIFFUSE,"ColorSwatch",WS_TABSTOP, CONTROL "Custom1",IDC_LM_NIGHT_DIFFUSE,"ColorSwatch",WS_TABSTOP,160,165,30,15
160,165,30,15 CONTROL "Use 8Bits lightmaps",IDC_LM_COMPRESS_8BIT,"Button",BS_AUTO3STATE | BS_TOP | BS_MULTILINE | WS_TABSTOP,10,20,90,10
CONTROL "Use 8Bits lightmaps",IDC_LM_COMPRESS_8BIT,"Button",
BS_AUTO3STATE | BS_TOP | BS_MULTILINE | WS_TABSTOP,10,20,
90,10
PUSHBUTTON "Auto Setup All",IDC_LMC_AUTO_SETUP,15,45,65,15 PUSHBUTTON "Auto Setup All",IDC_LMC_AUTO_SETUP,15,45,65,15
PUSHBUTTON "Auto Setup Visible",IDC_LMC_AUTO_SETUP_VISIBLEONLY,95, PUSHBUTTON "Auto Setup Visible",IDC_LMC_AUTO_SETUP_VISIBLEONLY,95,45,90,15
45,90,15
PUSHBUTTON "Copy From",IDC_LMC_COPY_FROM,120,20,65,15 PUSHBUTTON "Copy From",IDC_LMC_COPY_FROM,120,20,65,15
END END
IDD_LMC_CHOOSE_FROM DIALOG DISCARDABLE 0, 0, 217, 290 IDD_LMC_CHOOSE_FROM DIALOG 0, 0, 217, 290
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Choose LMC setup from object" CAPTION "Choose LMC setup from object"
FONT 8, "MS Sans Serif" FONT 8, "MS Sans Serif"
BEGIN BEGIN
DEFPUSHBUTTON "OK",IDOK,160,240,50,14 DEFPUSHBUTTON "OK",IDOK,160,240,50,14
PUSHBUTTON "Cancel",IDCANCEL,160,265,50,14 PUSHBUTTON "Cancel",IDCANCEL,160,265,50,14
LISTBOX IDC_LMC_COPY_LIST,5,20,120,260,LBS_SORT | LISTBOX IDC_LMC_COPY_LIST,5,20,120,260,LBS_SORT | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
LTEXT "List of objects in LMC mode.",IDC_STATIC,5,10,120,10 LTEXT "List of objects in LMC mode.",IDC_STATIC,5,10,120,10
CONTROL "Custom1",IDC_LMC_COPY_ALWAYS_DIFFUSE,"ColorSwatch", CONTROL "Custom1",IDC_LMC_COPY_ALWAYS_DIFFUSE,"ColorSwatch",WS_TABSTOP,180,45,30,15
WS_TABSTOP,180,45,30,15 CONTROL "Custom1",IDC_LMC_COPY_ALWAYS_AMBIENT,"ColorSwatch",WS_TABSTOP,140,45,30,15
CONTROL "Custom1",IDC_LMC_COPY_ALWAYS_AMBIENT,"ColorSwatch", CONTROL "Custom1",IDC_LMC_COPY_SUN_AMBIENT,"ColorSwatch",WS_TABSTOP,140,90,30,15
WS_TABSTOP,140,45,30,15 CONTROL "Custom1",IDC_LMC_COPY_SUN_DIFFUSE,"ColorSwatch",WS_TABSTOP,180,90,30,15
CONTROL "Custom1",IDC_LMC_COPY_SUN_AMBIENT,"ColorSwatch", CONTROL "Custom1",IDC_LMC_COPY_NIGHT_DIFFUSE,"ColorSwatch",WS_TABSTOP,180,135,30,15
WS_TABSTOP,140,90,30,15 CONTROL "Custom1",IDC_LMC_COPY_NIGHT_AMBIENT,"ColorSwatch",WS_TABSTOP,140,135,30,15
CONTROL "Custom1",IDC_LMC_COPY_SUN_DIFFUSE,"ColorSwatch",
WS_TABSTOP,180,90,30,15
CONTROL "Custom1",IDC_LMC_COPY_NIGHT_DIFFUSE,"ColorSwatch",
WS_TABSTOP,180,135,30,15
CONTROL "Custom1",IDC_LMC_COPY_NIGHT_AMBIENT,"ColorSwatch",
WS_TABSTOP,140,135,30,15
LTEXT "Colors for this node:",IDC_STATIC,140,25,70,10 LTEXT "Colors for this node:",IDC_STATIC,140,25,70,10
CONTROL "Get",IDC_LMC_COPY_ALWAYS_AMBIENT_FILTER,"Button", CONTROL "Get",IDC_LMC_COPY_ALWAYS_AMBIENT_FILTER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,140,65,30,10
BS_AUTOCHECKBOX | WS_TABSTOP,140,65,30,10 CONTROL "Get",IDC_LMC_COPY_ALWAYS_DIFFUSE_FILTER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,180,65,30,10
CONTROL "Get",IDC_LMC_COPY_ALWAYS_DIFFUSE_FILTER,"Button", CONTROL "Get",IDC_LMC_COPY_SUN_DIFFUSE_FILTER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,180,110,30,10
BS_AUTOCHECKBOX | WS_TABSTOP,180,65,30,10 CONTROL "Get",IDC_LMC_COPY_SUN_AMBIENT_FILTER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,140,110,30,10
CONTROL "Get",IDC_LMC_COPY_SUN_DIFFUSE_FILTER,"Button", CONTROL "Get",IDC_LMC_COPY_NIGHT_AMBIENT_FILTER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,140,155,30,10
BS_AUTOCHECKBOX | WS_TABSTOP,180,110,30,10 CONTROL "Get",IDC_LMC_COPY_NIGHT_DIFFUSE_FILTER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,180,155,30,10
CONTROL "Get",IDC_LMC_COPY_SUN_AMBIENT_FILTER,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP,140,110,30,10
CONTROL "Get",IDC_LMC_COPY_NIGHT_AMBIENT_FILTER,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP,140,155,30,10
CONTROL "Get",IDC_LMC_COPY_NIGHT_DIFFUSE_FILTER,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP,180,155,30,10
PUSHBUTTON "Clear All",IDC_LMC_COPY_CLEAR,140,175,70,15 PUSHBUTTON "Clear All",IDC_LMC_COPY_CLEAR,140,175,70,15
PUSHBUTTON "Get All",IDC_LMC_COPY_GET_ALL,140,195,70,15 PUSHBUTTON "Get All",IDC_LMC_COPY_GET_ALL,140,195,70,15
END END
@ -829,7 +672,7 @@ END
// //
#ifdef APSTUDIO_INVOKED #ifdef APSTUDIO_INVOKED
GUIDELINES DESIGNINFO DISCARDABLE GUIDELINES DESIGNINFO
BEGIN BEGIN
IDD_NODE_PROPERTIES_PANEL, DIALOG IDD_NODE_PROPERTIES_PANEL, DIALOG
BEGIN BEGIN

@ -1054,7 +1054,7 @@ INT_PTR CALLBACK LightmapDialogCallback (
// Set enable disable // Set enable disable
LightingStateChanged (hwndDlg, currentParam); LightingStateChanged (hwndDlg, currentParam);
CheckRadioButton (hwndDlg, IDC_LIGHT_GROUP_ALWAYS, IDC_LIGHT_GROUP_NIGHT, IDC_LIGHT_GROUP_ALWAYS+(currentParam->LightGroup%3)); CheckRadioButton (hwndDlg, IDC_LIGHT_GROUP_ALWAYS, IDC_LIGHT_GROUP_LANDSCAPE_AMBIENT, IDC_LIGHT_GROUP_ALWAYS+(currentParam->LightGroup%5));
} }
break; break;
@ -1096,10 +1096,14 @@ INT_PTR CALLBACK LightmapDialogCallback (
// Get the acceleration type // Get the acceleration type
if (IsDlgButtonChecked (hwndDlg, IDC_LIGHT_GROUP_ALWAYS) == BST_CHECKED) if (IsDlgButtonChecked (hwndDlg, IDC_LIGHT_GROUP_ALWAYS) == BST_CHECKED)
currentParam->LightGroup = 0; currentParam->LightGroup = 0;
else if (IsDlgButtonChecked (hwndDlg, IDC_LIGHT_GROUP_DAY) == BST_CHECKED) else if (IsDlgButtonChecked (hwndDlg, IDC_LIGHT_GROUP_LANDSCAPE_DIFFUSE) == BST_CHECKED)
currentParam->LightGroup = 1; currentParam->LightGroup = 1;
else if (IsDlgButtonChecked (hwndDlg, IDC_LIGHT_GROUP_NIGHT) == BST_CHECKED) else if (IsDlgButtonChecked (hwndDlg, IDC_LIGHT_GROUP_NIGHT_CYCLE) == BST_CHECKED)
currentParam->LightGroup = 2; currentParam->LightGroup = 2;
else if (IsDlgButtonChecked (hwndDlg, IDC_LIGHT_GROUP_DAY_CYCLE) == BST_CHECKED)
currentParam->LightGroup = 3;
else if (IsDlgButtonChecked (hwndDlg, IDC_LIGHT_GROUP_LANDSCAPE_AMBIENT) == BST_CHECKED)
currentParam->LightGroup = 4;
else else
currentParam->LightGroup = -1; currentParam->LightGroup = -1;
} }

@ -957,6 +957,7 @@ protected:
Value* force_quit_on_msg_displayer_cf(Value** arg_list, int count) Value* force_quit_on_msg_displayer_cf(Value** arg_list, int count)
{ {
nlwarning("Enable force quit on NeL report msg displayer"); nlwarning("Enable force quit on NeL report msg displayer");
NLMISC::INelContext::getInstance().setWindowedApplication(false);
// disable the Windows popup telling that the application aborted and disable the dr watson report. // disable the Windows popup telling that the application aborted and disable the dr watson report.
_set_abort_behavior(0, _WRITE_ABORT_MSG | _CALL_REPORTFAULT); _set_abort_behavior(0, _WRITE_ABORT_MSG | _CALL_REPORTFAULT);
putenv("NEL_IGNORE_ASSERT=1"); putenv("NEL_IGNORE_ASSERT=1");

@ -1,5 +1,5 @@
//{{NO_DEPENDENCIES}} //{{NO_DEPENDENCIES}}
// Microsoft Developer Studio generated include file. // Microsoft Visual C++ generated include file.
// Used by nel_export.rc // Used by nel_export.rc
// //
#define IDS_LIBDESCRIPTION 1 #define IDS_LIBDESCRIPTION 1
@ -7,7 +7,6 @@
#define IDS_CLASS_NAME 3 #define IDS_CLASS_NAME 3
#define IDC_ADD 3 #define IDC_ADD 3
#define IDS_PARAMS 4 #define IDS_PARAMS 4
#define IDC_STATIC -1
#define IDC_REMOVE 4 #define IDC_REMOVE 4
#define IDS_SPIN 5 #define IDS_SPIN 5
#define IDC_UP 5 #define IDC_UP 5
@ -225,9 +224,6 @@
#define IDC_OPEN_OCC_MODEL 1529 #define IDC_OPEN_OCC_MODEL 1529
#define IDC_ENV_FX 1531 #define IDC_ENV_FX 1531
#define IDC_SOUND_GROUP 1532 #define IDC_SOUND_GROUP 1532
#define IDC_LIGHT_GROUP_ALWAYS 1533
#define IDC_LIGHT_GROUP_DAY 1534
#define IDC_LIGHT_GROUP_NIGHT 1535
#define IDC_LIGHT_DONT_CAST_SHADOW_INTERIOR 1536 #define IDC_LIGHT_DONT_CAST_SHADOW_INTERIOR 1536
#define IDC_LIGHT_DONT_CAST_SHADOW_EXTERIOR 1537 #define IDC_LIGHT_DONT_CAST_SHADOW_EXTERIOR 1537
#define IDC_8BITS_LIGHTMAP 1537 #define IDC_8BITS_LIGHTMAP 1537
@ -270,6 +266,12 @@
#define IDC_LMC_COPY_ALWAYS_DIFFUSE 1567 #define IDC_LMC_COPY_ALWAYS_DIFFUSE 1567
#define IDC_LMC_COPY_LIST 1568 #define IDC_LMC_COPY_LIST 1568
#define IDC_REALTIME_LIGHT_AMBIENT_ADD_SUN 1569 #define IDC_REALTIME_LIGHT_AMBIENT_ADD_SUN 1569
#define IDC_LIGHT_GROUP_ALWAYS 1570
#define IDC_LIGHT_GROUP_LANDSCAPE_DIFFUSE 1571
#define IDC_LIGHT_GROUP_NIGHT_CYCLE 1572
#define IDC_LIGHT_GROUP_DAY_CYCLE 1573
#define IDC_LIGHT_GROUP_LANDSCAPE_AMBIENT 1574
#define IDC_STATIC -1
// Next default values for new objects // Next default values for new objects
// //

@ -40,7 +40,7 @@ END
// //
#ifdef APSTUDIO_INVOKED #ifdef APSTUDIO_INVOKED
GUIDELINES DESIGNINFO GUIDELINES DESIGNINFO
BEGIN BEGIN
IDD_PANEL, DIALOG IDD_PANEL, DIALOG
BEGIN BEGIN
@ -59,18 +59,18 @@ END
// TEXTINCLUDE // TEXTINCLUDE
// //
1 TEXTINCLUDE 1 TEXTINCLUDE
BEGIN BEGIN
"resource.h\0" "resource.h\0"
END END
2 TEXTINCLUDE 2 TEXTINCLUDE
BEGIN BEGIN
"#include ""afxres.h""\r\n" "#include ""afxres.h""\r\n"
"\0" "\0"
END END
3 TEXTINCLUDE 3 TEXTINCLUDE
BEGIN BEGIN
"\r\n" "\r\n"
"\0" "\0"
@ -85,8 +85,8 @@ END
// //
VS_VERSION_INFO VERSIONINFO VS_VERSION_INFO VERSIONINFO
FILEVERSION 0, 11, 0, 0 FILEVERSION 0, 12, 0, 0
PRODUCTVERSION 0, 11, 0, 0 PRODUCTVERSION 0, 12, 0, 0
FILEFLAGSMASK 0x3fL FILEFLAGSMASK 0x3fL
#ifdef _DEBUG #ifdef _DEBUG
FILEFLAGS 0x1L FILEFLAGS 0x1L
@ -103,12 +103,12 @@ BEGIN
BEGIN BEGIN
VALUE "Comments", "http://www.ryzomcore.org/" VALUE "Comments", "http://www.ryzomcore.org/"
VALUE "FileDescription", "PatchMesh to RykolPatchMesh" VALUE "FileDescription", "PatchMesh to RykolPatchMesh"
VALUE "FileVersion", "0.11.0" VALUE "FileVersion", "0.12.0"
VALUE "InternalName", "PatchMesh to RykolPatchMesh" VALUE "InternalName", "PatchMesh to RykolPatchMesh"
VALUE "LegalCopyright", "Copyright, 2000 Nevrax Ltd." VALUE "LegalCopyright", "Copyright, 2000 Nevrax Ltd."
VALUE "OriginalFilename", "nel_convert_patch.dlm" VALUE "OriginalFilename", "nel_convert_patch.dlm"
VALUE "ProductName", "NeL Patch Converter" VALUE "ProductName", "NeL Patch Converter"
VALUE "ProductVersion", "0.11.0" VALUE "ProductVersion", "0.12.0"
END END
END END
BLOCK "VarFileInfo" BLOCK "VarFileInfo"
@ -123,7 +123,7 @@ END
// String Table // String Table
// //
STRINGTABLE STRINGTABLE
BEGIN BEGIN
IDS_LIBDESCRIPTION "Rykol Patchmesh Converter" IDS_LIBDESCRIPTION "Rykol Patchmesh Converter"
IDS_CATEGORY "Rykol Tools" IDS_CATEGORY "Rykol Tools"

@ -345,12 +345,12 @@ END
// TEXTINCLUDE // TEXTINCLUDE
// //
1 TEXTINCLUDE 1 TEXTINCLUDE
BEGIN BEGIN
"modsres.h\0" "modsres.h\0"
END END
2 TEXTINCLUDE 2 TEXTINCLUDE
BEGIN BEGIN
"#define APSTUDIO_HIDDEN_SYMBOLS\r\n" "#define APSTUDIO_HIDDEN_SYMBOLS\r\n"
"#include ""windows.h""\r\n" "#include ""windows.h""\r\n"
@ -359,7 +359,7 @@ BEGIN
"\0" "\0"
END END
3 TEXTINCLUDE 3 TEXTINCLUDE
BEGIN BEGIN
"\r\n" "\r\n"
"\0" "\0"
@ -439,7 +439,7 @@ IDB_PATCHSELMASK BITMAP "patselm.bmp"
// //
#ifdef APSTUDIO_INVOKED #ifdef APSTUDIO_INVOKED
GUIDELINES DESIGNINFO GUIDELINES DESIGNINFO
BEGIN BEGIN
IDD_PASTE_NAMEDSET, DIALOG IDD_PASTE_NAMEDSET, DIALOG
BEGIN BEGIN
@ -514,8 +514,8 @@ END
// //
VS_VERSION_INFO VERSIONINFO VS_VERSION_INFO VERSIONINFO
FILEVERSION 0, 11, 2, 0 FILEVERSION 0, 12, 0, 0
PRODUCTVERSION 0, 11, 2, 0 PRODUCTVERSION 0, 12, 0, 0
FILEFLAGSMASK 0x3fL FILEFLAGSMASK 0x3fL
#ifdef _DEBUG #ifdef _DEBUG
FILEFLAGS 0x1L FILEFLAGS 0x1L
@ -533,13 +533,13 @@ BEGIN
VALUE "Comments", "Based on Kinetix 3D Studio Max 3.0 plugin sample\0" VALUE "Comments", "Based on Kinetix 3D Studio Max 3.0 plugin sample\0"
VALUE "CompanyName", "Ryzom Core" VALUE "CompanyName", "Ryzom Core"
VALUE "FileDescription", "NeL Patch Edit" VALUE "FileDescription", "NeL Patch Edit"
VALUE "FileVersion", "0.11.2" VALUE "FileVersion", "0.12.0"
VALUE "InternalName", "neleditpatch" VALUE "InternalName", "neleditpatch"
VALUE "LegalCopyright", "Copyright © 2000 Nevrax Ltd. Copyright © 1998 Autodesk Inc." VALUE "LegalCopyright", "Copyright © 2000 Nevrax Ltd. Copyright © 1998 Autodesk Inc."
VALUE "LegalTrademarks", "The following are registered trademarks of Autodesk, Inc.: 3D Studio MAX. The following are trademarks of Autodesk, Inc.: Kinetix, Kinetix(logo), BIPED, Physique, Character Studio, MAX DWG, DWG Unplugged, Heidi, FLI, FLC, DXF." VALUE "LegalTrademarks", "The following are registered trademarks of Autodesk, Inc.: 3D Studio MAX. The following are trademarks of Autodesk, Inc.: Kinetix, Kinetix(logo), BIPED, Physique, Character Studio, MAX DWG, DWG Unplugged, Heidi, FLI, FLC, DXF."
VALUE "OriginalFilename", "neleditpatch.dlm" VALUE "OriginalFilename", "neleditpatch.dlm"
VALUE "ProductName", "Ryzom Core" VALUE "ProductName", "Ryzom Core"
VALUE "ProductVersion", "0.11.2" VALUE "ProductVersion", "0.12.0"
END END
END END
BLOCK "VarFileInfo" BLOCK "VarFileInfo"
@ -565,7 +565,7 @@ IDI_ICON3 ICON "icon3.ico"
// String Table // String Table
// //
STRINGTABLE STRINGTABLE
BEGIN BEGIN
IDS_RB_NORMALMOD "NormalMod" IDS_RB_NORMALMOD "NormalMod"
IDS_RB_SKEWMOD "SkewMod" IDS_RB_SKEWMOD "SkewMod"
@ -585,7 +585,7 @@ BEGIN
IDS_RB_VOLSELECT_CLASS "Vol. Select" IDS_RB_VOLSELECT_CLASS "Vol. Select"
END END
STRINGTABLE STRINGTABLE
BEGIN BEGIN
IDS_RB_EDITMESH_CLASS "Edit Mesh" IDS_RB_EDITMESH_CLASS "Edit Mesh"
IDS_RB_PARAMETERS "Parameters" IDS_RB_PARAMETERS "Parameters"
@ -594,7 +594,7 @@ BEGIN
IDS_RB_AMOUNT "Amount" IDS_RB_AMOUNT "Amount"
END END
STRINGTABLE STRINGTABLE
BEGIN BEGIN
IDS_RB_BEND2 "Bend" IDS_RB_BEND2 "Bend"
IDS_RB_FROM "Lower Limit" IDS_RB_FROM "Lower Limit"
@ -614,7 +614,7 @@ BEGIN
IDS_RB_DISPLACEMOD "DisplaceMod" IDS_RB_DISPLACEMOD "DisplaceMod"
END END
STRINGTABLE STRINGTABLE
BEGIN BEGIN
IDS_RB_NODEXFORM "Linked XForm" IDS_RB_NODEXFORM "Linked XForm"
IDS_RB_NODEXFORM_CLASS "Linked XForm" IDS_RB_NODEXFORM_CLASS "Linked XForm"
@ -630,7 +630,7 @@ BEGIN
IDS_RB_SOT "Supports Objects of Type" IDS_RB_SOT "Supports Objects of Type"
END END
STRINGTABLE STRINGTABLE
BEGIN BEGIN
IDS_RB_BIASL2 "Bias L2" IDS_RB_BIASL2 "Bias L2"
IDS_RB_EDITMESHMOD "EditMeshMod" IDS_RB_EDITMESHMOD "EditMeshMod"
@ -650,7 +650,7 @@ BEGIN
IDS_RB_SMOOTHMOD "SmoothMod" IDS_RB_SMOOTHMOD "SmoothMod"
END END
STRINGTABLE STRINGTABLE
BEGIN BEGIN
IDS_RB_EXTRUDE "Extrude" IDS_RB_EXTRUDE "Extrude"
IDS_RB_TAPER "Taper" IDS_RB_TAPER "Taper"
@ -663,7 +663,7 @@ BEGIN
IDS_RB_APPARATUS "Gizmo" IDS_RB_APPARATUS "Gizmo"
END END
STRINGTABLE STRINGTABLE
BEGIN BEGIN
IDS_RB_FREQUENCY "Frequency" IDS_RB_FREQUENCY "Frequency"
IDS_RB_MAPMOD "MapMod" IDS_RB_MAPMOD "MapMod"
@ -683,7 +683,7 @@ BEGIN
IDS_RB_BIASL1 "Bias L1" IDS_RB_BIASL1 "Bias L1"
END END
STRINGTABLE STRINGTABLE
BEGIN BEGIN
IDS_RB_AMOUNT2 "Amount" IDS_RB_AMOUNT2 "Amount"
IDS_RB_CURVITURE "Curvature" IDS_RB_CURVITURE "Curvature"
@ -697,13 +697,13 @@ BEGIN
IDS_DB_EXTRUDE "Extrude" IDS_DB_EXTRUDE "Extrude"
END END
STRINGTABLE STRINGTABLE
BEGIN BEGIN
IDS_RB_RIPPLE "Ripple" IDS_RB_RIPPLE "Ripple"
IDS_RB_RIPPLE_BINDING "Ripple Binding" IDS_RB_RIPPLE_BINDING "Ripple Binding"
END END
STRINGTABLE STRINGTABLE
BEGIN BEGIN
IDS_RB_DELETEVERT "Delete Vertex" IDS_RB_DELETEVERT "Delete Vertex"
IDS_RB_DELETEFACE "Delete Face" IDS_RB_DELETEFACE "Delete Face"
@ -720,7 +720,7 @@ BEGIN
IDS_RB_EDGEDIVIDE "Edge Divide" IDS_RB_EDGEDIVIDE "Edge Divide"
END END
STRINGTABLE STRINGTABLE
BEGIN BEGIN
IDS_RB_EDGETURN "Edge Turn" IDS_RB_EDGETURN "Edge Turn"
IDS_RB_DELETEEDGE "Delete Edge" IDS_RB_DELETEEDGE "Delete Edge"
@ -732,36 +732,36 @@ BEGIN
IDS_PW_LATTICE "Lattice Map" IDS_PW_LATTICE "Lattice Map"
END END
STRINGTABLE STRINGTABLE
BEGIN BEGIN
IDS_RB_DEFDEFORMATIONS "MAX STANDARD" IDS_RB_DEFDEFORMATIONS "MAX STANDARD"
IDS_RB_DEFEDIT "MAX EDIT" IDS_RB_DEFEDIT "MAX EDIT"
END END
STRINGTABLE STRINGTABLE
BEGIN BEGIN
IDS_RB_DEFLECTOR_CLASS "Deflector" IDS_RB_DEFLECTOR_CLASS "Deflector"
IDS_RB_HIDEVERT "Hide Vertices" IDS_RB_HIDEVERT "Hide Vertices"
IDS_RB_DEFSURFACE "MAX SURFACE" IDS_RB_DEFSURFACE "MAX SURFACE"
END END
STRINGTABLE STRINGTABLE
BEGIN BEGIN
IDS_RB_NOISE "Noise" IDS_RB_NOISE "Noise"
END END
STRINGTABLE STRINGTABLE
BEGIN BEGIN
IDS_RB_ROTATION2 "Rotation" IDS_RB_ROTATION2 "Rotation"
IDS_RB_TWIST "Twist" IDS_RB_TWIST "Twist"
END END
STRINGTABLE STRINGTABLE
BEGIN BEGIN
IDS_RB_BENDMOD "BendMod" IDS_RB_BENDMOD "BendMod"
END END
STRINGTABLE STRINGTABLE
BEGIN BEGIN
IDS_RB_DISPLACEBINDING "Displace Binding" IDS_RB_DISPLACEBINDING "Displace Binding"
IDS_RB_SELECTDISPIMAGE "Select Displacement Image" IDS_RB_SELECTDISPIMAGE "Select Displacement Image"
@ -781,7 +781,7 @@ BEGIN
IDS_RB_TURBULENCE "Turbulence" IDS_RB_TURBULENCE "Turbulence"
END END
STRINGTABLE STRINGTABLE
BEGIN BEGIN
IDS_RB_SKEW_CLASS "Skew" IDS_RB_SKEW_CLASS "Skew"
IDS_RB_MATERIAL3_CLASS "Material" IDS_RB_MATERIAL3_CLASS "Material"
@ -800,7 +800,7 @@ BEGIN
IDS_RB_WAVE_CLASS "Wave" IDS_RB_WAVE_CLASS "Wave"
END END
STRINGTABLE STRINGTABLE
BEGIN BEGIN
IDS_RB_STRENGTH2 "Strength" IDS_RB_STRENGTH2 "Strength"
IDS_DS_MOVE "Move" IDS_DS_MOVE "Move"
@ -809,7 +809,7 @@ BEGIN
IDS_RB_ELEMENTSEL "Element" IDS_RB_ELEMENTSEL "Element"
END END
STRINGTABLE STRINGTABLE
BEGIN BEGIN
IDS_RB_NOVERTSTOWELD "No vertices within weld threshold." IDS_RB_NOVERTSTOWELD "No vertices within weld threshold."
IDS_RB_CHAOS "Chaos" IDS_RB_CHAOS "Chaos"
@ -819,24 +819,24 @@ BEGIN
IDS_RB_DUPFACEWARNING "This face already exists." IDS_RB_DUPFACEWARNING "This face already exists."
END END
STRINGTABLE STRINGTABLE
BEGIN BEGIN
IDS_RB_NONE "None" IDS_RB_NONE "None"
END END
STRINGTABLE STRINGTABLE
BEGIN BEGIN
IDS_RB_SCALE "Scale" IDS_RB_SCALE "Scale"
END END
STRINGTABLE STRINGTABLE
BEGIN BEGIN
IDS_DS_MOVE2 "Move" IDS_DS_MOVE2 "Move"
IDS_DS_SELECT "Select" IDS_DS_SELECT "Select"
IDS_DS_CREATE "Create" IDS_DS_CREATE "Create"
END END
STRINGTABLE STRINGTABLE
BEGIN BEGIN
IDS_TH_VERTDELETE "Delete Vertex" IDS_TH_VERTDELETE "Delete Vertex"
IDS_TH_BEZIERCORNER "Bezier Corner" IDS_TH_BEZIERCORNER "Bezier Corner"
@ -848,7 +848,7 @@ BEGIN
IDS_TH_NOPATCHESSEL "No patches selected" IDS_TH_NOPATCHESSEL "No patches selected"
END END
STRINGTABLE STRINGTABLE
BEGIN BEGIN
IDS_TH_EDGESUBDIVIDE "Edge Subdivide" IDS_TH_EDGESUBDIVIDE "Edge Subdivide"
IDS_TH_PATCHSUBDIVIDE "Patch Subdivide" IDS_TH_PATCHSUBDIVIDE "Patch Subdivide"
@ -863,16 +863,16 @@ BEGIN
IDS_TH_CONNECT_COINCIDENT "Weld coincident endpoints?" IDS_TH_CONNECT_COINCIDENT "Weld coincident endpoints?"
END END
STRINGTABLE STRINGTABLE
BEGIN BEGIN
IDS_TH_BOOLWELDFAILED "ERROR: Final boolean weld stage failed" IDS_TH_BOOLWELDFAILED "ERROR: Final boolean weld stage failed"
IDS_TH_COINCIDENTVERTEX "Cannot perform boolean because splines have coincident vertices" IDS_TH_COINCIDENTVERTEX "Cannot perform boolean because splines have coincident vertices"
IDS_TH_SPLINESMUSTOVERLAP IDS_TH_SPLINESMUSTOVERLAP
"Cannot perform boolean because splines must overlap" "Cannot perform boolean because splines must overlap"
IDS_TH_SELECTCLOSEDSPLINE "Please select a closed spline" IDS_TH_SELECTCLOSEDSPLINE "Please select a closed spline"
IDS_TH_SPLINESELFINTERSECTS "Spline is invalid: Self-intersects" IDS_TH_SPLINESELFINTERSECTS "Spline is invalid: Self-intersects"
IDS_TH_ATTACH "Attach" IDS_TH_ATTACH "Attach"
IDS_TH_CANHAVEONLYONESHAPE IDS_TH_CANHAVEONLYONESHAPE
"Can only have one shape in modifier for this operation" "Can only have one shape in modifier for this operation"
IDS_TH_NOVERTSSEL "No vertices selected" IDS_TH_NOVERTSSEL "No vertices selected"
IDS_TH_VERTCHANGE "Vertex Change" IDS_TH_VERTCHANGE "Vertex Change"
@ -885,7 +885,7 @@ BEGIN
IDS_TH_LINE "Line" IDS_TH_LINE "Line"
END END
STRINGTABLE STRINGTABLE
BEGIN BEGIN
IDS_TH_MAKEFIRST "Make First" IDS_TH_MAKEFIRST "Make First"
IDS_TH_EDITEDGE "Edit Edge" IDS_TH_EDITEDGE "Edit Edge"
@ -896,7 +896,7 @@ BEGIN
IDS_TH_PATCHADD "Patch Add" IDS_TH_PATCHADD "Patch Add"
END END
STRINGTABLE STRINGTABLE
BEGIN BEGIN
IDS_TH_EDITSPLINE "Edit Spline" IDS_TH_EDITSPLINE "Edit Spline"
IDS_TH_EDITSEGMENT "Edit Segment" IDS_TH_EDITSEGMENT "Edit Segment"
@ -907,7 +907,7 @@ BEGIN
IDS_TH_EDITOBJECT "Edit Object" IDS_TH_EDITOBJECT "Edit Object"
END END
STRINGTABLE STRINGTABLE
BEGIN BEGIN
IDS_TH_DETACHSPLINE "Detach Spline" IDS_TH_DETACHSPLINE "Detach Spline"
IDS_TH_OUTLINE "Outline Spline" IDS_TH_OUTLINE "Outline Spline"
@ -927,9 +927,9 @@ BEGIN
IDS_TH_INTERSECTION "Intersection" IDS_TH_INTERSECTION "Intersection"
END END
STRINGTABLE STRINGTABLE
BEGIN BEGIN
IDS_TH_CANHAVEONLYONEPATCH IDS_TH_CANHAVEONLYONEPATCH
"Can only have one patch object in modifier for this operation" "Can only have one patch object in modifier for this operation"
IDS_TH_DETACHPATCH "Detach Patch" IDS_TH_DETACHPATCH "Detach Patch"
IDS_TH_COPY_SPLINE "Copy Spline" IDS_TH_COPY_SPLINE "Copy Spline"
@ -937,7 +937,7 @@ BEGIN
IDS_TH_SPLINECHANGE "Spline Change" IDS_TH_SPLINECHANGE "Spline Change"
END END
STRINGTABLE STRINGTABLE
BEGIN BEGIN
IDS_TH_EDITPATCH_CLASS "NeL Edit" IDS_TH_EDITPATCH_CLASS "NeL Edit"
IDS_TH_EDITSPLINE_CLASS "Edit Spline" IDS_TH_EDITSPLINE_CLASS "Edit Spline"
@ -957,7 +957,7 @@ BEGIN
IDS_TH_NOSEGSSEL "No segments selected" IDS_TH_NOSEGSSEL "No segments selected"
END END
STRINGTABLE STRINGTABLE
BEGIN BEGIN
IDS_TH_DEGREES "Degrees" IDS_TH_DEGREES "Degrees"
IDS_TH_AXIS "Axis" IDS_TH_AXIS "Axis"
@ -968,12 +968,12 @@ BEGIN
IDS_RB_STARTPOINT "Start Point" IDS_RB_STARTPOINT "Start Point"
END END
STRINGTABLE STRINGTABLE
BEGIN BEGIN
IDS_TH_MIRRORSPLINE "Mirror Spline" IDS_TH_MIRRORSPLINE "Mirror Spline"
END END
STRINGTABLE STRINGTABLE
BEGIN BEGIN
IDS_RB_ENDPOINT "End Point" IDS_RB_ENDPOINT "End Point"
IDS_RB_AFRPOINTS "Points" IDS_RB_AFRPOINTS "Points"
@ -993,7 +993,7 @@ BEGIN
IDS_RB_VOFFSET "V Offset" IDS_RB_VOFFSET "V Offset"
END END
STRINGTABLE STRINGTABLE
BEGIN BEGIN
IDS_RB_WOFFSET "W Offset" IDS_RB_WOFFSET "W Offset"
IDS_RB_MAXEDGE1 "Max Edge Length 1" IDS_RB_MAXEDGE1 "Max Edge Length 1"
@ -1013,14 +1013,14 @@ BEGIN
IDS_RB_SHOULDRESET "Do you also want to reset the Unwrap UVW modifier\nto inherit the mapping from the new channel?\n\nChanges made within the UVW modifier will be lost." IDS_RB_SHOULDRESET "Do you also want to reset the Unwrap UVW modifier\nto inherit the mapping from the new channel?\n\nChanges made within the UVW modifier will be lost."
END END
STRINGTABLE STRINGTABLE
BEGIN BEGIN
IDS_RB_NUMVERTSELP "%d Vertices Selected" IDS_RB_NUMVERTSELP "%d Vertices Selected"
IDS_RB_NUMFACESELP "%d Faces Selected" IDS_RB_NUMFACESELP "%d Faces Selected"
IDS_RB_NUMEDGESELP "%d Edges Selected" IDS_RB_NUMEDGESELP "%d Edges Selected"
END END
STRINGTABLE STRINGTABLE
BEGIN BEGIN
IDS_RB_RESETUNWRAPUVWS "Are you sure you want to reset?\n\nAll changes made within the Unwrap UVW modifier will be lost." IDS_RB_RESETUNWRAPUVWS "Are you sure you want to reset?\n\nAll changes made within the Unwrap UVW modifier will be lost."
IDS_RB_LENGTH "Length" IDS_RB_LENGTH "Length"
@ -1040,7 +1040,7 @@ BEGIN
IDS_RB_ZOOMREG "Zoom Region" IDS_RB_ZOOMREG "Zoom Region"
END END
STRINGTABLE STRINGTABLE
BEGIN BEGIN
IDS_RB_UVW "Coordinates" IDS_RB_UVW "Coordinates"
IDS_RB_PROP "Unwrap Options" IDS_RB_PROP "Unwrap Options"
@ -1060,10 +1060,10 @@ BEGIN
IDS_EM_SHAPE "Shape" IDS_EM_SHAPE "Shape"
END END
STRINGTABLE STRINGTABLE
BEGIN BEGIN
IDS_ADV_SURF_APPROX_WARNING_TITLE "Surface Approximation Verification" IDS_ADV_SURF_APPROX_WARNING_TITLE "Surface Approximation Verification"
IDS_ADV_SURF_APPROX_WARNING IDS_ADV_SURF_APPROX_WARNING
"You have selected a potentially dangerous setting for the SubDivision limits. Are you sure you want to do this?" "You have selected a potentially dangerous setting for the SubDivision limits. Are you sure you want to do this?"
IDS_PW_PICK "Pick Texture" IDS_PW_PICK "Pick Texture"
IDS_PW_SNAP "Pixel Snap" IDS_PW_SNAP "Pixel Snap"
@ -1079,7 +1079,7 @@ BEGIN
IDS_PW_FALLOFF "Falloff type" IDS_PW_FALLOFF "Falloff type"
END END
STRINGTABLE STRINGTABLE
BEGIN BEGIN
IDS_EM_SELBYCOLOR "Select By Color" IDS_EM_SELBYCOLOR "Select By Color"
IDS_EM_VERTEXCOLOR "Vertex Color" IDS_EM_VERTEXCOLOR "Vertex Color"
@ -1099,7 +1099,7 @@ BEGIN
IDS_EM_DETACHFACES "Detach Faces" IDS_EM_DETACHFACES "Detach Faces"
END END
STRINGTABLE STRINGTABLE
BEGIN BEGIN
IDS_EM_DETACHVERTS "Detach Verts" IDS_EM_DETACHVERTS "Detach Verts"
IDS_EM_INHERIT_MATERIAL "Inherit Material" IDS_EM_INHERIT_MATERIAL "Inherit Material"
@ -1119,7 +1119,7 @@ BEGIN
IDS_TH_SPLINE_VERT_COUNT "Vertex Count: %d" IDS_TH_SPLINE_VERT_COUNT "Vertex Count: %d"
END END
STRINGTABLE STRINGTABLE
BEGIN BEGIN
IDS_TH_SELECTION "Selection" IDS_TH_SELECTION "Selection"
IDS_TH_OBJECT_SEL "Whole Object Selected" IDS_TH_OBJECT_SEL "Whole Object Selected"
@ -1139,17 +1139,17 @@ BEGIN
IDS_TH_CROSS_INSERT "Cross Insert" IDS_TH_CROSS_INSERT "Cross Insert"
END END
STRINGTABLE STRINGTABLE
BEGIN BEGIN
IDS_EM_BEVEL "Bevel" IDS_EM_BEVEL "Bevel"
IDS_EM_OUTLINE "Outline" IDS_EM_OUTLINE "Outline"
IDS_ADV_DISP_APPROX_WARNING_TITLE IDS_ADV_DISP_APPROX_WARNING_TITLE
"Displacement Approximation Verification" "Displacement Approximation Verification"
IDS_ADV_DISP_APPROX_WARNING IDS_ADV_DISP_APPROX_WARNING
"You have selected a potential dangerous setting for the SubDivision limits. Are you sure you want to do this?" "You have selected a potential dangerous setting for the SubDivision limits. Are you sure you want to do this?"
END END
STRINGTABLE STRINGTABLE
BEGIN BEGIN
IDS_PW_FALLOFFSPACE "World Falloff Space" IDS_PW_FALLOFFSPACE "World Falloff Space"
IDS_PW_BREAK "Break Selected Vertices" IDS_PW_BREAK "Break Selected Vertices"
@ -1169,7 +1169,7 @@ BEGIN
IDS_PW_TEXMAP "TextureMap" IDS_PW_TEXMAP "TextureMap"
END END
STRINGTABLE STRINGTABLE
BEGIN BEGIN
IDS_PW_CHANNEL "Map Channel" IDS_PW_CHANNEL "Map Channel"
IDS_PW_MAP "Map Channel Type" IDS_PW_MAP "Map Channel Type"
@ -1181,9 +1181,9 @@ BEGIN
IDS_PW_FALLOFF2 "Falloff" IDS_PW_FALLOFF2 "Falloff"
END END
STRINGTABLE STRINGTABLE
BEGIN BEGIN
IDS_TH_CROSS_NOT_IN_THRESHOLD IDS_TH_CROSS_NOT_IN_THRESHOLD
"Crossing lines not within specified threshold" "Crossing lines not within specified threshold"
IDS_TH_EDGEDELETE "Delete Edge" IDS_TH_EDGEDELETE "Delete Edge"
IDS_TH_NOEDGESSEL "No edges selected" IDS_TH_NOEDGESSEL "No edges selected"
@ -1200,7 +1200,7 @@ BEGIN
IDS_TH_OPEN "Open" IDS_TH_OPEN "Open"
END END
STRINGTABLE STRINGTABLE
BEGIN BEGIN
IDS_TH_CLOSED "Closed" IDS_TH_CLOSED "Closed"
IDS_EM_ATTACH_LIST "Attach List" IDS_EM_ATTACH_LIST "Attach List"
@ -1220,7 +1220,7 @@ BEGIN
IDS_PW_SCALEV "Scale Vertical" IDS_PW_SCALEV "Scale Vertical"
END END
STRINGTABLE STRINGTABLE
BEGIN BEGIN
IDS_PW_WELDSELECTED "Weld Selected" IDS_PW_WELDSELECTED "Weld Selected"
IDS_PW_APPLYPLANAR "Apply Planar" IDS_PW_APPLYPLANAR "Apply Planar"
@ -1240,7 +1240,7 @@ BEGIN
IDS_PW_UNHIDEALL "Unhide All" IDS_PW_UNHIDEALL "Unhide All"
END END
STRINGTABLE STRINGTABLE
BEGIN BEGIN
IDS_PW_FREEZE_SELECTED "Freeze Selected" IDS_PW_FREEZE_SELECTED "Freeze Selected"
IDS_PW_UNFREEZEALL "Unfreeze All" IDS_PW_UNFREEZEALL "Unfreeze All"
@ -1249,7 +1249,7 @@ BEGIN
IDS_PW_SCALE_UVW "Scale UVWs" IDS_PW_SCALE_UVW "Scale UVWs"
IDS_PW_WELD_UVW "Weld UVWs" IDS_PW_WELD_UVW "Weld UVWs"
IDS_PW_LINECOLOR "Line Color" IDS_PW_LINECOLOR "Line Color"
IDS_RB_UNSUPPORTED_MAP_TYPE IDS_RB_UNSUPPORTED_MAP_TYPE
"The Displace modifier does not support the mapping type that has been selected to acquire." "The Displace modifier does not support the mapping type that has been selected to acquire."
IDS_MM_ACQ_MAPPING "Aquire Mapping" IDS_MM_ACQ_MAPPING "Aquire Mapping"
IDS_PARAM_CHANGE "Parameter Change" IDS_PARAM_CHANGE "Parameter Change"
@ -1261,7 +1261,7 @@ BEGIN
IDS_PW_MOUSE_CONSTRAIN "SHIFT constrains the mouse to X/Y" IDS_PW_MOUSE_CONSTRAIN "SHIFT constrains the mouse to X/Y"
END END
STRINGTABLE STRINGTABLE
BEGIN BEGIN
IDS_PW_MOUSE_SELECTTV "Select texture vertices" IDS_PW_MOUSE_SELECTTV "Select texture vertices"
IDS_PW_MOUSE_SELECTTRI "SHIFT selects triangle faces" IDS_PW_MOUSE_SELECTTRI "SHIFT selects triangle faces"

@ -34,7 +34,7 @@ STYLE WS_CHILD
FONT 8, "MS Sans Serif" FONT 8, "MS Sans Serif"
BEGIN BEGIN
CONTROL "Paint",IDC_PAINT,"CustButton",WS_TABSTOP,7,5,38,19 CONTROL "Paint",IDC_PAINT,"CustButton",WS_TABSTOP,7,5,38,19
CONTROL "Meshes",IDC_INCLUDE_MESHES,"Button",BS_AUTOCHECKBOX | CONTROL "Meshes",IDC_INCLUDE_MESHES,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP,50,5,45,10 WS_TABSTOP,50,5,45,10
CONTROL "Preload Tiles",IDC_PRELOAD_TILES,"Button", CONTROL "Preload Tiles",IDC_PRELOAD_TILES,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP,50,15,50,10 BS_AUTOCHECKBOX | WS_TABSTOP,50,15,50,10
@ -47,12 +47,12 @@ END
// TEXTINCLUDE // TEXTINCLUDE
// //
1 TEXTINCLUDE DISCARDABLE 1 TEXTINCLUDE DISCARDABLE
BEGIN BEGIN
"modsres.h\0" "modsres.h\0"
END END
2 TEXTINCLUDE DISCARDABLE 2 TEXTINCLUDE DISCARDABLE
BEGIN BEGIN
"#define APSTUDIO_HIDDEN_SYMBOLS\r\n" "#define APSTUDIO_HIDDEN_SYMBOLS\r\n"
"#include ""windows.h""\r\n" "#include ""windows.h""\r\n"
@ -61,7 +61,7 @@ BEGIN
"\0" "\0"
END END
3 TEXTINCLUDE DISCARDABLE 3 TEXTINCLUDE DISCARDABLE
BEGIN BEGIN
"\r\n" "\r\n"
"\0" "\0"
@ -76,7 +76,7 @@ END
// //
#ifdef APSTUDIO_INVOKED #ifdef APSTUDIO_INVOKED
GUIDELINES DESIGNINFO DISCARDABLE GUIDELINES DESIGNINFO DISCARDABLE
BEGIN BEGIN
IDD_EDPATCH_OPS, DIALOG IDD_EDPATCH_OPS, DIALOG
BEGIN BEGIN
@ -96,8 +96,8 @@ END
// //
VS_VERSION_INFO VERSIONINFO VS_VERSION_INFO VERSIONINFO
FILEVERSION 0, 11, 1, 0 FILEVERSION 0, 12, 0, 0
PRODUCTVERSION 0, 11, 1, 0 PRODUCTVERSION 0, 12, 0, 0
FILEFLAGSMASK 0x3fL FILEFLAGSMASK 0x3fL
#ifdef _DEBUG #ifdef _DEBUG
FILEFLAGS 0x1L FILEFLAGS 0x1L
@ -116,14 +116,14 @@ BEGIN
VALUE "Comments", "TECH: cyril.corvazier\0" VALUE "Comments", "TECH: cyril.corvazier\0"
VALUE "CompanyName", "Ryzom Core\0" VALUE "CompanyName", "Ryzom Core\0"
VALUE "FileDescription", "NeL Patch Paint\0" VALUE "FileDescription", "NeL Patch Paint\0"
VALUE "FileVersion", "0.11.1\0" VALUE "FileVersion", "0.12.0\0"
VALUE "InternalName", "mods\0" VALUE "InternalName", "mods\0"
VALUE "LegalCopyright", "Copyright © 2000 Nevrax Ltd\0" VALUE "LegalCopyright", "Copyright © 2000 Nevrax Ltd\0"
VALUE "LegalTrademarks", "\0" VALUE "LegalTrademarks", "\0"
VALUE "OriginalFilename", "nelpatchpaint.dlm\0" VALUE "OriginalFilename", "nelpatchpaint.dlm\0"
VALUE "PrivateBuild", "\0" VALUE "PrivateBuild", "\0"
VALUE "ProductName", "Ryzom Core\0" VALUE "ProductName", "Ryzom Core\0"
VALUE "ProductVersion", "0.11.1\0" VALUE "ProductVersion", "0.12.0\0"
VALUE "SpecialBuild", "\0" VALUE "SpecialBuild", "\0"
END END
END END

@ -72,7 +72,7 @@ END
// //
#ifdef APSTUDIO_INVOKED #ifdef APSTUDIO_INVOKED
GUIDELINES DESIGNINFO DISCARDABLE GUIDELINES DESIGNINFO DISCARDABLE
BEGIN BEGIN
IDD_PANEL, DIALOG IDD_PANEL, DIALOG
BEGIN BEGIN
@ -90,18 +90,18 @@ END
// TEXTINCLUDE // TEXTINCLUDE
// //
1 TEXTINCLUDE DISCARDABLE 1 TEXTINCLUDE DISCARDABLE
BEGIN BEGIN
"resource.h\0" "resource.h\0"
END END
2 TEXTINCLUDE DISCARDABLE 2 TEXTINCLUDE DISCARDABLE
BEGIN BEGIN
"#include ""afxres.h""\r\n" "#include ""afxres.h""\r\n"
"\0" "\0"
END END
3 TEXTINCLUDE DISCARDABLE 3 TEXTINCLUDE DISCARDABLE
BEGIN BEGIN
"\r\n" "\r\n"
"\0" "\0"
@ -125,8 +125,8 @@ IDC_DROPPER_CURSOR CURSOR DISCARDABLE "dropcurs.cur"
// //
VS_VERSION_INFO VERSIONINFO VS_VERSION_INFO VERSIONINFO
FILEVERSION 0, 11, 0, 0 FILEVERSION 0, 12, 0, 0
PRODUCTVERSION 0, 11, 0, 0 PRODUCTVERSION 0, 12, 0, 0
FILEFLAGSMASK 0x3fL FILEFLAGSMASK 0x3fL
#ifdef _DEBUG #ifdef _DEBUG
FILEFLAGS 0x1L FILEFLAGS 0x1L
@ -145,13 +145,13 @@ BEGIN
VALUE "Comments", "TECH: \0" VALUE "Comments", "TECH: \0"
VALUE "CompanyName", "Ryzom Core\0" VALUE "CompanyName", "Ryzom Core\0"
VALUE "FileDescription", "Vertex Tree Paint\0" VALUE "FileDescription", "Vertex Tree Paint\0"
VALUE "FileVersion", "0.11.0\0" VALUE "FileVersion", "0.12.0\0"
VALUE "InternalName", "VertexTreePaint\0" VALUE "InternalName", "VertexTreePaint\0"
VALUE "LegalCopyright", "Copyright © 2000 Nevrax Ltd. Copyright © 1998 Autodesk Inc.\0" VALUE "LegalCopyright", "Copyright © 2000 Nevrax Ltd. Copyright © 1998 Autodesk Inc.\0"
VALUE "LegalTrademarks", "The following are registered trademarks of Autodesk, Inc.: 3D Studio MAX. The following are trademarks of Autodesk, Inc.: Kinetix, Kinetix(logo), BIPED, Physique, Character Studio, MAX DWG, DWG Unplugged, Heidi, FLI, FLC, DXF.\0" VALUE "LegalTrademarks", "The following are registered trademarks of Autodesk, Inc.: 3D Studio MAX. The following are trademarks of Autodesk, Inc.: Kinetix, Kinetix(logo), BIPED, Physique, Character Studio, MAX DWG, DWG Unplugged, Heidi, FLI, FLC, DXF.\0"
VALUE "OriginalFilename", "nel_vertex_tree_paint.dlm\0" VALUE "OriginalFilename", "nel_vertex_tree_paint.dlm\0"
VALUE "ProductName", "Ryzom Core\0" VALUE "ProductName", "Ryzom Core\0"
VALUE "ProductVersion", "0.11.0\0" VALUE "ProductVersion", "0.12.0\0"
END END
END END
BLOCK "VarFileInfo" BLOCK "VarFileInfo"
@ -179,11 +179,11 @@ IDB_BUTTON_MASK BITMAP DISCARDABLE "buttonmask.bmp"
IDD_PANEL DLGINIT IDD_PANEL DLGINIT
BEGIN BEGIN
IDC_COMBO_TYPE, 0x403, 10, 0 IDC_COMBO_TYPE, 0x403, 10, 0
0x6e49, 0x6574, 0x736e, 0x7469, 0x0079, 0x6e49, 0x6574, 0x736e, 0x7469, 0x0079,
IDC_COMBO_TYPE, 0x403, 14, 0 IDC_COMBO_TYPE, 0x403, 14, 0
0x6850, 0x7361, 0x2065, 0x654c, 0x6576, 0x206c, 0x0031, 0x6850, 0x7361, 0x2065, 0x654c, 0x6576, 0x206c, 0x0031,
IDC_COMBO_TYPE, 0x403, 14, 0 IDC_COMBO_TYPE, 0x403, 14, 0
0x6850, 0x7361, 0x2065, 0x654c, 0x6576, 0x206c, 0x0032, 0x6850, 0x7361, 0x2065, 0x654c, 0x6576, 0x206c, 0x0032,
0 0
END END
@ -193,7 +193,7 @@ END
// String Table // String Table
// //
STRINGTABLE DISCARDABLE STRINGTABLE DISCARDABLE
BEGIN BEGIN
IDS_LIBDESCRIPTION "Vertex tree painting modifier (Kinetix/Nel)" IDS_LIBDESCRIPTION "Vertex tree painting modifier (Kinetix/Nel)"
IDS_CATEGORY "NeL Tools" IDS_CATEGORY "NeL Tools"

@ -31,7 +31,7 @@ STYLE WS_CHILD | WS_VISIBLE
FONT 8, "MS Sans Serif" FONT 8, "MS Sans Serif"
BEGIN BEGIN
PUSHBUTTON "Button1",IDC_BANK_PATH,5,5,95,14 PUSHBUTTON "Button1",IDC_BANK_PATH,5,5,95,14
COMBOBOX IDC_LAND,5,25,95,75,CBS_DROPDOWNLIST | CBS_SORT | COMBOBOX IDC_LAND,5,25,95,75,CBS_DROPDOWNLIST | CBS_SORT |
WS_DISABLED | WS_VSCROLL | WS_TABSTOP WS_DISABLED | WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "Setup material",IDC_SETUP,20,80,70,15,WS_DISABLED PUSHBUTTON "Setup material",IDC_SETUP,20,80,70,15,WS_DISABLED
LTEXT "Static",IDC_TILE_COUNT1,10,45,85,8 LTEXT "Static",IDC_TILE_COUNT1,10,45,85,8
@ -56,9 +56,9 @@ BEGIN
CONTROL "",IDC_MAPON2,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,201, CONTROL "",IDC_MAPON2,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,201,
38,8,10 38,8,10
GROUPBOX "Alpha From:",IDC_STATIC,23,66,89,57 GROUPBOX "Alpha From:",IDC_STATIC,23,66,89,57
CONTROL "Map #1",IDC_MULT_ALPHA1,"Button",BS_AUTORADIOBUTTON | CONTROL "Map #1",IDC_MULT_ALPHA1,"Button",BS_AUTORADIOBUTTON |
WS_GROUP | WS_TABSTOP,36,77,41,10 WS_GROUP | WS_TABSTOP,36,77,41,10
CONTROL "Map #2",IDC_MULT_ALPHA2,"Button",BS_AUTORADIOBUTTON | CONTROL "Map #2",IDC_MULT_ALPHA2,"Button",BS_AUTORADIOBUTTON |
WS_TABSTOP,36,91,41,10 WS_TABSTOP,36,91,41,10
CONTROL "Multiply Alphas",IDC_MULT_ALPHA3,"Button", CONTROL "Multiply Alphas",IDC_MULT_ALPHA3,"Button",
BS_AUTORADIOBUTTON | WS_TABSTOP,36,106,63,10 BS_AUTORADIOBUTTON | WS_TABSTOP,36,106,63,10
@ -73,7 +73,7 @@ END
// //
#ifdef APSTUDIO_INVOKED #ifdef APSTUDIO_INVOKED
GUIDELINES DESIGNINFO DISCARDABLE GUIDELINES DESIGNINFO DISCARDABLE
BEGIN BEGIN
IDD_PANEL, DIALOG IDD_PANEL, DIALOG
BEGIN BEGIN
@ -97,18 +97,18 @@ END
// TEXTINCLUDE // TEXTINCLUDE
// //
1 TEXTINCLUDE DISCARDABLE 1 TEXTINCLUDE DISCARDABLE
BEGIN BEGIN
"resource.h\0" "resource.h\0"
END END
2 TEXTINCLUDE DISCARDABLE 2 TEXTINCLUDE DISCARDABLE
BEGIN BEGIN
"#include ""afxres.h""\r\n" "#include ""afxres.h""\r\n"
"\0" "\0"
END END
3 TEXTINCLUDE DISCARDABLE 3 TEXTINCLUDE DISCARDABLE
BEGIN BEGIN
"\r\n" "\r\n"
"\0" "\0"
@ -124,8 +124,8 @@ END
// //
VS_VERSION_INFO VERSIONINFO VS_VERSION_INFO VERSIONINFO
FILEVERSION 0, 11, 0, 0 FILEVERSION 0, 12, 0, 0
PRODUCTVERSION 0, 11, 0, 0 PRODUCTVERSION 0, 12, 0, 0
FILEFLAGSMASK 0x3fL FILEFLAGSMASK 0x3fL
#ifdef _DEBUG #ifdef _DEBUG
FILEFLAGS 0x1L FILEFLAGS 0x1L
@ -142,12 +142,12 @@ BEGIN
BEGIN BEGIN
VALUE "Comments", "Based on Kinetix 3D Studio Max 3.0 plugin sample\0" VALUE "Comments", "Based on Kinetix 3D Studio Max 3.0 plugin sample\0"
VALUE "CompanyName", "Ryzom Core\0" VALUE "CompanyName", "Ryzom Core\0"
VALUE "FileVersion", "0.11.0\0" VALUE "FileVersion", "0.12.0\0"
VALUE "InternalName", "Tile_utility\0" VALUE "InternalName", "Tile_utility\0"
VALUE "LegalCopyright", "\0" VALUE "LegalCopyright", "\0"
VALUE "OriginalFilename", "Tile_utility.dlu\0" VALUE "OriginalFilename", "Tile_utility.dlu\0"
VALUE "ProductName", "Ryzom Core\0" VALUE "ProductName", "Ryzom Core\0"
VALUE "ProductVersion", "0.11.0\0" VALUE "ProductVersion", "0.12.0\0"
VALUE "FileDescription", "Create material for tiles\0" VALUE "FileDescription", "Create material for tiles\0"
VALUE "Comments", "TECH: \0" VALUE "Comments", "TECH: \0"
VALUE "LegalTrademarks", "\0" VALUE "LegalTrademarks", "\0"
@ -167,7 +167,7 @@ END
// String Table // String Table
// //
STRINGTABLE DISCARDABLE STRINGTABLE DISCARDABLE
BEGIN BEGIN
IDS_LIBDESCRIPTION "Create material for tiles" IDS_LIBDESCRIPTION "Create material for tiles"
IDS_CATEGORY "Rykol Tools" IDS_CATEGORY "Rykol Tools"
@ -177,7 +177,7 @@ BEGIN
IDS_COLOR1 "Color 1" IDS_COLOR1 "Color 1"
END END
STRINGTABLE DISCARDABLE STRINGTABLE DISCARDABLE
BEGIN BEGIN
IDS_DS_PHASE "Phase" IDS_DS_PHASE "Phase"
IDS_DS_AMBIENT "Ambient Color" IDS_DS_AMBIENT "Ambient Color"
@ -185,7 +185,7 @@ BEGIN
IDS_DS_SPECULAR "Specular Color" IDS_DS_SPECULAR "Specular Color"
END END
STRINGTABLE DISCARDABLE STRINGTABLE DISCARDABLE
BEGIN BEGIN
IDS_DS_WIREFRAME "Wire" IDS_DS_WIREFRAME "Wire"
IDS_DS_SHININESS "Glossiness" IDS_DS_SHININESS "Glossiness"
@ -203,7 +203,7 @@ BEGIN
IDS_GRAD_TYPE "Gradient Type" IDS_GRAD_TYPE "Gradient Type"
END END
STRINGTABLE DISCARDABLE STRINGTABLE DISCARDABLE
BEGIN BEGIN
IDS_JW_MAPENABLES "Map Enables" IDS_JW_MAPENABLES "Map Enables"
IDS_DS_THRESH "Position" IDS_DS_THRESH "Position"
@ -223,7 +223,7 @@ BEGIN
IDS_DS_ANGLE "Angle" IDS_DS_ANGLE "Angle"
END END
STRINGTABLE DISCARDABLE STRINGTABLE DISCARDABLE
BEGIN BEGIN
IDS_DS_COLOR1 "Color 1" IDS_DS_COLOR1 "Color 1"
IDS_DS_COLOR2 "Color 2" IDS_DS_COLOR2 "Color 2"
@ -243,7 +243,7 @@ BEGIN
IDS_DS_MIXAMT "Mix Amount" IDS_DS_MIXAMT "Mix Amount"
END END
STRINGTABLE DISCARDABLE STRINGTABLE DISCARDABLE
BEGIN BEGIN
IDS_DS_SHRINK_ENV "Shrink-wrap Environment" IDS_DS_SHRINK_ENV "Shrink-wrap Environment"
IDS_DS_SCREEN "Screen" IDS_DS_SCREEN "Screen"
@ -263,7 +263,7 @@ BEGIN
IDS_JW_MAPS "Maps" IDS_JW_MAPS "Maps"
END END
STRINGTABLE DISCARDABLE STRINGTABLE DISCARDABLE
BEGIN BEGIN
IDS_JW_MAPAMOUNTS "Map Amounts" IDS_JW_MAPAMOUNTS "Map Amounts"
IDS_DS_MATTE_SHADOW_PAR "Matte/Shadow Basic Parameters" IDS_DS_MATTE_SHADOW_PAR "Matte/Shadow Basic Parameters"
@ -280,7 +280,7 @@ BEGIN
IDS_JW_SAMPLERBYNAME "Sampler Name" IDS_JW_SAMPLERBYNAME "Sampler Name"
END END
STRINGTABLE DISCARDABLE STRINGTABLE DISCARDABLE
BEGIN BEGIN
IDS_DS_NOISEPARMS "Noise Parameters" IDS_DS_NOISEPARMS "Noise Parameters"
IDS_DS_MIXPARMS "Mix Parameters" IDS_DS_MIXPARMS "Mix Parameters"
@ -300,7 +300,7 @@ BEGIN
IDS_DS_CYL_ENV "Cylindrical Environment" IDS_DS_CYL_ENV "Cylindrical Environment"
END END
STRINGTABLE DISCARDABLE STRINGTABLE DISCARDABLE
BEGIN BEGIN
IDS_DS_XLABEL "X:" IDS_DS_XLABEL "X:"
IDS_DS_YLABEL "Y:" IDS_DS_YLABEL "Y:"
@ -311,7 +311,7 @@ BEGIN
IDS_DS_BITMAP_TEXTURE_ERR "Bitmap Texture Error" IDS_DS_BITMAP_TEXTURE_ERR "Bitmap Texture Error"
END END
STRINGTABLE DISCARDABLE STRINGTABLE DISCARDABLE
BEGIN BEGIN
IDS_RB_NOISE "Noise" IDS_RB_NOISE "Noise"
IDS_RB_MULTISUBOBJECT "Multi/Sub-Object" IDS_RB_MULTISUBOBJECT "Multi/Sub-Object"
@ -320,7 +320,7 @@ BEGIN
IDS_RB_BACK "Back" IDS_RB_BACK "Back"
END END
STRINGTABLE DISCARDABLE STRINGTABLE DISCARDABLE
BEGIN BEGIN
IDS_RB_FACING "Facing" IDS_RB_FACING "Facing"
IDS_RB_MASK "Mask" IDS_RB_MASK "Mask"
@ -340,7 +340,7 @@ BEGIN
IDS_RB_CENTER2 "Color 2 Position" IDS_RB_CENTER2 "Color 2 Position"
END END
STRINGTABLE DISCARDABLE STRINGTABLE DISCARDABLE
BEGIN BEGIN
IDS_RB_HIGHTHRESHOLD "High Threshold" IDS_RB_HIGHTHRESHOLD "High Threshold"
IDS_RB_LOWTHRESHOLD "Low Threshold" IDS_RB_LOWTHRESHOLD "Low Threshold"
@ -360,12 +360,12 @@ BEGIN
IDS_DS_BOTTOM "Bottom" IDS_DS_BOTTOM "Bottom"
END END
STRINGTABLE DISCARDABLE STRINGTABLE DISCARDABLE
BEGIN BEGIN
IDS_RB_AMOUNT "Amount" IDS_RB_AMOUNT "Amount"
END END
STRINGTABLE DISCARDABLE STRINGTABLE DISCARDABLE
BEGIN BEGIN
IDS_RB_CURVITURE "Curvature" IDS_RB_CURVITURE "Curvature"
IDS_RB_AMPLITUDE "Amplitude" IDS_RB_AMPLITUDE "Amplitude"
@ -374,13 +374,13 @@ BEGIN
IDS_RB_DECAY "Decay" IDS_RB_DECAY "Decay"
END END
STRINGTABLE DISCARDABLE STRINGTABLE DISCARDABLE
BEGIN BEGIN
IDS_RB_LOWTHRESH "Low Threshold" IDS_RB_LOWTHRESH "Low Threshold"
IDS_RB_HIGHTHRESH "High Threshold" IDS_RB_HIGHTHRESH "High Threshold"
END END
STRINGTABLE DISCARDABLE STRINGTABLE DISCARDABLE
BEGIN BEGIN
IDS_DS_MARBLE "Marble" IDS_DS_MARBLE "Marble"
IDS_DS_MIX "Mix" IDS_DS_MIX "Mix"
@ -400,7 +400,7 @@ BEGIN
IDS_DS_CHECKER "Checker" IDS_DS_CHECKER "Checker"
END END
STRINGTABLE DISCARDABLE STRINGTABLE DISCARDABLE
BEGIN BEGIN
IDS_DS_NONE "None" IDS_DS_NONE "None"
IDS_DS_TRANS "Opacity" IDS_DS_TRANS "Opacity"
@ -420,12 +420,12 @@ BEGIN
IDS_DS_CLIPV "Clip V Offset" IDS_DS_CLIPV "Clip V Offset"
END END
STRINGTABLE DISCARDABLE STRINGTABLE DISCARDABLE
BEGIN BEGIN
IDS_DS_PARAMCHG "Param Change" IDS_DS_PARAMCHG "Param Change"
END END
STRINGTABLE DISCARDABLE STRINGTABLE DISCARDABLE
BEGIN BEGIN
IDS_DS_CLIPW "Clip U Width" IDS_DS_CLIPW "Clip U Width"
IDS_DS_CLIPH "Clip V Width" IDS_DS_CLIPH "Clip V Width"
@ -445,7 +445,7 @@ BEGIN
IDS_DS_FALLOFF "Falloff" IDS_DS_FALLOFF "Falloff"
END END
STRINGTABLE DISCARDABLE STRINGTABLE DISCARDABLE
BEGIN BEGIN
IDS_DS_FALLOFFPARAMS "Falloff Parameters" IDS_DS_FALLOFFPARAMS "Falloff Parameters"
IDS_DS_PERVAL "Perpendicular Value:" IDS_DS_PERVAL "Perpendicular Value:"
@ -465,7 +465,7 @@ BEGIN
IDS_DS_PLATE_PARAMS "Thin Wall Refraction Parameters" IDS_DS_PLATE_PARAMS "Thin Wall Refraction Parameters"
END END
STRINGTABLE DISCARDABLE STRINGTABLE DISCARDABLE
BEGIN BEGIN
IDS_DS_THICKFACT "Thickness Offset" IDS_DS_THICKFACT "Thickness Offset"
IDS_DS_REFRAMT "Bump Map Effect" IDS_DS_REFRAMT "Bump Map Effect"
@ -485,7 +485,7 @@ BEGIN
IDS_DS_GREEN "Green" IDS_DS_GREEN "Green"
END END
STRINGTABLE DISCARDABLE STRINGTABLE DISCARDABLE
BEGIN BEGIN
IDS_DS_BLUE "Blue" IDS_DS_BLUE "Blue"
IDS_DS_SOFTEN "Soften Level" IDS_DS_SOFTEN "Soften Level"
@ -505,7 +505,7 @@ BEGIN
IDS_KE_OREN_NAYAR_BLINN "Oren-Nayar-Blinn" IDS_KE_OREN_NAYAR_BLINN "Oren-Nayar-Blinn"
END END
STRINGTABLE DISCARDABLE STRINGTABLE DISCARDABLE
BEGIN BEGIN
IDS_KE_DIFF_LEVEL "Diffuse Level" IDS_KE_DIFF_LEVEL "Diffuse Level"
IDS_KE_DIFF_ROUGH "Diff. Roughness" IDS_KE_DIFF_ROUGH "Diff. Roughness"
@ -525,7 +525,7 @@ BEGIN
IDS_KE_COLOR "Color" IDS_KE_COLOR "Color"
END END
STRINGTABLE DISCARDABLE STRINGTABLE DISCARDABLE
BEGIN BEGIN
IDS_KE_ANISOTROPY "Anisotropy" IDS_KE_ANISOTROPY "Anisotropy"
IDS_KE_ORIENTATION "Orientation" IDS_KE_ORIENTATION "Orientation"
@ -545,7 +545,7 @@ BEGIN
IDS_KE_GLOSS1 "Glossiness 1" IDS_KE_GLOSS1 "Glossiness 1"
END END
STRINGTABLE DISCARDABLE STRINGTABLE DISCARDABLE
BEGIN BEGIN
IDS_KE_GLOSS2 "Glossiness 2" IDS_KE_GLOSS2 "Glossiness 2"
IDS_KE_ANISO1 "Anisotropy 1" IDS_KE_ANISO1 "Anisotropy 1"
@ -565,7 +565,7 @@ BEGIN
IDS_JW_APPLYREFDIM "Apply Reflection Dimming" IDS_JW_APPLYREFDIM "Apply Reflection Dimming"
END END
STRINGTABLE DISCARDABLE STRINGTABLE DISCARDABLE
BEGIN BEGIN
IDS_JW_PIXELSAMPLER "Pixel Sampler" IDS_JW_PIXELSAMPLER "Pixel Sampler"
IDS_JW_SAMPLERQUAL "Sampler Quality" IDS_JW_SAMPLERQUAL "Sampler Quality"
@ -585,7 +585,7 @@ BEGIN
IDS_RB_BLENDMAT_CDESC "Blend" IDS_RB_BLENDMAT_CDESC "Blend"
END END
STRINGTABLE DISCARDABLE STRINGTABLE DISCARDABLE
BEGIN BEGIN
IDS_DS_MIX_CDESC "Mix" IDS_DS_MIX_CDESC "Mix"
IDS_DS_FLATMIRROR_CDESC "Flat Mirror" IDS_DS_FLATMIRROR_CDESC "Flat Mirror"
@ -602,7 +602,7 @@ BEGIN
IDS_JW_ADTEXLOCK "Ambient-Diffuse Texture Lock" IDS_JW_ADTEXLOCK "Ambient-Diffuse Texture Lock"
END END
STRINGTABLE DISCARDABLE STRINGTABLE DISCARDABLE
BEGIN BEGIN
IDS_JW_ADLOCK "Ambient-Diffuse Lock" IDS_JW_ADLOCK "Ambient-Diffuse Lock"
IDS_JW_DSLOCK "Diffuse-Specular Lock" IDS_JW_DSLOCK "Diffuse-Specular Lock"
@ -621,7 +621,7 @@ BEGIN
IDS_PW_APPLYATMOS "ApplyAtmosphere" IDS_PW_APPLYATMOS "ApplyAtmosphere"
END END
STRINGTABLE DISCARDABLE STRINGTABLE DISCARDABLE
BEGIN BEGIN
IDS_PW_ATMOSDEPTH "AtmossphereDepth" IDS_PW_ATMOSDEPTH "AtmossphereDepth"
IDS_PW_RECEIVESHADOWS "RecieveShadows" IDS_PW_RECEIVESHADOWS "RecieveShadows"
@ -641,7 +641,7 @@ BEGIN
IDS_PW_STARTTIME "StartTime" IDS_PW_STARTTIME "StartTime"
END END
STRINGTABLE DISCARDABLE STRINGTABLE DISCARDABLE
BEGIN BEGIN
IDS_PW_PLAYBACK "PlayBackRate" IDS_PW_PLAYBACK "PlayBackRate"
IDS_PW_ENDCONDITION "EndCondition" IDS_PW_ENDCONDITION "EndCondition"
@ -661,7 +661,7 @@ BEGIN
IDS_PW_APPLYBLUR "ApplyBlur" IDS_PW_APPLYBLUR "ApplyBlur"
END END
STRINGTABLE DISCARDABLE STRINGTABLE DISCARDABLE
BEGIN BEGIN
IDS_KE_FACETED "Faceted" IDS_KE_FACETED "Faceted"
IDS_KE_ORIENTATION1 "Orientation 1" IDS_KE_ORIENTATION1 "Orientation 1"
@ -680,7 +680,7 @@ BEGIN
IDS_PW_MAT "Mat." IDS_PW_MAT "Mat."
END END
STRINGTABLE DISCARDABLE STRINGTABLE DISCARDABLE
BEGIN BEGIN
IDS_PW_BASE "Base" IDS_PW_BASE "Base"
IDS_DS_USEREFL "UseReflMap" IDS_DS_USEREFL "UseReflMap"
@ -695,7 +695,7 @@ BEGIN
IDS_ACUBIC_SELECT_INPUT_FILE "Select Input Reflection Map" IDS_ACUBIC_SELECT_INPUT_FILE "Select Input Reflection Map"
END END
STRINGTABLE DISCARDABLE STRINGTABLE DISCARDABLE
BEGIN BEGIN
65505 "RGB Level" 65505 "RGB Level"
65506 "RGB Offset" 65506 "RGB Offset"

@ -359,6 +359,27 @@ void dividSize (CBitmap &bitmap)
} }
} }
const int bayerDiv8R[4][4] = {
7, 3, 6, 2,
1, 5, 0, 4,
6, 2, 7, 3,
0, 4, 1, 5,
};
const int bayerDiv8G[4][4] = {
0, 4, 1, 5,
6, 2, 7, 3,
1, 5, 0, 4,
7, 3, 6, 2,
};
const int bayerDiv8B[4][4] = {
5, 1, 4, 0,
3, 7, 2, 6,
4, 0, 5, 1,
2, 6, 3, 7,
};
// *************************************************************************** // ***************************************************************************
int main(int argc, char **argv) int main(int argc, char **argv)
{ {
@ -601,6 +622,26 @@ int main(int argc, char **argv)
Reduce--; Reduce--;
} }
if (algo == TGA16)
{
// Apply bayer dither
CObjectVector<uint8> &rgba = picSrc.getPixels(0);
const uint32 w = picSrc.getWidth(0);
uint32 x = 0;
uint32 y = 0;
for (uint32 i = 0; i < rgba.size(); i += 4)
{
NLMISC::CRGBA &c = reinterpret_cast<NLMISC::CRGBA &>(rgba[i]);
c.R = (uint8)std::min(255, (int)c.R + bayerDiv8R[x % 4][y % 4]);
c.G = (uint8)std::min(255, (int)c.G + bayerDiv8G[x % 4][y % 4]);
c.B = (uint8)std::min(255, (int)c.B + bayerDiv8B[x % 4][y % 4]);
++x;
x %= w;
if (x == 0)
++y;
}
}
// 8 or 16 bits TGA or PNG ? // 8 or 16 bits TGA or PNG ?
if ((algo == TGA16) || (algo == TGA8) || (algo == PNG16) || (algo == PNG8)) if ((algo == TGA16) || (algo == TGA8) || (algo == PNG16) || (algo == PNG8))
{ {

@ -11,8 +11,8 @@
#endif // _MSC_VER > 1000 #endif // _MSC_VER > 1000
#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers #define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
#define NOMINMAX #define NOMINMAX
#define _WIN32_WINNT 0x0501
#include <afxwin.h> // MFC core and standard components #include <afxwin.h> // MFC core and standard components
#include <afxext.h> // MFC extensions #include <afxext.h> // MFC extensions

@ -22,6 +22,8 @@
#endif // _MSC_VER > 1000 #endif // _MSC_VER > 1000
#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers #define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
#define NOMINMAX
#define _WIN32_WINNT 0x0501
#include <afxwin.h> // MFC core and standard components #include <afxwin.h> // MFC core and standard components
#include <afxext.h> // MFC extensions #include <afxext.h> // MFC extensions

@ -11,6 +11,8 @@
#endif // _MSC_VER > 1000 #endif // _MSC_VER > 1000
#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers #define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
#define NOMINMAX
#define _WIN32_WINNT 0x0501
#include <afxwin.h> // MFC core and standard components #include <afxwin.h> // MFC core and standard components
#include <afxext.h> // MFC extensions #include <afxext.h> // MFC extensions

@ -27,6 +27,8 @@
#endif // _MSC_VER > 1000 #endif // _MSC_VER > 1000
#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers #define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
#define NOMINMAX
#define _WIN32_WINNT 0x0501
#include <afxwin.h> // MFC core and standard components #include <afxwin.h> // MFC core and standard components
#include <afxext.h> // MFC extensions #include <afxext.h> // MFC extensions

@ -22,6 +22,8 @@
#endif // _MSC_VER > 1000 #endif // _MSC_VER > 1000
#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers #define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
#define NOMINMAX
#define _WIN32_WINNT 0x0501
#include <afxwin.h> // MFC core and standard components #include <afxwin.h> // MFC core and standard components
#include <afxext.h> // MFC extensions #include <afxext.h> // MFC extensions

@ -205,6 +205,20 @@
<value value="10" hardtext="uiNumber10"/> <value value="10" hardtext="uiNumber10"/>
</parameter> </parameter>
</action> </action>
<action name="select_shortcut_bar_2" hardtext="uiSelectShortcutBar2" contexts="game, r2ed_anim_test">
<parameter hardtext="uiShortcutBarNumber">
<value value="1" hardtext="uiNumber01"/>
<value value="2" hardtext="uiNumber02"/>
<value value="3" hardtext="uiNumber03"/>
<value value="4" hardtext="uiNumber04"/>
<value value="5" hardtext="uiNumber05"/>
<value value="6" hardtext="uiNumber06"/>
<value value="7" hardtext="uiNumber07"/>
<value value="8" hardtext="uiNumber08"/>
<value value="9" hardtext="uiNumber09"/>
<value value="10" hardtext="uiNumber10"/>
</parameter>
</action>
<action name="phrase_cancel_cast" hardtext="uiCancelCast" contexts="game, r2ed_anim_test"/> <action name="phrase_cancel_cast" hardtext="uiCancelCast" contexts="game, r2ed_anim_test"/>
</action_category> </action_category>

@ -81,7 +81,6 @@ INCLUDE_DIRECTORIES(
${LIBXML2_INCLUDE_DIR} ${LIBXML2_INCLUDE_DIR}
${LUA_INCLUDE_DIR} ${LUA_INCLUDE_DIR}
${LUABIND_INCLUDE_DIR} ${LUABIND_INCLUDE_DIR}
${LIBWWW_INCLUDE_DIR}
${CURL_INCLUDE_DIRS} ${CURL_INCLUDE_DIRS}
${ZLIB_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR}
) )
@ -101,7 +100,6 @@ TARGET_LINK_LIBRARIES(ryzom_client
${LUA_LIBRARIES} ${LUA_LIBRARIES}
${LUABIND_LIBRARIES} ${LUABIND_LIBRARIES}
${CURL_LIBRARIES} ${CURL_LIBRARIES}
${LIBWWW_LIBRARIES}
${SEVENZIP_LIBRARY} ${SEVENZIP_LIBRARY}
) )

@ -389,8 +389,8 @@ END_MESSAGE_MAP()
BOOL CBug_reportDlg::OnInitDialog() BOOL CBug_reportDlg::OnInitDialog()
{ {
setReportEmailFunction ((void*)sendEmail); // setReportEmailFunction ((void*)sendEmail);
setDefaultEmailParams ("gw.nevrax.com", "", "lecroart@nevrax.com"); // setDefaultEmailParams ("gw.nevrax.com", "", "lecroart@nevrax.com");
CDialog::OnInitDialog(); CDialog::OnInitDialog();

@ -8369,7 +8369,7 @@ ADD_METHOD(void CCharacterCL::displayDebug(float x, float &y, float lineStep)) /
// Display the Run Factor. // Display the Run Factor.
TextContext->printfAt(x, y, "(Walk)Run Factor: %f", runFactor()); TextContext->printfAt(x, y, "(Walk)Run Factor: %f", runFactor());
y += lineStep; y += lineStep;
// Display the current animation name(id)(offset)(nbloop) pour le channel MOVE. // Display the current animation name(id)(offset)(nbloop) for channel MOVE.
TextContext->printfAt(x, y, "Current Animation: %s(%u)(%lf)(%u loops)", animId(MOVE)==std::numeric_limits<uint>::max()?"[NONE]":currentAnimationName().c_str(), animId(MOVE), animOffset(MOVE), _NbLoopAnim); TextContext->printfAt(x, y, "Current Animation: %s(%u)(%lf)(%u loops)", animId(MOVE)==std::numeric_limits<uint>::max()?"[NONE]":currentAnimationName().c_str(), animId(MOVE), animOffset(MOVE), _NbLoopAnim);
y += lineStep; y += lineStep;
// First Pos // First Pos
@ -8388,14 +8388,8 @@ ADD_METHOD(void CCharacterCL::displayDebug(float x, float &y, float lineStep)) /
TextContext->printfAt(x, y, "Prim Pos: %f %f %f", primFinalPos.x, primFinalPos.y, primFinalPos.z); TextContext->printfAt(x, y, "Prim Pos: %f %f %f", primFinalPos.x, primFinalPos.y, primFinalPos.z);
y += lineStep; y += lineStep;
} }
// Skeleton Ptr // Skeleton Ptr, Animset Ptr and Current State Ptr
TextContext->printfAt(x, y, "Skel Ptr: %p", &_Skeleton); TextContext->printfAt(x, y, "Skel Ptr: %p - AnimSet Ptr: %p - State Ptr: %p", &_Skeleton, _CurrentAnimSet[MOVE], _CurrentState);
y += lineStep;
// Animset Ptr
TextContext->printfAt(x, y, "AnimSet Ptr: %p", _CurrentAnimSet[MOVE]);
y += lineStep;
// Current State Ptr
TextContext->printfAt(x, y, "State Ptr: %p", _CurrentState);
y += lineStep; y += lineStep;
// Display the target mount and rider. // Display the target mount and rider.
TextContext->printfAt(x, y, "Mount: %3u(Theoretical: %3u) Rider: %3u(Theoretical: %3u)", mount(), _TheoreticalMount, rider(), _TheoreticalRider); TextContext->printfAt(x, y, "Mount: %3u(Theoretical: %3u) Rider: %3u(Theoretical: %3u)", mount(), _TheoreticalMount, rider(), _TheoreticalRider);

@ -436,9 +436,9 @@ int main(int argc, char **argv)
// Set default email value for reporting error // Set default email value for reporting error
#ifdef TEST_CRASH_COUNTER #ifdef TEST_CRASH_COUNTER
//initCrashReport (); // initCrashReport ();
setReportEmailFunction ((void*)sendEmail); // setReportEmailFunction ((void*)sendEmail);
setDefaultEmailParams ("smtp.nevrax.com", "", "hulud@nevrax.com"); // setDefaultEmailParams ("smtp.nevrax.com", "", "hulud@nevrax.com");
if (string(cmdline) == "/crash") if (string(cmdline) == "/crash")
volatile int toto = *(int*)0; volatile int toto = *(int*)0;

@ -2104,11 +2104,8 @@ void CEntityCL::setEntityName(const ucstring &name)
//--------------------------------------------------- //---------------------------------------------------
void CEntityCL::displayDebug(float x, float &y, float lineStep) // virtual void CEntityCL::displayDebug(float x, float &y, float lineStep) // virtual
{ {
// Type // Type and slot
TextContext->printfAt(x, y, "Type: %d", Type); TextContext->printfAt(x, y, "Type: %d - Slot: %d", Type, _Slot);
y += lineStep;
// Slot
TextContext->printfAt(x, y, "Slot: %d", _Slot);
y += lineStep; y += lineStep;
// Outpost // Outpost
TextContext->printfAt(x, y, "Outpost id:%d side:%s",this->getOutpostId(),OUTPOSTENUMS::toString(this->getOutpostSide()).c_str() ); TextContext->printfAt(x, y, "Outpost id:%d side:%s",this->getOutpostId(),OUTPOSTENUMS::toString(this->getOutpostSide()).c_str() );
@ -2119,11 +2116,8 @@ void CEntityCL::displayDebug(float x, float &y, float lineStep) // virtual
else else
TextContext->printfAt(x, y, "Name not received"); TextContext->printfAt(x, y, "Name not received");
y += lineStep; y += lineStep;
// Target // Target and DataSet Id
TextContext->printfAt(x, y, "Target: %d", _TargetSlot); TextContext->printfAt(x, y, "Target: %d - DataSet Id: %u", _TargetSlot, _DataSetId);
y += lineStep;
// DataSet Id
TextContext->printfAt(x, y, "DataSet Id: %u", _DataSetId);
y += lineStep; y += lineStep;
// Sheet Id // Sheet Id
TextContext->printfAt(x, y, "Sheet: %d(%s)", _SheetId.asInt(), _SheetId.toString().c_str()); TextContext->printfAt(x, y, "Sheet: %d(%s)", _SheetId.asInt(), _SheetId.toString().c_str());

@ -71,7 +71,7 @@ void initIG()
{ {
// Initialize lightmaps colors for the fireworks. // Initialize lightmaps colors for the fireworks.
// Fireworks is group 3 // Fireworks is group 5
Scene->setLightGroupColor (LightGroupFireworks, CRGBA(0,0,0)); Scene->setLightGroupColor (LightGroupFireworks, CRGBA(0,0,0));
}// initIG // }// initIG //

@ -846,8 +846,8 @@ void prelogInit()
FPU_CHECKER_ONCE FPU_CHECKER_ONCE
// Set default email value for reporting error // Set default email value for reporting error
setReportEmailFunction ((void*)sendEmail); // setReportEmailFunction ((void*)sendEmail);
setDefaultEmailParams ("smtp.nevrax.com", "", "ryzombug@nevrax.com"); // setDefaultEmailParams ("smtp.nevrax.com", "", "ryzombug@nevrax.com");
// create the save dir. // create the save dir.
if (!CFile::isExists("save")) CFile::createDirectory("save"); if (!CFile::isExists("save")) CFile::createDirectory("save");

@ -1620,6 +1620,23 @@ public:
}; };
REGISTER_ACTION_HANDLER(CHandlerPhraseSelectShortcutBar, "select_shortcut_bar"); REGISTER_ACTION_HANDLER(CHandlerPhraseSelectShortcutBar, "select_shortcut_bar");
// ***************************************************************************
class CHandlerPhraseSelectShortcutBar2 : public IActionHandler
{
public:
virtual void execute(CCtrlBase * /* pCaller */, const string &Params)
{
CInterfaceManager *pIM= CInterfaceManager::getInstance();
CCDBNodeLeaf *node= NLGUI::CDBManager::getInstance()->getDbProp("UI:PHRASE:SELECT_MEMORY_2", false);
if(node)
{
sint32 val;
fromString(Params, val);
node->setValue32(val);
}
}
};
REGISTER_ACTION_HANDLER(CHandlerPhraseSelectShortcutBar2, "select_shortcut_bar_2");
// *************************************************************************** // ***************************************************************************
// *************************************************************************** // ***************************************************************************

@ -25,11 +25,6 @@
#include "nel/misc/mutex.h" #include "nel/misc/mutex.h"
// to fix a conflict with syslog.h being included by libwww
#ifdef LOG_WARNING
#undef LOG_WARNING
#endif
/** /**
* class used to display console text commands in the chat window * class used to display console text commands in the chat window
* \author Nicolas Brigand * \author Nicolas Brigand

@ -468,7 +468,7 @@ bool CCtrlSheetInfo::parseCtrlInfo(xmlNodePtr cur, CInterfaceGroup * /* parentGr
prop = (char*) xmlGetProp( cur, (xmlChar*)"item_slot" ); prop = (char*) xmlGetProp( cur, (xmlChar*)"item_slot" );
if(prop) if(prop)
{ {
string str= prop; string str= prop.str();
_ItemSlot= SLOTTYPE::stringToSlotType(NLMISC::toUpper(str)); _ItemSlot= SLOTTYPE::stringToSlotType(NLMISC::toUpper(str));
} }

@ -70,7 +70,7 @@ void CGroupHTMLCS::addHTTPGetParams (string &url, bool /*trustedDomain*/)
// *************************************************************************** // ***************************************************************************
void CGroupHTMLCS::addHTTPPostParams (HTAssocList *formfields, bool /*trustedDomain*/) void CGroupHTMLCS::addHTTPPostParams (SFormFields &formfields, bool /*trustedDomain*/)
{ {
std::vector<CParameter> parameters; std::vector<CParameter> parameters;
getParameters (parameters, false); getParameters (parameters, false);
@ -78,7 +78,7 @@ void CGroupHTMLCS::addHTTPPostParams (HTAssocList *formfields, bool /*trustedDom
uint i; uint i;
for (i=0; i<parameters.size(); i++) for (i=0; i<parameters.size(); i++)
{ {
HTParseFormInput(formfields, (parameters[i].Name+"="+parameters[i].Value).c_str()); formfields.add(parameters[i].Name, parameters[i].Value);
} }
} }

@ -40,7 +40,7 @@ public:
// From CGroupHTML // From CGroupHTML
virtual void addHTTPGetParams (std::string &url, bool trustedDomain); virtual void addHTTPGetParams (std::string &url, bool trustedDomain);
virtual void addHTTPPostParams (HTAssocList *formfields, bool trustedDomain); virtual void addHTTPPostParams (SFormFields &formfields, bool trustedDomain);
virtual std::string home(); virtual std::string home();
private: private:

@ -83,7 +83,7 @@ void CGroupHTMLForum::addHTTPGetParams (string &url, bool /*trustedDomain*/)
// *************************************************************************** // ***************************************************************************
void CGroupHTMLForum::addHTTPPostParams (HTAssocList *formfields, bool /*trustedDomain*/) void CGroupHTMLForum::addHTTPPostParams (SFormFields &formfields, bool /*trustedDomain*/)
{ {
ucstring user_name = UserEntity->getLoginName (); ucstring user_name = UserEntity->getLoginName ();
const SGuild &guild = CGuildManager::getInstance()->getGuild(); const SGuild &guild = CGuildManager::getInstance()->getGuild();
@ -91,10 +91,10 @@ void CGroupHTMLForum::addHTTPPostParams (HTAssocList *formfields, bool /*trusted
if (!gname.empty()) if (!gname.empty())
{ {
HTParseFormInput(formfields, ("shard="+toString(CharacterHomeSessionId)).c_str()); formfields.add("shard", toString(CharacterHomeSessionId));
HTParseFormInput(formfields, ("user_login="+user_name.toString()).c_str()); formfields.add("user_login", user_name.toString());
HTParseFormInput(formfields, ("forum="+gname).c_str()); formfields.add("forum", gname);
HTParseFormInput(formfields, ("session_cookie="+NetMngr.getLoginCookie().toString()).c_str()); formfields.add("session_cookie", NetMngr.getLoginCookie().toString());
} }
else else
{ {

@ -40,7 +40,7 @@ public:
// From CGroupHTML // From CGroupHTML
virtual void addHTTPGetParams (std::string &url, bool trustedDomain); virtual void addHTTPGetParams (std::string &url, bool trustedDomain);
virtual void addHTTPPostParams (HTAssocList *formfields, bool trustedDomain); virtual void addHTTPPostParams (SFormFields &formfields, bool trustedDomain);
virtual std::string home(); virtual std::string home();
virtual void handle (); virtual void handle ();

@ -62,13 +62,13 @@ void CGroupHTMLMail::addHTTPGetParams (string &url, bool /*trustedDomain*/)
// *************************************************************************** // ***************************************************************************
void CGroupHTMLMail::addHTTPPostParams (HTAssocList *formfields, bool /*trustedDomain*/) void CGroupHTMLMail::addHTTPPostParams (SFormFields &formfields, bool /*trustedDomain*/)
{ {
ucstring user_name = UserEntity->getLoginName (); ucstring user_name = UserEntity->getLoginName ();
HTParseFormInput(formfields, ("shard="+toString(CharacterHomeSessionId)).c_str()); formfields.add("shard", toString(CharacterHomeSessionId));
HTParseFormInput(formfields, ("user_login="+user_name.toString()).c_str()); formfields.add("user_login", user_name.toString());
HTParseFormInput(formfields, ("session_cookie="+NetMngr.getLoginCookie().toString()).c_str()); formfields.add("session_cookie", NetMngr.getLoginCookie().toString());
HTParseFormInput(formfields, ("lang="+CI18N::getCurrentLanguageCode()).c_str()); formfields.add("lang", CI18N::getCurrentLanguageCode());
} }
// *************************************************************************** // ***************************************************************************

@ -40,7 +40,7 @@ public:
// From CGroupHTML // From CGroupHTML
virtual void addHTTPGetParams (std::string &url, bool trustedDomain); virtual void addHTTPGetParams (std::string &url, bool trustedDomain);
virtual void addHTTPPostParams (HTAssocList *formfields, bool trustedDomain); virtual void addHTTPPostParams (SFormFields &formfields, bool trustedDomain);
virtual std::string home(); virtual std::string home();
virtual void handle (); virtual void handle ();

@ -307,19 +307,19 @@ void CGroupHTMLAuth::addHTTPGetParams (string &url, bool trustedDomain)
// *************************************************************************** // ***************************************************************************
void CGroupHTMLAuth::addHTTPPostParams (HTAssocList *formfields, bool trustedDomain) void CGroupHTMLAuth::addHTTPPostParams (SFormFields &formfields, bool trustedDomain)
{ {
if(!UserEntity) return; if(!UserEntity) return;
uint32 cid = NetMngr.getLoginCookie().getUserId() * 16 + PlayerSelectedSlot; uint32 cid = NetMngr.getLoginCookie().getUserId() * 16 + PlayerSelectedSlot;
HTParseFormInput(formfields, ("shardid="+toString(CharacterHomeSessionId)).c_str()); formfields.add("shardid", toString(CharacterHomeSessionId));
HTParseFormInput(formfields, ("name="+UserEntity->getLoginName().toUtf8()).c_str()); formfields.add("name", UserEntity->getLoginName().toUtf8());
HTParseFormInput(formfields, ("lang="+CI18N::getCurrentLanguageCode()).c_str()); formfields.add("lang", CI18N::getCurrentLanguageCode());
HTParseFormInput(formfields, "ig=1"); formfields.add("ig", "1");
if (trustedDomain) if (trustedDomain)
{ {
HTParseFormInput(formfields, ("cid="+toString(cid)).c_str()); formfields.add("cid", toString(cid));
HTParseFormInput(formfields, ("authkey="+getWebAuthKey()).c_str()); formfields.add("authkey", getWebAuthKey());
} }
} }
@ -365,7 +365,7 @@ void CGroupHTMLWebIG::addHTTPGetParams (string &url, bool trustedDomain)
// *************************************************************************** // ***************************************************************************
void CGroupHTMLWebIG::addHTTPPostParams (HTAssocList *formfields, bool trustedDomain) void CGroupHTMLWebIG::addHTTPPostParams (SFormFields &formfields, bool trustedDomain)
{ {
CGroupHTMLAuth::addHTTPPostParams(formfields, trustedDomain); CGroupHTMLAuth::addHTTPPostParams(formfields, trustedDomain);
} }

@ -33,7 +33,7 @@ public:
// From CGroupHTML // From CGroupHTML
virtual void addHTTPGetParams (std::string &url, bool trustedDomain); virtual void addHTTPGetParams (std::string &url, bool trustedDomain);
virtual void addHTTPPostParams (HTAssocList *formfields, bool trustedDomain); virtual void addHTTPPostParams (SFormFields &formfields, bool trustedDomain);
virtual std::string home(); virtual std::string home();
virtual void handle (); virtual void handle ();
@ -55,7 +55,7 @@ public:
/// From CGroupHTMLAuth /// From CGroupHTMLAuth
virtual void addHTTPGetParams (std::string &url, bool trustedDomain); virtual void addHTTPGetParams (std::string &url, bool trustedDomain);
virtual void addHTTPPostParams (HTAssocList *formfields, bool trustedDomain); virtual void addHTTPPostParams (SFormFields &formfields, bool trustedDomain);
virtual std::string home(); virtual std::string home();
virtual void handle (); virtual void handle ();

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save