Merge with develop

--HG--
branch : feature-material-editor
hg/feature/material-editor
kaetemi 9 years ago
commit 8c6952b268

@ -871,7 +871,7 @@ MACRO(NL_SETUP_BUILD)
ENDIF(ANDROID) ENDIF(ANDROID)
IF(APPLE) IF(APPLE)
ADD_PLATFORM_FLAGS("-gdwarf-2") ADD_PLATFORM_FLAGS("-gdwarf-2 -D_DARWIN_UNLIMITED_STREAMS")
ENDIF(APPLE) ENDIF(APPLE)
# Fix "relocation R_X86_64_32 against.." error on x64 platforms # Fix "relocation R_X86_64_32 against.." error on x64 platforms

@ -71,13 +71,13 @@ namespace NLGUI
private: private:
/// Drawing helpers /// Drawing helpers
virtual bool drawResizer(CCtrlBase* pCB, NLMISC::CRGBA col){ return false; } virtual bool drawResizer(CCtrlBase* /* pCB */, NLMISC::CRGBA /* col */) { return false; }
virtual bool drawRotate(CCtrlBase* pCB, NLMISC::CRGBA col){ return false; } virtual bool drawRotate(CCtrlBase* /* pCB */, NLMISC::CRGBA /* col */) { return false; }
virtual bool drawScale(CCtrlBase* pCB, NLMISC::CRGBA col){ return false; } virtual bool drawScale(CCtrlBase* /* pCB */, NLMISC::CRGBA /* col */) { return false; }
virtual bool drawColorPicker(CCtrlBase* pCB, NLMISC::CRGBA col){ return false; } virtual bool drawColorPicker(CCtrlBase* /* pCB */, NLMISC::CRGBA /* col */) { return false; }
virtual bool drawLink(CCtrlBase* pCB, NLMISC::CRGBA col){ return false; } virtual bool drawLink(CCtrlBase* /* pCB */, NLMISC::CRGBA /* col */) { return false; }
virtual bool drawBrowse(CCtrlBase* pCB, NLMISC::CRGBA col){ return false; } virtual bool drawBrowse(CCtrlBase* /* pCB */, NLMISC::CRGBA /* col */) { return false; }
virtual bool drawPan(CCtrlBase* pCB, NLMISC::CRGBA col){ return false; } virtual bool drawPan(CCtrlBase* /* pCB */, NLMISC::CRGBA /* col */) { return false; }
virtual bool drawCustom(CCtrlBase* pCB); virtual bool drawCustom(CCtrlBase* pCB);
protected: protected:

@ -127,6 +127,9 @@ public:
/// Returns the code of the language ("fr", "en", ...) defined on system /// Returns the code of the language ("fr", "en", ...) defined on system
static std::string getSystemLanguageCode (); static std::string getSystemLanguageCode ();
/// Define the code of the language ("fr", "en", ...) defined on system
static bool setSystemLanguageCode (const std::string &languageCode);
/// Find a string in the selected language and return his association. /// Find a string in the selected language and return his association.
static const ucstring &get (const std::string &label); static const ucstring &get (const std::string &label);
@ -230,6 +233,7 @@ private:
static std::vector<std::string> _LanguageCodes; static std::vector<std::string> _LanguageCodes;
static std::vector<ucstring> _LanguageNames; static std::vector<ucstring> _LanguageNames;
static std::string _SystemLanguageCode;
static bool _LanguagesNamesLoaded; static bool _LanguagesNamesLoaded;

@ -236,9 +236,6 @@ private:
// If not NULL, binary mode detected, use this stream in serials // If not NULL, binary mode detected, use this stream in serials
IStream *_BinaryStream; IStream *_BinaryStream;
// System dependant structure for locale
void* _Locale;
}; };

@ -181,9 +181,6 @@ private:
// Error message // Error message
std::string _ErrorString; std::string _ErrorString;
// System dependant structure for locale
void* _Locale;
}; };

@ -39,6 +39,7 @@
// NeL includes // NeL includes
#include <nel/misc/time_nl.h> #include <nel/misc/time_nl.h>
#include <nel/misc/string_common.h> #include <nel/misc/string_common.h>
#include <nel/misc/common.h>
// Project includes // Project includes
@ -102,7 +103,7 @@ public:
{ {
releaseError(); releaseError();
m_ErrorLog = fopen(errorLog.c_str(), "wt"); m_ErrorLog = nlfopen(errorLog, "wt");
fwrite(s_ErrorHeader.c_str(), 1, s_ErrorHeader.length(), m_ErrorLog); fwrite(s_ErrorHeader.c_str(), 1, s_ErrorHeader.length(), m_ErrorLog);
fwrite("\n", 1, 1, m_ErrorLog); fwrite("\n", 1, 1, m_ErrorLog);
fflush(m_ErrorLog); fflush(m_ErrorLog);
@ -113,7 +114,7 @@ public:
{ {
releaseDepend(); releaseDepend();
m_DependLog = fopen(dependLog.c_str(), "wt"); m_DependLog = nlfopen(dependLog, "wt");
fwrite(s_DependHeader.c_str(), 1, s_DependHeader.length(), m_DependLog); fwrite(s_DependHeader.c_str(), 1, s_DependHeader.length(), m_DependLog);
fwrite("\n", 1, 1, m_DependLog); fwrite("\n", 1, 1, m_DependLog);
// fflush(m_DependLog); // fflush(m_DependLog);

@ -23,6 +23,7 @@
#include "nel/misc/types_nl.h" #include "nel/misc/types_nl.h"
#include "nel/misc/file.h" #include "nel/misc/file.h"
#include "nel/misc/common.h"
#include "nel/misc/path.h" #include "nel/misc/path.h"
#include "nel/misc/bitmap.h" #include "nel/misc/bitmap.h"
#include "nel/misc/events.h" #include "nel/misc/events.h"
@ -115,7 +116,7 @@ void LoadSceneScript (const char *ScriptName, CScene* pScene, vector<SDispCS> &D
float posx, posy, posz; float posx, posy, posz;
float roti, rotj, rotk; float roti, rotj, rotk;
FILE *f = fopen (CPath::lookup(ScriptName).c_str(),"rb"); FILE *f = nlfopen (CPath::lookup(ScriptName), "rb");
fseek (f, 0, SEEK_END); fseek (f, 0, SEEK_END);
uint file_size = ftell (f); uint file_size = ftell (f);
fseek (f, 0, SEEK_SET); fseek (f, 0, SEEK_SET);

@ -60,7 +60,7 @@ public:
nlinfo ("init() was called"); nlinfo ("init() was called");
// fp = fopen (NLMISC::CFile::findNewFile("stat.csv").c_str(), "wt"); // fp = nlfopen (NLMISC::CFile::findNewFile("stat.csv"), "wt");
} }
bool update () bool update ()

@ -33,6 +33,7 @@
#endif #endif
#include "nel/misc/common.h"
#include "nel/misc/debug.h" #include "nel/misc/debug.h"
#include "nel/misc/mem_stream.h" #include "nel/misc/mem_stream.h"
#include "nel/misc/path.h" #include "nel/misc/path.h"
@ -276,11 +277,11 @@ void CClient::updatePong (sint64 pingTime, sint64 pongTime, uint32 pongNumber, u
} }
string fn = StatPathName + ConnectionName + "_" + ha + "_" + getDate() + ".pong"; string fn = StatPathName + ConnectionName + "_" + ha + "_" + getDate() + ".pong";
FILE *fp = fopen (fn.c_str(), "rt"); FILE *fp = nlfopen (fn, "rt");
if (fp == NULL) if (fp == NULL)
{ {
// new file, add the header // new file, add the header
FILE *fp = fopen (fn.c_str(), "wt"); FILE *fp = nlfopen (fn, "wt");
if (fp != NULL) if (fp != NULL)
{ {
fprintf (fp, "#%s\t%s\t%s\t%s\n", "PingTime", "PongTime", "Delta", "PingNumber"); fprintf (fp, "#%s\t%s\t%s\t%s\n", "PingTime", "PongTime", "Delta", "PingNumber");
@ -292,7 +293,7 @@ void CClient::updatePong (sint64 pingTime, sint64 pongTime, uint32 pongNumber, u
fclose (fp); fclose (fp);
} }
fp = fopen (fn.c_str(), "at"); fp = nlfopen (fn, "at");
if (fp == NULL) if (fp == NULL)
{ {
nlwarning ("Can't open pong file name '%s'", fn.c_str()); nlwarning ("Can't open pong file name '%s'", fn.c_str());

@ -21,6 +21,7 @@
#include "nel/misc/types_nl.h" #include "nel/misc/types_nl.h"
#include "nel/misc/debug.h" #include "nel/misc/debug.h"
#include "nel/misc/common.h"
#include "nel/misc/mem_stream.h" #include "nel/misc/mem_stream.h"
#include "nel/misc/time_nl.h" #include "nel/misc/time_nl.h"
#include "nel/misc/config_file.h" #include "nel/misc/config_file.h"
@ -112,7 +113,7 @@ void exit (const string &reason)
void createConfigFile() void createConfigFile()
{ {
FILE *fp = fopen ("client.cfg", "wt"); FILE *fp = nlfopen ("client.cfg", "wt");
if (fp == NULL) if (fp == NULL)
{ {
InfoLog->displayRawNL ("Can't create client.cfg"); InfoLog->displayRawNL ("Can't create client.cfg");
@ -159,7 +160,7 @@ void checkConnectionName ()
void loadConfigFile () void loadConfigFile ()
{ {
FILE *fp = fopen ("client.cfg", "rt"); FILE *fp = nlfopen ("client.cfg", "rt");
if (fp == NULL) if (fp == NULL)
{ {
createConfigFile(); createConfigFile();

@ -40,8 +40,6 @@ 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(BEFORE ${DXSDK_INCLUDE_DIR})
TARGET_LINK_LIBRARIES(${NLDRV_OGL_LIB} ${DXSDK_DINPUT_LIBRARY} ${DXSDK_GUID_LIBRARY})
ADD_DEFINITIONS(-DDRIVER_OPENGL_EXPORTS) ADD_DEFINITIONS(-DDRIVER_OPENGL_EXPORTS)
ENDIF() ENDIF()

@ -1203,6 +1203,7 @@ sint CDriverGL::getTotalVideoMemory() const
{ {
H_AUTO_OGL(CDriverGL_getTotalVideoMemory); H_AUTO_OGL(CDriverGL_getTotalVideoMemory);
#ifndef USE_OPENGLES
if (_Extensions.NVXGPUMemoryInfo) if (_Extensions.NVXGPUMemoryInfo)
{ {
GLint memoryInKiB = 0; GLint memoryInKiB = 0;
@ -1306,6 +1307,10 @@ sint CDriverGL::getTotalVideoMemory() const
} }
#endif #endif
#else
// TODO: implement for OpenGL ES
#endif
return -1; return -1;
} }

@ -38,8 +38,6 @@ 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(BEFORE ${DXSDK_INCLUDE_DIR})
TARGET_LINK_LIBRARIES(${NLDRV_OGLES_LIB} ${DXSDK_DINPUT_LIBRARY} ${DXSDK_GUID_LIBRARY})
ADD_DEFINITIONS(/DDRIVER_OPENGLES_EXPORTS) ADD_DEFINITIONS(/DDRIVER_OPENGLES_EXPORTS)
ENDIF() ENDIF()

@ -316,7 +316,8 @@ namespace NLGUI
curl_easy_setopt(curl, CURLOPT_NOPROGRESS, true); curl_easy_setopt(curl, CURLOPT_NOPROGRESS, true);
curl_easy_setopt(curl, CURLOPT_URL, finalUrl.c_str()); curl_easy_setopt(curl, CURLOPT_URL, finalUrl.c_str());
curl_easy_setopt(curl, CURLOPT_FILE, fp); curl_easy_setopt(curl, CURLOPT_WRITEDATA, fp);
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, fwrite);
curl_multi_add_handle(MultiCurl, curl); curl_multi_add_handle(MultiCurl, curl);
Curls.push_back(CDataDownload(curl, finalUrl, dest, fp, ImgType, img, "", "", style)); Curls.push_back(CDataDownload(curl, finalUrl, dest, fp, ImgType, img, "", "", style));
@ -423,7 +424,8 @@ namespace NLGUI
curl_easy_setopt(curl, CURLOPT_NOPROGRESS, true); curl_easy_setopt(curl, CURLOPT_NOPROGRESS, true);
curl_easy_setopt(curl, CURLOPT_URL, url.c_str()); curl_easy_setopt(curl, CURLOPT_URL, url.c_str());
curl_easy_setopt(curl, CURLOPT_FILE, fp); curl_easy_setopt(curl, CURLOPT_WRITEDATA, fp);
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, fwrite);
curl_multi_add_handle(MultiCurl, curl); curl_multi_add_handle(MultiCurl, curl);
Curls.push_back(CDataDownload(curl, url, dest, fp, BnpType, NULL, script, md5sum)); Curls.push_back(CDataDownload(curl, url, dest, fp, BnpType, NULL, script, md5sum));

@ -201,12 +201,6 @@ ELSE(WITH_STATIC OR WIN32)
TARGET_LINK_LIBRARIES(nelmisc ${PNG_LIBRARY}) TARGET_LINK_LIBRARIES(nelmisc ${PNG_LIBRARY})
ENDIF(WITH_STATIC OR WIN32) ENDIF(WITH_STATIC OR WIN32)
# For DirectInput (di_event_emitter)
IF(WIN32)
INCLUDE_DIRECTORIES(BEFORE ${DXSDK_INCLUDE_DIR})
TARGET_LINK_LIBRARIES(nelmisc ${DXSDK_DINPUT_LIBRARY} ${DXSDK_GUID_LIBRARY} winmm dbghelp)
ENDIF(WIN32)
IF(UNIX) IF(UNIX)
TARGET_LINK_LIBRARIES(nelmisc -lc -ldl) TARGET_LINK_LIBRARIES(nelmisc -lc -ldl)
IF(NOT APPLE) IF(NOT APPLE)

@ -19,6 +19,8 @@
#include "nel/misc/dynloadlib.h" #include "nel/misc/dynloadlib.h"
#include "nel/misc/command.h" #include "nel/misc/command.h"
#include <locale.h>
#ifdef DEBUG_NEW #ifdef DEBUG_NEW
#define new DEBUG_NEW #define new DEBUG_NEW
#endif #endif
@ -85,6 +87,9 @@ void INelContext::contextReady()
_NelContext = this; _NelContext = this;
*(_getInstance()) = this; *(_getInstance()) = this;
// set numeric locale to C to avoid the use of decimal separators different of a dot
char *locale = setlocale(LC_NUMERIC, "C");
// register any pending thinks // register any pending thinks
// register local instance counter in the global instance counter manager // register local instance counter in the global instance counter manager

@ -316,6 +316,13 @@ CConfigFile::~CConfigFile ()
void CConfigFile::load (const string &fileName, bool lookupPaths ) void CConfigFile::load (const string &fileName, bool lookupPaths )
{ {
char *locale = setlocale(LC_NUMERIC, NULL);
if (!locale || strcmp(locale, "C"))
{
nlerror("Numeric locale not defined to C, an external library possibly redefined it!");
}
if(fileName.empty()) if(fileName.empty())
{ {
nlwarning ("CF: Can't load a empty file name configfile"); nlwarning ("CF: Can't load a empty file name configfile");
@ -597,8 +604,12 @@ bool CConfigFile::exists (const std::string &varName)
void CConfigFile::save () const void CConfigFile::save () const
{ {
// Avoid any problem, Force Locale to default char *locale = setlocale(LC_NUMERIC, NULL);
setlocale(LC_ALL, "C");
if (!locale || strcmp(locale, "C"))
{
nlerror("Numeric locale not defined to C, an external library possibly redefined it!");
}
FILE *fp = nlfopen (getFilename(), "w"); FILE *fp = nlfopen (getFilename(), "w");
if (fp == NULL) if (fp == NULL)

@ -43,6 +43,7 @@ string CI18N::_SelectedLanguageCode;
CI18N::ILoadProxy *CI18N::_LoadProxy = 0; CI18N::ILoadProxy *CI18N::_LoadProxy = 0;
vector<string> CI18N::_LanguageCodes; vector<string> CI18N::_LanguageCodes;
vector<ucstring> CI18N::_LanguageNames; vector<ucstring> CI18N::_LanguageNames;
std::string CI18N::_SystemLanguageCode;
bool CI18N::noResolution = false; bool CI18N::noResolution = false;
void CI18N::setLoadProxy(ILoadProxy *loadProxy) void CI18N::setLoadProxy(ILoadProxy *loadProxy)
@ -248,10 +249,8 @@ bool CI18N::isLanguageCodeSupported(const std::string &lang)
std::string CI18N::getSystemLanguageCode () std::string CI18N::getSystemLanguageCode ()
{ {
static std::string s_cachedSystemLanguage; if (!_SystemLanguageCode.empty())
return _SystemLanguageCode;
if (!s_cachedSystemLanguage.empty())
return s_cachedSystemLanguage;
#ifdef NL_OS_MAC #ifdef NL_OS_MAC
// under OS X, locale is only defined in console, not in UI // under OS X, locale is only defined in console, not in UI
@ -293,7 +292,7 @@ std::string CI18N::getSystemLanguageCode ()
} }
else else
{ {
nlerror("Unable to convert CFStringRef to string"); nlwarning("Unable to convert CFStringRef to string");
} }
delete [] tmp; delete [] tmp;
@ -306,34 +305,138 @@ std::string CI18N::getSystemLanguageCode ()
CFRelease(langCF); CFRelease(langCF);
} }
if (!lang.empty())
{
// fix language code if country is specified
std::string::size_type pos = lang.find('-');
if (pos != std::string::npos)
lang = lang.substr(0, pos);
// only keep language code if supported by NeL // only keep language code if supported by NeL
if (!lang.empty() && isLanguageCodeSupported(lang)) if (isLanguageCodeSupported(lang))
{ {
s_cachedSystemLanguage = lang; _SystemLanguageCode = lang;
break; break;
} }
} }
}
// don't need languages array anymore // don't need languages array anymore
CFRelease(langs); CFRelease(langs);
} }
#endif #endif
// use system locale (works under Linux and Windows) #ifdef NL_OS_WINDOWS
if (s_cachedSystemLanguage.empty()) // use user locale under Windows (since Vista)
if (_SystemLanguageCode.empty())
{
// GetUserDefaultLocaleName prototype
typedef int (WINAPI* GetUserDefaultLocaleNamePtr)(LPWSTR lpLocaleName, int cchLocaleName);
// get pointer on GetUserDefaultLocaleName, kernel32.dll is always in memory so no need to call LoadLibrary
GetUserDefaultLocaleNamePtr nlGetUserDefaultLocaleName = (GetUserDefaultLocaleNamePtr)GetProcAddress(GetModuleHandleA("kernel32.dll"), "GetUserDefaultLocaleName");
// only use it if found
if (nlGetUserDefaultLocaleName)
{ {
std::string lang = NLMISC::toLower(std::string(setlocale(LC_CTYPE, ""))); // get user locale
wchar_t buffer[LOCALE_NAME_MAX_LENGTH];
sint res = nlGetUserDefaultLocaleName(buffer, LOCALE_NAME_MAX_LENGTH);
// convert wide string to std::string
std::string lang = wideToUtf8(buffer);
// only keep 2 first characters // only keep 2 first characters
if (lang.size() > 1) if (lang.size() > 1)
s_cachedSystemLanguage = lang.substr(0, 2); _SystemLanguageCode = lang.substr(0, 2);
}
}
#endif
// use system locale (works under OS X, Linux and Windows)
if (_SystemLanguageCode.empty())
{
// get default locale
char *locale = setlocale(LC_CTYPE, "");
if (locale)
{
std::string lang(locale);
#ifdef NL_OS_WINDOWS
// be sure supported languages are initialized
initLanguages();
// locales names are different under Windows, for example: French_France.1252
for(uint i = 0; i < _LanguageNames.size(); ++i)
{
std::string name = _LanguageNames[i].toUtf8();
// so we compare the language name with the supported ones
if (lang.compare(0, name.length(), name) == 0)
{
// found, so use its code
_SystemLanguageCode = _LanguageCodes[i];
break;
}
}
#else
// only keep 2 first characters
if (lang.size() > 1)
_SystemLanguageCode = NLMISC::toLower(lang).substr(0, 2);
#endif
}
} }
// english is default language // english is default language
if (s_cachedSystemLanguage.empty()) if (_SystemLanguageCode.empty())
s_cachedSystemLanguage = "en"; _SystemLanguageCode = "en";
return _SystemLanguageCode;
}
bool CI18N::setSystemLanguageCode (const std::string &languageCode)
{
// be sure supported languages are initialized
initLanguages();
return s_cachedSystemLanguage; std::string lang = NLMISC::toLower(languageCode);
// specified language is really a code (2 characters)
if (lang.length() == 2)
{
// check if language code is supported
for(uint i = 0; i < _LanguageCodes.size(); ++i)
{
std::string code = NLMISC::toLower(_LanguageCodes[i]);
if (lang == code)
{
// found, so use it
_SystemLanguageCode = lang;
return true;
}
}
}
// specified language is something else
else
{
// check if language name is supported
for(uint i = 0; i < _LanguageNames.size(); ++i)
{
std::string name = NLMISC::toLower(_LanguageNames[i].toUtf8());
if (name == lang)
{
// found, so use its code
_SystemLanguageCode = _LanguageCodes[i];
return true;
}
}
}
return false;
} }
void CI18N::removeCComment(ucstring &commentedString) void CI18N::removeCComment(ucstring &commentedString)

@ -24,11 +24,6 @@
// Include from libxml2 // Include from libxml2
#include <libxml/xmlerror.h> #include <libxml/xmlerror.h>
#if defined(NL_OS_WINDOWS) && defined(NL_COMP_VC_VERSION) && NL_COMP_VC_VERSION >= 80
#define USE_LOCALE_ATOF
#include <locale.h>
#endif
using namespace std; using namespace std;
#define NLMISC_READ_BUFFER_SIZE 1024 #define NLMISC_READ_BUFFER_SIZE 1024
@ -46,26 +41,10 @@ const char SEPARATOR = ' ';
// *************************************************************************** // ***************************************************************************
#define readnumber(dest,thetype,digits,convfunc) \ #define readnumber(dest,digits) \
string number_as_string; \ string number_as_string; \
serialSeparatedBufferIn( number_as_string ); \ serialSeparatedBufferIn( number_as_string ); \
dest = (thetype)convfunc( number_as_string.c_str() ); NLMISC::fromString(number_as_string, dest);
#ifdef USE_LOCALE_ATOF
#define readnumberlocale(dest,thetype,digits,convfunc) \
string number_as_string; \
serialSeparatedBufferIn( number_as_string ); \
dest = (thetype)convfunc( number_as_string.c_str(), (_locale_t)_Locale );
#define nl_atof _atof_l
#else
#define readnumberlocale(dest,thetype,digits,convfunc) readnumber(dest,thetype,digits,convfunc)
#define nl_atof atof
#endif
// *************************************************************************** // ***************************************************************************
@ -91,13 +70,6 @@ CIXml::CIXml () : IStream (true /* Input mode */)
_ErrorString = ""; _ErrorString = "";
_TryBinaryMode = false; _TryBinaryMode = false;
_BinaryStream = NULL; _BinaryStream = NULL;
#ifdef USE_LOCALE_ATOF
// create C numeric locale
_Locale = _create_locale(LC_NUMERIC, "C");
#else
_Locale = NULL;
#endif
} }
// *************************************************************************** // ***************************************************************************
@ -113,13 +85,6 @@ CIXml::CIXml (bool tryBinaryMode) : IStream (true /* Input mode */)
_ErrorString = ""; _ErrorString = "";
_TryBinaryMode = tryBinaryMode; _TryBinaryMode = tryBinaryMode;
_BinaryStream = NULL; _BinaryStream = NULL;
#ifdef USE_LOCALE_ATOF
// create C numeric locale
_Locale = _create_locale(LC_NUMERIC, "C");
#else
_Locale = NULL;
#endif
} }
// *************************************************************************** // ***************************************************************************
@ -128,10 +93,6 @@ CIXml::~CIXml ()
{ {
// Release // Release
release (); release ();
#ifdef USE_LOCALE_ATOF
if (_Locale) _free_locale((_locale_t)_Locale);
#endif
} }
// *************************************************************************** // ***************************************************************************
@ -468,7 +429,7 @@ void CIXml::serial(uint8 &b)
else else
{ {
// Read the number // Read the number
readnumber( b, uint8, 3, atoi ); readnumber( b, 3 );
} }
} }
@ -482,7 +443,7 @@ void CIXml::serial(sint8 &b)
} }
else else
{ {
readnumber( b, sint8, 4, atoi ); readnumber( b, 4 );
} }
} }
@ -496,7 +457,7 @@ void CIXml::serial(uint16 &b)
} }
else else
{ {
readnumber( b, uint16, 5, atoi ); readnumber( b, 5 );
} }
} }
@ -510,7 +471,7 @@ void CIXml::serial(sint16 &b)
} }
else else
{ {
readnumber( b, sint16, 6, atoi ); readnumber( b, 6 );
} }
} }
@ -529,7 +490,7 @@ void CIXml::serial(uint32 &b)
} }
else else
{ {
readnumber( b, uint32, 10, atoui ); readnumber( b, 10 );
} }
} }
@ -543,7 +504,7 @@ void CIXml::serial(sint32 &b)
} }
else else
{ {
readnumber( b, sint32, 11, atoi ); readnumber( b, 11 );
} }
} }
@ -557,7 +518,7 @@ void CIXml::serial(uint64 &b)
} }
else else
{ {
readnumber( b, uint64, 20, atoiInt64 ); readnumber( b, 20 );
} }
} }
@ -571,7 +532,7 @@ void CIXml::serial(sint64 &b)
} }
else else
{ {
readnumber( b, sint64, 20, atoiInt64 ); readnumber( b, 20 );
} }
} }
@ -585,7 +546,7 @@ void CIXml::serial(float &b)
} }
else else
{ {
readnumberlocale( b, float, 128, nl_atof ); readnumber( b, 128 );
} }
} }
@ -599,7 +560,7 @@ void CIXml::serial(double &b)
} }
else else
{ {
readnumberlocale( b, double, 128, nl_atof ); readnumber( b, 128 );
} }
} }

@ -43,22 +43,11 @@ const char SEPARATOR = ' ';
// *************************************************************************** // ***************************************************************************
#ifdef USE_LOCALE_SPRINTF
#define writenumber(src,format,digits) \
char number_as_cstring [digits+1]; \
_sprintf_l( number_as_cstring, format, (_locale_t)_Locale, src ); \
serialSeparatedBufferOut( number_as_cstring );
#else
#define writenumber(src,format,digits) \ #define writenumber(src,format,digits) \
char number_as_cstring [digits+1]; \ char number_as_cstring [digits+1]; \
sprintf( number_as_cstring, format, src ); \ sprintf( number_as_cstring, format, src ); \
serialSeparatedBufferOut( number_as_cstring ); serialSeparatedBufferOut( number_as_cstring );
#endif
// *************************************************************************** // ***************************************************************************
// XML callbacks // XML callbacks
// *************************************************************************** // ***************************************************************************
@ -149,13 +138,6 @@ COXml::COXml () : IStream (false /* Output mode */)
// Push begin // Push begin
_PushBegin = false; _PushBegin = false;
#ifdef USE_LOCALE_SPRINTF
// create C numeric locale
_Locale = _create_locale(LC_NUMERIC, "C");
#else
_Locale = NULL;
#endif
} }
// *************************************************************************** // ***************************************************************************
@ -215,10 +197,6 @@ COXml::~COXml ()
{ {
// Flush document to the internal stream // Flush document to the internal stream
flush (); flush ();
#ifdef USE_LOCALE_SPRINTF
if (_Locale) _free_locale((_locale_t)_Locale);
#endif
} }
// *************************************************************************** // ***************************************************************************

@ -1963,14 +1963,15 @@ bool CFile::createEmptyFile (const std::string& filename)
bool CFile::fileExists (const string& filename) bool CFile::fileExists (const string& filename)
{ {
//H_AUTO(FileExists); //H_AUTO(FileExists);
#ifdef NL_OS_WINDOWS FILE *file = nlfopen(filename, "rb");
DWORD attr = GetFileAttributesW(utf8ToWide(filename));
// attributes are valid and file is not a directory if (file)
if (attr == INVALID_FILE_ATTRIBUTES || (attr & FILE_ATTRIBUTE_DIRECTORY)) return false; {
fclose(file);
return true; return true;
#else }
return access(filename.c_str(), R_OK) != -1;
#endif return false;
} }

@ -195,13 +195,17 @@ uint32 CAudioDecoderVorbis::getNextBytes(uint8 *buffer, uint32 minimum, uint32 m
uint8 CAudioDecoderVorbis::getChannels() uint8 CAudioDecoderVorbis::getChannels()
{ {
vorbis_info *vi = ov_info(&_OggVorbisFile, -1); vorbis_info *vi = ov_info(&_OggVorbisFile, -1);
return (uint8)vi->channels; if (vi) return (uint8)vi->channels;
nlwarning("ov_info returned NULL");
return 0;
} }
uint CAudioDecoderVorbis::getSamplesPerSec() uint CAudioDecoderVorbis::getSamplesPerSec()
{ {
vorbis_info *vi = ov_info(&_OggVorbisFile, -1); vorbis_info *vi = ov_info(&_OggVorbisFile, -1);
return (uint)vi->rate; if (vi) return (uint)vi->rate;
nlwarning("ov_info returned NULL");
return 0;
} }
uint8 CAudioDecoderVorbis::getBitsPerSample() uint8 CAudioDecoderVorbis::getBitsPerSample()

@ -17,6 +17,7 @@
#include "nel/misc/file.h" #include "nel/misc/file.h"
#include "nel/misc/path.h" #include "nel/misc/path.h"
#include "nel/misc/common.h"
#include "nel/3d/scene_group.h" #include "nel/3d/scene_group.h"
#include "nel/3d/zone.h" #include "nel/3d/zone.h"
#include "nel/3d/skeleton_shape.h" #include "nel/3d/skeleton_shape.h"
@ -660,9 +661,7 @@ int main(int argc, const char *argv[])
options.insert (argv[i]); options.insert (argv[i]);
// Open log // Open log
FILE *logStream; FILE *logStream = nlfopen(getLogDirectory() + "file_info.log", "wt");
logStream= fopen(std::string(getLogDirectory() + "file_info.log").c_str(), "wt");
// parse dir or file ?? // parse dir or file ??
const char *fileName= argv[1]; const char *fileName= argv[1];

@ -998,7 +998,8 @@ int main(int nNbArg, char **ppArgs)
ChDir (sExeDir); ChDir (sExeDir);
// out a text file, with list of // out a text file, with list of
FILE *out= fopen(ppArgs[4], "wt"); FILE *out = nlfopen(ppArgs[4], "wt");
if(!out) if(!out)
{ {
outString(string("ERROR: cannot save ")+ppArgs[4]); outString(string("ERROR: cannot save ")+ppArgs[4]);

@ -8,6 +8,7 @@
#include "nel/misc/time_nl.h" #include "nel/misc/time_nl.h"
#include "nel/misc/file.h" #include "nel/misc/file.h"
#include "nel/misc/common.h"
#include "nel/misc/triangle.h" #include "nel/misc/triangle.h"
#include "nel/misc/bsphere.h" #include "nel/misc/bsphere.h"
#include "3d/quad_tree.h" #include "3d/quad_tree.h"
@ -3121,8 +3122,8 @@ void CNelExport::deleteLM(INode& ZeNode)
sprintf( tmp, "%d", i ); sprintf( tmp, "%d", i );
sSaveName += tmp; sSaveName += tmp;
sSaveName += ".tga"; sSaveName += ".tga";
FILE *file; FILE *file = nlfopen(sSaveName, "rb")
if( file = fopen(sSaveName.c_str(),"rb") ) if (file)
{ {
fclose( file ); fclose( file );
DeleteFile( sSaveName.c_str() ); DeleteFile( sSaveName.c_str() );
@ -3521,8 +3522,8 @@ bool CNelExport::exportScene(std::vector<INode*>& vectNode)
sprintf( tmp, "%d", i ); sprintf( tmp, "%d", i );
sSaveName += tmp; sSaveName += tmp;
sSaveName += ".tga"; sSaveName += ".tga";
FILE *file; FILE *file = nlfopen(sSaveName, "rb");
if( file = fopen(sSaveName.c_str(),"rb") ) if (file)
{ {
fclose( file ); fclose( file );
DeleteFile( sSaveName.c_str() ); DeleteFile( sSaveName.c_str() );

@ -15,6 +15,7 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>. // along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <nel/misc/path.h> #include <nel/misc/path.h>
#include <nel/misc/common.h>
#include <nel/misc/file.h> #include <nel/misc/file.h>
#include <nel/misc/config_file.h> #include <nel/misc/config_file.h>
#include <nel/3d/u_light.h> #include <nel/3d/u_light.h>
@ -851,7 +852,7 @@ bool ShapesExporter::renderPS(UInstance &entity, const string &output_path, doub
{ {
if(step > 0) if(step > 0)
{ {
FILE *fp = fopen(string(CPath::standardizePath(output_path)+"nb_steps.txt").c_str(), "w"); FILE *fp = nlfopen(CPath::standardizePath(output_path)+"nb_steps.txt", "w");
if(fp) { fprintf(fp, "%d", step); fclose(fp); } if(fp) { fprintf(fp, "%d", step); fclose(fp); }
} }
nlinfo("PS duration %f after %f with nothing with %d steps, dt %f", duration, startTime, step, deltaTime); nlinfo("PS duration %f after %f with nothing with %d steps, dt %f", duration, startTime, step, deltaTime);
@ -873,7 +874,7 @@ bool ShapesExporter::createThumbnail(const string &filename, const string &path)
uint selectedFrame = 0; uint selectedFrame = 0;
if(CFile::getExtension(filename) == "ps") if(CFile::getExtension(filename) == "ps")
{ {
FILE *fp = fopen(string(CPath::standardizePath(output_path)+"nb_steps.txt").c_str(), "r"); FILE *fp = nlfopen(CPath::standardizePath(output_path)+"nb_steps.txt", "r");
if(fp) if(fp)
{ {
char str[100]; char str[100];

@ -18,6 +18,7 @@
#include <iostream> #include <iostream>
#include "nel/misc/file.h" #include "nel/misc/file.h"
#include "nel/misc/common.h"
#include "nel/misc/bitmap.h" #include "nel/misc/bitmap.h"
#include "nel/misc/path.h" #include "nel/misc/path.h"
#include "nel/misc/debug.h" #include "nel/misc/debug.h"
@ -49,7 +50,7 @@ std::string getOutputFileName(const std::string &inputFileName);
uint8 getType(const std::string &sFileNameDest) uint8 getType(const std::string &sFileNameDest)
{ {
uint32 dds; uint32 dds;
FILE *f = fopen(sFileNameDest.c_str(),"rb"); FILE *f = nlfopen(sFileNameDest, "rb");
if(f==NULL) if(f==NULL)
{ {
return NOT_DEFINED; return NOT_DEFINED;
@ -105,7 +106,7 @@ uint8 getType(const std::string &sFileNameDest)
bool sameType(const std::string &sFileNameDest, uint8 &algo, bool wantMipMap) bool sameType(const std::string &sFileNameDest, uint8 &algo, bool wantMipMap)
{ {
uint32 dds; uint32 dds;
FILE *f = fopen(sFileNameDest.c_str(),"rb"); FILE *f = nlfopen(sFileNameDest, "rb");
if(f==NULL) if(f==NULL)
{ {
return false; return false;

@ -20,6 +20,7 @@
#include <iostream> #include <iostream>
#include "nel/misc/types_nl.h" #include "nel/misc/types_nl.h"
#include "nel/misc/file.h" #include "nel/misc/file.h"
#include "nel/misc/common.h"
#include "nel/3d/quad_tree.h" #include "nel/3d/quad_tree.h"
#include "nel/3d/zone.h" #include "nel/3d/zone.h"
#include "nel/3d/landscape.h" #include "nel/3d/landscape.h"
@ -978,7 +979,7 @@ int main(sint argc, char **argv)
} }
#if WELD_LOG #if WELD_LOG
fdbg = fopen("log.txt","wt"); fdbg = nlfopen("log.txt","wt");
fprintf(fdbg,"Center zone : %s\n",argv[1]); fprintf(fdbg,"Center zone : %s\n",argv[1]);
#endif #endif

@ -20,6 +20,7 @@
#include <nel/misc/types_nl.h> #include <nel/misc/types_nl.h>
#include <nel/misc/config_file.h> #include <nel/misc/config_file.h>
#include <nel/misc/debug.h> #include <nel/misc/debug.h>
#include <nel/misc/common.h>
#include <nel/misc/path.h> #include <nel/misc/path.h>
#include <nel/misc/i18n.h> #include <nel/misc/i18n.h>
@ -743,7 +744,7 @@ void displayZones()
\****************************************************************/ \****************************************************************/
void writeConfigFile(const char * configFileName) void writeConfigFile(const char * configFileName)
{ {
FILE * f = fopen(configFileName,"wt"); FILE * f = nlfopen(configFileName, "wt");
if(f==NULL) if(f==NULL)
{ {
@ -801,7 +802,7 @@ void writeConfigFile(const char * configFileName)
\****************************************************************/ \****************************************************************/
void initViewerConfig(const char * configFileName) void initViewerConfig(const char * configFileName)
{ {
FILE * f = fopen(configFileName,"rt"); FILE *f = nlfopen(configFileName, "rt");
if(f==NULL) if(f==NULL)
{ {
nlwarning("'%s' not found, default values used", configFileName); nlwarning("'%s' not found, default values used", configFileName);

@ -32,6 +32,7 @@
#include "nel/misc/file.h" #include "nel/misc/file.h"
#include "nel/misc/smart_ptr.h" #include "nel/misc/smart_ptr.h"
#include "nel/misc/command.h" #include "nel/misc/command.h"
#include "nel/misc/common.h"
#include "nel/misc/path.h" #include "nel/misc/path.h"
//#include "nel/memory/memory_manager.h" //#include "nel/memory/memory_manager.h"
#include "nel/misc/i18n.h" #include "nel/misc/i18n.h"
@ -685,12 +686,13 @@ void convertCsvFile( const string &file, bool generate, const string& sheetType
{ {
const uint BUFFER_SIZE = 16*1024; const uint BUFFER_SIZE = 16*1024;
char lineBuffer[BUFFER_SIZE]; char lineBuffer[BUFFER_SIZE];
FILE *s;
vector<string> fields; vector<string> fields;
vector<string> args; vector<string> args;
if ((s = fopen(file.c_str(), "r")) == NULL) FILE *s = nlfopen(file, "r");
if (s == NULL)
{ {
fprintf(stderr, "Can't find file %s to convert\n", file.c_str()); fprintf(stderr, "Can't find file %s to convert\n", file.c_str());
return; return;

@ -20,6 +20,7 @@
#include "progress_dialog.h" #include "progress_dialog.h"
#include <sys/timeb.h> #include <sys/timeb.h>
#include "nel/misc/file.h" #include "nel/misc/file.h"
#include "nel/misc/common.h"
using namespace std; using namespace std;
using namespace NLMISC; using namespace NLMISC;
@ -468,11 +469,15 @@ void CData_mirrorDlg::OnOK()
if (!LogDirectory.empty()) if (!LogDirectory.empty())
{ {
string sTmp = LogDirectory + "data_mirror.txt"; string sTmp = LogDirectory + "data_mirror.txt";
FILE *f = fopen(sTmp.c_str(),"at"); FILE *f = nlfopen(sTmp ,"at");
if (f)
{
fprintf(f,"Modified file : %s\n", dest.c_str()); fprintf(f,"Modified file : %s\n", dest.c_str());
fclose(f); fclose(f);
} }
} }
}
// Touch // Touch
setFileTime (dest.c_str(), fileTime); setFileTime (dest.c_str(), fileTime);
@ -503,11 +508,14 @@ void CData_mirrorDlg::OnOK()
if (!LogDirectory.empty()) if (!LogDirectory.empty())
{ {
string sTmp = LogDirectory + "data_mirror.txt"; string sTmp = LogDirectory + "data_mirror.txt";
FILE *f = fopen(sTmp.c_str(),"at"); FILE *f = nlfopen(sTmp, "at");
if (f)
{
fprintf(f,"Added file : %s\n", dest.c_str()); fprintf(f,"Added file : %s\n", dest.c_str());
fclose(f); fclose(f);
} }
} }
}
// Touch // Touch
setFileTime (dest.c_str(), fileTime); setFileTime (dest.c_str(), fileTime);
@ -535,12 +543,16 @@ void CData_mirrorDlg::OnOK()
if (!LogDirectory.empty()) if (!LogDirectory.empty())
{ {
string sTmp = LogDirectory + "data_mirror.txt"; string sTmp = LogDirectory + "data_mirror.txt";
FILE *f = fopen(sTmp.c_str(),"at"); FILE *f = nlfopen(sTmp, "at");
if (f)
{
fprintf(f,"Removed file : %s\n", dest.c_str()); fprintf(f,"Removed file : %s\n", dest.c_str());
fclose(f); fclose(f);
} }
} }
} }
}
FILE *file = fopen ((IgnoreDirectory+"ignore_list.txt").c_str (), "w"); FILE *file = fopen ((IgnoreDirectory+"ignore_list.txt").c_str (), "w");
if (file) if (file)

@ -40,6 +40,7 @@ int _getch()
#include "nel/misc/path.h" #include "nel/misc/path.h"
#include "nel/misc/sheet_id.h" #include "nel/misc/sheet_id.h"
#include "nel/misc/common.h"
#include <vector> #include <vector>
@ -86,7 +87,7 @@ int main(int argc, const char *argv[])
sort(sheets.begin(), sheets.end(), Pred); sort(sheets.begin(), sheets.end(), Pred);
// display. // display.
FILE *out= fopen("sheetid.txt", "wb"); FILE *out= nlfopen("sheetid.txt", "wb");
if(out) if(out)
{ {
for(uint i=0;i<sheets.size();i++) for(uint i=0;i<sheets.size();i++)

@ -18,6 +18,7 @@
// misc // misc
#include <nel/misc/types_nl.h> #include <nel/misc/types_nl.h>
#include <nel/misc/file.h> #include <nel/misc/file.h>
#include <nel/misc/common.h>
#include <nel/misc/path.h> #include <nel/misc/path.h>
#include <nel/misc/config_file.h> #include <nel/misc/config_file.h>
@ -567,9 +568,9 @@ int main( int argc, char ** argv )
// dump the list of extensions in a txt file // dump the list of extensions in a txt file
if( dumpExtensions ) if( dumpExtensions )
{ {
FILE * extListOutput;
string extListFileName = outputPath + "sheet_ext.txt"; string extListFileName = outputPath + "sheet_ext.txt";
if( !(extListOutput = fopen(extListFileName.c_str(),"w")) ) FILE *extListOutput = nlfopen(extListFileName, "w");
if (!extListOutput)
{ {
nlwarning("Can't open output file %s",extListFileName.c_str()); nlwarning("Can't open output file %s",extListFileName.c_str());
return 1; return 1;

@ -17,6 +17,7 @@
#include "nel/misc/types_nl.h" #include "nel/misc/types_nl.h"
#include "nel/misc/app_context.h" #include "nel/misc/app_context.h"
#include "nel/misc/path.h" #include "nel/misc/path.h"
#include "nel/misc/common.h"
#include "nel/misc/sstring.h" #include "nel/misc/sstring.h"
#include "nel/misc/algo.h" #include "nel/misc/algo.h"
@ -228,7 +229,7 @@ int main(int argc, char *argv[])
// read the index file // read the index file
set<string> fileInIndex; set<string> fileInIndex;
char lineBuffer[1024]; char lineBuffer[1024];
FILE *fp = fopen(indexFileName.c_str(), "rt"); FILE *fp = nlfopen(indexFileName, "rt");
while (fgets(lineBuffer, 1024, fp)) while (fgets(lineBuffer, 1024, fp))
fileInIndex.insert(CSString(lineBuffer).strip()); fileInIndex.insert(CSString(lineBuffer).strip());
@ -263,8 +264,8 @@ int main(int argc, char *argv[])
if (!validFiles.empty() && needRepack) if (!validFiles.empty() && needRepack)
{ {
// open the pack file // open the pack file
// FILE *fp = fopen(filename.c_str(), "wt"); // FILE *fp = nlfopen(filename, "wt");
FILE *fp = fopen(packFileName.c_str(), "wt"); FILE *fp = nlfopen(packFileName, "wt");
fprintf(fp, "<nel:packed_xml>\n"); fprintf(fp, "<nel:packed_xml>\n");
@ -275,7 +276,7 @@ int main(int argc, char *argv[])
printf("Adding file '%s'...\n", CFile::getFilename(subFileName).c_str()); printf("Adding file '%s'...\n", CFile::getFilename(subFileName).c_str());
fprintf(fp, " <nel:xml_file name=\"%s\">\n", CFile::getFilename(subFileName).c_str()); fprintf(fp, " <nel:xml_file name=\"%s\">\n", CFile::getFilename(subFileName).c_str());
FILE *subFp = fopen(subFileName.c_str(), "rt"); FILE *subFp = nlfopen(subFileName, "rt");
nlassert(subFp != NULL); nlassert(subFp != NULL);
char buffer[MaxLineSize]; char buffer[MaxLineSize];
char *result; char *result;
@ -304,7 +305,7 @@ int main(int argc, char *argv[])
fclose(fp); fclose(fp);
// write the disposable index file used by pack to check for erased file // write the disposable index file used by pack to check for erased file
fp = fopen(indexFileName.c_str(), "wt"); fp = nlfopen(indexFileName, "wt");
for (uint i=0; i<validFiles.size(); ++i) for (uint i=0; i<validFiles.size(); ++i)
{ {
fprintf(fp, "%s\n", CFile::getFilename(validFiles[i]).c_str()); fprintf(fp, "%s\n", CFile::getFilename(validFiles[i]).c_str());
@ -327,8 +328,8 @@ int main(int argc, char *argv[])
{ {
printf("Unpacking directory '%s'...\n", dirName.c_str()); printf("Unpacking directory '%s'...\n", dirName.c_str());
// open the pack file // open the pack file
// FILE *fp = fopen((dirName+"/tmp."+DefaultExt).c_str(), "rt"); // FILE *fp = nlfopen(dirName+"/tmp."+DefaultExt, "rt");
FILE *fp = fopen(filename.c_str(), "rt"); FILE *fp = nlfopen(filename, "rt");
if (!recursive) if (!recursive)
{ {
// if we are not recursive, we MUST have a file here // if we are not recursive, we MUST have a file here

@ -333,7 +333,7 @@ std::string getServiceStateFileName(const std::string& serviceAlias,const std::s
std::string getOfflineServiceState(const std::string& serviceAlias,const std::string& serviceExecutionPath) std::string getOfflineServiceState(const std::string& serviceAlias,const std::string& serviceExecutionPath)
{ {
// open the file for reading // open the file for reading
FILE* f= fopen(getServiceStateFileName(serviceAlias,serviceExecutionPath).c_str(),"rt"); FILE* f = nlfopen(getServiceStateFileName(serviceAlias,serviceExecutionPath), "rt");
if (f==NULL) return "Offline"; if (f==NULL) return "Offline";
// setup a buffer to hold the text read from the file // setup a buffer to hold the text read from the file
@ -366,7 +366,7 @@ bool writeServiceLaunchCtrl(const std::string& serviceAlias,const std::string& s
NLMISC::CFile::createDirectoryTree(serviceExecutionPath); NLMISC::CFile::createDirectoryTree(serviceExecutionPath);
// open the file for writing // open the file for writing
FILE* f= fopen(getServiceLaunchCtrlFileName(serviceAlias,serviceExecutionPath,delay).c_str(),"wt"); FILE* f= nlfopen(getServiceLaunchCtrlFileName(serviceAlias,serviceExecutionPath,delay), "wt");
if (f==NULL) return false; if (f==NULL) return false;
// write the text to the file // write the text to the file
@ -1636,7 +1636,7 @@ NLMISC_COMMAND(aesSystem, "Execute a system() call", "<command>")
char str[1024]; char str[1024];
FILE *fp = fopen(fn.c_str(), "rt"); FILE *fp = nlfopen(fn, "rt");
if (fp != NULL) if (fp != NULL)
{ {
while (true) while (true)
@ -1654,7 +1654,7 @@ NLMISC_COMMAND(aesSystem, "Execute a system() call", "<command>")
log.displayNL("No stdout"); log.displayNL("No stdout");
} }
fp = fopen(fne.c_str(), "rt"); fp = nlfopen(fne, "rt");
if (fp != NULL) if (fp != NULL)
{ {
while (true) while (true)

@ -27,6 +27,7 @@
#endif #endif
#include "nel/misc/debug.h" #include "nel/misc/debug.h"
#include "nel/misc/common.h"
#include "nel/misc/path.h" #include "nel/misc/path.h"
#include "nel/misc/thread.h" #include "nel/misc/thread.h"
@ -586,7 +587,7 @@ private:
string dest = filename.substr(0, filename.size ()-4); string dest = filename.substr(0, filename.size ()-4);
setRWAccess(dest); setRWAccess(dest);
if(VerboseLog) nlinfo("Calling fopen('%s','wb')", dest.c_str()); if(VerboseLog) nlinfo("Calling fopen('%s','wb')", dest.c_str());
FILE *fp = fopen (dest.c_str(), "wb"); FILE *fp = nlfopen (dest, "wb");
if (fp == NULL) if (fp == NULL)
{ {
string err = toString("Can't open file '%s' : code=%d %s, (error code 32)", dest.c_str(), errno, strerror(errno)); string err = toString("Can't open file '%s' : code=%d %s, (error code 32)", dest.c_str(), errno, strerror(errno));

@ -32,7 +32,7 @@ end
------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------
function bgdownloader:setIcon(icon) function bgdownloader:setIcon(icon)
local bm = self:getProgressGroup():find("bm"); local bm = self:getProgressGroup():find("bm")
if icon == "" then if icon == "" then
bm.active = false bm.active = false
else else

@ -4,7 +4,7 @@
------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------
-- create the game namespace without reseting if already created in an other file. -- create the game namespace without reseting if already created in an other file.
if (game==nil) then if (game==nil) then
game= {}; game = {}
end end
@ -12,14 +12,14 @@ end
-- called to construct guild flags background in the modal window -- called to construct guild flags background in the modal window
function game:bcCreateGuildInitFlags() function game:bcCreateGuildInitFlags()
local ui = getUICaller(); local ui = getUICaller()
for i = 0,14 do for i = 0,14 do
local uiBack = getUI(getUIId(ui) .. ':back' .. i); local uiBack = getUI(getUIId(ui) .. ':back' .. i)
uiBack.image1.back = i+1; uiBack.image1.back = i+1
uiBack.image1.symbol = 0; uiBack.image1.symbol = 0
uiBack.image1.color1 = runExpr('makeRGB(255,255,255)'); uiBack.image1.color1 = runExpr('makeRGB(255,255,255)')
uiBack.image1.color2 = runExpr('makeRGB(0,0,0)'); uiBack.image1.color2 = runExpr('makeRGB(0,0,0)')
end end
end end
@ -28,37 +28,37 @@ end
-- trap some parts should be deprecated ... try to clean it up -- trap some parts should be deprecated ... try to clean it up
function game:bcMissionsUpdate() function game:bcMissionsUpdate()
local mt = getDbProp('UI:TEMP:MISSION:MISSION_TYPE'); local mt = getDbProp('UI:TEMP:MISSION:MISSION_TYPE')
-- init bot_chat_missions title -- init bot_chat_missions title
local title = 'uiBotChatMissions'; local title = 'uiBotChatMissions'
if (mt == 3) then title = 'uiBotChatZCCharges'; if (mt == 3) then title = 'uiBotChatZCCharges'
elseif (mt == 4) then title = 'uiBotChatBuilding'; elseif (mt == 4) then title = 'uiBotChatBuilding'
elseif (mt == 5) then title = 'uiBotChatRMBuy'; elseif (mt == 5) then title = 'uiBotChatRMBuy'
elseif (mt == 6) then title = 'uiBotChatRMUpgrade'; elseif (mt == 6) then title = 'uiBotChatRMUpgrade'
end end
local ui = getUI('ui:interface:bot_chat_missions'); local ui = getUI('ui:interface:bot_chat_missions')
ui.title = title; ui.title = title
-- init desc -- init desc
title = 'uiSelectMission'; title = 'uiSelectMission'
if (mt == 3) then title = 'uiSelectZCCharge'; if (mt == 3) then title = 'uiSelectZCCharge'
elseif (mt == 4) then title = 'uiSelectBuilding'; elseif (mt == 4) then title = 'uiSelectBuilding'
elseif (mt == 5) then title = 'uiSelectRMBuy'; elseif (mt == 5) then title = 'uiSelectRMBuy'
elseif (mt == 6) then title = 'uiSelectRMUpgrade'; elseif (mt == 6) then title = 'uiSelectRMUpgrade'
end end
ui.header_opened.mission_title.hardtext = title; ui.header_opened.mission_title.hardtext = title
ui.header_opened.zc_duty.active = (mt == 3); ui.header_opened.zc_duty.active = (mt == 3)
ui.header_opened.xp_guild.active = ((mt == 5) or (mt == 6)); ui.header_opened.xp_guild.active = ((mt == 5) or (mt == 6))
-- init bot_chat_accept_mission title -- init bot_chat_accept_mission title
title = 'uiAcceptMission'; title = 'uiAcceptMission'
if (mt == 3) then title = 'uiAcceptZCCharge'; if (mt == 3) then title = 'uiAcceptZCCharge'
elseif (mt == 4) then title = 'uiAcceptBuilding'; elseif (mt == 4) then title = 'uiAcceptBuilding'
elseif (mt == 5) then title = 'uiAcceptRMBuy'; elseif (mt == 5) then title = 'uiAcceptRMBuy'
elseif (mt == 6) then title = 'uiAcceptRMUpgrade'; elseif (mt == 6) then title = 'uiAcceptRMUpgrade'
end end
ui = getUI('ui:interface:bot_chat_accept_mission'); ui = getUI('ui:interface:bot_chat_accept_mission')
ui.title = title; ui.title = title;
end end

@ -3,36 +3,36 @@
------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------
-- create the game namespace without reseting if already created in an other file. -- create the game namespace without reseting if already created in an other file.
if (help==nil) then if (help==nil) then
help= {}; help = {}
end end
------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------
-- --
function help:closeCSBrowserHeader() function help:closeCSBrowserHeader()
local ui = getUI('ui:interface:cs_browser'); local ui = getUI('ui:interface:cs_browser')
-- save size -- save size
ui_cs_browser_h = ui.h; ui_cs_browser_h = ui.h
ui_cs_browser_w = ui.w; ui_cs_browser_w = ui.w
-- reduce window size -- reduce window size
ui.pop_min_h = 32; ui.pop_min_h = 32
ui.h = 0; ui.h = 0
ui.w = 216; ui.w = 216
end end
------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------
-- --
function help:openCSBrowserHeader() function help:openCSBrowserHeader()
local ui = getUI('ui:interface:cs_browser'); local ui = getUI('ui:interface:cs_browser')
ui.pop_min_h = 96; ui.pop_min_h = 96
-- set size from saved values -- set size from saved values
if (ui_cs_browser_h ~= nil) then if (ui_cs_browser_h ~= nil) then
ui.h = ui_cs_browser_h; ui.h = ui_cs_browser_h
end end
if (ui_cs_browser_w ~= nil) then if (ui_cs_browser_w ~= nil) then
ui.w = ui_cs_browser_w; ui.w = ui_cs_browser_w
end end
end end

@ -1,4 +1,4 @@
fyrosLastNames = {"Abyan", "Abybus", "Abycaan", "Abycabus", "Abycacaon", "Abycacus", "Abycadix", "Abycadon", "Abycados", "Abycaion" fyrosFirstNames = {"Abyan", "Abybus", "Abycaan", "Abycabus", "Abycacaon", "Abycacus", "Abycadix", "Abycadon", "Abycados", "Abycaion"
, "Abycakos", "Abycala", "Abycalaus", "Abycalion", "Abycallo", "Abycalus", "Abycamus", "Abycan", "Abycanix", "Abycaon", "Abycaps" , "Abycakos", "Abycala", "Abycalaus", "Abycalion", "Abycallo", "Abycalus", "Abycamus", "Abycan", "Abycanix", "Abycaon", "Abycaps"
, "Abycarius", "Abycaron", "Abycaros", "Abycarus", "Abycaseus", "Abycasse", "Abycatheus", "Abycathus", "Abycatis", "Abycaton", "Abycaxius" , "Abycarius", "Abycaron", "Abycaros", "Abycarus", "Abycaseus", "Abycasse", "Abycatheus", "Abycathus", "Abycatis", "Abycaton", "Abycaxius"
, "Abycus", "Abydix", "Abydon", "Abydos", "Abygrian", "Abygribus", "Abygricaon", "Abygricus", "Abygridix", "Abygridon", "Abygridos" , "Abycus", "Abydix", "Abydon", "Abydos", "Abygrian", "Abygribus", "Abygricaon", "Abygricus", "Abygridix", "Abygridon", "Abygridos"
@ -286,7 +286,7 @@ fyrosLastNames = {"Abyan", "Abybus", "Abycaan", "Abycabus", "Abycacaon", "Abycac
, "Zenathus", "Zenatis", "Zenaton", "Zenaxius", "Zenbus", "Zencaon", "Zencus", "Zendix", "Zendon", "Zendos", "Zenion", "Zenix", "Zenkos", "Zenla", "Zenlaus", "Zenlion", "Zenllo", "Zenlus", "Zenmus", "Zenn", "Zennix", "Zenps", "Zenrius", "Zenron", "Zenros", "Zenrus", "Zenseus", "Zensse", "Zentheus" , "Zenathus", "Zenatis", "Zenaton", "Zenaxius", "Zenbus", "Zencaon", "Zencus", "Zendix", "Zendon", "Zendos", "Zenion", "Zenix", "Zenkos", "Zenla", "Zenlaus", "Zenlion", "Zenllo", "Zenlus", "Zenmus", "Zenn", "Zennix", "Zenps", "Zenrius", "Zenron", "Zenros", "Zenrus", "Zenseus", "Zensse", "Zentheus"
, "Zenthus", "Zentis", "Zenton", "Zenxius", "Zeperian", "Zeperibus", "Zepericaon", "Zepericus", "Zeperidix", "Zeperidon", "Zeperidos", "Zeperiion", "Zeperikos", "Zeperila", "Zeperilaus", "Zeperilion", "Zeperillo", "Zeperilus", "Zeperimus", "Zeperin", "Zeperinix", "Zeperips", "Zeperirius", "Zeperiron", "Zeperiros", "Zeperirus", "Zeperiseus", "Zeperisse", "Zeperitheus", "Zeperithus", "Zeperitis", "Zeperiton", "Zeperixius", "Zephaan", "Zephabus", "Zephacaon", "Zephacus", "Zephadix", "Zephadon", "Zephados", "Zephaion", "Zephakos", "Zephala", "Zephalaus", "Zephalion", "Zephallo", "Zephalus", "Zephamus", "Zephan", "Zephanix", "Zephaps", "Zepharius", "Zepharon", "Zepharos", "Zepharus", "Zephaseus", "Zephasse", "Zephatheus", "Zephathus", "Zephatis", "Zephaton", "Zephaxius", "Zephoan", "Zephobus", "Zephocaon", "Zephocus", "Zephodix", "Zephodon", "Zephodos", "Zephoion", "Zephokos", "Zephola", "Zepholaus", "Zepholion", "Zephollo", "Zepholus", "Zephomus", "Zephon", "Zephonix", "Zephops", "Zephorius", "Zephoron", "Zephoros", "Zephorus", "Zephoseus", "Zephosse", "Zephotheus", "Zephothus", "Zephotis", "Zephoton", "Zephoxius", "Zephyan", "Zephybus", "Zephycaon", "Zephycus", "Zephydix", "Zephydon", "Zephydos", "Zephyion", "Zephykos", "Zephyla", "Zephylaus", "Zephylion", "Zephyllo", "Zephylus", "Zephymus", "Zephyn", "Zephynix", "Zephyps", "Zephyrius", "Zephyron", "Zephyros", "Zephyrus", "Zephyseus", "Zephysse", "Zephytheus", "Zephythus", "Zephytis", "Zephyton", "Zephyxius", "Zeps", "Zeraan", "Zerabus", "Zeracaon", "Zeracus", "Zeradix", "Zeradon", "Zerados", "Zeraion", "Zerakos", "Zerala", "Zeralaus", "Zeralion", "Zerallo", "Zeralus", "Zeramus", "Zeran", "Zeranix", "Zeraps", "Zerarius", "Zeraron", "Zeraros", "Zerarus", "Zeraseus", "Zerasse", "Zeratheus", "Zerathus", "Zeratis", "Zeraton", "Zeraxius", "Zerian", "Zeribus", "Zericaon", "Zericus", "Zeridix", "Zeridon", "Zeridos", "Zeriion", "Zerikos", "Zerila", "Zerilaus", "Zerilion", "Zerillo", "Zerilus", "Zerimus", "Zerin", "Zerinix", "Zerips", "Zeririus", "Zeriron", "Zeriros", "Zerirus", "Zeriseus", "Zerisse", "Zeritheus", "Zerithus", "Zeritis", "Zeriton", "Zerius", "Zerixius", "Zeron", "Zeros", "Zerus", "Zeryaan", "Zeryabus", "Zeryacaon", "Zeryacus", "Zeryadix", "Zeryadon", "Zeryados", "Zeryaion", "Zeryakos", "Zeryala", "Zeryalaus", "Zeryalion", "Zeryallo", "Zeryalus", "Zeryamus", "Zeryan", "Zeryanix", "Zeryaps", "Zeryarius", "Zeryaron", "Zeryaros", "Zeryarus", "Zeryaseus", "Zeryasse", "Zeryatheus", "Zeryathus", "Zeryatis", "Zeryaton", "Zeryaxius", "Zeseus", "Zesse", "Zessean", "Zessebus", "Zessecaon", "Zessecus", "Zessedix", "Zessedon", "Zessedos", "Zesseion", "Zessekos", "Zessela", "Zesselaus", "Zesselion", "Zessello", "Zesselus", "Zessemus", "Zessen", "Zessenix", "Zesseps", "Zesserius", "Zesseron", "Zesseros", "Zesserus", "Zesseseus", "Zessesse", "Zessetheus", "Zessethus", "Zessetis", "Zesseton", "Zessexius", "Zetheus", "Zethus", "Zetis", "Zeton", "Zexius"} , "Zenthus", "Zentis", "Zenton", "Zenxius", "Zeperian", "Zeperibus", "Zepericaon", "Zepericus", "Zeperidix", "Zeperidon", "Zeperidos", "Zeperiion", "Zeperikos", "Zeperila", "Zeperilaus", "Zeperilion", "Zeperillo", "Zeperilus", "Zeperimus", "Zeperin", "Zeperinix", "Zeperips", "Zeperirius", "Zeperiron", "Zeperiros", "Zeperirus", "Zeperiseus", "Zeperisse", "Zeperitheus", "Zeperithus", "Zeperitis", "Zeperiton", "Zeperixius", "Zephaan", "Zephabus", "Zephacaon", "Zephacus", "Zephadix", "Zephadon", "Zephados", "Zephaion", "Zephakos", "Zephala", "Zephalaus", "Zephalion", "Zephallo", "Zephalus", "Zephamus", "Zephan", "Zephanix", "Zephaps", "Zepharius", "Zepharon", "Zepharos", "Zepharus", "Zephaseus", "Zephasse", "Zephatheus", "Zephathus", "Zephatis", "Zephaton", "Zephaxius", "Zephoan", "Zephobus", "Zephocaon", "Zephocus", "Zephodix", "Zephodon", "Zephodos", "Zephoion", "Zephokos", "Zephola", "Zepholaus", "Zepholion", "Zephollo", "Zepholus", "Zephomus", "Zephon", "Zephonix", "Zephops", "Zephorius", "Zephoron", "Zephoros", "Zephorus", "Zephoseus", "Zephosse", "Zephotheus", "Zephothus", "Zephotis", "Zephoton", "Zephoxius", "Zephyan", "Zephybus", "Zephycaon", "Zephycus", "Zephydix", "Zephydon", "Zephydos", "Zephyion", "Zephykos", "Zephyla", "Zephylaus", "Zephylion", "Zephyllo", "Zephylus", "Zephymus", "Zephyn", "Zephynix", "Zephyps", "Zephyrius", "Zephyron", "Zephyros", "Zephyrus", "Zephyseus", "Zephysse", "Zephytheus", "Zephythus", "Zephytis", "Zephyton", "Zephyxius", "Zeps", "Zeraan", "Zerabus", "Zeracaon", "Zeracus", "Zeradix", "Zeradon", "Zerados", "Zeraion", "Zerakos", "Zerala", "Zeralaus", "Zeralion", "Zerallo", "Zeralus", "Zeramus", "Zeran", "Zeranix", "Zeraps", "Zerarius", "Zeraron", "Zeraros", "Zerarus", "Zeraseus", "Zerasse", "Zeratheus", "Zerathus", "Zeratis", "Zeraton", "Zeraxius", "Zerian", "Zeribus", "Zericaon", "Zericus", "Zeridix", "Zeridon", "Zeridos", "Zeriion", "Zerikos", "Zerila", "Zerilaus", "Zerilion", "Zerillo", "Zerilus", "Zerimus", "Zerin", "Zerinix", "Zerips", "Zeririus", "Zeriron", "Zeriros", "Zerirus", "Zeriseus", "Zerisse", "Zeritheus", "Zerithus", "Zeritis", "Zeriton", "Zerius", "Zerixius", "Zeron", "Zeros", "Zerus", "Zeryaan", "Zeryabus", "Zeryacaon", "Zeryacus", "Zeryadix", "Zeryadon", "Zeryados", "Zeryaion", "Zeryakos", "Zeryala", "Zeryalaus", "Zeryalion", "Zeryallo", "Zeryalus", "Zeryamus", "Zeryan", "Zeryanix", "Zeryaps", "Zeryarius", "Zeryaron", "Zeryaros", "Zeryarus", "Zeryaseus", "Zeryasse", "Zeryatheus", "Zeryathus", "Zeryatis", "Zeryaton", "Zeryaxius", "Zeseus", "Zesse", "Zessean", "Zessebus", "Zessecaon", "Zessecus", "Zessedix", "Zessedon", "Zessedos", "Zesseion", "Zessekos", "Zessela", "Zesselaus", "Zesselion", "Zessello", "Zesselus", "Zessemus", "Zessen", "Zessenix", "Zesseps", "Zesserius", "Zesseron", "Zesseros", "Zesserus", "Zesseseus", "Zessesse", "Zessetheus", "Zessethus", "Zessetis", "Zesseton", "Zessexius", "Zetheus", "Zethus", "Zetis", "Zeton", "Zexius"}
fyrosFirstNames = {"Abyan", "Abybus", "Abycaon", "Abycus", "Abydix", "Abydon", "Abydos", "Abyion", "Abykos", "Abyla", "Abylaus", "Abylion" fyrosLastNames = {"Abyan", "Abybus", "Abycaon", "Abycus", "Abydix", "Abydon", "Abydos", "Abyion", "Abykos", "Abyla", "Abylaus", "Abylion"
, "Abyllo", "Abylus", "Abymus", "Abyn", "Abynix", "Abyps", "Abyrius", "Abyron", "Abyros", "Abyrus", "Abyseus", "Abysse", "Abytheus", "Abythus" , "Abyllo", "Abylus", "Abymus", "Abyn", "Abynix", "Abyps", "Abyrius", "Abyron", "Abyros", "Abyrus", "Abyseus", "Abysse", "Abytheus", "Abythus"
, "Abytis", "Abyton", "Abyxius", "Aean", "Aebus", "Aecaon", "Aecus", "Aedix", "Aedon", "Aedos", "Aeion", "Aekos", "Aela", "Aelaus", "Aelion" , "Abytis", "Abyton", "Abyxius", "Aean", "Aebus", "Aecaon", "Aecus", "Aedix", "Aedon", "Aedos", "Aeion", "Aekos", "Aela", "Aelaus", "Aelion"
, "Aello", "Aelus", "Aemus", "Aen", "Aenix", "Aeps", "Aerius", "Aeron", "Aeros", "Aerus", "Aeseus", "Aesse", "Aetheus", "Aethus", "Aetis" , "Aello", "Aelus", "Aemus", "Aen", "Aenix", "Aeps", "Aerius", "Aeron", "Aeros", "Aerus", "Aeseus", "Aesse", "Aetheus", "Aethus", "Aetis"

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -4,7 +4,7 @@
------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------
-- create the game namespace without reseting if already created in an other file. -- create the game namespace without reseting if already created in an other file.
if (outgame == nil) then if (outgame == nil) then
outgame= {}; outgame = {}
end end
@ -19,246 +19,240 @@ end
-- tryker: given name 4500, FirstName 4335 -- tryker: given name 4500, FirstName 4335
-- Fyros -- Fyros
function outgame:getFyrosLastName()
local nbFyrosLastNames = 0;
for _ in pairs(fyrosLastNames) do nbFyrosLastNames = nbFyrosLastNames + 1 end
return fyrosLastNames[math.random(nbFyrosLastNames)]
end
function outgame:getFyrosFirstName() function outgame:getFyrosFirstName()
local nbFyrosFirstNames = 0; local nbFyrosFirstNames = #fyrosFirstNames
for _ in pairs(fyrosFirstNames) do nbFyrosFirstNames = nbFyrosFirstNames + 1 end
return fyrosFirstNames[math.random(nbFyrosFirstNames)] return fyrosFirstNames[math.random(nbFyrosFirstNames)]
end end
function outgame:getFyrosLastName()
local nbFyrosLastNames = #fyrosLastNames
return fyrosLastNames[math.random(nbFyrosLastNames)]
end
-- Matis -- Matis
function outgame:getMatisLastName(sex) function outgame:getMatisFirstName(sex)
local dbNameSex = getDbProp("UI:TEMP:NAME_SEX"); -- 1 = male, 2 = female
local dbNameSex = getDbProp("UI:TEMP:NAME_SEX")
if sex ~= nil then if sex ~= nil then
dbNameSex = sex; dbNameSex = sex
end end
local LastName = "" local FirstName = ""
if tonumber(dbNameSex) == 1 then if tonumber(dbNameSex) == 1 then
local nbMatisMaleLastNames = 0; local nbMatisMaleFirstNames = #matisMaleFirstNames
for _ in pairs(matisMaleLastNames) do nbMatisMaleLastNames = nbMatisMaleLastNames + 1 end FirstName = matisMaleFirstNames[math.random(nbMatisMaleFirstNames)]
LastName = matisMaleLastNames[math.random(nbMatisMaleLastNames)];
else else
local nbMatisFemaleLastNames = 0; local nbMatisFemaleFirstNames = #matisFemaleFirstNames
for _ in pairs(matisFemaleLastNames) do nbMatisFemaleLastNames = nbMatisFemaleLastNames + 1 end FirstName = matisFemaleFirstNames[math.random(nbMatisFemaleFirstNames)]
LastName = matisFemaleLastNames[math.random(nbMatisFemaleLastNames)];
end end
return LastName; return FirstName
end end
function outgame:getMatisFirstName() function outgame:getMatisLastName()
local nbMatisLastNames = #matisLastNames
local nbMatisFirstNames = 0;
for _ in pairs(matisFirstNames) do nbMatisFirstNames = nbMatisFirstNames + 1 end
return matisFirstNames[math.random(nbMatisFirstNames)] return matisLastNames[math.random(nbMatisLastNames)]
end end
-- Tryker -- Tryker
function outgame:getTrykerLastName()
local nbTrykerLastNames = 0;
for _ in pairs(trykerLastNames) do nbTrykerLastNames = nbTrykerLastNames + 1 end
return trykerLastNames[math.random(nbTrykerLastNames)]
end
function outgame:getTrykerFirstName() function outgame:getTrykerFirstName()
local nbTrykerFirstNames = 0; local nbTrykerFirstNames = #trykerFirstNames
for _ in pairs(trykerFirstNames) do nbTrykerFirstNames = nbTrykerFirstNames + 1 end
return trykerFirstNames[math.random(nbTrykerFirstNames)] return trykerFirstNames[math.random(nbTrykerFirstNames)]
end end
function outgame:getTrykerLastName()
local nbTrykerLastNames = #trykerLastNames
return trykerLastNames[math.random(nbTrykerLastNames)]
end
-- Zoraï -- Zoraï
function outgame:getZoraiLastName() function outgame:getZoraiFirstName()
local nbLastNamesOne = 0; local nbFirstNamesOne = #zoraiFirstNamesOne
for _ in pairs(zoraiLastNamesOne) do nbLastNamesOne = nbLastNamesOne + 1 end local FirstNameOne = zoraiFirstNamesOne[math.random(nbFirstNamesOne)]
local lastNameOne = zoraiLastNamesOne[math.random(nbLastNamesOne)];
local nbLastNamesTwo = 0; local nbFirstNamesTwo = #zoraiFirstNamesTwo
for _ in pairs(zoraiLastNamesTwo) do nbLastNamesTwo = nbLastNamesTwo + 1 end local FirstNameTwo = zoraiFirstNamesTwo[math.random(nbFirstNamesTwo)]
local lastNameTwo = zoraiLastNamesTwo[math.random(nbLastNamesTwo)];
return lastNameOne .. "-" .. lastNameTwo return FirstNameOne .. "-" .. FirstNameTwo
end end
function outgame:getZoraiFirstName()
local nbFirstNames = 0;
for _ in pairs(zoraiFirstNames) do nbFirstNames = nbFirstNames + 1 end
return zoraiFirstNames[math.random(nbFirstNames)] function outgame:getZoraiLastName()
local nbLastNames = #zoraiLastNames
return zoraiLastNames[math.random(nbLastNames)]
end end
function outgame:procGenerateName() function outgame:procGenerateName()
local uiNameFull = getUI("ui:outgame:appear_name:name_full"); local uiNameFull = getUI("ui:outgame:appear_name:name_full")
local uiGenText = getUI("ui:outgame:appear_name:eb"); local uiGenText = getUI("ui:outgame:appear_name:eb")
local dbNameRace = getDbProp("UI:TEMP:NAME_RACE"); local dbNameRace = getDbProp("UI:TEMP:NAME_RACE")
local dbNameSubRace = getDbProp("UI:TEMP:NAME_SUB_RACE"); local dbNameSubRaceFirstName = getDbProp("UI:TEMP:NAME_SUB_RACE_FIRST_NAME")
local dbNameSubRace2 = getDbProp("UI:TEMP:NAME_SUB_RACE2"); local dbNameSubRaceLastName = getDbProp("UI:TEMP:NAME_SUB_RACE_LAST_NAME")
local nameResult = ""; local nameResult = ""
local fullnameResult = ""; local fullnameResult = ""
-- Look at outgame:procUpdateNameRaceLabel() for the "race" list. -- Look at outgame:procUpdateNameRaceLabel() for the "race" list.
-- fy ma try zo --> -- fy ma try zo -->
local lastName = "test"
local firstName = "test2" local firstName = "test2"
local lastName = "test"
-- Fyros and Matis are using "first name, last name" order
-- Trykers and Zoraïs are using "last name, first name" order
if tonumber(dbNameRace) == 1 then if tonumber(dbNameRace) == 1 then
-- Fyros -- Fyros
lastName = self:getFyrosLastName()
firstName = self:getFyrosFirstName() firstName = self:getFyrosFirstName()
fullnameResult = lastName .. " " .. firstName lastName = self:getFyrosLastName()
nameResult = lastName fullnameResult = firstName .. " " .. lastName
elseif tonumber(dbNameRace) == 2 then elseif tonumber(dbNameRace) == 2 then
-- Matis -- Matis
lastName = self:getMatisLastName()
firstName = self:getMatisFirstName() firstName = self:getMatisFirstName()
fullnameResult = lastName .. " " .. firstName lastName = self:getMatisLastName()
nameResult = lastName fullnameResult = firstName .. " " .. lastName
elseif tonumber(dbNameRace) == 3 then elseif tonumber(dbNameRace) == 3 then
-- Tryker -- Tryker
lastName = self:getTrykerLastName()
firstName = self:getTrykerFirstName() firstName = self:getTrykerFirstName()
fullnameResult = firstName .. " " .. lastName lastName = self:getTrykerLastName()
nameResult = lastName fullnameResult = lastName .. " " .. firstName
elseif tonumber(dbNameRace) == 4 then elseif tonumber(dbNameRace) == 4 then
-- Zorai -- Zorai
lastName = self:getZoraiLastName()
firstName = self:getZoraiFirstName() firstName = self:getZoraiFirstName()
fullnameResult = firstName .. " " .. lastName lastName = self:getZoraiLastName()
nameResult = lastName fullnameResult = lastName .. " " .. firstName
elseif tonumber(dbNameRace) == 5 then elseif tonumber(dbNameRace) == 5 then
-- Maraudeurs -- Maraudeurs
-- lastName
if tonumber(dbNameSubRace) == 1 then -- firstName
if tonumber(dbNameSubRaceFirstName) == 1 then
-- Fyros -- Fyros
lastName = self:getFyrosLastName() firstName = self:getFyrosFirstName()
elseif tonumber( dbNameSubRace ) == 2 then elseif tonumber(dbNameSubRaceFirstName) == 2 then
-- Matis F
lastName = self:getMatisLastName(2)
elseif tonumber( dbNameSubRace ) == 3 then
-- Matis M -- Matis M
lastName = self:getMatisLastName(1) firstName = self:getMatisFirstName(1)
elseif tonumber( dbNameSubRace ) == 4 then elseif tonumber(dbNameSubRaceFirstName) == 3 then
-- Matis F
firstName = self:getMatisFirstName(2)
elseif tonumber(dbNameSubRaceFirstName) == 4 then
-- Tryker -- Tryker
lastName = self:getTrykerLastName() firstName = self:getTrykerFirstName()
elseif tonumber( dbNameSubRace ) == 5 then elseif tonumber(dbNameSubRaceFirstName) == 5 then
-- Zorai -- Zorai
lastName = self:getZoraiLastName() firstName = self:getZoraiFirstName()
end end
-- firstName -- lastName
if tonumber(dbNameSubRace2) == 1 then if tonumber(dbNameSubRaceLastName) == 1 then
-- Fyros -- Fyros
firstName = self:getFyrosFirstName() lastName = self:getFyrosLastName()
elseif tonumber( dbNameSubRace2 ) == 2 then elseif tonumber(dbNameSubRaceLastName) == 2 then
-- Matis -- Matis
firstName = self:getMatisFirstName() lastName = self:getMatisLastName()
firstName = self:getMatisFirstName() elseif tonumber(dbNameSubRaceLastName) == 3 then
elseif tonumber( dbNameSubRace2 ) == 3 then
-- Tryker -- Tryker
firstName = self:getTrykerFirstName() lastName = self:getTrykerLastName()
elseif tonumber( dbNameSubRace2 ) == 4 then elseif tonumber(dbNameSubRaceLastName) == 4 then
-- Zorai -- Zorai
firstName = self:getZoraiFirstName() lastName = self:getZoraiLastName()
end end
fullnameResult = lastName .. " " .. firstName fullnameResult = firstName .. " " .. lastName
nameResult = lastName
end end
uiNameFull.hardtext = fullnameResult; -- always use first name for character name
nameResult = firstName
nameResult = string.gsub(nameResult, "'", ""); uiNameFull.hardtext = fullnameResult
nameResult = string.gsub(nameResult, " ", "");
nameResult = string.gsub(nameResult, "-", ""); nameResult = string.gsub(nameResult, "'", "")
nameResult = string.lower( nameResult ); nameResult = string.gsub(nameResult, " ", "")
nameResult = nameResult:gsub("^%l", string.upper); nameResult = string.gsub(nameResult, "-", "")
uiGenText.input_string = nameResult; nameResult = string.lower(nameResult)
nameResult = nameResult:gsub("^%l", string.upper)
uiGenText.input_string = nameResult
end end
-- Name sex slider update. -- Name sex slider update.
function outgame:procUpdateNameSexLabel() function outgame:procUpdateNameSexLabel()
local nameSexType = { "uiCP_Sex_Male", "uiCP_Sex_Female" } local nameSexType = { "uiCP_Sex_Male", "uiCP_Sex_Female" }
local uiNameSexText = getUI("ui:outgame:appear_name:name_sex_slider:name_sex"); local uiNameSexText = getUI("ui:outgame:appear_name:name_sex_slider:name_sex")
local uiNameSex = getDbProp("UI:TEMP:NAME_SEX"); local uiNameSex = getDbProp("UI:TEMP:NAME_SEX")
tempstr = tostring(i18n.get(nameSexType[tonumber(uiNameSex)])); tempstr = tostring(i18n.get(nameSexType[tonumber(uiNameSex)]))
tempstr = string.lower( tempstr ); tempstr = string.lower(tempstr)
tempstr = (tempstr:gsub("^%l", string.upper)); tempstr = (tempstr:gsub("^%l", string.upper))
uiNameSexText.hardtext= tempstr; uiNameSexText.hardtext = tempstr
end end
-- Name race slider update. -- Name race slider update.
function outgame:procUpdateNameRaceLabel() function outgame:procUpdateNameRaceLabel()
local nameRaceType = { "Fyros", "Matis", "Tryker", "Zoraï", "uiCP_Maraudeur" } local nameRaceType = { "Fyros", "Matis", "Tryker", "Zoraï", "uiCP_Maraudeur" }
local uiNameRaceText = getUI("ui:outgame:appear_name:name_race_slider:name_race"); local uiNameRaceText = getUI("ui:outgame:appear_name:name_race_slider:name_race")
local dbNameRace = getDbProp("UI:TEMP:NAME_RACE"); local dbNameRace = getDbProp("UI:TEMP:NAME_RACE")
local uiNameSexSlider = getUI("ui:outgame:appear_name:name_sex_slider"); local uiNameSexSlider = getUI("ui:outgame:appear_name:name_sex_slider")
local uiNameSubRaceSlider = getUI("ui:outgame:appear_name:name_sub_race_slider"); local uiNameSubRaceFirstNameSlider = getUI("ui:outgame:appear_name:name_sub_race_first_name_slider")
local uiNameSubRace2Slider = getUI("ui:outgame:appear_name:name_sub_race2_slider"); local uiNameSubRaceLastNameSlider = getUI("ui:outgame:appear_name:name_sub_race_last_name_slider")
local uiNameGenerate = getUI("ui:outgame:appear_name:generate"); local uiNameGenerate = getUI("ui:outgame:appear_name:generate")
-- Show/Hide sex slider -- Show/Hide sex slider
uiNameGenerate.y = "-50" uiNameGenerate.y = "-50"
if tonumber(dbNameRace) == 2 then if tonumber(dbNameRace) == 2 then
uiNameSexSlider.active = true; uiNameSexSlider.active = true
uiNameGenerate.y = "-65" uiNameGenerate.y = "-65"
else else
uiNameSexSlider.active = false; uiNameSexSlider.active = false
end end
-- Show/Hide sub race slider -- Show/Hide sub race slider
if tonumber(dbNameRace) == 5 then if tonumber(dbNameRace) == 5 then
uiNameSubRaceSlider.active = true; uiNameSubRaceFirstNameSlider.active = true
uiNameSubRace2Slider.active = true; uiNameSubRaceLastNameSlider.active = true
uiNameGenerate.y = "-105" uiNameGenerate.y = "-105"
else else
uiNameSubRaceSlider.active = false; uiNameSubRaceFirstNameSlider.active = false
uiNameSubRace2Slider.active = false; uiNameSubRaceLastNameSlider.active = false
end end
uiNameRaceText.hardtext = tostring(nameRaceType[tonumber(dbNameRace)])
uiNameRaceText.hardtext= tostring(nameRaceType[tonumber(dbNameRace)]);
end end
local matisF = "Matis " .. (string.lower(tostring(i18n.get("uiCP_Sex_Female")) )):gsub("^%l", string.upper); local matisF = "Matis " .. (string.lower(tostring(i18n.get("uiCP_Sex_Female")) )):gsub("^%l", string.upper)
local matisM = "Matis " .. (string.lower(tostring(i18n.get("uiCP_Sex_Male")) )):gsub("^%l", string.upper); local matisM = "Matis " .. (string.lower(tostring(i18n.get("uiCP_Sex_Male")) )):gsub("^%l", string.upper)
function outgame:procUpdateNameSubRaceLabel() function outgame:procUpdateNameSubRaceFirstNameLabel()
local nameSubRaceType = { "Fyros", matisF, matisM, "Tryker", "Zoraï" } local nameSubRaceFirstNameType = { "Fyros", matisM, matisF, "Tryker", "Zoraï" }
local uiNameSubRaceText = getUI("ui:outgame:appear_name:name_sub_race_slider:name_race"); local uiNameSubRaceFirstNameText = getUI("ui:outgame:appear_name:name_sub_race_first_name_slider:name_race")
local dbNameSubRace = getDbProp("UI:TEMP:NAME_SUB_RACE"); local dbNameSubRaceFirstName = getDbProp("UI:TEMP:NAME_SUB_RACE_FIRST_NAME")
uiNameSubRaceFirstNameText.hardtext= tostring(nameSubRaceFirstNameType[tonumber(dbNameSubRaceFirstName)])
uiNameSubRaceText.hardtext= tostring(nameSubRaceType[tonumber(dbNameSubRace)]);
end end
function outgame:procUpdateNameSubRace2Label()
local nameSubRace2Type = { "Fyros", "Matis", "Tryker", "Zoraï" }
local uiNameSubRace2Text = getUI("ui:outgame:appear_name:name_sub_race2_slider:name_race");
local dbNameSubRace2 = getDbProp("UI:TEMP:NAME_SUB_RACE2");
function outgame:procUpdateNameSubRaceLastNameLabel()
local nameSubRaceLastNameType = { "Fyros", "Matis", "Tryker", "Zoraï" }
local uiNameSubRaceLastNameText = getUI("ui:outgame:appear_name:name_sub_race_last_name_slider:name_race")
local dbNameSubRaceLastName = getDbProp("UI:TEMP:NAME_SUB_RACE_LAST_NAME")
uiNameSubRace2Text.hardtext= tostring(nameSubRace2Type[tonumber(dbNameSubRace2)]); uiNameSubRaceLastNameText.hardtext= tostring(nameSubRaceLastNameType[tonumber(dbNameSubRaceLastName)])
end end
------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------
-- called to construct icons -- called to construct icons
function outgame:activePackElement(id, icon) function outgame:activePackElement(id, icon)
local uiDesc = getUI("ui:outgame:appear:job_options:options:desc"); local uiDesc = getUI("ui:outgame:appear:job_options:options:desc")
uiDesc['ico' .. tostring(id)].active= true; uiDesc['ico' .. tostring(id)].active = true
uiDesc['ico' .. tostring(id)].texture= icon; uiDesc['ico' .. tostring(id)].texture = icon
uiDesc['ico' .. tostring(id) .. 'txt'].active= true; uiDesc['ico' .. tostring(id) .. 'txt'].active = true
end end
@ -266,13 +260,13 @@ end
-- called to construct pack text -- called to construct pack text
function outgame:setPackJobText(id, spec) function outgame:setPackJobText(id, spec)
-- Set Pack content -- Set Pack content
local uiPackText = getUI("ui:outgame:appear:job_options:options:desc:pack_" .. id); local uiPackText = getUI("ui:outgame:appear:job_options:options:desc:pack_" .. id)
uiPackText.hardtext= "uiCP_Job_" .. id .. tostring(spec); uiPackText.hardtext= "uiCP_Job_" .. id .. tostring(spec)
-- Set specialization text -- Set specialization text
local uiResText = getUI("ui:outgame:appear:job_options:options:result:res"); local uiResText = getUI("ui:outgame:appear:job_options:options:result:res")
if(spec==2) then if(spec==2) then
uiResText.hardtext= "uiCP_Res_" .. id; uiResText.hardtext= "uiCP_Res_" .. id
end end
end end
@ -280,63 +274,63 @@ end
-- called to construct pack -- called to construct pack
function outgame:buildActionPack() function outgame:buildActionPack()
local uiDesc = getUI("ui:outgame:appear:job_options:options:desc"); local uiDesc = getUI("ui:outgame:appear:job_options:options:desc")
if (uiDesc==nil) then if (uiDesc==nil) then
return; return
end end
-- Reset All -- Reset All
for i = 1,20 do for i = 1,20 do
uiDesc['ico' .. tostring(i)].active= false; uiDesc['ico' .. tostring(i)].active = false
uiDesc['ico' .. tostring(i) .. 'txt'].active= false; uiDesc['ico' .. tostring(i) .. 'txt'].active = false
end end
-- Build Default Combat -- Build Default Combat
self:activePackElement(1, 'f1.tga'); -- Dagger self:activePackElement(1, 'f1.tga') -- Dagger
self:activePackElement(2, 'f2.tga'); -- Accurate Attack self:activePackElement(2, 'f2.tga') -- Accurate Attack
-- Build Default Magic -- Build Default Magic
self:activePackElement(6, 'm2.tga'); -- Gloves self:activePackElement(6, 'm2.tga') -- Gloves
self:activePackElement(7, 'm1.tga'); -- Acid self:activePackElement(7, 'm1.tga') -- Acid
-- Build Default Forage -- Build Default Forage
self:activePackElement(11, 'g1.tga'); -- Forage Tool self:activePackElement(11, 'g1.tga') -- Forage Tool
self:activePackElement(12, 'g2.tga'); -- Basic Extract self:activePackElement(12, 'g2.tga') -- Basic Extract
-- Build Default Craft -- Build Default Craft
self:activePackElement(16, 'c2.tga'); -- Craft Tool self:activePackElement(16, 'c2.tga') -- Craft Tool
self:activePackElement(17, 'c1.tga'); -- 50 raw mat self:activePackElement(17, 'c1.tga') -- 50 raw mat
self:activePackElement(18, 'c3.tga'); -- Craft Root self:activePackElement(18, 'c3.tga') -- Craft Root
self:activePackElement(19, 'c4.tga'); -- Boots Plan self:activePackElement(19, 'c4.tga') -- Boots Plan
-- Build Option -- Build Option
if (getDbProp('UI:TEMP:JOB_FIGHT') == 2) then if (getDbProp('UI:TEMP:JOB_FIGHT') == 2) then
self:activePackElement(3, 'f3.tga'); -- Increase damage self:activePackElement(3, 'f3.tga') -- Increase damage
elseif (getDbProp('UI:TEMP:JOB_MAGIC') == 2) then elseif (getDbProp('UI:TEMP:JOB_MAGIC') == 2) then
self:activePackElement(8, 'm5.tga'); -- Fear self:activePackElement(8, 'm5.tga') -- Fear
elseif (getDbProp('UI:TEMP:JOB_FORAGE') == 2) then elseif (getDbProp('UI:TEMP:JOB_FORAGE') == 2) then
self:activePackElement(13, 'g3.tga'); -- Basic Prospection self:activePackElement(13, 'g3.tga') -- Basic Prospection
elseif (getDbProp('UI:TEMP:JOB_CRAFT') == 2) then elseif (getDbProp('UI:TEMP:JOB_CRAFT') == 2) then
self:activePackElement(20, 'c6.tga'); -- Gloves Plan self:activePackElement(20, 'c6.tga') -- Gloves Plan
self:activePackElement(17, 'c5.tga'); -- Replace 17, with 100x RawMat self:activePackElement(17, 'c5.tga') -- Replace 17, with 100x RawMat
end end
-- Reset Text -- Reset Text
self:setPackJobText('F', 1); self:setPackJobText('F', 1)
self:setPackJobText('M', 1); self:setPackJobText('M', 1)
self:setPackJobText('G', 1); self:setPackJobText('G', 1)
self:setPackJobText('C', 1); self:setPackJobText('C', 1)
-- Set correct text for specalized version -- Set correct text for specalized version
if (getDbProp('UI:TEMP:JOB_FIGHT') == 2) then if (getDbProp('UI:TEMP:JOB_FIGHT') == 2) then
self:setPackJobText('F', 2); self:setPackJobText('F', 2)
elseif (getDbProp('UI:TEMP:JOB_MAGIC') == 2) then elseif (getDbProp('UI:TEMP:JOB_MAGIC') == 2) then
self:setPackJobText('M', 2); self:setPackJobText('M', 2)
elseif (getDbProp('UI:TEMP:JOB_FORAGE') == 2) then elseif (getDbProp('UI:TEMP:JOB_FORAGE') == 2) then
self:setPackJobText('G', 2); self:setPackJobText('G', 2)
elseif (getDbProp('UI:TEMP:JOB_CRAFT') == 2) then elseif (getDbProp('UI:TEMP:JOB_CRAFT') == 2) then
self:setPackJobText('C', 2); self:setPackJobText('C', 2)
end end
end end

@ -51,8 +51,8 @@
<!-- We start at 1 not 0. --> <!-- We start at 1 not 0. -->
<variable entry="UI:TEMP:NAME_RACE" type="sint64" value="1" /> <variable entry="UI:TEMP:NAME_RACE" type="sint64" value="1" />
<!-- used for marauder names. --> <!-- used for marauder names. -->
<variable entry="UI:TEMP:NAME_SUB_RACE" type="sint64" value="1" /> <variable entry="UI:TEMP:NAME_SUB_RACE_FIRST_NAME" type="sint64" value="1" />
<variable entry="UI:TEMP:NAME_SUB_RACE2" type="sint64" value="1" /> <variable entry="UI:TEMP:NAME_SUB_RACE_LAST_NAME" type="sint64" value="1" />
<!-- you will have to change the max value of the slider too, since it seam not working to set it using that var directly. --> <!-- you will have to change the max value of the slider too, since it seam not working to set it using that var directly. -->
<variable entry="UI:TEMP:NAME_RACE_NB" type="sint64" value="5" /> <variable entry="UI:TEMP:NAME_RACE_NB" type="sint64" value="5" />
<!-- We start at 1 not 0. --> <!-- We start at 1 not 0. -->
@ -1273,8 +1273,7 @@
<group type="modal" id="appear_name" posref="MM MM" w="400" h="680" <group type="modal" id="appear_name" posref="MM MM" w="400" h="680"
mouse_pos="false" escapable="false" exit_click_out="false" mouse_pos="false" escapable="false" exit_click_out="false"
on_active="proc" on_active_params="proc_appear_name_active" on_active="proc" on_active_params="proc_appear_name_active"
display="false" display="false">
>
<instance template="outgame_popup" id="back" posref="TL TL" /> <instance template="outgame_popup" id="back" posref="TL TL" />
@ -1344,8 +1343,8 @@
onscroll="proc" params="proc_appear_name_race_label_change" /> onscroll="proc" params="proc_appear_name_race_label_change" />
</group> </group>
<!-- Slider Name Sub Race --> <!-- Slider Name Sub Race First Name -->
<group id="name_sub_race_slider" posparent="name_race_slider" posref="BM BM" x="0" y="-40" w="200" h="48" > <group id="name_sub_race_first_name_slider" posparent="name_race_slider" posref="BM BM" x="0" y="-40" w="200" h="48" >
<view type="bitmap" id="left" posref="TL TL" texture="opt_on_l.tga" y="-6" /> <view type="bitmap" id="left" posref="TL TL" texture="opt_on_l.tga" y="-6" />
<view type="bitmap" id="right" posref="TR TR" texture="opt_on_r.tga" y="-6" /> <view type="bitmap" id="right" posref="TR TR" texture="opt_on_r.tga" y="-6" />
@ -1354,22 +1353,23 @@
<ctrl type="button" button_type="push_button" tx_normal="blank.tga" tx_pushed="opt_on_l_over.tga" tx_over="opt_on_l_over.tga" scale="true" w="32" h="32" <ctrl type="button" button_type="push_button" tx_normal="blank.tga" tx_pushed="opt_on_l_over.tga" tx_over="opt_on_l_over.tga" scale="true" w="32" h="32"
color="0 0 0 0" col_over="255 255 255 128" col_pushed="255 255 255 255" color="0 0 0 0" col_over="255 255 255 128" col_pushed="255 255 255 255"
id="but_back" posref="TL TL" x="0" y="-6" id="but_back" posref="TL TL" x="0" y="-6"
onclick_l="proc" params_l="proc_appear_name_sub_race_sub_one" /> onclick_l="proc" params_l="proc_appear_name_sub_race_first_name_sub_one" />
<ctrl type="button" button_type="push_button" tx_normal="blank.tga" tx_pushed="opt_on_r_over.tga" tx_over="opt_on_r_over.tga" scale="true" w="32" h="32" <ctrl type="button" button_type="push_button" tx_normal="blank.tga" tx_pushed="opt_on_r_over.tga" tx_over="opt_on_r_over.tga" scale="true" w="32" h="32"
color="0 0 0 0" col_over="255 255 255 128" col_pushed="255 255 255 255" color="0 0 0 0" col_over="255 255 255 128" col_pushed="255 255 255 255"
id="but_next" posref="TR TR" x="0" y="-6" id="but_next" posref="TR TR" x="0" y="-6"
onclick_l="proc" params_l="proc_appear_name_sub_race_add_one" /> onclick_l="proc" params_l="proc_appear_name_sub_race_first_name_add_one" />
<view type="text" id="lastName" case="%case_first_string_letter_up" posparent="name_sub_race_slider" posref="TL TL" x="0" y="0" hardtext="uiCP_LastName" color="255 255 255 255" fontsize="11"/> <view type="text" id="firstName" case="%case_first_string_letter_up" posparent="name_sub_race_first_name_slider" posref="TL TL" x="0" y="0" hardtext="uiCP_FirstName" color="255 255 255 255" fontsize="11"/>
<view type="text" id="name_race" case="%case_first_string_letter_up" posparent="name_sub_race_slider" posref="TR TL" x="-100" y="0" hardtext="Fyros" color="255 255 255 255" fontsize="11"/> <view type="text" id="name_race" case="%case_first_string_letter_up" posparent="name_sub_race_first_name_slider" posref="TR TL" x="-100" y="0" hardtext="Fyros" color="255 255 255 255" fontsize="11"/>
<ctrl type="scroll" id="name_race_scroll" posparent="name_sub_race_slider" posref="MM MM" x="0" y="0" w="160" h="32" <ctrl type="scroll" id="name_race_scroll" posparent="name_sub_race_first_name_slider" posref="MM MM" x="0" y="0" w="160" h="32"
vertical="false" align="L" min="1" max="5" value="UI:TEMP:NAME_SUB_RACE" tracksize="40" vertical="false" align="L" min="1" max="5" value="UI:TEMP:NAME_SUB_RACE_FIRST_NAME" tracksize="40"
tx_topright="" tx_middle="slider_m.tga" tx_bottomleft="" tx_topright="" tx_middle="slider_m.tga" tx_bottomleft=""
onscroll="proc" params="proc_appear_name_sub_race_label_change" /> onscroll="proc" params="proc_appear_name_sub_race_first_name_label_change" />
</group> </group>
<!-- Slider Name Sub Race2 -->
<group id="name_sub_race2_slider" posparent="name_sub_race_slider" posref="BM BM" x="0" y="-40" w="200" h="48" > <!-- Slider Name Sub Race Last Name -->
<group id="name_sub_race_last_name_slider" posparent="name_sub_race_first_name_slider" posref="BM BM" x="0" y="-40" w="200" h="48" >
<view type="bitmap" id="left" posref="TL TL" texture="opt_on_l.tga" y="-6" /> <view type="bitmap" id="left" posref="TL TL" texture="opt_on_l.tga" y="-6" />
<view type="bitmap" id="right" posref="TR TR" texture="opt_on_r.tga" y="-6" /> <view type="bitmap" id="right" posref="TR TR" texture="opt_on_r.tga" y="-6" />
@ -1378,20 +1378,21 @@
<ctrl type="button" button_type="push_button" tx_normal="blank.tga" tx_pushed="opt_on_l_over.tga" tx_over="opt_on_l_over.tga" scale="true" w="32" h="32" <ctrl type="button" button_type="push_button" tx_normal="blank.tga" tx_pushed="opt_on_l_over.tga" tx_over="opt_on_l_over.tga" scale="true" w="32" h="32"
color="0 0 0 0" col_over="255 255 255 128" col_pushed="255 255 255 255" color="0 0 0 0" col_over="255 255 255 128" col_pushed="255 255 255 255"
id="but_back" posref="TL TL" x="0" y="-6" id="but_back" posref="TL TL" x="0" y="-6"
onclick_l="proc" params_l="proc_appear_name_sub_race2_sub_one" /> onclick_l="proc" params_l="proc_appear_name_sub_race_last_name_sub_one" />
<ctrl type="button" button_type="push_button" tx_normal="blank.tga" tx_pushed="opt_on_r_over.tga" tx_over="opt_on_r_over.tga" scale="true" w="32" h="32" <ctrl type="button" button_type="push_button" tx_normal="blank.tga" tx_pushed="opt_on_r_over.tga" tx_over="opt_on_r_over.tga" scale="true" w="32" h="32"
color="0 0 0 0" col_over="255 255 255 128" col_pushed="255 255 255 255" color="0 0 0 0" col_over="255 255 255 128" col_pushed="255 255 255 255"
id="but_next" posref="TR TR" x="0" y="-6" id="but_next" posref="TR TR" x="0" y="-6"
onclick_l="proc" params_l="proc_appear_name_sub_race2_add_one" /> onclick_l="proc" params_l="proc_appear_name_sub_race_last_name_add_one" />
<view type="text" id="firstName" case="%case_first_string_letter_up" posparent="name_sub_race2_slider" posref="TL TL" x="0" y="0" hardtext="uiCP_FirstName" color="255 255 255 255" fontsize="11"/> <view type="text" id="lastName" case="%case_first_string_letter_up" posparent="name_sub_race_last_name_slider" posref="TL TL" x="0" y="0" hardtext="uiCP_LastName" color="255 255 255 255" fontsize="11"/>
<view type="text" id="name_race" case="%case_first_string_letter_up" posparent="name_sub_race2_slider" posref="TR TL" x="-100" y="0" hardtext="Fyros" color="255 255 255 255" fontsize="11"/> <view type="text" id="name_race" case="%case_first_string_letter_up" posparent="name_sub_race_last_name_slider" posref="TR TL" x="-100" y="0" hardtext="Fyros" color="255 255 255 255" fontsize="11"/>
<ctrl type="scroll" id="name_race_scroll" posparent="name_sub_race2_slider" posref="MM MM" x="0" y="0" w="160" h="32" <ctrl type="scroll" id="name_race_scroll" posparent="name_sub_race_last_name_slider" posref="MM MM" x="0" y="0" w="160" h="32"
vertical="false" align="L" min="1" max="4" value="UI:TEMP:NAME_SUB_RACE2" tracksize="40" vertical="false" align="L" min="1" max="4" value="UI:TEMP:NAME_SUB_RACE_LAST_NAME" tracksize="40"
tx_topright="" tx_middle="slider_m.tga" tx_bottomleft="" tx_topright="" tx_middle="slider_m.tga" tx_bottomleft=""
onscroll="proc" params="proc_appear_name_sub_race2_label_change" /> onscroll="proc" params="proc_appear_name_sub_race_last_name_label_change" />
</group> </group>
<!-- Slider Name Sex --> <!-- Slider Name Sex -->
<group id="name_sex_slider" posparent="name_race_slider" posref="BM BM" x="0" y="-40" w="200" h="48" > <group id="name_sex_slider" posparent="name_race_slider" posref="BM BM" x="0" y="-40" w="200" h="48" >
@ -1414,7 +1415,6 @@
vertical="false" align="L" min="1" max="2" value="UI:TEMP:NAME_SEX" tracksize="40" vertical="false" align="L" min="1" max="2" value="UI:TEMP:NAME_SEX" tracksize="40"
tx_topright="" tx_middle="slider_m.tga" tx_bottomleft="" tx_topright="" tx_middle="slider_m.tga" tx_bottomleft=""
onscroll="proc" params="proc_appear_name_sex_label_change" /> onscroll="proc" params="proc_appear_name_sex_label_change" />
</group> </group>
<ctrl style="valid_txt_button" id="generate" posref="BM BM" posparent="name_race_slider" x="0" y="-100" hardtext="uiCP_Name_Generate" <ctrl style="valid_txt_button" id="generate" posref="BM BM" posparent="name_race_slider" x="0" y="-100" hardtext="uiCP_Name_Generate"
@ -1534,18 +1534,18 @@
<!-- Name generator init. --> <!-- Name generator init. -->
<action handler="set" params="target_property=ui:outgame:appear_name:name_sex_slider:name_sex_scroll:value|value=add(@UI:TEMP:CHAR3D:VPA:SEX,1)" /> <action handler="set" params="target_property=ui:outgame:appear_name:name_sex_slider:name_sex_scroll:value|value=add(@UI:TEMP:CHAR3D:VPA:SEX,1)" />
<action handler="set" params="target_property=ui:outgame:appear_name:name_race_slider:name_race_scroll:value|value=add(@UI:TEMP:CHAR3D:PEOPLE,1)" /> <action handler="set" params="target_property=ui:outgame:appear_name:name_race_slider:name_race_scroll:value|value=add(@UI:TEMP:CHAR3D:PEOPLE,1)" />
<action handler="set" params="target_property=ui:outgame:appear_name:name_sub_race_slider:name_race_scroll:value|value=1" /> <action handler="set" params="target_property=ui:outgame:appear_name:name_sub_race_first_name_slider:name_race_scroll:value|value=1" />
<action handler="set" params="target_property=ui:outgame:appear_name:name_sub_race2_slider:name_race_scroll:value|value=1" /> <action handler="set" params="target_property=ui:outgame:appear_name:name_sub_race_last_name_slider:name_race_scroll:value|value=1" />
<action handler="set" params="dblink=UI:TEMP:NAME_SEX|value=add(@UI:TEMP:CHAR3D:VPA:SEX,1)" /> <action handler="set" params="dblink=UI:TEMP:NAME_SEX|value=add(@UI:TEMP:CHAR3D:VPA:SEX,1)" />
<action handler="set" params="dblink=UI:TEMP:NAME_RACE|value=add(@UI:TEMP:CHAR3D:PEOPLE,1)" /> <action handler="set" params="dblink=UI:TEMP:NAME_RACE|value=add(@UI:TEMP:CHAR3D:PEOPLE,1)" />
<action handler="set" params="dblink=UI:TEMP:NAME_SUB_RACE|value=1" /> <action handler="set" params="dblink=UI:TEMP:NAME_SUB_RACE_FIRST_NAME|value=1" />
<action handler="set" params="dblink=UI:TEMP:NAME_SUB2_RACE|value=1" /> <action handler="set" params="dblink=UI:TEMP:NAME_SUB_RACE_LAST_NAME|value=1" />
<action handler="lua:outgame:procUpdateNameSexLabel()" /> <action handler="lua:outgame:procUpdateNameSexLabel()" />
<action handler="lua:outgame:procUpdateNameRaceLabel()" /> <action handler="lua:outgame:procUpdateNameRaceLabel()" />
<action handler="lua:outgame:procUpdateNameSubRaceLabel()" /> <action handler="lua:outgame:procUpdateNameSubRaceFirstNameLabel()" />
<action handler="lua:outgame:procUpdateNameSubRace2Label()" /> <action handler="lua:outgame:procUpdateNameSubRaceLastNameLabel()" />
<!-- End Name Generator. --> <!-- End Name Generator. -->
</proc> </proc>
@ -1651,28 +1651,28 @@
<action handler="lua:outgame:procUpdateNameRaceLabel()" /> <action handler="lua:outgame:procUpdateNameRaceLabel()" />
</proc> </proc>
<!-- Name Sub Race. --> <!-- Name Sub Race. -->
<proc id="proc_appear_name_sub_race_label_change"> <proc id="proc_appear_name_sub_race_first_name_label_change">
<action handler="lua:outgame:procUpdateNameSubRaceLabel()" /> <action handler="lua:outgame:procUpdateNameSubRaceFirstNameLabel()" />
</proc> </proc>
<proc id="proc_appear_name_sub_race_add_one"> <proc id="proc_appear_name_sub_race_first_name_add_one">
<action handler="set" params="dblink=UI:TEMP:NAME_SUB_RACE|value=min(add(@UI:TEMP:NAME_SUB_RACE,1),5)" /> <action handler="set" params="dblink=UI:TEMP:NAME_SUB_RACE_FIRST_NAME|value=min(add(@UI:TEMP:NAME_SUB_RACE_FIRST_NAME,1),5)" />
<action handler="lua:outgame:procUpdateNameSubRaceLabel()" /> <action handler="lua:outgame:procUpdateNameSubRaceFirstNameLabel()" />
</proc> </proc>
<proc id="proc_appear_name_sub_race_sub_one"> <proc id="proc_appear_name_sub_race_first_name_sub_one">
<action handler="set" params="dblink=UI:TEMP:NAME_SUB_RACE|value=max(sub(@UI:TEMP:NAME_SUB_RACE,1),1)" /> <action handler="set" params="dblink=UI:TEMP:NAME_SUB_RACE_FIRST_NAME|value=max(sub(@UI:TEMP:NAME_SUB_RACE_FIRST_NAME,1),1)" />
<action handler="lua:outgame:procUpdateNameSubRaceLabel()" /> <action handler="lua:outgame:procUpdateNameSubRaceFirstNameLabel()" />
</proc> </proc>
<!-- Name Sub Race2. --> <!-- Name Sub Race2. -->
<proc id="proc_appear_name_sub_race2_label_change"> <proc id="proc_appear_name_sub_race_last_name_label_change">
<action handler="lua:outgame:procUpdateNameSubRace2Label()" /> <action handler="lua:outgame:procUpdateNameSubRaceLastNameLabel()" />
</proc> </proc>
<proc id="proc_appear_name_sub_race2_add_one"> <proc id="proc_appear_name_sub_race_last_name_add_one">
<action handler="set" params="dblink=UI:TEMP:NAME_SUB_RACE2|value=min(add(@UI:TEMP:NAME_SUB_RACE2,1),4)" /> <action handler="set" params="dblink=UI:TEMP:NAME_SUB_RACE_LAST_NAME|value=min(add(@UI:TEMP:NAME_SUB_RACE_LAST_NAME,1),4)" />
<action handler="lua:outgame:procUpdateNameSubRace2Label()" /> <action handler="lua:outgame:procUpdateNameSubRaceLastNameLabel()" />
</proc> </proc>
<proc id="proc_appear_name_sub_race2_sub_one"> <proc id="proc_appear_name_sub_race_last_name_sub_one">
<action handler="set" params="dblink=UI:TEMP:NAME_SUB_RACE2|value=max(sub(@UI:TEMP:NAME_SUB_RACE2,1),1)" /> <action handler="set" params="dblink=UI:TEMP:NAME_SUB_RACE_LAST_NAME|value=max(sub(@UI:TEMP:NAME_SUB_RACE_LAST_NAME,1),1)" />
<action handler="lua:outgame:procUpdateNameSubRace2Label()" /> <action handler="lua:outgame:procUpdateNameSubRaceLastNameLabel()" />
</proc> </proc>
<!-- End Name Generator. --> <!-- End Name Generator. -->

@ -109,7 +109,7 @@ function game.RingAccessPointFilter:validate()
if config.Local == 1 then if config.Local == 1 then
ucUrl = ucstring(NicoMagicURL) -- for test in local mode ucUrl = ucstring(NicoMagicURL) -- for test in local mode
else else
ucUrl = getDynString(game.NpcWebPage.UrlTextId); ucUrl = getDynString(game.NpcWebPage.UrlTextId)
end end
debugInfo(tostring(ucUrl)) debugInfo(tostring(ucUrl))
local utf8Url = ucUrl:toUtf8() local utf8Url = ucUrl:toUtf8()

@ -2,39 +2,39 @@
------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------
-- create the game namespace without reseting if already created in an other file. -- create the game namespace without reseting if already created in an other file.
if (game==nil) then if (game==nil) then
game= {}; game = {}
end end
------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------
-- --
function game:getMilkoTooltipWithKey(prop, tooltip, tooltip_pushed, name, param) function game:getMilkoTooltipWithKey(prop, tooltip, tooltip_pushed, name, param)
local tt; local tt
-- Check if button is toggled and choose the good tooltip -- Check if button is toggled and choose the good tooltip
if (prop ~= '' and tooltip_pushed ~= '') then if (prop ~= '' and tooltip_pushed ~= '') then
local db = getDbProp(prop); local db = getDbProp(prop)
if (db == 1) then if (db == 1) then
tt = tooltip_pushed; tt = tooltip_pushed
else else
tt = tooltip; tt = tooltip
end end
else else
tt = tooltip; tt = tooltip;
end end
-- Get key shortcut -- Get key shortcut
local text = i18n.get(tt); local text = i18n.get(tt)
local key = runExpr('getKey(\'' .. name .. '\',\'' .. param .. '\',1)'); local key = runExpr('getKey(\'' .. name .. '\',\'' .. param .. '\',1)')
if (key ~= nil and key ~= '') then if (key ~= nil and key ~= '') then
key = ' @{2F2F}(' .. key .. ')'; key = ' @{2F2F}(' .. key .. ')'
text = concatUCString(text, key); text = concatUCString(text, key)
end end
setContextHelpText(text); setContextHelpText(text)
end end
function game:taskbarDisableTooltip(ui) function game:taskbarDisableTooltip(ui)
local uiGroup = getUI(ui); local uiGroup = getUI(ui)
disableContextHelpForControl(uiGroup); disableContextHelpForControl(uiGroup)
end end

@ -180,7 +180,7 @@ function webig:doRemoveDbSheetQuantity(sheet_list, ctrl)
end end
end end
--assert(nil, "RELOADABLE SCRIPT"); --assert(nil, "RELOADABLE SCRIPT")

@ -30,13 +30,6 @@
#include <csignal> #include <csignal>
#endif #endif
#ifdef NL_OS_MAC
#include <stdio.h>
#include <sys/resource.h>
#include "nel/misc/dynloadlib.h"
#include "app_bundle_utils.h"
#endif
#include "nel/misc/debug.h" #include "nel/misc/debug.h"
#include "nel/misc/command.h" #include "nel/misc/command.h"
#include "nel/net/tcp_sock.h" #include "nel/net/tcp_sock.h"
@ -226,23 +219,6 @@ int main(int argc, char **argv)
} }
#endif // TEST_CRASH_COUNTER #endif // TEST_CRASH_COUNTER
#ifdef NL_OS_MAC
struct rlimit rlp, rlp2, rlp3;
getrlimit(RLIMIT_NOFILE, &rlp);
rlp2.rlim_cur = 1024;
rlp2.rlim_max = rlp.rlim_max;
setrlimit(RLIMIT_NOFILE, &rlp2);
getrlimit(RLIMIT_NOFILE, &rlp3);
nlinfo("rlimit before %d %d\n", rlp.rlim_cur, rlp.rlim_max);
nlinfo("rlimit after %d %d\n", rlp3.rlim_cur, rlp3.rlim_max);
// add the bundle's plugins path as library search path (for nel drivers)
CLibrary::addLibPath(getAppBundlePath() + "/Contents/PlugIns/nel/");
#endif
#if defined(NL_OS_WINDOWS) #if defined(NL_OS_WINDOWS)
#ifdef TEST_CRASH_COUNTER #ifdef TEST_CRASH_COUNTER
@ -291,6 +267,10 @@ int main(int argc, char **argv)
// TODO for Linux : splashscreen // TODO for Linux : splashscreen
#endif #endif
// initialize log
initLog();
// initialize patch manager and set the ryzom full path, before it's used // initialize patch manager and set the ryzom full path, before it's used
CPatchManager *pPM = CPatchManager::getInstance(); CPatchManager *pPM = CPatchManager::getInstance();
pPM->setRyzomFilename(Args.getProgramPath() + Args.getProgramName()); pPM->setRyzomFilename(Args.getProgramPath() + Args.getProgramName());

@ -2223,6 +2223,7 @@ bool CClientConfig::getDefaultConfigLocation(std::string& p_name) const
#endif #endif
std::string currentPath = CPath::standardizePath(CPath::getCurrentPath()); std::string currentPath = CPath::standardizePath(CPath::getCurrentPath());
std::string etcPath = CPath::standardizePath(getRyzomEtcPrefix());
// look in the current working directory first // look in the current working directory first
if (CFile::isExists(currentPath + defaultConfigFileName)) if (CFile::isExists(currentPath + defaultConfigFileName))
@ -2232,13 +2233,14 @@ bool CClientConfig::getDefaultConfigLocation(std::string& p_name) const
else if (CFile::isExists(Args.getStartupPath() + defaultConfigFileName)) else if (CFile::isExists(Args.getStartupPath() + defaultConfigFileName))
p_name = Args.getStartupPath() + defaultConfigFileName; p_name = Args.getStartupPath() + defaultConfigFileName;
// look in prefix path // look in application directory
else if (CFile::isExists(defaultConfigPath + defaultConfigFileName)) else if (CFile::isExists(defaultConfigPath + defaultConfigFileName))
p_name = defaultConfigPath + defaultConfigFileName; p_name = defaultConfigPath + defaultConfigFileName;
// if some client_default.cfg was found return true // look in etc prefix path
if (p_name.size()) else if (!etcPath.empty() && CFile::isExists(etcPath + defaultConfigFileName))
return true; p_name = etcPath + defaultConfigFileName;
return false; // if some client_default.cfg was found return true
return !p_name.empty();
} }

@ -86,7 +86,7 @@ namespace NL3D
class CEntitySheet; class CEntitySheet;
class CEntityCL; class CEntityCL;
class CAttackInfo; struct CAttackInfo;
class CItemSheet; class CItemSheet;

@ -1212,10 +1212,10 @@ void CFarTP::sendReady()
else else
{ {
// Set season // Set season
RT.updateRyzomClock(NetMngr.getCurrentServerTick(), ryzomGetLocalTime() * 0.001); RT.updateRyzomClock(NetMngr.getCurrentServerTick());
DayNightCycleHour = (float)RT.getRyzomTime(); DayNightCycleHour = (float)RT.getRyzomTime();
CurrSeason = RT.getRyzomSeason(); CurrSeason = RT.getRyzomSeason();
RT.updateRyzomClock(NetMngr.getCurrentServerTick(), ryzomGetLocalTime() * 0.001); RT.updateRyzomClock(NetMngr.getCurrentServerTick());
DayNightCycleHour = (float)RT.getRyzomTime(); DayNightCycleHour = (float)RT.getRyzomTime();
ManualSeasonValue = RT.getRyzomSeason(); ManualSeasonValue = RT.getRyzomSeason();

@ -105,6 +105,12 @@ extern HINSTANCE HInstance;
extern HWND SlashScreen; extern HWND SlashScreen;
#endif // NL_OS_WINDOWS #endif // NL_OS_WINDOWS
#ifdef NL_OS_MAC
#include <stdio.h>
#include <sys/resource.h>
#include "nel/misc/dynloadlib.h"
#endif
#include "app_bundle_utils.h" #include "app_bundle_utils.h"
#include <new> #include <new>
@ -796,6 +802,65 @@ static bool addRyzomIconBitmap(const std::string &directory, vector<CBitmap> &bi
} }
#endif #endif
//---------------------------------------------------
// initLog :
// Initialize the client.log file
//---------------------------------------------------
void initLog()
{
// Add a displayer for Debug Infos.
createDebug();
// Client.Log displayer
nlassert( !ErrorLog->getDisplayer("CLIENT.LOG") );
CFileDisplayer *ClientLogDisplayer = new CFileDisplayer(getLogDirectory() + "client.log", true, "CLIENT.LOG");
DebugLog->addDisplayer (ClientLogDisplayer);
InfoLog->addDisplayer (ClientLogDisplayer);
WarningLog->addDisplayer (ClientLogDisplayer);
ErrorLog->addDisplayer (ClientLogDisplayer);
AssertLog->addDisplayer (ClientLogDisplayer);
// Display the client version.
nlinfo("RYZOM VERSION : %s", getDebugVersion().c_str());
#ifdef NL_OS_MAC
struct rlimit rlp, rlp2, rlp3;
getrlimit(RLIMIT_NOFILE, &rlp);
rlim_t value = 1024;
rlp2.rlim_cur = std::min(value, rlp.rlim_max);
rlp2.rlim_max = rlp.rlim_max;
if (setrlimit(RLIMIT_NOFILE, &rlp2))
{
if (errno == EINVAL)
{
nlwarning("Unable to set rlimit with error: the specified limit is invalid");
}
else if (errno == EPERM)
{
nlwarning("Unable to set rlimit with error: the limit specified would have raised the maximum limit value and the caller is not the super-user");
}
else
{
nlwarning("Unable to set rlimit with error: unknown error");
}
}
getrlimit(RLIMIT_NOFILE, &rlp3);
nlinfo("rlimit before %llu %llu", (uint64)rlp.rlim_cur, (uint64)rlp.rlim_max);
nlinfo("rlimit after %llu %llu", (uint64)rlp3.rlim_cur, (uint64)rlp3.rlim_max);
// add the bundle's plugins path as library search path (for nel drivers)
if (CFile::isExists(getAppBundlePath() + "/Contents/PlugIns/nel"))
{
CLibrary::addLibPath(getAppBundlePath() + "/Contents/PlugIns/nel/");
}
#endif
}
//--------------------------------------------------- //---------------------------------------------------
// prelogInit : // prelogInit :
// Initialize the application before login // Initialize the application before login
@ -848,21 +913,6 @@ void prelogInit()
// Due to Bug #906, we disable the stl xml allocation // Due to Bug #906, we disable the stl xml allocation
// nlverify (xmlMemSetup (XmlFree4NeL, XmlMalloc4NeL, XmlRealloc4NeL, XmlStrdup4NeL) == 0); // nlverify (xmlMemSetup (XmlFree4NeL, XmlMalloc4NeL, XmlRealloc4NeL, XmlStrdup4NeL) == 0);
// Add a displayer for Debug Infos.
createDebug();
// Client.Log displayer
nlassert( !ErrorLog->getDisplayer("CLIENT.LOG") );
CFileDisplayer *ClientLogDisplayer = new CFileDisplayer(getLogDirectory() + "client.log", true, "CLIENT.LOG");
DebugLog->addDisplayer (ClientLogDisplayer);
InfoLog->addDisplayer (ClientLogDisplayer);
WarningLog->addDisplayer (ClientLogDisplayer);
ErrorLog->addDisplayer (ClientLogDisplayer);
AssertLog->addDisplayer (ClientLogDisplayer);
// Display the client version.
nlinfo("RYZOM VERSION : %s", getDebugVersion().c_str());
// Init the debug memory // Init the debug memory
initDebugMemory(); initDebugMemory();

@ -27,6 +27,9 @@ namespace NLMISC
class IProgressCallback; class IProgressCallback;
} }
// Initialize the log
void initLog();
// Initialize the application before login step // Initialize the application before login step
void prelogInit(); void prelogInit();

@ -797,10 +797,10 @@ void initMainLoop()
{ {
// setup good day / season before ig are added. // setup good day / season before ig are added.
RT.updateRyzomClock(NetMngr.getCurrentServerTick(), ryzomGetLocalTime() * 0.001); RT.updateRyzomClock(NetMngr.getCurrentServerTick());
updateDayNightCycleHour(); updateDayNightCycleHour();
StartupSeason = CurrSeason = RT.getRyzomSeason(); StartupSeason = CurrSeason = RT.getRyzomSeason();
RT.updateRyzomClock(NetMngr.getCurrentServerTick(), ryzomGetLocalTime() * 0.001); RT.updateRyzomClock(NetMngr.getCurrentServerTick());
updateDayNightCycleHour(); updateDayNightCycleHour();
ManualSeasonValue = RT.getRyzomSeason(); ManualSeasonValue = RT.getRyzomSeason();

@ -2635,7 +2635,13 @@ public:
{ {
ucstring title; ucstring title;
STRING_MANAGER::CStringManagerClient::instance()->getDynString(textId, title); STRING_MANAGER::CStringManagerClient::instance()->getDynString(textId, title);
pMenu->addLineAtIndex(5 + insertion_index, title+" @{T8}/"+s, "chat_target_selected", "dyn"+s, "dyn"+s);
// replace dynamic channel name and shortcut
ucstring res = CI18N::get("uiFilterMenuDynamic");
strFindReplace(res, "%channel", title);
strFindReplace(res, "%shortcut", s);
pMenu->addLineAtIndex(5 + insertion_index, res, "chat_target_selected", "dyn"+s, "dyn"+s);
insertion_index++; insertion_index++;
} }
} }

@ -922,21 +922,23 @@ void CPatchManager::createBatchFile(CProductDescriptionForClient &descFile, bool
contentPrefix += "set RYZOM_CLIENT=\"%1\"\n"; contentPrefix += "set RYZOM_CLIENT=\"%1\"\n";
contentPrefix += "set UNPACKPATH=\"%2\"\n"; contentPrefix += "set UNPACKPATH=\"%2\"\n";
contentPrefix += "set ROOTPATH=\"%3\"\n"; contentPrefix += "set ROOTPATH=\"%3\"\n";
contentPrefix += "set STARTUPPATH=\"%4\"\n";
contentPrefix += toString("set UPGRADE_FILE=\"%%ROOTPATH%%\\%s\"\n", UpgradeBatchFilename.c_str()); contentPrefix += toString("set UPGRADE_FILE=\"%%ROOTPATH%%\\%s\"\n", UpgradeBatchFilename.c_str());
contentPrefix += "\n"; contentPrefix += "\n";
contentPrefix += "set LOGIN=%4\n"; contentPrefix += "set LOGIN=%5\n";
contentPrefix += "set PASSWORD=%5\n"; contentPrefix += "set PASSWORD=%6\n";
contentPrefix += "set SHARDID=%6\n"; contentPrefix += "set SHARDID=%7\n";
#else #else
contentPrefix += "#!/bin/sh\n"; contentPrefix += "#!/bin/sh\n";
contentPrefix += "export RYZOM_CLIENT=$1\n"; contentPrefix += "export RYZOM_CLIENT=$1\n";
contentPrefix += "export UNPACKPATH=$2\n"; contentPrefix += "export UNPACKPATH=$2\n";
contentPrefix += "export ROOTPATH=$3\n"; contentPrefix += "export ROOTPATH=$3\n";
contentPrefix += "export STARTUPPATH=$4\n";
contentPrefix += toString("export UPGRADE_FILE=$ROOTPATH/%s\n", UpgradeBatchFilename.c_str()); contentPrefix += toString("export UPGRADE_FILE=$ROOTPATH/%s\n", UpgradeBatchFilename.c_str());
contentPrefix += "\n"; contentPrefix += "\n";
contentPrefix += "LOGIN=$4\n"; contentPrefix += "LOGIN=$5\n";
contentPrefix += "PASSWORD=$5\n"; contentPrefix += "PASSWORD=$6\n";
contentPrefix += "SHARDID=$6\n"; contentPrefix += "SHARDID=$7\n";
#endif #endif
contentPrefix += "\n"; contentPrefix += "\n";
@ -958,7 +960,7 @@ void CPatchManager::createBatchFile(CProductDescriptionForClient &descFile, bool
if (wantRyzomRestart) if (wantRyzomRestart)
{ {
// client shouldn't be in memory anymore else it couldn't be overwritten // client shouldn't be in memory anymore else it couldn't be overwritten
contentSuffix += toString("start \"\" /D \"%%ROOTPATH%%\" \"%%RYZOM_CLIENT%%\" %s %%LOGIN%% %%PASSWORD%% %%SHARDID%%\n", additionalParams.c_str()); contentSuffix += toString("start \"\" /D \"%%STARTUPPATH%%\" \"%%RYZOM_CLIENT%%\" %s %%LOGIN%% %%PASSWORD%% %%SHARDID%%\n", additionalParams.c_str());
} }
#else #else
if (wantRyzomRestart) if (wantRyzomRestart)
@ -976,7 +978,7 @@ void CPatchManager::createBatchFile(CProductDescriptionForClient &descFile, bool
if (wantRyzomRestart) if (wantRyzomRestart)
{ {
// change to previous client directory // change to previous client directory
contentSuffix += "cd \"$ROOTPATH\"\n\n"; contentSuffix += "cd \"$STARTUPPATH\"\n\n";
// launch new client // launch new client
contentSuffix += toString("\"$RYZOM_CLIENT\" %s $LOGIN $PASSWORD $SHARDID\n", additionalParams.c_str()); contentSuffix += toString("\"$RYZOM_CLIENT\" %s $LOGIN $PASSWORD $SHARDID\n", additionalParams.c_str());
@ -1017,30 +1019,32 @@ void CPatchManager::executeBatchFile()
std::string batchFilename; std::string batchFilename;
#ifdef NL_OS_WINDOWS
batchFilename = CPath::standardizeDosPath(ClientRootPath);
#else
batchFilename = ClientRootPath;
#endif
batchFilename += UpdateBatchFilename;
// make script executable
CFile::setRWAccess(batchFilename);
std::vector<std::string> arguments; std::vector<std::string> arguments;
std::string startupPath = Args.getStartupPath();
// 3 first parameters are Ryzom client full path, patch directory full path and client root directory full path // 3 first parameters are Ryzom client full path, patch directory full path and client root directory full path
#ifdef NL_OS_WINDOWS #ifdef NL_OS_WINDOWS
batchFilename = CPath::standardizeDosPath(ClientRootPath);
arguments.push_back(CPath::standardizeDosPath(RyzomFilename)); arguments.push_back(CPath::standardizeDosPath(RyzomFilename));
arguments.push_back(CPath::standardizeDosPath(ClientPatchPath)); arguments.push_back(CPath::standardizeDosPath(ClientPatchPath));
arguments.push_back(CPath::standardizeDosPath(ClientRootPath)); arguments.push_back(CPath::standardizeDosPath(ClientRootPath));
arguments.push_back(CPath::standardizeDosPath(startupPath));
#else #else
batchFilename = ClientRootPath;
arguments.push_back(RyzomFilename); arguments.push_back(RyzomFilename);
arguments.push_back(ClientPatchPath); arguments.push_back(ClientPatchPath);
arguments.push_back(ClientRootPath); arguments.push_back(ClientRootPath);
arguments.push_back(startupPath);
#endif #endif
batchFilename += UpdateBatchFilename;
// make script executable
CFile::setRWAccess(batchFilename);
// append login, password and shard // append login, password and shard
if (!LoginLogin.empty()) if (!LoginLogin.empty())
{ {
@ -1414,7 +1418,8 @@ void CPatchManager::downloadFileWithCurl (const string &source, const string &de
curl_easy_setopt(curl, CURLOPT_PROGRESSDATA, NULL); curl_easy_setopt(curl, CURLOPT_PROGRESSDATA, NULL);
throw Exception ("Can't open file '%s' for writing: code=%d %s (error code 37)", dest.c_str (), errno, strerror(errno)); throw Exception ("Can't open file '%s' for writing: code=%d %s (error code 37)", dest.c_str (), errno, strerror(errno));
} }
curl_easy_setopt(curl, CURLOPT_FILE, fp); curl_easy_setopt(curl, CURLOPT_WRITEDATA, fp);
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, fwrite);
//CurrentFilesToGet++; //CurrentFilesToGet++;

@ -1340,7 +1340,7 @@ bool mainLoop()
if (!ClientCfg.Local) if (!ClientCfg.Local)
{ {
if(NetMngr.getCurrentServerTick() > LastGameCycle) if(NetMngr.getCurrentServerTick() > LastGameCycle)
RT.updateRyzomClock(NetMngr.getCurrentServerTick(), ryzomGetLocalTime() * 0.001); RT.updateRyzomClock(NetMngr.getCurrentServerTick());
} }
else if (ClientCfg.SimulateServerTick) else if (ClientCfg.SimulateServerTick)
{ {
@ -1348,7 +1348,7 @@ bool mainLoop()
uint numTicks = (uint) floor(SimulatedServerDate * 10); uint numTicks = (uint) floor(SimulatedServerDate * 10);
SimulatedServerTick += numTicks; SimulatedServerTick += numTicks;
SimulatedServerDate = (float)((double)SimulatedServerDate - (double) numTicks * 0.1); SimulatedServerDate = (float)((double)SimulatedServerDate - (double) numTicks * 0.1);
RT.updateRyzomClock((uint32)SimulatedServerTick, ryzomGetLocalTime() * 0.001); RT.updateRyzomClock((uint32)SimulatedServerTick);
} }
@ -2092,14 +2092,14 @@ bool mainLoop()
if (Actions.valide ("inc_hour")) if (Actions.valide ("inc_hour"))
{ {
RT.increaseTickOffset( (uint32)(2000 * displayHourDelta) ); RT.increaseTickOffset( (uint32)(2000 * displayHourDelta) );
RT.updateRyzomClock(NetMngr.getCurrentServerTick(), ryzomGetLocalTime() * 0.001); RT.updateRyzomClock(NetMngr.getCurrentServerTick());
} }
// Ctrl-L decrease hour // Ctrl-L decrease hour
if (Actions.valide ("dec_hour")) if (Actions.valide ("dec_hour"))
{ {
RT.decreaseTickOffset( (uint32)(2000 * displayHourDelta) ); RT.decreaseTickOffset( (uint32)(2000 * displayHourDelta) );
RT.updateRyzomClock(NetMngr.getCurrentServerTick(), ryzomGetLocalTime() * 0.001); RT.updateRyzomClock(NetMngr.getCurrentServerTick());
CTimedFXManager::getInstance().setDate(CClientDate(RT.getRyzomDay(), (float) RT.getRyzomTime())); CTimedFXManager::getInstance().setDate(CClientDate(RT.getRyzomDay(), (float) RT.getRyzomTime()));
if (IGCallbacks) if (IGCallbacks)
{ {

@ -430,6 +430,9 @@ void displayDebug()
TextContext->printfAt(1.f, line, "TEST WEATHER FUNCTION"); TextContext->printfAt(1.f, line, "TEST WEATHER FUNCTION");
line += lineStep; line += lineStep;
} }
// thunder
TextContext->printfAt(1.f, line, "Thunder level : %.02f", WeatherManager.getThunderLevel());
line += lineStep;
// season // season
TextContext->printfAt(1.f, line, "Season : %s", EGSPD::CSeason::toString(CurrSeason).c_str()); TextContext->printfAt(1.f, line, "Season : %s", EGSPD::CSeason::toString(CurrSeason).c_str());
line += lineStep; line += lineStep;

@ -132,7 +132,7 @@ void CWeatherManagerClient::update(uint64 day, float hour, const CWeatherContext
// build current weather state // build current weather state
EGSPD::CSeason::TSeason season = CRyzomTime::getSeasonByDay((uint32)day); EGSPD::CSeason::TSeason season = CRyzomTime::getSeasonByDay((uint32)day);
// //
manualUpdate(day, hour, wc, weatherValue, season); manualUpdateImpl(day, hour, wc, weatherValue, season);
_LastEvalHour = hour; _LastEvalHour = hour;
_LastEvalDay = day; _LastEvalDay = day;
} }
@ -147,25 +147,29 @@ void CWeatherManagerClient::update(uint64 day, float hour, const CWeatherContext
// build current weather state // build current weather state
EGSPD::CSeason::TSeason season = CRyzomTime::getSeasonByDay((uint32)day); EGSPD::CSeason::TSeason season = CRyzomTime::getSeasonByDay((uint32)day);
// //
manualUpdate(day, hour, wc, weatherValue, season, camMat, continent); manualUpdateImpl(day, hour, wc, weatherValue, season, camMat, continent);
_LastEvalHour = hour; _LastEvalHour = hour;
_LastEvalDay = day; _LastEvalDay = day;
} }
//================================================================================================ //================================================================================================
void CWeatherManagerClient::manualUpdate(uint64 day, float hour, const CWeatherContext &wc, float weatherValue, EGSPD::CSeason::TSeason season, const NLMISC::CMatrix &camMat, const CContinent &continent) void CWeatherManagerClient::manualUpdate(uint64 day, float hour, const CWeatherContext &wc, float weatherValue, EGSPD::CSeason::TSeason season, const NLMISC::CMatrix &camMat, const CContinent &continent)
{
manualUpdateImpl(day, hour, wc, weatherValue, season, camMat, continent);
_LastEvalHour = hour;
_LastEvalDay = day;
}
//================================================================================================
void CWeatherManagerClient::manualUpdateImpl(uint64 day, float hour, const CWeatherContext &wc, float weatherValue, EGSPD::CSeason::TSeason season, const NLMISC::CMatrix &camMat, const CContinent &continent)
{ {
H_AUTO_USE(RZ_WeatherManagerClient) H_AUTO_USE(RZ_WeatherManagerClient)
if (!wc.WF) return; if (!wc.WF) return;
manualUpdate(day, hour, wc, weatherValue, season); manualUpdateImpl(day, hour, wc, weatherValue, season);
setupFXs(camMat, wc.GR, continent); setupFXs(camMat, wc.GR, continent);
setupWind(&(wc.WF[season])); setupWind(&(wc.WF[season]));
float scaledWeatherValue = weatherValue * (wc.WF[season].getNumWeatherSetups() - 1); float scaledWeatherValue = weatherValue * (wc.WF[season].getNumWeatherSetups() - 1);
updateThunder(day, hour, wc, true, scaledWeatherValue, season); updateThunder(day, hour, wc, true, scaledWeatherValue, season);
_LastEvalHour = hour;
_LastEvalDay = day;
// Sound stuff // Sound stuff
if (SoundMngr != 0) if (SoundMngr != 0)
@ -250,9 +254,16 @@ void CWeatherManagerClient::manualUpdate(uint64 day, float hour, const CWeatherC
} }
} }
//================================================================================================ //================================================================================================
void CWeatherManagerClient::manualUpdate(uint64 day, float hour, const CWeatherContext &wc, float weatherValue, EGSPD::CSeason::TSeason season) void CWeatherManagerClient::manualUpdate(uint64 day, float hour, const CWeatherContext &wc, float weatherValue, EGSPD::CSeason::TSeason season)
{
manualUpdateImpl(day, hour, wc, weatherValue, season);
_LastEvalHour = hour;
_LastEvalDay = day;
}
//================================================================================================
void CWeatherManagerClient::manualUpdateImpl(uint64 day, float hour, const CWeatherContext &wc, float weatherValue, EGSPD::CSeason::TSeason season)
{ {
H_AUTO_USE(RZ_WeatherManagerClient) H_AUTO_USE(RZ_WeatherManagerClient)
if (!wc.WF) return; if (!wc.WF) return;
@ -269,11 +280,8 @@ void CWeatherManagerClient::manualUpdate(uint64 day, float hour, const CWeatherC
// blend client specific part // blend client specific part
CWeatherStateClient::blend(_CurrWeatherStateClient, safe_cast<const CWeatherSetupClient *>(floorSetup)->WeatherStateClient, safe_cast<const CWeatherSetupClient *>(ceilSetup)->WeatherStateClient, blendFactor); CWeatherStateClient::blend(_CurrWeatherStateClient, safe_cast<const CWeatherSetupClient *>(floorSetup)->WeatherStateClient, safe_cast<const CWeatherSetupClient *>(ceilSetup)->WeatherStateClient, blendFactor);
} }
_LastEvalHour = hour;
_LastEvalDay = day;
} }
//================================================================================================ //================================================================================================
void CWeatherManagerClient::setupWind(const CWeatherFunction *wf) void CWeatherManagerClient::setupWind(const CWeatherFunction *wf)
{ {

@ -105,6 +105,8 @@ protected:
// from CWeatherManager // from CWeatherManager
virtual void setupLoaded(CWeatherSetup *setup); virtual void setupLoaded(CWeatherSetup *setup);
private: private:
void manualUpdateImpl(uint64 day, float hour, const CWeatherContext &wc, float weatherValue, EGSPD::CSeason::TSeason season);
void manualUpdateImpl(uint64 day, float hour, const CWeatherContext &wc, float weatherValue, EGSPD::CSeason::TSeason season, const NLMISC::CMatrix &camMat, const class CContinent &continent);
typedef std::map<std::string, CPrecipitation> TPrecipitationMap; typedef std::map<std::string, CPrecipitation> TPrecipitationMap;
// A vector of precipitation pointers // A vector of precipitation pointers
typedef std::vector<CPrecipitation *> TPrecipitationVect; typedef std::vector<CPrecipitation *> TPrecipitationVect;

@ -10,6 +10,6 @@ fi
chmod +x "$ROOTPATH/ryzom_client" chmod +x "$ROOTPATH/ryzom_client"
chmod +x "$ROOTPATH/crash_report" chmod +x "$ROOTPATH/crash_report"
chmod +x "$ROOTPATH/ryzom_client_patcher" chmod +x "$ROOTPATH/ryzom_client_patcher"
chmod +x "$ROOTPATH/ryzom_configuration" chmod +x "$ROOTPATH/ryzom_configuration_qt"
exit 0 exit 0

@ -205,7 +205,7 @@ inline bool CMirroredDataSet::propIsList( TPropertyIndex propIndex ) const
* Display the values of one property for all entities * Display the values of one property for all entities
*/ */
template <class T, class CPropLocationClass> template <class T, class CPropLocationClass>
inline void CMirroredDataSet::displayPropValues( TPropertyIndex propIndex, T* pt, NLMISC::CLog& log ) const inline void CMirroredDataSet::displayPropValues( TPropertyIndex propIndex, T* /* pt */, NLMISC::CLog& log ) const
{ {
// std::stringstream ss; // std::stringstream ss;
// ss << "Mirror property " << propIndex << ":" << endl; // ss << "Mirror property " << propIndex << ":" << endl;

@ -83,4 +83,19 @@ namespace WEEKDAY
}; // WEEKDAY }; // WEEKDAY
void CRyzomTime::updateRyzomClock(uint32 gameCyle)
{
static const uint32 ticksPerDay = (RYZOM_DAY_IN_HOUR * RYZOM_HOURS_IN_TICKS);
static const float ticksPerHour = (float)RYZOM_HOURS_IN_TICKS;
uint32 totalTicks = gameCyle + _TickOffset;
uint32 days = totalTicks / ticksPerDay;
uint32 dayCycle = totalTicks - (days * ticksPerDay);
days -= RYZOM_START_SPRING;
float hours = (float)dayCycle / ticksPerHour;
_RyzomDay = days;
_RyzomTime = hours;
}
/* end of file */

@ -135,18 +135,11 @@ public:
{ {
_RyzomDay = 0; _RyzomDay = 0;
_RyzomTime = 0.f; _RyzomTime = 0.f;
_LocalTime = 0.0;
_TickOffset = 0; _TickOffset = 0;
} }
// Update ryzom clock when tick occurs, local time must be given if localUpdateRyzomClock() and getLocalRyzomTime() is used // Update ryzom clock when tick occurs, local time must be given if localUpdateRyzomClock() and getLocalRyzomTime() is used
void updateRyzomClock( uint32 gameCyle, double localTime = 0 ) void updateRyzomClock(uint32 gameCyle);
{
float hours = ( gameCyle + _TickOffset ) / float(RYZOM_HOURS_IN_TICKS);
_RyzomDay = ( (uint)hours / RYZOM_DAY_IN_HOUR ) - RYZOM_START_SPRING;
_RyzomTime = (float) fmod( hours, (float)RYZOM_DAY_IN_HOUR );
_LocalTime = localTime;
}
// get ryzom time (synchronized with server) // get ryzom time (synchronized with server)
inline float getRyzomTime() const { return _RyzomTime; } inline float getRyzomTime() const { return _RyzomTime; }
@ -202,7 +195,6 @@ private:
uint32 _RyzomDay; uint32 _RyzomDay;
float _RyzomTime; float _RyzomTime;
double _LocalTime;
uint32 _TickOffset; uint32 _TickOffset;
}; };

@ -19,6 +19,7 @@
#include "nel/misc/singleton.h" #include "nel/misc/singleton.h"
#include <time.h> #include <time.h>
#include "nel/misc/path.h" #include "nel/misc/path.h"
#include "nel/misc/common.h"
#include "nel/net/module.h" #include "nel/net/module.h"
#include "nel/net/module_builder_parts.h" #include "nel/net/module_builder_parts.h"
#include "nel/net/unified_network.h" #include "nel/net/unified_network.h"
@ -297,7 +298,7 @@ namespace ADMIN
// read the persistent state file if any // read the persistent state file if any
string filename = CPath::standardizePath(IService::getInstance()->SaveFilesDirectory.toString(), true)+AESPersistentStateFilename; string filename = CPath::standardizePath(IService::getInstance()->SaveFilesDirectory.toString(), true)+AESPersistentStateFilename;
FILE *fp = fopen(filename.c_str(), "rt"); FILE *fp = nlfopen(filename, "rt");
if (fp != NULL) if (fp != NULL)
{ {
char buffer[1024]; char buffer[1024];
@ -567,7 +568,7 @@ namespace ADMIN
if (now > _LastNagiosReport+_NagiosReportDelay) if (now > _LastNagiosReport+_NagiosReportDelay)
{ {
// write the nagios report // write the nagios report
FILE *fp = fopen("aes_nagios_report.txt", "wt"); FILE *fp = nlfopen("aes_nagios_report.txt", "wt");
if (fp != NULL) if (fp != NULL)
{ {
// output the current date // output the current date
@ -632,7 +633,7 @@ namespace ADMIN
{ {
/// The persistent service orders need to be saved /// The persistent service orders need to be saved
string filename = CPath::standardizePath(IService::getInstance()->SaveFilesDirectory.toString(), true)+AESPersistentStateFilename; string filename = CPath::standardizePath(IService::getInstance()->SaveFilesDirectory.toString(), true)+AESPersistentStateFilename;
FILE *fp = fopen(filename.c_str(), "wt"); FILE *fp = nlfopen(filename, "wt");
if (fp != NULL) if (fp != NULL)
{ {
{ {
@ -801,7 +802,7 @@ namespace ADMIN
std::string getOfflineServiceState(const std::string& serviceAlias) std::string getOfflineServiceState(const std::string& serviceAlias)
{ {
// open the file for reading // open the file for reading
FILE* f= fopen(getServiceStateFileName(serviceAlias).c_str(),"rt"); FILE* f= nlfopen(getServiceStateFileName(serviceAlias), "rt");
if (f==NULL) return "STOPPED"; if (f==NULL) return "STOPPED";
// setup a buffer to hold the text read from the file // setup a buffer to hold the text read from the file
@ -825,7 +826,7 @@ namespace ADMIN
uint32 getOfflineServicePID(const std::string& serviceAlias) uint32 getOfflineServicePID(const std::string& serviceAlias)
{ {
// open the file for reading // open the file for reading
FILE* f= fopen(getServicePIDFileName(serviceAlias).c_str(),"rt"); FILE* f = nlfopen(getServicePIDFileName(serviceAlias), "rt");
if (f==NULL) return 0; if (f==NULL) return 0;
// setup a buffer to hold the text read from the file // setup a buffer to hold the text read from the file
@ -853,7 +854,7 @@ namespace ADMIN
uint32 getServiceStartLoopCounter(const std::string& serviceAlias) uint32 getServiceStartLoopCounter(const std::string& serviceAlias)
{ {
// open the file for reading // open the file for reading
FILE* f= fopen(getServiceLoopCounterFileName(serviceAlias).c_str(),"rt"); FILE* f= nlfopen(getServiceLoopCounterFileName(serviceAlias), "rt");
if (f==NULL) if (f==NULL)
return 0; return 0;
@ -936,7 +937,7 @@ namespace ADMIN
NLMISC::CFile::createDirectoryTree(path); NLMISC::CFile::createDirectoryTree(path);
// open the file for writing // open the file for writing
FILE* f= fopen(getServiceLaunchCtrlFileName(serviceAlias, path, deferred).c_str(),"wt"); FILE* f = nlfopen(getServiceLaunchCtrlFileName(serviceAlias, path, deferred).c_str(),"wt");
if (f==NULL) return false; if (f==NULL) return false;
// write the text to the file // write the text to the file

@ -18,6 +18,7 @@
#include "nel/misc/types_nl.h" #include "nel/misc/types_nl.h"
#include <time.h> #include <time.h>
#include "nel/misc/file.h" #include "nel/misc/file.h"
#include "nel/misc/common.h"
#include "nel/misc/sstring.h" #include "nel/misc/sstring.h"
#include "nel/misc/mutable_container.h" #include "nel/misc/mutable_container.h"
#include "nel/net/service.h" #include "nel/net/service.h"
@ -195,7 +196,7 @@ namespace ADMIN
// read the persistent state file if any // read the persistent state file if any
string filename = CPath::standardizePath(IService::getInstance()->SaveFilesDirectory.toString(), true)+ASPersistentStateFilename; string filename = CPath::standardizePath(IService::getInstance()->SaveFilesDirectory.toString(), true)+ASPersistentStateFilename;
FILE *fp = fopen(filename.c_str(), "rt"); FILE *fp = nlfopen(filename, "rt");
if (fp != NULL) if (fp != NULL)
{ {
char buffer[1024]; char buffer[1024];
@ -232,7 +233,7 @@ namespace ADMIN
if (_NeedToWriteStateFile) if (_NeedToWriteStateFile)
{ {
string filename = CPath::standardizePath(IService::getInstance()->SaveFilesDirectory.toString(), true)+ASPersistentStateFilename; string filename = CPath::standardizePath(IService::getInstance()->SaveFilesDirectory.toString(), true)+ASPersistentStateFilename;
FILE *fp = fopen(filename.c_str(), "wt"); FILE *fp = nlfopen(filename, "wt");
if (fp != NULL) if (fp != NULL)
{ {
CSString line; CSString line;

@ -18,6 +18,7 @@
#include "nel/misc/command.h" #include "nel/misc/command.h"
#include "nel/misc/variable.h" #include "nel/misc/variable.h"
#include "nel/misc/common.h"
#include "nel/misc/aabbox.h" #include "nel/misc/aabbox.h"
#include "nel/misc/vector.h" #include "nel/misc/vector.h"
#include "nel/misc/vectord.h" #include "nel/misc/vectord.h"
@ -1979,7 +1980,7 @@ public:
CBMP4Image<2,2>::SHdr imageHdr(imageWidth, imageHeight); CBMP4Image<2,2>::SHdr imageHdr(imageWidth, imageHeight);
CBMP4Image<2,2>::SPalette imagePalette; CBMP4Image<2,2>::SPalette imagePalette;
FILE *outf = fopen((OutputPath+name+".bmp").c_str(),"wb"); FILE *outf = nlfopen(OutputPath+name+".bmp", "wb");
if (outf == NULL) if (outf == NULL)
return; return;
@ -2095,8 +2096,8 @@ public:
CBMP4Image<2,2>::SHdr imageHdr(imageWidth, imageHeight); CBMP4Image<2,2>::SHdr imageHdr(imageWidth, imageHeight);
CBMP4Image<2,2>::SPalette imagePalette; CBMP4Image<2,2>::SPalette imagePalette;
FILE *outf = fopen((OutputPath+name+".bmp").c_str(),"wb"); FILE *outf = nlfopen(OutputPath+name+".bmp", "wb");
FILE *outfh = fopen((OutputPath+name+"_hm.bmp").c_str(),"wb"); FILE *outfh = nlfopen(OutputPath+name+"_hm.bmp", "wb");
if (outf == NULL) if (outf == NULL)
return; return;

@ -183,7 +183,7 @@ std::string CAIScriptDataManager::dirname()
// string fullfilename = dirname() + "/" + name + ".ai_script_data"; // string fullfilename = dirname() + "/" + name + ".ai_script_data";
// if (!CFile::fileExists(fullfilename) || CFile::getFileSize(fullfilename)==0) // if (!CFile::fileExists(fullfilename) || CFile::getFileSize(fullfilename)==0)
// { // {
// FILE* fp = fopen(fullfilename.c_str(), "w"); // FILE* fp = nlfopen(fullfilename, "w");
// if (fp) // if (fp)
// { // {
// fprintf(fp, "// This file contains data for the AI script\n"); // fprintf(fp, "// This file contains data for the AI script\n");

@ -25,6 +25,7 @@
#include "entities_game_service.h" #include "entities_game_service.h"
#include "egs_globals.h" #include "egs_globals.h"
#include "nel/misc/noise_value.h" #include "nel/misc/noise_value.h"
#include "nel/misc/common.h"
#include "nel/misc/variable.h" #include "nel/misc/variable.h"
#include "nel/misc/words_dictionary.h" #include "nel/misc/words_dictionary.h"
#include "game_share/time_weather_season/time_date_season_manager.h" #include "game_share/time_weather_season/time_date_season_manager.h"
@ -587,7 +588,7 @@ void CDeposit::selectRMsByFilters( std::vector<std::string>& exactRMCodesS, cons
if ( ! depositReportCreated ) if ( ! depositReportCreated )
{ {
depositReportCreated = true; depositReportCreated = true;
depositReportFile = fopen( "deposit_contents.csv", "wt" ); // fclose() auto? depositReportFile = nlfopen( "deposit_contents.csv", "wt" ); // fclose() auto?
if ( depositReportFile ) if ( depositReportFile )
{ {
fprintf( depositReportFile, "Deposit;RM;When in year;When in day;Weather;\n" ); fprintf( depositReportFile, "Deposit;RM;When in year;When in day;Weather;\n" );

@ -2564,8 +2564,7 @@ void CGameItem::dumpGameItemStats( const string& fileName )
{ {
if( !fileName.empty() ) if( !fileName.empty() )
{ {
FILE * f; FILE *f = nlfopen(fileName, "w");
f = fopen(fileName.c_str(),"w");
if(f) if(f)
{ {

@ -791,7 +791,7 @@ void CGameItemManager::destroyItem( CGameItemPtr &ptr )
//void CGameItemManager::dumpGameItemList( const string& fileName ) //void CGameItemManager::dumpGameItemList( const string& fileName )
//{ //{
// FILE * f; // FILE * f;
// f = fopen(fileName.c_str(),"w"); // f = nlfopen(fileName, "w");
// //
// if(f) // if(f)
// { // {

@ -1240,8 +1240,8 @@ bool forageTestDoExtract(
} }
// Request and output results // Request and output results
FILE *f = fopen( std::string(getLogDirectory() + "forage_test.csv").c_str(), "at" ); FILE *f = nlfopen(getLogDirectory() + "forage_test.csv", "at" );
FILE *f2 = fopen( std::string(getLogDirectory() + "forage_test.log").c_str(), "at" ); FILE *f2 = nlfopen(getLogDirectory() + "forage_test.log", "at" );
float reqS = 1.0f / (reqPeriod * 10.0f); float reqS = 1.0f / (reqPeriod * 10.0f);
float req [CHarvestSource::NbPosRTProps]; float req [CHarvestSource::NbPosRTProps];
float abs [CHarvestSource::NbPosRTProps]; float abs [CHarvestSource::NbPosRTProps];

@ -1884,13 +1884,13 @@ void CDepositMapsBatchTask::run()
if ( ! CFile::isExists( pathName ) ) if ( ! CFile::isExists( pathName ) )
CFile::createDirectory( pathName ); CFile::createDirectory( pathName );
pathName += "/"; pathName += "/";
FILE *outputF = fopen( (pathName + "deposit_maps.html").c_str(), "w" ); FILE *outputF = nlfopen(pathName + "deposit_maps.html", "w");
if ( ! outputF ) if ( ! outputF )
{ {
nlwarning( "Can't create file %sdeposit_maps.html", pathName.c_str() ); nlwarning( "Can't create file %sdeposit_maps.html", pathName.c_str() );
return; return;
} }
FILE *inputF = fopen( _InputFilename.c_str(), "r" ); FILE *inputF = nlfopen(_InputFilename, "r");
if ( ! inputF ) if ( ! inputF )
{ {
fprintf( outputF, "File %s not found", _InputFilename.c_str() ); fprintf( outputF, "File %s not found", _InputFilename.c_str() );

@ -192,7 +192,7 @@ void CCDBSynchronised::write( const string& fileName )
if ( _DataStructRoot ) if ( _DataStructRoot )
{ {
TWriteCallbackArg wca; TWriteCallbackArg wca;
wca.F = fopen( fileName.c_str(),"w" ); wca.F = nlfopen(fileName, "w");
wca.Container = &_DataContainer; wca.Container = &_DataContainer;
ICDBStructNode::CTextId id; ICDBStructNode::CTextId id;
_DataStructRoot->foreachLeafCall( cbWrite, id, &wca ); _DataStructRoot->foreachLeafCall( cbWrite, id, &wca );

@ -102,11 +102,11 @@ void CPlayer::checkCrashMarker()
if (!CFile::isExists(LastLoadFileName)) if (!CFile::isExists(LastLoadFileName))
{ {
// create the file if needed // create the file if needed
nlverify(LastLoad = fopen(LastLoadFileName, "wb")); nlverify(LastLoad = nlfopen(LastLoadFileName, "wb"));
fclose(LastLoad); fclose(LastLoad);
} }
nlverify(LastLoad = fopen(LastLoadFileName, "r+b")); nlverify(LastLoad = nlfopen(LastLoadFileName, "r+b"));
// check // check
uint32 lastBad[2]; uint32 lastBad[2];

@ -118,7 +118,7 @@ void CSession::log(const NLMISC::CSString& lang,const NLMISC::CSString& txt)
nlassert(!fileName.empty()); nlassert(!fileName.empty());
nlinfo("Opening new log file: %s",fileName.c_str()); nlinfo("Opening new log file: %s",fileName.c_str());
_Files[lang]= fopen(fileName.c_str(),"wb"); _Files[lang]= nlfopen(fileName, "wb");
DROP_IF(_Files[lang]==NULL,"Failed to open log file for writing: "+fileName,return); DROP_IF(_Files[lang]==NULL,"Failed to open log file for writing: "+fileName,return);
} }
fprintf(_Files[lang],"%s\n",txt.c_str()); fprintf(_Files[lang],"%s\n",txt.c_str());

@ -391,7 +391,7 @@ void CRepositoryReceiver::beginFile(NLNET::IModuleProxy *sender, const std::stri
_CurrentFileExpected= fileSize; _CurrentFileExpected= fileSize;
// open the temp file // open the temp file
_CurrentFileHandle= fopen(rrTempFileName(_TargetDirectory,_EmitterName).c_str(),"wb"); _CurrentFileHandle= nlfopen(rrTempFileName(_TargetDirectory,_EmitterName), "wb");
BOMB_IF(_CurrentFileHandle==NULL,"Failed to open temporary file for writing: "+rrTempFileName(_TargetDirectory,_EmitterName),return); BOMB_IF(_CurrentFileHandle==NULL,"Failed to open temporary file for writing: "+rrTempFileName(_TargetDirectory,_EmitterName),return);
} }

@ -88,7 +88,7 @@ public:
NLMISC::CFile::deleteFile(_TmpFileName); NLMISC::CFile::deleteFile(_TmpFileName);
DROP_IF(NLMISC::CFile::fileExists(_TmpFileName),"Failed to delete file: "+_TmpFileName,return); DROP_IF(NLMISC::CFile::fileExists(_TmpFileName),"Failed to delete file: "+_TmpFileName,return);
_File= fopen(_TmpFileName.c_str(),"wb"); _File = nlfopen(_TmpFileName,"wb");
} }
~CSimpleFileDisplayer() ~CSimpleFileDisplayer()

@ -19,6 +19,7 @@
#include <time.h> #include <time.h>
#include "nel/misc/time_nl.h" #include "nel/misc/time_nl.h"
#include "nel/misc/thread.h" #include "nel/misc/thread.h"
#include "nel/misc/common.h"
#include "nel/misc/random.h" #include "nel/misc/random.h"
#include "nel/misc/singleton.h" #include "nel/misc/singleton.h"
#include "nel/net/service.h" #include "nel/net/service.h"
@ -926,7 +927,7 @@ public:
// prepare the output file // prepare the output file
string outputFile = queryOptions.OutputPrefix+LogQueryResultFile.get(); string outputFile = queryOptions.OutputPrefix+LogQueryResultFile.get();
FILE *fp = fopen(outputFile.c_str(), "wt");; FILE *fp = nlfopen(outputFile, "wt");;
if (fp == NULL) if (fp == NULL)
{ {
_QueryStatus.write(TThreadStatus(qs_push_state, "ErrorWritingQueryResult")); _QueryStatus.write(TThreadStatus(qs_push_state, "ErrorWritingQueryResult"));

@ -21,6 +21,7 @@
// nel // nel
#include "nel/misc/variable.h" #include "nel/misc/variable.h"
#include "nel/misc/file.h" #include "nel/misc/file.h"
#include "nel/misc/common.h"
// game share // game share
#include "game_share/utils.h" #include "game_share/utils.h"
@ -599,7 +600,7 @@ namespace PATCHMAN
// nldebug("- Reading file data @offset: %d (%d bytes)",newFileEntry.StartOffset,fileSize); // nldebug("- Reading file data @offset: %d (%d bytes)",newFileEntry.StartOffset,fileSize);
// read in the file // read in the file
FILE* inf= fopen(fileName.c_str(),"rb"); FILE* inf = nlfopen(fileName, "rb");
BOMB_IF(inf==NULL,"Failed to open input file for reading: "+fileName,return false); BOMB_IF(inf==NULL,"Failed to open input file for reading: "+fileName,return false);
uint32 bytesRead=(uint32)fread(&_CacheBuffer[newFileEntry.StartOffset],1,fileSize,inf); uint32 bytesRead=(uint32)fread(&_CacheBuffer[newFileEntry.StartOffset],1,fileSize,inf);
fclose(inf); fclose(inf);

@ -409,7 +409,7 @@ void CRepositoryReceiver::fileList(NLNET::IModuleProxy *sender, uint32 version,
// _CurrentFileExpected= fileSize; // _CurrentFileExpected= fileSize;
// //
// // open the temp file // // open the temp file
// _CurrentFileHandle= fopen(rrTempFileName(_TargetDirectories.patchDirectoryName(),_EmitterName).c_str(),"wb"); // _CurrentFileHandle= nlfopen(rrTempFileName(_TargetDirectories.patchDirectoryName(),_EmitterName), "wb");
// BOMB_IF(_CurrentFileHandle==NULL,"Failed to open temporary file for writing: "+rrTempFileName(_TargetDirectories.patchDirectoryName(),_EmitterName),return); // BOMB_IF(_CurrentFileHandle==NULL,"Failed to open temporary file for writing: "+rrTempFileName(_TargetDirectories.patchDirectoryName(),_EmitterName),return);
// } // }
// //

@ -20,6 +20,7 @@
// nel // nel
#include "nel/misc/variable.h" #include "nel/misc/variable.h"
#include "nel/misc/common.h"
#include "nel/net/service.h" #include "nel/net/service.h"
#include "nel/net/module.h" #include "nel/net/module.h"
#include "nel/net/module_builder_parts.h" #include "nel/net/module_builder_parts.h"
@ -775,7 +776,7 @@ NLMISC_CLASS_COMMAND_IMPL(CServerPatchTerminal, depDevCfg)
CSString cfgFileName= appDesc.CmdLine.firstWord()+".cfg"; CSString cfgFileName= appDesc.CmdLine.firstWord()+".cfg";
string fileName = configDirectory+cfgFileName; string fileName = configDirectory+cfgFileName;
FILE *fp = fopen(fileName.c_str(), "wt"); FILE *fp = nlfopen(fileName, "wt");
nlassert(fp != NULL); nlassert(fp != NULL);
fwrite(appDesc.CfgFile.data(), appDesc.CfgFile.size(), 1, fp); fwrite(appDesc.CfgFile.data(), appDesc.CfgFile.size(), 1, fp);
fclose(fp); fclose(fp);
@ -808,7 +809,7 @@ NLMISC_CLASS_COMMAND_IMPL(CServerPatchTerminal, depDevCfg)
batch << "start " << cmdLine; batch << "start " << cmdLine;
fileName = DevConfigDirectory.get()+"/start_"+appDesc.ShardName+"_"+appDesc.StartOrder+"_"+appDesc.AppName+".bat"; fileName = DevConfigDirectory.get()+"/start_"+appDesc.ShardName+"_"+appDesc.StartOrder+"_"+appDesc.AppName+".bat";
fp = fopen(fileName.c_str(), "wt"); fp = nlfopen(fileName, "wt");
nlassert(fp != NULL); nlassert(fp != NULL);
fwrite(batch.data(), batch.size(), 1, fp); fwrite(batch.data(), batch.size(), 1, fp);
fclose(fp); fclose(fp);

@ -22,6 +22,7 @@
*/ */
#include <nel/misc/types_nl.h> #include <nel/misc/types_nl.h>
#include <nel/misc/stream.h> #include <nel/misc/stream.h>
#include <nel/misc/common.h>
#include <nel/misc/bit_set.h> #include <nel/misc/bit_set.h>
#include <nel/misc/variable.h> #include <nel/misc/variable.h>
@ -282,7 +283,7 @@ public:
if (_File != NULL) if (_File != NULL)
return false; return false;
_File = fopen(filename, mode); _File = nlfopen(filename, mode);
if (_File == NULL) if (_File == NULL)
return false; return false;

@ -19,6 +19,7 @@
#include "nel/misc/types_nl.h" #include "nel/misc/types_nl.h"
#include "nel/misc/file.h" #include "nel/misc/file.h"
#include "nel/misc/path.h" #include "nel/misc/path.h"
#include "nel/misc/common.h"
#include "nel/misc/sstring.h" #include "nel/misc/sstring.h"
#include "nel/net/service.h" #include "nel/net/service.h"
#include "game_share/utils.h" #include "game_share/utils.h"
@ -101,7 +102,7 @@ public:
ptm = gmtime(&endTime); ptm = gmtime(&endTime);
// write to the log file // write to the log file
FILE* fileHandle= fopen(DailyActivityLogFileName,"ab"); FILE* fileHandle= nlfopen(DailyActivityLogFileName,"ab");
nlassert(fileHandle!=NULL); nlassert(fileHandle!=NULL);
fprintf(fileHandle,"%02u/%02u/%u CDailyTaskScheduler: Started: %02u:%02u, Finished: %02u:%02u, Executed %u commands Started %u Jobs\n", fprintf(fileHandle,"%02u/%02u/%u CDailyTaskScheduler: Started: %02u:%02u, Finished: %02u:%02u, Executed %u commands Started %u Jobs\n",
ptm->tm_mday, ptm->tm_mon+1, ptm->tm_year+1900, (uint)startTime/3600%24, (uint)startTime/60%60, (uint)endTime/3600%24, (uint)endTime/60%60, commandsVar==NULL?0:commandsVar->size(), jobsRemaining ); ptm->tm_mday, ptm->tm_mon+1, ptm->tm_year+1900, (uint)startTime/3600%24, (uint)startTime/60%60, (uint)endTime/3600%24, (uint)endTime/60%60, commandsVar==NULL?0:commandsVar->size(), jobsRemaining );

@ -19,6 +19,7 @@
#include "nel/misc/types_nl.h" #include "nel/misc/types_nl.h"
#include "nel/misc/file.h" #include "nel/misc/file.h"
#include "nel/misc/path.h" #include "nel/misc/path.h"
#include "nel/misc/common.h"
#include "nel/misc/sstring.h" #include "nel/misc/sstring.h"
#include "nel/net/service.h" #include "nel/net/service.h"
#include "game_share/utils.h" #include "game_share/utils.h"
@ -101,7 +102,7 @@ public:
ptm = gmtime(&endTime); ptm = gmtime(&endTime);
// write to the log file // write to the log file
FILE* fileHandle= fopen(HourlyActivityLogFileName,"ab"); FILE* fileHandle= nlfopen(HourlyActivityLogFileName,"ab");
nlassert(fileHandle!=NULL); nlassert(fileHandle!=NULL);
fprintf(fileHandle,"%02u/%02u/%u CHourlyTaskScheduler: Started: %02u:%02u, Finished: %02u:%02u, Executed %u commands Started %u Jobs\n", fprintf(fileHandle,"%02u/%02u/%u CHourlyTaskScheduler: Started: %02u:%02u, Finished: %02u:%02u, Executed %u commands Started %u Jobs\n",
ptm->tm_mday, ptm->tm_mon+1, ptm->tm_year+1900, (uint)startTime/3600%24, (uint)startTime/60%60, (uint)endTime/3600%24, (uint)endTime/60%60, commandsVar==NULL?0:commandsVar->size(), jobsRemaining ); ptm->tm_mday, ptm->tm_mon+1, ptm->tm_year+1900, (uint)startTime/3600%24, (uint)startTime/60%60, (uint)endTime/3600%24, (uint)endTime/60%60, commandsVar==NULL?0:commandsVar->size(), jobsRemaining );

@ -31,6 +31,7 @@
// Nel // Nel
#include "nel/misc/sheet_id.h" #include "nel/misc/sheet_id.h"
#include "nel/misc/command.h" #include "nel/misc/command.h"
#include "nel/misc/common.h"
#include "nel/georges/u_form_elm.h" #include "nel/georges/u_form_elm.h"
#include "nel/georges/u_form.h" #include "nel/georges/u_form.h"
#include "nel/georges/u_form_loader.h" #include "nel/georges/u_form_loader.h"
@ -270,7 +271,7 @@ void CTestingTool::startTestSession( const std::string& sheet )
//---------------------------------------------------------------- //----------------------------------------------------------------
void CTestingTool::testSessionProceed() void CTestingTool::testSessionProceed()
{ {
_TestSessionReport = fopen( "testSessionReport.txt", "w+t" ); _TestSessionReport = nlfopen( "testSessionReport.txt", "w+t" );
fputs( "=====================================================================\n", _TestSessionReport ); fputs( "=====================================================================\n", _TestSessionReport );
fputs( "===================== NEW TEST SESSION STARTED ======================\n", _TestSessionReport ); fputs( "===================== NEW TEST SESSION STARTED ======================\n", _TestSessionReport );

@ -27,11 +27,7 @@ SET(CLIENT_CONFIG_UIS
sys_info_widget.ui sys_info_widget.ui
) )
SET(CLIENT_CONFIG_TRANS FILE(GLOB CLIENT_CONFIG_TRANS translations/*.ts)
${CMAKE_CURRENT_SOURCE_DIR}/translations/ryzom_configuration_en.ts
${CMAKE_CURRENT_SOURCE_DIR}/translations/ryzom_configuration_fr.ts
${CMAKE_CURRENT_SOURCE_DIR}/translations/ryzom_configuration_hu.ts
)
CONFIGURE_FILE(translations/translations.qrc ${CMAKE_CURRENT_BINARY_DIR}/translations.qrc COPYONLY) CONFIGURE_FILE(translations/translations.qrc ${CMAKE_CURRENT_BINARY_DIR}/translations.qrc COPYONLY)
SET(CLIENT_CONFIG_RCS resources.qrc ${CMAKE_CURRENT_BINARY_DIR}/translations.qrc ) SET(CLIENT_CONFIG_RCS resources.qrc ${CMAKE_CURRENT_BINARY_DIR}/translations.qrc )
@ -47,6 +43,8 @@ IF(WITH_QT)
ADD_DEFINITIONS(${QT_DEFINITIONS}) ADD_DEFINITIONS(${QT_DEFINITIONS})
ELSE() ELSE()
# uncomment this line if you want to update original translations
# QT5_CREATE_TRANSLATION(CLIENT_CONFIG_QM ${CLIENT_CONFIG_UIS} ${SRC} ${CLIENT_CONFIG_TRANS})
QT5_ADD_TRANSLATION(CLIENT_CONFIG_QM ${CLIENT_CONFIG_TRANS}) QT5_ADD_TRANSLATION(CLIENT_CONFIG_QM ${CLIENT_CONFIG_TRANS})
QT5_ADD_RESOURCES(CLIENT_CONFIG_RC_SRCS ${CLIENT_CONFIG_RCS}) QT5_ADD_RESOURCES(CLIENT_CONFIG_RC_SRCS ${CLIENT_CONFIG_RCS})
QT5_WRAP_CPP(CLIENT_CONFIG_MOC_SRC ${CLIENT_CONFIG_HDR}) QT5_WRAP_CPP(CLIENT_CONFIG_MOC_SRC ${CLIENT_CONFIG_HDR})

@ -31,6 +31,10 @@
#include <QtGui> #include <QtGui>
#include <QMessageBox> #include <QMessageBox>
#include "nel/misc/cmd_args.h"
extern NLMISC::CCmdArgs Args;
CClientConfigDialog::CClientConfigDialog( QWidget *parent ) : CClientConfigDialog::CClientConfigDialog( QWidget *parent ) :
QDialog( parent ) QDialog( parent )
{ {
@ -145,16 +149,29 @@ void CClientConfigDialog::onClickPlay()
{ {
bool started = false; bool started = false;
QStringList arguments;
if (Args.haveArg("p"))
{
arguments << "-p" << QString::fromUtf8(Args.getArg("p").front().c_str());
}
QString clientFullPath = QString::fromUtf8(Args.getProgramPath().c_str());
#ifdef Q_OS_WIN32 #ifdef Q_OS_WIN32
started = QProcess::startDetached( "ryzom_client_r.exe" ); #ifdef _DEBUG
if( !started ) clientFullPath += "ryzom_client_d.exe";
QProcess::startDetached( "ryzom_client_d.exe" ); #else
clientFullPath += "ryzom_client_r.exe";
#endif
#elif defined(Q_OS_MAC) #elif defined(Q_OS_MAC)
started = QProcess::startDetached( "./Ryzom.app" ); clientFullPath += "Ryzom";
#else #else
started = QProcess::startDetached( "./ryzom_client" ); clientFullPath += "ryzom_client";
#endif #endif
started = QProcess::startDetached(clientFullPath, arguments);
onClickOK(); onClickOK();
} }

@ -17,6 +17,10 @@
#include "stdpch.h" #include "stdpch.h"
#include "config.h" #include "config.h"
#include "nel/misc/common.h"
#include "nel/misc/i18n.h"
#include "nel/misc/path.h"
CConfig::CConfig() CConfig::CConfig()
{ {
} }
@ -25,17 +29,50 @@ CConfig::~CConfig()
{ {
} }
bool CConfig::load( const char *fileName ) bool CConfig::create(const std::string &configFileName, const std::string &defaultFileName)
{
NLMISC::CFile::createDirectoryTree(NLMISC::CFile::getPath(configFileName));
// create the basic .cfg
FILE *fp = NLMISC::nlfopen(configFileName, "w");
if (fp == NULL) return false;
// store full path to default config file
fprintf(fp, "RootConfigFilename = \"%s\";\n", defaultFileName.c_str());
// get current locale
std::string lang = NLMISC::CI18N::getSystemLanguageCode();
const std::vector<std::string> &languages = NLMISC::CI18N::getLanguageCodes();
// search if current locale is defined in language codes
for(uint i = 0; i < languages.size(); ++i)
{
if (lang == languages[i])
{
// store the language code in the config file
fprintf(fp, "LanguageCode = \"%s\";\n", lang.c_str());
break;
}
}
fclose(fp);
return true;
}
bool CConfig::load(const std::string &fileName)
{ {
try try
{ {
cf.load(fileName); cf.load(fileName);
std::string def = getString("RootConfigFilename"); std::string def = getString("RootConfigFilename");
if( def.compare( "" ) != 0 ) if (!def.empty())
dcf.load(def); dcf.load(def);
} }
catch( NLMISC::Exception &e ) catch (const NLMISC::Exception &e)
{ {
nlwarning( "%s", e.what() ); nlwarning( "%s", e.what() );
return false; return false;
@ -51,7 +88,7 @@ bool CConfig::reload()
cf.clear(); cf.clear();
cf.reparse(); cf.reparse();
} }
catch( NLMISC::Exception &e ) catch (const NLMISC::Exception &e)
{ {
nlwarning( "%s", e.what() ); nlwarning( "%s", e.what() );
return false; return false;
@ -112,7 +149,7 @@ bool CConfig::save()
{ {
cf.save(); cf.save();
} }
catch( NLMISC::Exception &e ) catch (const NLMISC::Exception &e)
{ {
nlwarning( "%s", e.what() ); nlwarning( "%s", e.what() );
return false; return false;

@ -28,12 +28,20 @@ public:
CConfig(); CConfig();
~CConfig(); ~CConfig();
/**
@brief Create a config file.
@param fileName - The config file to create
@param defaultFileName - The default config file to use
@return Returns true on success, returns false on failure.
*/
bool create(const std::string &fileName, const std::string &defaultFileName);
/** /**
@brief Loads a config file. @brief Loads a config file.
@param fileName - The file to load @param fileName - The file to load
@return Returns true on success, returns false on failure. @return Returns true on success, returns false on failure.
*/ */
bool load( const char *fileName ); bool load(const std::string &fileName);
/** /**
@brief Reloads the contents of the config file @brief Reloads the contents of the config file

@ -28,7 +28,7 @@
<item> <item>
<widget class="QCheckBox" name="texcompressionCheckBox"> <widget class="QCheckBox" name="texcompressionCheckBox">
<property name="text"> <property name="text">
<string>Disable texture compression</string> <string>Force texture compression</string>
</property> </property>
</widget> </widget>
</item> </item>

@ -90,10 +90,10 @@ void CDisplaySettingsWidget::load()
windowedRadioButton->setChecked( true ); windowedRadioButton->setChecked( true );
} }
widthLineEdit->setText( QString( "%1" ).arg( mode.width ) ); widthLineEdit->setText(QString::number(mode.width));
heightLineEdit->setText( QString( "%1" ).arg( mode.height ) ); heightLineEdit->setText(QString::number(mode.height));
xpositionLineEdit->setText( QString( "%1" ).arg( s.config.getInt( "PositionX" ) ) ); xpositionLineEdit->setText(QString::number(s.config.getInt("PositionX")));
ypositionLineEdit->setText( QString( "%1" ).arg( s.config.getInt( "PositionY" ) ) ); ypositionLineEdit->setText(QString::number(s.config.getInt("PositionY")));
} }
@ -165,8 +165,19 @@ void CDisplaySettingsWidget::updateVideoModes()
} }
while(itr != iend) while(itr != iend)
{
if (itr->frequency)
{ {
videomodeComboBox->addItem(QString("%1x%2 %3 bit @%4").arg(itr->width).arg(itr->height).arg(itr->depth).arg(itr->frequency)); videomodeComboBox->addItem(QString("%1x%2 %3 bit @%4").arg(itr->width).arg(itr->height).arg(itr->depth).arg(itr->frequency));
}
else if (itr->width)
{
videomodeComboBox->addItem(QString("%1x%2 %3 bit").arg(itr->width).arg(itr->height).arg(itr->depth));
}
else
{
videomodeComboBox->addItem(tr("Auto"));
}
++itr; ++itr;
} }
@ -183,7 +194,7 @@ uint32 CDisplaySettingsWidget::findVideoModeIndex( CVideoMode *mode )
//| --------------------------------------| //| --------------------------------------|
//| Auto | OpenGL modes | //| Auto | OpenGL modes |
//| OpenGL | OpenGL modes | //| OpenGL | OpenGL modes |
//| Direct3D | Direct3d modes | //| Direct3D | Direct3D modes |
//| --------------------------------------| //| --------------------------------------|
// //
// //

@ -25,7 +25,7 @@
<item> <item>
<widget class="QLabel" name="label"> <widget class="QLabel" name="label">
<property name="text"> <property name="text">
<string>Specify if Ryzom is to be run in OpenGL or Direct3D.</string> <string>Specify if Ryzom is to be run in OpenGL or Direct3D:</string>
</property> </property>
</widget> </widget>
</item> </item>
@ -78,7 +78,7 @@
<item> <item>
<widget class="QLabel" name="label_3"> <widget class="QLabel" name="label_3">
<property name="text"> <property name="text">
<string>Specify a video mode</string> <string>Specify a video mode:</string>
</property> </property>
</widget> </widget>
</item> </item>

@ -43,11 +43,6 @@
<string>German</string> <string>German</string>
</property> </property>
</item> </item>
<item>
<property name="text">
<string>Hungarian</string>
</property>
</item>
</widget> </widget>
</item> </item>
<item> <item>

@ -18,6 +18,7 @@
#include "client_config_dialog.h" #include "client_config_dialog.h"
#include "system.h" #include "system.h"
#include "nel/misc/cmd_args.h"
#include <QSplashScreen> #include <QSplashScreen>
@ -36,27 +37,117 @@
#endif #endif
NLMISC::CCmdArgs Args;
int main(sint32 argc, char **argv) int main(sint32 argc, char **argv)
{ {
NLMISC::CApplicationContext applicationContext; NLMISC::CApplicationContext applicationContext;
QApplication app(argc, argv); QApplication app(argc, argv);
// parse command-line arguments
Args.setDescription("Ryzom Configuration");
Args.addArg("p", "profile", "id", "Use this profile to determine what directory to use by default");
if (!Args.parse(argc, argv)) return 1;
QApplication::setWindowIcon(QIcon(":/resources/welcome_icon.png")); QApplication::setWindowIcon(QIcon(":/resources/welcome_icon.png"));
QPixmap pixmap(":/resources/splash_screen.png" ); QPixmap pixmap(":/resources/splash_screen.png" );
QSplashScreen splash( pixmap ); QSplashScreen splash( pixmap );
splash.show(); splash.show();
QString locale = QLocale::system().name().left(2); QLocale locale = QLocale::system();
// load application translations
QTranslator localTranslator; QTranslator localTranslator;
if (localTranslator.load(QString(":/translations/ryzom_configuration_%1.qm").arg(locale))) if (localTranslator.load(locale, "ryzom_configuration", "_", ":/translations"))
{ {
app.installTranslator(&localTranslator); QApplication::installTranslator(&localTranslator);
} }
CSystem::GetInstance().config.load( "client.cfg" ); // load Qt default translations
QTranslator qtTranslator;
if (qtTranslator.load(locale, "qt", "_", ":/translations"))
{
QApplication::installTranslator(&qtTranslator);
}
// Known cases:
// 1. Steam
// - Linux and Windows: all files in Steam folder
// - OS X: client.cfg in ~/Library/Application Support/Ryzom, client_default.cfg in Steam folder
// 2. Installer
// - Linux: client.cfg in ~/.ryzom/<config>/ client_default.cfg in ~/.ryzom/ryzom_live/
// - Windows: client.cfg in Roaming/Ryzom/<config>/ client_default.cfg in Local/Ryzom/ryzom_live/
// - OS X: client.cfg in ~/Library/Application Support/Ryzom/<config>/ client_default.cfg in ~/Library/Application Support/Ryzom/ryzom_live/
// default paths
std::string ryzomDir = NLMISC::CPath::standardizePath(NLMISC::CPath::getApplicationDirectory("Ryzom"));
std::string currentDir = Args.getStartupPath();
std::string executableDir = Args.getProgramPath();
std::string configFilename = "client.cfg";
std::string configPath;
// search client.cfg file in config directory (Ryzom Installer)
if (Args.haveArg("p"))
{
ryzomDir = NLMISC::CPath::standardizePath(ryzomDir + Args.getArg("p").front());
// client.cfg is always in profile directory if using -p argument
configPath = ryzomDir + configFilename;
}
else
{
#ifdef NL_OS_MAC
// client.cfg is in ~/Library/Application Support/Ryzom under OS X
configPath = ryzomDir + configFilename;
#else
// client.cfg is in current directory under other platforms
configPath = currentDir + configFilename;
#endif
}
// if file doesn't exist, create it
if (!NLMISC::CFile::fileExists(configPath))
{
// we need the full path to client_default.cfg
std::string defaultConfigFilename = "client_default.cfg";
std::string defaultConfigPath;
#ifdef NL_OS_MAC
// fix path inside bundle
defaultConfigPath = NLMISC::CPath::makePathAbsolute("../Resources", executableDir, true) + defaultConfigFilename;
#else
// same path as executables
defaultConfigPath = executableDir + defaultConfigFilename;
#endif
// test if default config exists in determined path
if (!NLMISC::CFile::fileExists(defaultConfigPath))
{
defaultConfigPath = currentDir + defaultConfigFilename;
// test if default config exists in current path
if (!NLMISC::CFile::fileExists(defaultConfigPath))
{
nlwarning("Unable to find %s", defaultConfigFilename.c_str());
return 1;
}
}
if (!CSystem::GetInstance().config.create(configPath, defaultConfigPath))
{
nlwarning("Unable to create %s", configPath.c_str());
return 1;
}
}
if (!CSystem::GetInstance().config.load(configPath))
{
nlwarning("Unable to load %s", configPath.c_str());
return 1;
}
CClientConfigDialog d; CClientConfigDialog d;
d.show(); d.show();

@ -27,7 +27,7 @@ CSysInfoWidget::CSysInfoWidget( QWidget *parent ) :
osLabel->setText(QString::fromUtf8(CSystem::GetInstance().sysInfo.osName.c_str())); osLabel->setText(QString::fromUtf8(CSystem::GetInstance().sysInfo.osName.c_str()));
cpuLabel->setText(QString::fromUtf8(CSystem::GetInstance().sysInfo.cpuName.c_str())); cpuLabel->setText(QString::fromUtf8(CSystem::GetInstance().sysInfo.cpuName.c_str()));
ramLabel->setText(QString(tr("%1 MB").arg(CSystem::GetInstance().sysInfo.totalRAM))); ramLabel->setText(QString(tr("%1 MiB").arg(CSystem::GetInstance().sysInfo.totalRAM)));
gfxcardLabel->setText(QString::fromUtf8(CSystem::GetInstance().sysInfo.videoDevice.c_str())); gfxcardLabel->setText(QString::fromUtf8(CSystem::GetInstance().sysInfo.videoDevice.c_str()));
gfxdriverLabel->setText(QString::fromUtf8(CSystem::GetInstance().sysInfo.videoDriverVersion.c_str())); gfxdriverLabel->setText(QString::fromUtf8(CSystem::GetInstance().sysInfo.videoDriverVersion.c_str()));

@ -160,6 +160,16 @@ void CSystem::GetVideoModes( std::vector< CVideoMode > &dst, NL3D::IDriver *driv
std::vector< NL3D::GfxMode > modes; std::vector< NL3D::GfxMode > modes;
driver->getModes( modes ); driver->getModes( modes );
{
// auto mode
CVideoMode mode;
mode.depth = 0;
mode.width = 0;
mode.height = 0;
mode.frequency = 0;
dst.push_back( mode );
}
for( std::vector< NL3D::GfxMode >::iterator itr = modes.begin(); itr != modes.end(); ++itr ) for( std::vector< NL3D::GfxMode >::iterator itr = modes.begin(); itr != modes.end(); ++itr )
{ {
if( ( itr->Width >= 800 ) && ( itr->Height >= 600 ) && ( itr->Depth >= 16 ) ) if( ( itr->Width >= 800 ) && ( itr->Height >= 600 ) && ( itr->Depth >= 16 ) )

@ -0,0 +1,508 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1" language="de" sourcelanguage="en">
<context>
<name>CClientConfigDialog</name>
<message>
<location filename="../client_config_dialog.cpp" line="251"/>
<source>Ryzom configuration</source>
<translation>Ryzom Konfiguration</translation>
</message>
<message>
<location filename="../client_config_dialog.cpp" line="252"/>
<source>Are you sure you want to quit without saving the configuration?</source>
<translation>Bist du sicher, dass du abbrechen willst, ohne die Konfiguration zu sichern?</translation>
</message>
</context>
<context>
<name>CDisplaySettingsDetailsWidget</name>
<message>
<location filename="../display_settings_details_widget.cpp" line="218"/>
<source>Low</source>
<translation>Niedrig</translation>
</message>
<message>
<location filename="../display_settings_details_widget.cpp" line="221"/>
<source>Medium</source>
<translation>Mittel</translation>
</message>
<message>
<location filename="../display_settings_details_widget.cpp" line="224"/>
<source>Normal</source>
<translation>Normal</translation>
</message>
<message>
<location filename="../display_settings_details_widget.cpp" line="227"/>
<source>High</source>
<translation>Hoch</translation>
</message>
<message>
<location filename="../display_settings_details_widget.cpp" line="240"/>
<source>Low (32 MB)</source>
<translation>Niedrig (32 MB)</translation>
</message>
<message>
<location filename="../display_settings_details_widget.cpp" line="244"/>
<source>Normal (64 MB)</source>
<translation>Normal (64 MB)</translation>
</message>
<message>
<location filename="../display_settings_details_widget.cpp" line="248"/>
<source>High (128 MB)</source>
<translation>Hoch (128 MB)</translation>
</message>
</context>
<context>
<name>CDisplaySettingsWidget</name>
<message>
<location filename="../display_settings_widget.cpp" line="179"/>
<source>Auto</source>
<translatorcomment>if too long, Auto is sufficient (just ugly, as in German the short form also means &quot;car&quot;)</translatorcomment>
<translation>Automatisch</translation>
</message>
</context>
<context>
<name>CSoundSettingsWidget</name>
<message>
<location filename="../sound_settings_widget.cpp" line="92"/>
<source>%1 tracks</source>
<translatorcomment>audio-channels?</translatorcomment>
<translation>%1 Tonspuren</translation>
</message>
</context>
<context>
<name>CSysInfoWidget</name>
<message>
<location filename="../sys_info_widget.cpp" line="30"/>
<source>%1 MiB</source>
<translation>%1 MiB</translation>
</message>
</context>
<context>
<name>client_config_dialog</name>
<message>
<location filename="../client_config_dialog.ui" line="20"/>
<source>Ryzom Configuration</source>
<translation>Ryzom-Konfiguration</translation>
</message>
<message>
<location filename="../client_config_dialog.ui" line="107"/>
<location filename="../client_config_dialog.ui" line="135"/>
<source>General</source>
<translation>Allgemein</translation>
</message>
<message>
<location filename="../client_config_dialog.ui" line="130"/>
<source>Category</source>
<translation>Kategorie</translation>
</message>
<message>
<location filename="../client_config_dialog.ui" line="146"/>
<source>Display</source>
<translation>Anzeige</translation>
</message>
<message>
<location filename="../client_config_dialog.ui" line="156"/>
<source>Display details</source>
<translation>Anzeigedetails</translation>
</message>
<message>
<location filename="../client_config_dialog.ui" line="161"/>
<source>Display advanced</source>
<translation>Anzeige erweitert</translation>
</message>
<message>
<location filename="../client_config_dialog.ui" line="167"/>
<source>Sound</source>
<translation>Sound</translation>
</message>
<message>
<location filename="../client_config_dialog.ui" line="178"/>
<source>System information</source>
<translation>System-Information</translation>
</message>
<message>
<location filename="../client_config_dialog.ui" line="188"/>
<source>OpenGL information</source>
<translation>OpenGL-Information</translation>
</message>
<message>
<location filename="../client_config_dialog.ui" line="193"/>
<source>Direct3D information</source>
<translation>Direct3D-Information</translation>
</message>
<message>
<location filename="../client_config_dialog.ui" line="245"/>
<source>Apply</source>
<translation>Anwenden</translation>
</message>
<message>
<location filename="../client_config_dialog.ui" line="252"/>
<source>Default</source>
<translation>Standard</translation>
</message>
<message>
<location filename="../client_config_dialog.ui" line="259"/>
<source>Play Ryzom</source>
<translation>Ryzom spielen</translation>
</message>
</context>
<context>
<name>display_settings_advanced_widget</name>
<message>
<location filename="../display_settings_advanced_widget.ui" line="14"/>
<source>Display advanced</source>
<translation>Anzeige erweitert</translation>
</message>
<message>
<location filename="../display_settings_advanced_widget.ui" line="22"/>
<source>Modify these settings only if you have trouble launching the game</source>
<translation>Modifiziere diese Einstellungen nur dann, wenn du Probleme mit dem Starten des Spiels hast</translation>
</message>
<message>
<location filename="../display_settings_advanced_widget.ui" line="31"/>
<source>Force texture compression</source>
<translation>Erzwinge Textur-Kompression</translation>
</message>
<message>
<location filename="../display_settings_advanced_widget.ui" line="38"/>
<source>Disable vertex shaders</source>
<translation>Deaktiviere Vertex-Shader</translation>
</message>
<message>
<location filename="../display_settings_advanced_widget.ui" line="45"/>
<source>Disable AGP for vertices</source>
<translation>Deaktiviere AGP für Vertexeckpunkte</translation>
</message>
<message>
<location filename="../display_settings_advanced_widget.ui" line="52"/>
<source>Disable pixel shaders</source>
<translation>Deaktiviere Pixel-Shader</translation>
</message>
</context>
<context>
<name>display_settings_details_widget</name>
<message>
<location filename="../display_settings_details_widget.ui" line="14"/>
<source>Display details</source>
<translation>Anzeigedetails</translation>
</message>
<message>
<location filename="../display_settings_details_widget.ui" line="20"/>
<source>Landscape</source>
<translation>Landschaft</translation>
</message>
<message>
<location filename="../display_settings_details_widget.ui" line="30"/>
<location filename="../display_settings_details_widget.ui" line="116"/>
<location filename="../display_settings_details_widget.ui" line="196"/>
<location filename="../display_settings_details_widget.ui" line="276"/>
<source>Level of detail</source>
<translation>Detailstufe</translation>
</message>
<message>
<location filename="../display_settings_details_widget.ui" line="94"/>
<location filename="../display_settings_details_widget.ui" line="174"/>
<location filename="../display_settings_details_widget.ui" line="254"/>
<location filename="../display_settings_details_widget.ui" line="334"/>
<source>Low</source>
<translation>Niedrig</translation>
</message>
<message>
<location filename="../display_settings_details_widget.ui" line="106"/>
<source>Characters</source>
<translation>Charaktere</translation>
</message>
<message>
<location filename="../display_settings_details_widget.ui" line="186"/>
<source>FX</source>
<translation>FX Effekte</translation>
</message>
<message>
<location filename="../display_settings_details_widget.ui" line="266"/>
<source>Textures</source>
<translation>Texturen</translation>
</message>
</context>
<context>
<name>display_settings_widget</name>
<message>
<location filename="../display_settings_widget.ui" line="14"/>
<source>Display</source>
<translation>Anzeige</translation>
</message>
<message>
<location filename="../display_settings_widget.ui" line="20"/>
<source>Driver</source>
<translation>Treiber</translation>
</message>
<message>
<source>Specify if Ryzom is to be run in OpenGL or Direct3D.</source>
<translatorcomment>there&apos;s a period (full stop) at the end opposed to the other &quot;specify&quot;-sentece about full screen ending with a colon...</translatorcomment>
<translation type="obsolete">Wähle, ob Ryzom in OpenGL oder Direct3D laufen soll:</translation>
</message>
<message>
<location filename="../display_settings_widget.ui" line="28"/>
<source>Specify if Ryzom is to be run in OpenGL or Direct3D:</source>
<translation>Wähle, ob Ryzom in OpenGL oder Direct3D laufen soll:</translation>
</message>
<message>
<location filename="../display_settings_widget.ui" line="35"/>
<source>Auto</source>
<translation>Automatisch</translation>
</message>
<message>
<location filename="../display_settings_widget.ui" line="42"/>
<source>OpenGL</source>
<translation>OpenGL</translation>
</message>
<message>
<location filename="../display_settings_widget.ui" line="49"/>
<source>Direct3D</source>
<translation>Direct3D</translation>
</message>
<message>
<location filename="../display_settings_widget.ui" line="61"/>
<source>Parameters</source>
<translation>Parameter</translation>
</message>
<message>
<location filename="../display_settings_widget.ui" line="67"/>
<source>Specify if Ryzom is to be run in full screen or window mode:</source>
<translation>Wähle, ob Ryzom im Vollbildmodus oder Fenstermodus laufen soll:</translation>
</message>
<message>
<location filename="../display_settings_widget.ui" line="74"/>
<source>Full screen</source>
<translation>Vollbild</translation>
</message>
<message>
<location filename="../display_settings_widget.ui" line="81"/>
<source>Specify a video mode:</source>
<translation>Wähle eine Bildschirmauflösung:</translation>
</message>
<message>
<source>Specify a video mode</source>
<translation type="vanished">Wähle eine Bildschirmauflösung</translation>
</message>
<message>
<location filename="../display_settings_widget.ui" line="104"/>
<source>Windowed</source>
<translation>Im Fenster</translation>
</message>
<message>
<location filename="../display_settings_widget.ui" line="115"/>
<source>Width</source>
<translation>Breite</translation>
</message>
<message>
<location filename="../display_settings_widget.ui" line="122"/>
<source>Height</source>
<translation>Höhe</translation>
</message>
<message>
<location filename="../display_settings_widget.ui" line="129"/>
<source>X position</source>
<translation>X-Position</translation>
</message>
<message>
<location filename="../display_settings_widget.ui" line="136"/>
<source>Y position</source>
<translation>Y-Position</translation>
</message>
</context>
<context>
<name>general_settings_widget</name>
<message>
<location filename="../general_settings_widget.ui" line="14"/>
<source>Form</source>
<translation>Formblatt</translation>
</message>
<message>
<location filename="../general_settings_widget.ui" line="25"/>
<source>Language</source>
<translation>Sprache</translation>
</message>
<message>
<location filename="../general_settings_widget.ui" line="33"/>
<source>English</source>
<translation>Englisch</translation>
</message>
<message>
<location filename="../general_settings_widget.ui" line="38"/>
<source>French</source>
<translation>Französisch</translation>
</message>
<message>
<location filename="../general_settings_widget.ui" line="43"/>
<source>German</source>
<translation>Deutsch</translation>
</message>
<message>
<location filename="../general_settings_widget.ui" line="48"/>
<source>Hungarian</source>
<translation>Ungarisch</translation>
</message>
<message>
<location filename="../general_settings_widget.ui" line="72"/>
<source>Save config file when quitting the game</source>
<translatorcomment>Do we need the &quot;file&quot; mentioned?</translatorcomment>
<translation>Speichere Konfigurationsdatei beim Beenden des Spiels</translation>
</message>
<message>
<location filename="../general_settings_widget.ui" line="92"/>
<source>Advanced</source>
<translatorcomment>is it &quot;extended&quot; or rather &quot;progressed&quot; like &quot;further/better developed&quot;?</translatorcomment>
<translation>Erweitert</translation>
</message>
<message>
<location filename="../general_settings_widget.ui" line="100"/>
<source>Slow down the game (process low priority)</source>
<translation>Verlangsame Spiel (niedrige Prozesspriorität)</translation>
</message>
<message>
<source>Slow down the game ( process low priority )</source>
<translation type="vanished">Verlangsame das Spiel (niedrige Prozesspriorität)</translation>
</message>
</context>
<context>
<name>sound_settings_widget</name>
<message>
<location filename="../sound_settings_widget.ui" line="14"/>
<source>Sound</source>
<translation>Sound</translation>
</message>
<message>
<location filename="../sound_settings_widget.ui" line="24"/>
<source>Enable sound</source>
<translation>Aktiviere Sound</translation>
</message>
<message>
<location filename="../sound_settings_widget.ui" line="31"/>
<source>Enable EAX</source>
<translation>Aktiviere EAX Klangverarbeitung</translation>
</message>
<message>
<location filename="../sound_settings_widget.ui" line="38"/>
<source>Enable FMod</source>
<translation>Aktiviere FMod Audiotool</translation>
</message>
<message>
<location filename="../sound_settings_widget.ui" line="45"/>
<source>Software sound buffer (may increase FPS)</source>
<translation>Software Sound Buffer (kann FPS erhöhen)</translation>
</message>
<message>
<source>Software sound buffer ( may increase FPS )</source>
<translation type="vanished">Software Sound Buffer (kann FPS erhöhen)</translation>
</message>
<message>
<location filename="../sound_settings_widget.ui" line="68"/>
<source>Sound tracks</source>
<translatorcomment>is this really about audio channels?</translatorcomment>
<translation>Tonspuren</translation>
</message>
<message>
<location filename="../sound_settings_widget.ui" line="117"/>
<source>8 tracks</source>
<translatorcomment>8-track as in 8 audio channels, right? Or does it mean something else?</translatorcomment>
<translation>8 Spuren</translation>
</message>
</context>
<context>
<name>sys_info_d3d_widget</name>
<message>
<location filename="../sys_info_d3d_widget.ui" line="14"/>
<source>Direct3D information</source>
<translation>Direct3D-Information</translation>
</message>
<message>
<location filename="../sys_info_d3d_widget.ui" line="20"/>
<source>Direct3D</source>
<translation>Direct3D</translation>
</message>
<message>
<location filename="../sys_info_d3d_widget.ui" line="30"/>
<source>Description</source>
<translation>Beschreibung</translation>
</message>
<message>
<location filename="../sys_info_d3d_widget.ui" line="65"/>
<source>Driver</source>
<translation>Treiber</translation>
</message>
<message>
<location filename="../sys_info_d3d_widget.ui" line="100"/>
<source>Driver version</source>
<translation>Treiber-Version</translation>
</message>
</context>
<context>
<name>sys_info_opengl_widget</name>
<message>
<location filename="../sys_info_opengl_widget.ui" line="14"/>
<source>OpenGL information</source>
<translation>OpenGL-Information</translation>
</message>
<message>
<location filename="../sys_info_opengl_widget.ui" line="20"/>
<source>OpenGL</source>
<translation>OpenGL</translation>
</message>
<message>
<location filename="../sys_info_opengl_widget.ui" line="28"/>
<source>Vendor</source>
<translation>Hersteller</translation>
</message>
<message>
<location filename="../sys_info_opengl_widget.ui" line="63"/>
<source>Renderer</source>
<translation>Renderer</translation>
</message>
<message>
<location filename="../sys_info_opengl_widget.ui" line="98"/>
<source>Version</source>
<translation>Version</translation>
</message>
<message>
<location filename="../sys_info_opengl_widget.ui" line="148"/>
<source>Extensions</source>
<translation>Erweiterungen</translation>
</message>
</context>
<context>
<name>sys_info_widget</name>
<message>
<location filename="../sys_info_widget.ui" line="14"/>
<location filename="../sys_info_widget.ui" line="20"/>
<source>System information</source>
<translation>System-Information</translation>
</message>
<message>
<location filename="../sys_info_widget.ui" line="30"/>
<source>Operating system</source>
<translation>Betriebssystem</translation>
</message>
<message>
<location filename="../sys_info_widget.ui" line="68"/>
<source>CPU</source>
<translation>Prozessor</translation>
</message>
<message>
<location filename="../sys_info_widget.ui" line="106"/>
<source>Physical memory</source>
<translation>Physikalischer Speicher</translation>
</message>
<message>
<location filename="../sys_info_widget.ui" line="135"/>
<source>Video device</source>
<translatorcomment>seems to refer to the video card. Or is it something else?</translatorcomment>
<translation>Grafikkarte</translation>
</message>
<message>
<location filename="../sys_info_widget.ui" line="173"/>
<source>Video driver version</source>
<translation>Grafiktreiber-Version</translation>
</message>
</context>
</TS>

@ -1,468 +1,500 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS> <!DOCTYPE TS>
<TS version="2.0" language="en_US"> <TS version="2.1" language="en" sourcelanguage="en">
<context> <context>
<name>CClientConfigDialog</name> <name>CClientConfigDialog</name>
<message> <message>
<location filename="client_config_dialog.cpp" line="248"/> <location filename="../client_config_dialog.cpp" line="251"/>
<source>Ryzom configuration</source> <source>Ryzom configuration</source>
<translation type="unfinished"></translation> <translation>Ryzom configuration</translation>
</message> </message>
<message> <message>
<location filename="client_config_dialog.cpp" line="249"/> <location filename="../client_config_dialog.cpp" line="252"/>
<source>Are you sure you want to quit without saving the configuration?</source> <source>Are you sure you want to quit without saving the configuration?</source>
<translation type="unfinished"></translation> <translation>Are you sure you want to quit without saving the configuration?</translation>
</message> </message>
</context> </context>
<context> <context>
<name>CDisplaySettingsDetailsWidget</name> <name>CDisplaySettingsDetailsWidget</name>
<message> <message>
<location filename="display_settings_details_widget.cpp" line="231"/> <location filename="../display_settings_details_widget.cpp" line="218"/>
<source>Low</source> <source>Low</source>
<translation type="unfinished"></translation> <translation>Low</translation>
</message> </message>
<message> <message>
<location filename="display_settings_details_widget.cpp" line="234"/> <location filename="../display_settings_details_widget.cpp" line="221"/>
<source>Medium</source> <source>Medium</source>
<translation type="unfinished"></translation> <translation>Medium</translation>
</message> </message>
<message> <message>
<location filename="display_settings_details_widget.cpp" line="237"/> <location filename="../display_settings_details_widget.cpp" line="224"/>
<source>Normal</source> <source>Normal</source>
<translation type="unfinished"></translation> <translation>Normal</translation>
</message> </message>
<message> <message>
<location filename="display_settings_details_widget.cpp" line="240"/> <location filename="../display_settings_details_widget.cpp" line="227"/>
<source>High</source> <source>High</source>
<translation type="unfinished"></translation> <translation>High</translation>
</message> </message>
<message> <message>
<location filename="display_settings_details_widget.cpp" line="253"/> <location filename="../display_settings_details_widget.cpp" line="240"/>
<source>Low (32 MB)</source> <source>Low (32 MB)</source>
<translation type="unfinished"></translation> <translation>Low (32 MB)</translation>
</message> </message>
<message> <message>
<location filename="display_settings_details_widget.cpp" line="257"/> <location filename="../display_settings_details_widget.cpp" line="244"/>
<source>Normal (64 MB)</source> <source>Normal (64 MB)</source>
<translation type="unfinished"></translation> <translation>Normal (64 MB)</translation>
</message> </message>
<message> <message>
<location filename="display_settings_details_widget.cpp" line="261"/> <location filename="../display_settings_details_widget.cpp" line="248"/>
<source>High (128 MB)</source> <source>High (128 MB)</source>
<translation type="unfinished"></translation> <translation>High (128 MB)</translation>
</message>
</context>
<context>
<name>CDisplaySettingsWidget</name>
<message>
<location filename="../display_settings_widget.cpp" line="179"/>
<source>Auto</source>
<translation>Auto</translation>
</message> </message>
</context> </context>
<context> <context>
<name>CSoundSettingsWidget</name> <name>CSoundSettingsWidget</name>
<message> <message>
<location filename="sound_settings_widget.cpp" line="98"/> <location filename="../sound_settings_widget.cpp" line="92"/>
<source>%1 tracks</source> <source>%1 tracks</source>
<translation type="unfinished"></translation> <translation>%1 tracks</translation>
</message>
</context>
<context>
<name>CSysInfoWidget</name>
<message>
<location filename="../sys_info_widget.cpp" line="30"/>
<source>%1 MiB</source>
<translation>%1 MiB</translation>
</message> </message>
</context> </context>
<context> <context>
<name>client_config_dialog</name> <name>client_config_dialog</name>
<message> <message>
<location filename="client_config_dialog.ui" line="20"/> <location filename="../client_config_dialog.ui" line="20"/>
<source>Ryzom Configuration</source> <source>Ryzom Configuration</source>
<translation type="unfinished"></translation> <translation>Ryzom Configuration</translation>
</message> </message>
<message> <message>
<location filename="client_config_dialog.ui" line="107"/> <location filename="../client_config_dialog.ui" line="107"/>
<location filename="client_config_dialog.ui" line="135"/> <location filename="../client_config_dialog.ui" line="135"/>
<source>General</source> <source>General</source>
<translation type="unfinished"></translation> <translation>General</translation>
</message> </message>
<message> <message>
<location filename="client_config_dialog.ui" line="130"/> <location filename="../client_config_dialog.ui" line="130"/>
<source>Category</source> <source>Category</source>
<translation type="unfinished"></translation> <translation>Category</translation>
</message> </message>
<message> <message>
<location filename="client_config_dialog.ui" line="146"/> <location filename="../client_config_dialog.ui" line="146"/>
<source>Display</source> <source>Display</source>
<translation type="unfinished"></translation> <translation>Display</translation>
</message> </message>
<message> <message>
<location filename="client_config_dialog.ui" line="156"/> <location filename="../client_config_dialog.ui" line="156"/>
<source>Display details</source> <source>Display details</source>
<translation type="unfinished"></translation> <translation>Display details</translation>
</message> </message>
<message> <message>
<location filename="client_config_dialog.ui" line="161"/> <location filename="../client_config_dialog.ui" line="161"/>
<source>Display advanced</source> <source>Display advanced</source>
<translation type="unfinished"></translation> <translation>Display advanced</translation>
</message> </message>
<message> <message>
<location filename="client_config_dialog.ui" line="167"/> <location filename="../client_config_dialog.ui" line="167"/>
<source>Sound</source> <source>Sound</source>
<translation type="unfinished"></translation> <translation>Sound</translation>
</message> </message>
<message> <message>
<location filename="client_config_dialog.ui" line="178"/> <location filename="../client_config_dialog.ui" line="178"/>
<source>System information</source> <source>System information</source>
<translation type="unfinished"></translation> <translation>System information</translation>
</message> </message>
<message> <message>
<location filename="client_config_dialog.ui" line="188"/> <location filename="../client_config_dialog.ui" line="188"/>
<source>OpenGL information</source> <source>OpenGL information</source>
<translation type="unfinished"></translation> <translation>OpenGL information</translation>
</message> </message>
<message> <message>
<location filename="client_config_dialog.ui" line="193"/> <location filename="../client_config_dialog.ui" line="193"/>
<source>Direct3D information</source> <source>Direct3D information</source>
<translation type="unfinished"></translation> <translation>Direct3D information</translation>
</message> </message>
<message> <message>
<location filename="client_config_dialog.ui" line="245"/> <location filename="../client_config_dialog.ui" line="245"/>
<source>Apply</source> <source>Apply</source>
<translation type="unfinished"></translation> <translation>Apply</translation>
</message> </message>
<message> <message>
<location filename="client_config_dialog.ui" line="252"/> <location filename="../client_config_dialog.ui" line="252"/>
<source>Default</source> <source>Default</source>
<translation type="unfinished"></translation> <translation>Default</translation>
</message> </message>
<message> <message>
<location filename="client_config_dialog.ui" line="259"/> <location filename="../client_config_dialog.ui" line="259"/>
<source>Play Ryzom</source> <source>Play Ryzom</source>
<translation type="unfinished"></translation> <translation>Play Ryzom</translation>
</message> </message>
</context> </context>
<context> <context>
<name>display_settings_advanced_widget</name> <name>display_settings_advanced_widget</name>
<message> <message>
<location filename="display_settings_advanced_widget.ui" line="14"/> <location filename="../display_settings_advanced_widget.ui" line="14"/>
<source>Display advanced</source> <source>Display advanced</source>
<translation type="unfinished"></translation> <translation>Display advanced</translation>
</message> </message>
<message> <message>
<location filename="display_settings_advanced_widget.ui" line="22"/> <location filename="../display_settings_advanced_widget.ui" line="22"/>
<source>Modify these settings only if you have trouble launching the game</source> <source>Modify these settings only if you have trouble launching the game</source>
<translation type="unfinished"></translation> <translation>Modify these settings only if you have trouble launching the game</translation>
</message> </message>
<message> <message>
<location filename="display_settings_advanced_widget.ui" line="31"/> <location filename="../display_settings_advanced_widget.ui" line="31"/>
<source>Disable texture compression</source> <source>Force texture compression</source>
<translation type="unfinished"></translation> <translation>Force texture compression</translation>
</message> </message>
<message> <message>
<location filename="display_settings_advanced_widget.ui" line="38"/> <location filename="../display_settings_advanced_widget.ui" line="38"/>
<source>Disable vertex shaders</source> <source>Disable vertex shaders</source>
<translation type="unfinished"></translation> <translation>Disable vertex shaders</translation>
</message> </message>
<message> <message>
<location filename="display_settings_advanced_widget.ui" line="45"/> <location filename="../display_settings_advanced_widget.ui" line="45"/>
<source>Disable AGP for vertices</source> <source>Disable AGP for vertices</source>
<translation type="unfinished"></translation> <translation>Disable AGP for vertices</translation>
</message> </message>
<message> <message>
<location filename="display_settings_advanced_widget.ui" line="52"/> <location filename="../display_settings_advanced_widget.ui" line="52"/>
<source>Disable pixel shaders</source> <source>Disable pixel shaders</source>
<translation type="unfinished"></translation> <translation>Disable pixel shaders</translation>
</message> </message>
</context> </context>
<context> <context>
<name>display_settings_details_widget</name> <name>display_settings_details_widget</name>
<message> <message>
<location filename="display_settings_details_widget.ui" line="14"/> <location filename="../display_settings_details_widget.ui" line="14"/>
<source>Display details</source> <source>Display details</source>
<translation type="unfinished"></translation> <translation>Display details</translation>
</message> </message>
<message> <message>
<location filename="display_settings_details_widget.ui" line="20"/> <location filename="../display_settings_details_widget.ui" line="20"/>
<source>Landscape</source> <source>Landscape</source>
<translation type="unfinished"></translation> <translation>Landscape</translation>
</message> </message>
<message> <message>
<location filename="display_settings_details_widget.ui" line="30"/> <location filename="../display_settings_details_widget.ui" line="30"/>
<location filename="display_settings_details_widget.ui" line="116"/> <location filename="../display_settings_details_widget.ui" line="116"/>
<location filename="display_settings_details_widget.ui" line="196"/> <location filename="../display_settings_details_widget.ui" line="196"/>
<location filename="display_settings_details_widget.ui" line="276"/> <location filename="../display_settings_details_widget.ui" line="276"/>
<source>Level of detail</source> <source>Level of detail</source>
<translation type="unfinished"></translation> <translation>Level of detail</translation>
</message> </message>
<message> <message>
<location filename="display_settings_details_widget.ui" line="94"/> <location filename="../display_settings_details_widget.ui" line="94"/>
<location filename="display_settings_details_widget.ui" line="174"/> <location filename="../display_settings_details_widget.ui" line="174"/>
<location filename="display_settings_details_widget.ui" line="254"/> <location filename="../display_settings_details_widget.ui" line="254"/>
<location filename="display_settings_details_widget.ui" line="334"/> <location filename="../display_settings_details_widget.ui" line="334"/>
<source>Low</source> <source>Low</source>
<translation type="unfinished"></translation> <translation>Low</translation>
</message> </message>
<message> <message>
<location filename="display_settings_details_widget.ui" line="106"/> <location filename="../display_settings_details_widget.ui" line="106"/>
<source>Characters</source> <source>Characters</source>
<translation type="unfinished"></translation> <translation>Characters</translation>
</message> </message>
<message> <message>
<location filename="display_settings_details_widget.ui" line="186"/> <location filename="../display_settings_details_widget.ui" line="186"/>
<source>FX</source> <source>FX</source>
<translation type="unfinished"></translation> <translation>FX</translation>
</message> </message>
<message> <message>
<location filename="display_settings_details_widget.ui" line="266"/> <location filename="../display_settings_details_widget.ui" line="266"/>
<source>Textures</source> <source>Textures</source>
<translation type="unfinished"></translation> <translation>Textures</translation>
</message> </message>
</context> </context>
<context> <context>
<name>display_settings_widget</name> <name>display_settings_widget</name>
<message> <message>
<location filename="display_settings_widget.ui" line="14"/> <location filename="../display_settings_widget.ui" line="14"/>
<source>Display</source> <source>Display</source>
<translation type="unfinished"></translation> <translation>Display</translation>
</message> </message>
<message> <message>
<location filename="display_settings_widget.ui" line="20"/> <location filename="../display_settings_widget.ui" line="20"/>
<source>Driver</source> <source>Driver</source>
<translation type="unfinished"></translation> <translation>Driver</translation>
</message> </message>
<message> <message>
<location filename="display_settings_widget.ui" line="28"/>
<source>Specify if Ryzom is to be run in OpenGL or Direct3D.</source> <source>Specify if Ryzom is to be run in OpenGL or Direct3D.</source>
<translation type="unfinished"></translation> <translation type="vanished">Specify if Ryzom is to be run in OpenGL or Direct3D.</translation>
</message> </message>
<message> <message>
<location filename="display_settings_widget.ui" line="35"/> <location filename="../display_settings_widget.ui" line="28"/>
<source>Specify if Ryzom is to be run in OpenGL or Direct3D:</source>
<translation>Specify if Ryzom is to be run in OpenGL or Direct3D:</translation>
</message>
<message>
<location filename="../display_settings_widget.ui" line="35"/>
<source>Auto</source> <source>Auto</source>
<translation type="unfinished"></translation> <translation>Auto</translation>
</message> </message>
<message> <message>
<location filename="display_settings_widget.ui" line="42"/> <location filename="../display_settings_widget.ui" line="42"/>
<source>OpenGL</source> <source>OpenGL</source>
<translation type="unfinished"></translation> <translation>OpenGL</translation>
</message> </message>
<message> <message>
<location filename="display_settings_widget.ui" line="49"/> <location filename="../display_settings_widget.ui" line="49"/>
<source>Direct3D</source> <source>Direct3D</source>
<translation type="unfinished"></translation> <translation>Direct3D</translation>
</message> </message>
<message> <message>
<location filename="display_settings_widget.ui" line="61"/> <location filename="../display_settings_widget.ui" line="61"/>
<source>Parameters</source> <source>Parameters</source>
<translation type="unfinished"></translation> <translation>Parameters</translation>
</message> </message>
<message> <message>
<location filename="display_settings_widget.ui" line="67"/> <location filename="../display_settings_widget.ui" line="67"/>
<source>Specify if Ryzom is to be run in full screen or window mode:</source> <source>Specify if Ryzom is to be run in full screen or window mode:</source>
<translation type="unfinished"></translation> <translation>Specify if Ryzom is to be run in full screen or window mode:</translation>
</message> </message>
<message> <message>
<location filename="display_settings_widget.ui" line="74"/> <location filename="../display_settings_widget.ui" line="74"/>
<source>Full screen</source> <source>Full screen</source>
<translation type="unfinished"></translation> <translation>Full screen</translation>
</message>
<message>
<location filename="../display_settings_widget.ui" line="81"/>
<source>Specify a video mode:</source>
<translation>Specify a video mode:</translation>
</message> </message>
<message> <message>
<location filename="display_settings_widget.ui" line="81"/>
<source>Specify a video mode</source> <source>Specify a video mode</source>
<translation type="unfinished"></translation> <translation type="vanished">Specify a video mode</translation>
</message> </message>
<message> <message>
<location filename="display_settings_widget.ui" line="104"/> <location filename="../display_settings_widget.ui" line="104"/>
<source>Windowed</source> <source>Windowed</source>
<translation type="unfinished"></translation> <translation>Windowed</translation>
</message> </message>
<message> <message>
<location filename="display_settings_widget.ui" line="115"/> <location filename="../display_settings_widget.ui" line="115"/>
<source>Width</source> <source>Width</source>
<translation type="unfinished"></translation> <translation>Width</translation>
</message> </message>
<message> <message>
<location filename="display_settings_widget.ui" line="122"/> <location filename="../display_settings_widget.ui" line="122"/>
<source>Height</source> <source>Height</source>
<translation type="unfinished"></translation> <translation>Height</translation>
</message> </message>
<message> <message>
<location filename="display_settings_widget.ui" line="129"/> <location filename="../display_settings_widget.ui" line="129"/>
<source>X position</source> <source>X position</source>
<translation type="unfinished"></translation> <translation>X position</translation>
</message> </message>
<message> <message>
<location filename="display_settings_widget.ui" line="136"/> <location filename="../display_settings_widget.ui" line="136"/>
<source>Y position</source> <source>Y position</source>
<translation type="unfinished"></translation> <translation>Y position</translation>
</message> </message>
</context> </context>
<context> <context>
<name>general_settings_widget</name> <name>general_settings_widget</name>
<message> <message>
<location filename="general_settings_widget.ui" line="14"/> <location filename="../general_settings_widget.ui" line="14"/>
<source>Form</source> <source>Form</source>
<translation type="unfinished"></translation> <translation>Form</translation>
</message> </message>
<message> <message>
<location filename="general_settings_widget.ui" line="25"/> <location filename="../general_settings_widget.ui" line="25"/>
<source>Language</source> <source>Language</source>
<translation type="unfinished"></translation> <translation>Language</translation>
</message> </message>
<message> <message>
<location filename="general_settings_widget.ui" line="33"/> <location filename="../general_settings_widget.ui" line="33"/>
<source>English</source> <source>English</source>
<translation type="unfinished"></translation> <translation>English</translation>
</message> </message>
<message> <message>
<location filename="general_settings_widget.ui" line="38"/> <location filename="../general_settings_widget.ui" line="38"/>
<source>French</source> <source>French</source>
<translation type="unfinished"></translation> <translation>French</translation>
</message> </message>
<message> <message>
<location filename="general_settings_widget.ui" line="43"/> <location filename="../general_settings_widget.ui" line="43"/>
<source>German</source> <source>German</source>
<translation type="unfinished"></translation> <translation>German</translation>
</message> </message>
<message> <message>
<location filename="general_settings_widget.ui" line="48"/> <location filename="../general_settings_widget.ui" line="48"/>
<source>Hungarian</source> <source>Hungarian</source>
<translation type="unfinished"></translation> <translation>Hungarian</translation>
</message> </message>
<message> <message>
<location filename="general_settings_widget.ui" line="72"/> <location filename="../general_settings_widget.ui" line="72"/>
<source>Save config file when quitting the game</source> <source>Save config file when quitting the game</source>
<translation type="unfinished"></translation> <translation>Save config file when quitting the game</translation>
</message> </message>
<message> <message>
<location filename="general_settings_widget.ui" line="92"/> <location filename="../general_settings_widget.ui" line="92"/>
<source>Advanced</source> <source>Advanced</source>
<translation type="unfinished"></translation> <translation>Advanced</translation>
</message> </message>
<message> <message>
<location filename="general_settings_widget.ui" line="100"/> <location filename="../general_settings_widget.ui" line="100"/>
<source>Slow down the game (process low priority)</source> <source>Slow down the game (process low priority)</source>
<translation type="unfinished"></translation> <translation>Slow down the game (process low priority)</translation>
</message>
<message>
<source>Slow down the game ( process low priority )</source>
<translation type="vanished">Slow down the game ( process low priority )</translation>
</message> </message>
</context> </context>
<context> <context>
<name>sound_settings_widget</name> <name>sound_settings_widget</name>
<message> <message>
<location filename="sound_settings_widget.ui" line="14"/> <location filename="../sound_settings_widget.ui" line="14"/>
<source>Sound</source> <source>Sound</source>
<translation type="unfinished"></translation> <translation>Sound</translation>
</message> </message>
<message> <message>
<location filename="sound_settings_widget.ui" line="24"/> <location filename="../sound_settings_widget.ui" line="24"/>
<source>Enable sound</source> <source>Enable sound</source>
<translation type="unfinished"></translation> <translation>Enable sound</translation>
</message> </message>
<message> <message>
<location filename="sound_settings_widget.ui" line="31"/> <location filename="../sound_settings_widget.ui" line="31"/>
<source>Enable EAX</source> <source>Enable EAX</source>
<translation type="unfinished"></translation> <translation>Enable EAX</translation>
</message> </message>
<message> <message>
<location filename="sound_settings_widget.ui" line="38"/> <location filename="../sound_settings_widget.ui" line="38"/>
<source>Enable FMod</source> <source>Enable FMod</source>
<translation type="unfinished"></translation> <translation>Enable FMod</translation>
</message>
<message>
<location filename="../sound_settings_widget.ui" line="45"/>
<source>Software sound buffer (may increase FPS)</source>
<translation>Software sound buffer (may increase FPS)</translation>
</message> </message>
<message> <message>
<location filename="sound_settings_widget.ui" line="45"/>
<source>Software sound buffer ( may increase FPS )</source> <source>Software sound buffer ( may increase FPS )</source>
<translation type="unfinished"></translation> <translation type="vanished">Software sound buffer ( may increase FPS )</translation>
</message> </message>
<message> <message>
<location filename="sound_settings_widget.ui" line="68"/> <location filename="../sound_settings_widget.ui" line="68"/>
<source>Sound tracks</source> <source>Sound tracks</source>
<translation type="unfinished"></translation> <translation>Sound tracks</translation>
</message> </message>
<message> <message>
<location filename="sound_settings_widget.ui" line="117"/> <location filename="../sound_settings_widget.ui" line="117"/>
<source>8 tracks</source> <source>8 tracks</source>
<translation type="unfinished"></translation> <translation>8 tracks</translation>
</message> </message>
</context> </context>
<context> <context>
<name>sys_info_d3d_widget</name> <name>sys_info_d3d_widget</name>
<message> <message>
<location filename="sys_info_d3d_widget.ui" line="14"/> <location filename="../sys_info_d3d_widget.ui" line="14"/>
<source>Direct3D information</source> <source>Direct3D information</source>
<translation type="unfinished"></translation> <translation>Direct3D information</translation>
</message> </message>
<message> <message>
<location filename="sys_info_d3d_widget.ui" line="20"/> <location filename="../sys_info_d3d_widget.ui" line="20"/>
<source>Direct3D</source> <source>Direct3D</source>
<translation type="unfinished"></translation> <translation>Direct3D</translation>
</message> </message>
<message> <message>
<location filename="sys_info_d3d_widget.ui" line="30"/> <location filename="../sys_info_d3d_widget.ui" line="30"/>
<source>Description</source> <source>Description</source>
<translation type="unfinished"></translation> <translation>Description</translation>
</message> </message>
<message> <message>
<location filename="sys_info_d3d_widget.ui" line="65"/> <location filename="../sys_info_d3d_widget.ui" line="65"/>
<source>Driver</source> <source>Driver</source>
<translation type="unfinished"></translation> <translation>Driver</translation>
</message> </message>
<message> <message>
<location filename="sys_info_d3d_widget.ui" line="100"/> <location filename="../sys_info_d3d_widget.ui" line="100"/>
<source>Driver version</source> <source>Driver version</source>
<translation type="unfinished"></translation> <translation>Driver version</translation>
</message> </message>
</context> </context>
<context> <context>
<name>sys_info_opengl_widget</name> <name>sys_info_opengl_widget</name>
<message> <message>
<location filename="sys_info_opengl_widget.ui" line="14"/> <location filename="../sys_info_opengl_widget.ui" line="14"/>
<source>OpenGL information</source> <source>OpenGL information</source>
<translation type="unfinished"></translation> <translation>OpenGL information</translation>
</message> </message>
<message> <message>
<location filename="sys_info_opengl_widget.ui" line="20"/> <location filename="../sys_info_opengl_widget.ui" line="20"/>
<source>OpenGL</source> <source>OpenGL</source>
<translation type="unfinished"></translation> <translation>OpenGL</translation>
</message> </message>
<message> <message>
<location filename="sys_info_opengl_widget.ui" line="28"/> <location filename="../sys_info_opengl_widget.ui" line="28"/>
<source>Vendor</source> <source>Vendor</source>
<translation type="unfinished"></translation> <translation>Vendor</translation>
</message> </message>
<message> <message>
<location filename="sys_info_opengl_widget.ui" line="63"/> <location filename="../sys_info_opengl_widget.ui" line="63"/>
<source>Renderer</source> <source>Renderer</source>
<translation type="unfinished"></translation> <translation>Renderer</translation>
</message> </message>
<message> <message>
<location filename="sys_info_opengl_widget.ui" line="98"/> <location filename="../sys_info_opengl_widget.ui" line="98"/>
<source>Version</source> <source>Version</source>
<translation type="unfinished"></translation> <translation>Version</translation>
</message> </message>
<message> <message>
<location filename="sys_info_opengl_widget.ui" line="148"/> <location filename="../sys_info_opengl_widget.ui" line="148"/>
<source>Extensions</source> <source>Extensions</source>
<translation type="unfinished"></translation> <translation>Extensions</translation>
</message> </message>
</context> </context>
<context> <context>
<name>sys_info_widget</name> <name>sys_info_widget</name>
<message> <message>
<location filename="sys_info_widget.ui" line="14"/> <location filename="../sys_info_widget.ui" line="14"/>
<location filename="sys_info_widget.ui" line="20"/> <location filename="../sys_info_widget.ui" line="20"/>
<source>System information</source> <source>System information</source>
<translation type="unfinished"></translation> <translation>System information</translation>
</message> </message>
<message> <message>
<location filename="sys_info_widget.ui" line="30"/> <location filename="../sys_info_widget.ui" line="30"/>
<source>Operating system</source> <source>Operating system</source>
<translation type="unfinished"></translation> <translation>Operating system</translation>
</message> </message>
<message> <message>
<location filename="sys_info_widget.ui" line="68"/> <location filename="../sys_info_widget.ui" line="68"/>
<source>CPU</source> <source>CPU</source>
<translation type="unfinished"></translation> <translation>CPU</translation>
</message> </message>
<message> <message>
<location filename="sys_info_widget.ui" line="106"/> <location filename="../sys_info_widget.ui" line="106"/>
<source>Physical memory</source> <source>Physical memory</source>
<translation type="unfinished"></translation> <translation>Physical memory</translation>
</message> </message>
<message> <message>
<location filename="sys_info_widget.ui" line="135"/> <location filename="../sys_info_widget.ui" line="135"/>
<source>Video device</source> <source>Video device</source>
<translation type="unfinished"></translation> <translation>Video device</translation>
</message> </message>
<message> <message>
<location filename="sys_info_widget.ui" line="173"/> <location filename="../sys_info_widget.ui" line="173"/>
<source>Video driver version</source> <source>Video driver version</source>
<translation type="unfinished"></translation> <translation>Video driver version</translation>
</message> </message>
</context> </context>
</TS> </TS>

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

Loading…
Cancel
Save