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)
IF(APPLE)
ADD_PLATFORM_FLAGS("-gdwarf-2")
ADD_PLATFORM_FLAGS("-gdwarf-2 -D_DARWIN_UNLIMITED_STREAMS")
ENDIF(APPLE)
# Fix "relocation R_X86_64_32 against.." error on x64 platforms

@ -71,13 +71,13 @@ namespace NLGUI
private:
/// Drawing helpers
virtual bool drawResizer(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 drawColorPicker(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 drawPan(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 drawScale(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 drawBrowse(CCtrlBase* /* pCB */, NLMISC::CRGBA /* col */) { return false; }
virtual bool drawPan(CCtrlBase* /* pCB */, NLMISC::CRGBA /* col */) { return false; }
virtual bool drawCustom(CCtrlBase* pCB);
protected:

@ -127,6 +127,9 @@ public:
/// Returns the code of the language ("fr", "en", ...) defined on system
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.
static const ucstring &get (const std::string &label);
@ -230,6 +233,7 @@ private:
static std::vector<std::string> _LanguageCodes;
static std::vector<ucstring> _LanguageNames;
static std::string _SystemLanguageCode;
static bool _LanguagesNamesLoaded;

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

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

@ -39,6 +39,7 @@
// NeL includes
#include <nel/misc/time_nl.h>
#include <nel/misc/string_common.h>
#include <nel/misc/common.h>
// Project includes
@ -102,7 +103,7 @@ public:
{
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("\n", 1, 1, m_ErrorLog);
fflush(m_ErrorLog);
@ -113,7 +114,7 @@ public:
{
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("\n", 1, 1, m_DependLog);
// fflush(m_DependLog);

@ -23,6 +23,7 @@
#include "nel/misc/types_nl.h"
#include "nel/misc/file.h"
#include "nel/misc/common.h"
#include "nel/misc/path.h"
#include "nel/misc/bitmap.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 roti, rotj, rotk;
FILE *f = fopen (CPath::lookup(ScriptName).c_str(),"rb");
FILE *f = nlfopen (CPath::lookup(ScriptName), "rb");
fseek (f, 0, SEEK_END);
uint file_size = ftell (f);
fseek (f, 0, SEEK_SET);

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

@ -33,6 +33,7 @@
#endif
#include "nel/misc/common.h"
#include "nel/misc/debug.h"
#include "nel/misc/mem_stream.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";
FILE *fp = fopen (fn.c_str(), "rt");
FILE *fp = nlfopen (fn, "rt");
if (fp == NULL)
{
// new file, add the header
FILE *fp = fopen (fn.c_str(), "wt");
FILE *fp = nlfopen (fn, "wt");
if (fp != NULL)
{
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);
}
fp = fopen (fn.c_str(), "at");
fp = nlfopen (fn, "at");
if (fp == NULL)
{
nlwarning ("Can't open pong file name '%s'", fn.c_str());

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

@ -40,8 +40,6 @@ NL_ADD_LIB_SUFFIX(${NLDRV_OGL_LIB})
NL_ADD_RUNTIME_FLAGS(${NLDRV_OGL_LIB})
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)
ENDIF()

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

@ -38,8 +38,6 @@ NL_ADD_LIB_SUFFIX(${NLDRV_OGLES_LIB})
NL_ADD_RUNTIME_FLAGS(${NLDRV_OGLES_LIB})
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)
ENDIF()

@ -305,7 +305,7 @@ namespace NLGUI
return;
}
FILE *fp = nlfopen (tmpdest, "wb");
FILE *fp = nlfopen(tmpdest, "wb");
if (fp == NULL)
{
curl_easy_cleanup(curl);
@ -316,7 +316,8 @@ namespace NLGUI
curl_easy_setopt(curl, CURLOPT_NOPROGRESS, true);
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);
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_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);
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})
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)
TARGET_LINK_LIBRARIES(nelmisc -lc -ldl)
IF(NOT APPLE)

@ -19,6 +19,8 @@
#include "nel/misc/dynloadlib.h"
#include "nel/misc/command.h"
#include <locale.h>
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
@ -85,6 +87,9 @@ void INelContext::contextReady()
_NelContext = 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 local instance counter in the global instance counter manager

@ -316,6 +316,13 @@ CConfigFile::~CConfigFile ()
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())
{
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
{
// Avoid any problem, Force Locale to default
setlocale(LC_ALL, "C");
char *locale = setlocale(LC_NUMERIC, NULL);
if (!locale || strcmp(locale, "C"))
{
nlerror("Numeric locale not defined to C, an external library possibly redefined it!");
}
FILE *fp = nlfopen (getFilename(), "w");
if (fp == NULL)

@ -43,6 +43,7 @@ string CI18N::_SelectedLanguageCode;
CI18N::ILoadProxy *CI18N::_LoadProxy = 0;
vector<string> CI18N::_LanguageCodes;
vector<ucstring> CI18N::_LanguageNames;
std::string CI18N::_SystemLanguageCode;
bool CI18N::noResolution = false;
void CI18N::setLoadProxy(ILoadProxy *loadProxy)
@ -248,10 +249,8 @@ bool CI18N::isLanguageCodeSupported(const std::string &lang)
std::string CI18N::getSystemLanguageCode ()
{
static std::string s_cachedSystemLanguage;
if (!s_cachedSystemLanguage.empty())
return s_cachedSystemLanguage;
if (!_SystemLanguageCode.empty())
return _SystemLanguageCode;
#ifdef NL_OS_MAC
// under OS X, locale is only defined in console, not in UI
@ -293,7 +292,7 @@ std::string CI18N::getSystemLanguageCode ()
}
else
{
nlerror("Unable to convert CFStringRef to string");
nlwarning("Unable to convert CFStringRef to string");
}
delete [] tmp;
@ -306,11 +305,20 @@ std::string CI18N::getSystemLanguageCode ()
CFRelease(langCF);
}
// only keep language code if supported by NeL
if (!lang.empty() && isLanguageCodeSupported(lang))
if (!lang.empty())
{
s_cachedSystemLanguage = lang;
break;
// 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
if (isLanguageCodeSupported(lang))
{
_SystemLanguageCode = lang;
break;
}
}
}
@ -319,21 +327,116 @@ std::string CI18N::getSystemLanguageCode ()
}
#endif
// use system locale (works under Linux and Windows)
if (s_cachedSystemLanguage.empty())
#ifdef NL_OS_WINDOWS
// use user locale under Windows (since Vista)
if (_SystemLanguageCode.empty())
{
std::string lang = NLMISC::toLower(std::string(setlocale(LC_CTYPE, "")));
// 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 keep 2 first characters
if (lang.size() > 1)
s_cachedSystemLanguage = lang.substr(0, 2);
// only use it if found
if (nlGetUserDefaultLocaleName)
{
// 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
if (lang.size() > 1)
_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
if (s_cachedSystemLanguage.empty())
s_cachedSystemLanguage = "en";
if (_SystemLanguageCode.empty())
_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)

@ -24,11 +24,6 @@
// Include from libxml2
#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;
#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; \
serialSeparatedBufferIn( number_as_string ); \
dest = (thetype)convfunc( number_as_string.c_str() );
#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
NLMISC::fromString(number_as_string, dest);
// ***************************************************************************
@ -91,13 +70,6 @@ CIXml::CIXml () : IStream (true /* Input mode */)
_ErrorString = "";
_TryBinaryMode = false;
_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 = "";
_TryBinaryMode = tryBinaryMode;
_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 ();
#ifdef USE_LOCALE_ATOF
if (_Locale) _free_locale((_locale_t)_Locale);
#endif
}
// ***************************************************************************
@ -468,7 +429,7 @@ void CIXml::serial(uint8 &b)
else
{
// Read the number
readnumber( b, uint8, 3, atoi );
readnumber( b, 3 );
}
}
@ -482,7 +443,7 @@ void CIXml::serial(sint8 &b)
}
else
{
readnumber( b, sint8, 4, atoi );
readnumber( b, 4 );
}
}
@ -496,7 +457,7 @@ void CIXml::serial(uint16 &b)
}
else
{
readnumber( b, uint16, 5, atoi );
readnumber( b, 5 );
}
}
@ -510,7 +471,7 @@ void CIXml::serial(sint16 &b)
}
else
{
readnumber( b, sint16, 6, atoi );
readnumber( b, 6 );
}
}
@ -529,7 +490,7 @@ void CIXml::serial(uint32 &b)
}
else
{
readnumber( b, uint32, 10, atoui );
readnumber( b, 10 );
}
}
@ -543,7 +504,7 @@ void CIXml::serial(sint32 &b)
}
else
{
readnumber( b, sint32, 11, atoi );
readnumber( b, 11 );
}
}
@ -557,7 +518,7 @@ void CIXml::serial(uint64 &b)
}
else
{
readnumber( b, uint64, 20, atoiInt64 );
readnumber( b, 20 );
}
}
@ -571,7 +532,7 @@ void CIXml::serial(sint64 &b)
}
else
{
readnumber( b, sint64, 20, atoiInt64 );
readnumber( b, 20 );
}
}
@ -585,7 +546,7 @@ void CIXml::serial(float &b)
}
else
{
readnumberlocale( b, float, 128, nl_atof );
readnumber( b, 128 );
}
}
@ -599,7 +560,7 @@ void CIXml::serial(double &b)
}
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) \
char number_as_cstring [digits+1]; \
sprintf( number_as_cstring, format, src ); \
serialSeparatedBufferOut( number_as_cstring );
#endif
// ***************************************************************************
// XML callbacks
// ***************************************************************************
@ -149,13 +138,6 @@ COXml::COXml () : IStream (false /* Output mode */)
// Push begin
_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 ();
#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)
{
//H_AUTO(FileExists);
#ifdef NL_OS_WINDOWS
DWORD attr = GetFileAttributesW(utf8ToWide(filename));
// attributes are valid and file is not a directory
if (attr == INVALID_FILE_ATTRIBUTES || (attr & FILE_ATTRIBUTE_DIRECTORY)) return false;
return true;
#else
return access(filename.c_str(), R_OK) != -1;
#endif
FILE *file = nlfopen(filename, "rb");
if (file)
{
fclose(file);
return true;
}
return false;
}

@ -195,13 +195,17 @@ uint32 CAudioDecoderVorbis::getNextBytes(uint8 *buffer, uint32 minimum, uint32 m
uint8 CAudioDecoderVorbis::getChannels()
{
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()
{
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()

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

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

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

@ -15,6 +15,7 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <nel/misc/path.h>
#include <nel/misc/common.h>
#include <nel/misc/file.h>
#include <nel/misc/config_file.h>
#include <nel/3d/u_light.h>
@ -851,7 +852,7 @@ bool ShapesExporter::renderPS(UInstance &entity, const string &output_path, doub
{
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); }
}
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;
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)
{
char str[100];

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

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

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

@ -32,6 +32,7 @@
#include "nel/misc/file.h"
#include "nel/misc/smart_ptr.h"
#include "nel/misc/command.h"
#include "nel/misc/common.h"
#include "nel/misc/path.h"
//#include "nel/memory/memory_manager.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;
char lineBuffer[BUFFER_SIZE];
FILE *s;
vector<string> fields;
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());
return;

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

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

@ -18,6 +18,7 @@
// misc
#include <nel/misc/types_nl.h>
#include <nel/misc/file.h>
#include <nel/misc/common.h>
#include <nel/misc/path.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
if( dumpExtensions )
{
FILE * extListOutput;
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());
return 1;

@ -17,6 +17,7 @@
#include "nel/misc/types_nl.h"
#include "nel/misc/app_context.h"
#include "nel/misc/path.h"
#include "nel/misc/common.h"
#include "nel/misc/sstring.h"
#include "nel/misc/algo.h"
@ -228,7 +229,7 @@ int main(int argc, char *argv[])
// read the index file
set<string> fileInIndex;
char lineBuffer[1024];
FILE *fp = fopen(indexFileName.c_str(), "rt");
FILE *fp = nlfopen(indexFileName, "rt");
while (fgets(lineBuffer, 1024, fp))
fileInIndex.insert(CSString(lineBuffer).strip());
@ -263,8 +264,8 @@ int main(int argc, char *argv[])
if (!validFiles.empty() && needRepack)
{
// open the pack file
// FILE *fp = fopen(filename.c_str(), "wt");
FILE *fp = fopen(packFileName.c_str(), "wt");
// FILE *fp = nlfopen(filename, "wt");
FILE *fp = nlfopen(packFileName, "wt");
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());
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);
char buffer[MaxLineSize];
char *result;
@ -304,7 +305,7 @@ int main(int argc, char *argv[])
fclose(fp);
// 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)
{
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());
// open the pack file
// FILE *fp = fopen((dirName+"/tmp."+DefaultExt).c_str(), "rt");
FILE *fp = fopen(filename.c_str(), "rt");
// FILE *fp = nlfopen(dirName+"/tmp."+DefaultExt, "rt");
FILE *fp = nlfopen(filename, "rt");
if (!recursive)
{
// 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)
{
// 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";
// 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);
// 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;
// write the text to the file
@ -1636,7 +1636,7 @@ NLMISC_COMMAND(aesSystem, "Execute a system() call", "<command>")
char str[1024];
FILE *fp = fopen(fn.c_str(), "rt");
FILE *fp = nlfopen(fn, "rt");
if (fp != NULL)
{
while (true)
@ -1654,7 +1654,7 @@ NLMISC_COMMAND(aesSystem, "Execute a system() call", "<command>")
log.displayNL("No stdout");
}
fp = fopen(fne.c_str(), "rt");
fp = nlfopen(fne, "rt");
if (fp != NULL)
{
while (true)

@ -27,6 +27,7 @@
#endif
#include "nel/misc/debug.h"
#include "nel/misc/common.h"
#include "nel/misc/path.h"
#include "nel/misc/thread.h"
@ -586,7 +587,7 @@ private:
string dest = filename.substr(0, filename.size ()-4);
setRWAccess(dest);
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)
{
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)
local bm = self:getProgressGroup():find("bm");
local bm = self:getProgressGroup():find("bm")
if icon == "" then
bm.active = false
else

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

@ -3,36 +3,36 @@
------------------------------------------------------------------------------------------------------------
-- create the game namespace without reseting if already created in an other file.
if (help==nil) then
help= {};
help = {}
end
------------------------------------------------------------------------------------------------------------
--
function help:closeCSBrowserHeader()
local ui = getUI('ui:interface:cs_browser');
local ui = getUI('ui:interface:cs_browser')
-- save size
ui_cs_browser_h = ui.h;
ui_cs_browser_w = ui.w;
ui_cs_browser_h = ui.h
ui_cs_browser_w = ui.w
-- reduce window size
ui.pop_min_h = 32;
ui.h = 0;
ui.w = 216;
ui.pop_min_h = 32
ui.h = 0
ui.w = 216
end
------------------------------------------------------------------------------------------------------------
--
function help:openCSBrowserHeader()
local ui = getUI('ui:interface:cs_browser');
ui.pop_min_h = 96;
local ui = getUI('ui:interface:cs_browser')
ui.pop_min_h = 96
-- set size from saved values
if (ui_cs_browser_h ~= nil) then
ui.h = ui_cs_browser_h;
ui.h = ui_cs_browser_h
end
if (ui_cs_browser_w ~= nil) then
ui.w = ui_cs_browser_w;
ui.w = ui_cs_browser_w
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"
, "Abycarius", "Abycaron", "Abycaros", "Abycarus", "Abycaseus", "Abycasse", "Abycatheus", "Abycathus", "Abycatis", "Abycaton", "Abycaxius"
, "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"
, "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"
, "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"

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

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

@ -49,14 +49,14 @@
<!-- Name Generator. -->
<!-- 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. -->
<variable entry="UI:TEMP:NAME_SUB_RACE" type="sint64" value="1" />
<variable entry="UI:TEMP:NAME_SUB_RACE2" type="sint64" value="1" />
<variable entry="UI:TEMP:NAME_SUB_RACE_FIRST_NAME" 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. -->
<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. -->
<variable entry="UI:TEMP:NAME_SEX" type="sint64" value="1" />
<variable entry="UI:TEMP:NAME_SEX" type="sint64" value="1" />
<!-- End Name Generator. -->
<template name="char_var_dec" id="#id" >
@ -1273,20 +1273,19 @@
<group type="modal" id="appear_name" posref="MM MM" w="400" h="680"
mouse_pos="false" escapable="false" exit_click_out="false"
on_active="proc" on_active_params="proc_appear_name_active"
display="false"
>
display="false">
<instance template="outgame_popup" id="back" posref="TL TL" />
<view type="text" id="text" posref="TM TM" x="0" y="-56" color="255 255 255 255" global_color="false" fontsize="17" multi_line="true" multi_line_space="0"
line_maxw="350" shadow="true" hardtext="uiCP_Name_Enter" />
<!-- NamingPolicy -->
<ctrl style="opt_button" id="name_policy" posref="BM BM" posparent="text" x="0" y="-40" hardtext="uiCP_Name_Policy"
text_color_over="208 258 16 255" text_color_normal="255 255 46 255" text_color_pushed="108 158 16 255"
onover="play_sound" params_over="name=specie_but_over"
onclick_l="open_url" params_l="cfg_ConditionsTermsURL" />
<!-- onclick_l="open_url" params_l="cfg_NamingPolicyURL" /> -->
<!-- NamingPolicy -->
<ctrl style="opt_button" id="name_policy" posref="BM BM" posparent="text" x="0" y="-40" hardtext="uiCP_Name_Policy"
text_color_over="208 258 16 255" text_color_normal="255 255 46 255" text_color_pushed="108 158 16 255"
onover="play_sound" params_over="name=specie_but_over"
onclick_l="open_url" params_l="cfg_ConditionsTermsURL" />
<!-- onclick_l="open_url" params_l="cfg_NamingPolicyURL" /> -->
<group type="edit_box" id="eb" posparent="name_policy" posref="BM TM" x="0" y="-8" w="300" h="52" render_layer="4" child_resize_h="true"
onenter="proc" params="proc_appear_name_enter"
@ -1309,119 +1308,120 @@
onover="play_sound" params_over="name=specie_but_over"
onclick_l="proc" params_l="proc_appear_name_cancel" />
<!-- Name Generator -->
<!-- Name Generator -->
<!-- voir coter widgets.xml pour les template de checkbox et autre -->
<!-- voir coter widgets.xml pour les template de checkbox et autre -->
<view type="text" id="name_generator" x="0" y="-30" posparent="eb" posref="BM BM" multi_line="false" render_layer="4"
fontsize="10" shadow="true" global_color="false" case="%case_first_string_letter_up" hardtext="uiCP_Name_Generator"
<view type="text" id="name_generator" x="0" y="-30" posparent="eb" posref="BM BM" multi_line="false" render_layer="4"
fontsize="10" shadow="true" global_color="false" case="%case_first_string_letter_up" hardtext="uiCP_Name_Generator"
on_active="proc" on_active_params="proc_init_name_generator" />
<!-- Full generated name with spaces and quote before being clean to match the login name pattern. -->
<view type="text" id="name_full" x="0" y="-15" posparent="eb" posref="BM BM" multi_line="false" render_layer="4"
fontsize="14" color="200 200 200 255" shadow="true" global_color="false" case="%case_first_string_letter_up" />
<!-- Slider Name Race -->
<group id="name_race_slider" posparent="name_generator" posref="BM BM" x="0" y="-55" w="200" h="48" >
<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="middle" posref="TM TM" scale="true" sizeref="w" h="32" w="-64" y="-5" texture="opt_on_m.tga"/>
<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"
id="but_back" posref="TL TL" x="0" y="-6"
onclick_l="proc" params_l="proc_appear_name_race_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"
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"
onclick_l="proc" params_l="proc_appear_name_race_add_one" />
<view type="text" id="name_race" case="%case_first_string_letter_up" posparent="name_generator" posref="TL TL" x="0" y="0" hardtext="Fyros" color="255 255 255 255" fontsize="11"/>
<ctrl type="scroll" id="name_race_scroll" posparent="name_race_slider" posref="MM MM" x="0" y="0" w="160" h="32"
vertical="false" align="L" min="1" max="5" value="UI:TEMP:NAME_RACE" tracksize="40"
tx_topright="" tx_middle="slider_m.tga" tx_bottomleft=""
onscroll="proc" params="proc_appear_name_race_label_change" />
</group>
<!-- Slider Name Sub Race -->
<group id="name_sub_race_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="right" posref="TR TR" texture="opt_on_r.tga" y="-6" />
<view type="bitmap" id="middle" posref="TM TM" scale="true" sizeref="w" h="32" w="-64" y="-5" texture="opt_on_m.tga"/>
<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"
id="but_back" posref="TL TL" x="0" y="-6"
onclick_l="proc" params_l="proc_appear_name_sub_race_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"
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"
onclick_l="proc" params_l="proc_appear_name_sub_race_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="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"/>
<ctrl type="scroll" id="name_race_scroll" posparent="name_sub_race_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"
tx_topright="" tx_middle="slider_m.tga" tx_bottomleft=""
onscroll="proc" params="proc_appear_name_sub_race_label_change" />
</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" >
<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="middle" posref="TM TM" scale="true" sizeref="w" h="32" w="-64" y="-5" texture="opt_on_m.tga"/>
<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"
id="but_back" posref="TL TL" x="0" y="-6"
onclick_l="proc" params_l="proc_appear_name_sub_race2_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"
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"
onclick_l="proc" params_l="proc_appear_name_sub_race2_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="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"/>
<ctrl type="scroll" id="name_race_scroll" posparent="name_sub_race2_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"
tx_topright="" tx_middle="slider_m.tga" tx_bottomleft=""
onscroll="proc" params="proc_appear_name_sub_race2_label_change" />
</group>
<!-- Slider Name Sex -->
<group id="name_sex_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="right" posref="TR TR" texture="opt_on_r.tga" y="-6" />
<view type="bitmap" id="middle" posref="TM TM" scale="true" sizeref="w" h="32" w="-64" y="-5" texture="opt_on_m.tga"/>
<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"
id="but_back" posref="TL TL" x="0" y="-6"
onclick_l="proc" params_l="proc_appear_name_sex_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"
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"
onclick_l="proc" params_l="proc_appear_name_sex_add_one" />
<view type="text" id="name_sex" posparent="name_race_slider" posref="TL TL" x="0" y="0" hardtext="uiCP_Sex_Male" case="%case_first_string_letter_up" color="255 255 255 255" fontsize="11"/>
<ctrl type="scroll" id="name_sex_scroll" posparent="name_sex_slider" posref="MM MM" x="0" y="0" w="160" h="32"
vertical="false" align="L" min="1" max="2" value="UI:TEMP:NAME_SEX" tracksize="40"
tx_topright="" tx_middle="slider_m.tga" tx_bottomleft=""
onscroll="proc" params="proc_appear_name_sex_label_change" />
</group>
<ctrl style="valid_txt_button" id="generate" posref="BM BM" posparent="name_race_slider" x="0" y="-100" hardtext="uiCP_Name_Generate"
onover="play_sound" params_over="name=specie_but_over"
onclick_l="proc" params_l="proc_appear_name_generate" />
<!-- Full generated name with spaces and quote before being clean to match the login name pattern. -->
<view type="text" id="name_full" x="0" y="-15" posparent="eb" posref="BM BM" multi_line="false" render_layer="4"
fontsize="14" color="200 200 200 255" shadow="true" global_color="false" case="%case_first_string_letter_up" />
<!-- Slider Name Race -->
<group id="name_race_slider" posparent="name_generator" posref="BM BM" x="0" y="-55" w="200" h="48" >
<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="middle" posref="TM TM" scale="true" sizeref="w" h="32" w="-64" y="-5" texture="opt_on_m.tga"/>
<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"
id="but_back" posref="TL TL" x="0" y="-6"
onclick_l="proc" params_l="proc_appear_name_race_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"
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"
onclick_l="proc" params_l="proc_appear_name_race_add_one" />
<view type="text" id="name_race" case="%case_first_string_letter_up" posparent="name_generator" posref="TL TL" x="0" y="0" hardtext="Fyros" color="255 255 255 255" fontsize="11"/>
<ctrl type="scroll" id="name_race_scroll" posparent="name_race_slider" posref="MM MM" x="0" y="0" w="160" h="32"
vertical="false" align="L" min="1" max="5" value="UI:TEMP:NAME_RACE" tracksize="40"
tx_topright="" tx_middle="slider_m.tga" tx_bottomleft=""
onscroll="proc" params="proc_appear_name_race_label_change" />
</group>
<!-- Slider Name Sub Race First Name -->
<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="right" posref="TR TR" texture="opt_on_r.tga" y="-6" />
<view type="bitmap" id="middle" posref="TM TM" scale="true" sizeref="w" h="32" w="-64" y="-5" texture="opt_on_m.tga"/>
<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"
id="but_back" posref="TL TL" x="0" y="-6"
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"
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"
onclick_l="proc" params_l="proc_appear_name_sub_race_first_name_add_one" />
<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_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_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_FIRST_NAME" tracksize="40"
tx_topright="" tx_middle="slider_m.tga" tx_bottomleft=""
onscroll="proc" params="proc_appear_name_sub_race_first_name_label_change" />
</group>
<!-- 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="right" posref="TR TR" texture="opt_on_r.tga" y="-6" />
<view type="bitmap" id="middle" posref="TM TM" scale="true" sizeref="w" h="32" w="-64" y="-5" texture="opt_on_m.tga"/>
<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"
id="but_back" posref="TL TL" x="0" y="-6"
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"
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"
onclick_l="proc" params_l="proc_appear_name_sub_race_last_name_add_one" />
<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_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_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_RACE_LAST_NAME" tracksize="40"
tx_topright="" tx_middle="slider_m.tga" tx_bottomleft=""
onscroll="proc" params="proc_appear_name_sub_race_last_name_label_change" />
</group>
<!-- Slider Name Sex -->
<group id="name_sex_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="right" posref="TR TR" texture="opt_on_r.tga" y="-6" />
<view type="bitmap" id="middle" posref="TM TM" scale="true" sizeref="w" h="32" w="-64" y="-5" texture="opt_on_m.tga"/>
<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"
id="but_back" posref="TL TL" x="0" y="-6"
onclick_l="proc" params_l="proc_appear_name_sex_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"
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"
onclick_l="proc" params_l="proc_appear_name_sex_add_one" />
<view type="text" id="name_sex" posparent="name_race_slider" posref="TL TL" x="0" y="0" hardtext="uiCP_Sex_Male" case="%case_first_string_letter_up" color="255 255 255 255" fontsize="11"/>
<ctrl type="scroll" id="name_sex_scroll" posparent="name_sex_slider" posref="MM MM" x="0" y="0" w="160" h="32"
vertical="false" align="L" min="1" max="2" value="UI:TEMP:NAME_SEX" tracksize="40"
tx_topright="" tx_middle="slider_m.tga" tx_bottomleft=""
onscroll="proc" params="proc_appear_name_sex_label_change" />
</group>
<ctrl style="valid_txt_button" id="generate" posref="BM BM" posparent="name_race_slider" x="0" y="-100" hardtext="uiCP_Name_Generate"
onover="play_sound" params_over="name=specie_but_over"
onclick_l="proc" params_l="proc_appear_name_generate" />
<!-- End Name Generator -->
<!-- End Name Generator -->
</group>
@ -1531,22 +1531,22 @@
<action handler="set" params="target_property=ui:outgame:appear_name:eb:input_string|value=''" />
<action handler="set_keyboard_focus" params="target=ui:outgame:appear_name:eb|select_all=false" />
<!-- 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_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_race2_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_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_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_SUB2_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_SUB_RACE_LAST_NAME|value=1" />
<action handler="lua:outgame:procUpdateNameSexLabel()" />
<action handler="lua:outgame:procUpdateNameRaceLabel()" />
<action handler="lua:outgame:procUpdateNameSubRaceLabel()" />
<action handler="lua:outgame:procUpdateNameSubRace2Label()" />
<!-- End Name Generator. -->
<action handler="lua:outgame:procUpdateNameSexLabel()" />
<action handler="lua:outgame:procUpdateNameRaceLabel()" />
<action handler="lua:outgame:procUpdateNameSubRaceFirstNameLabel()" />
<action handler="lua:outgame:procUpdateNameSubRaceLastNameLabel()" />
<!-- End Name Generator. -->
</proc>
@ -1624,55 +1624,55 @@
<!-- Name Generator. -->
<proc id="proc_appear_name_generate">
<action handler="lua:outgame:procGenerateName()" />
<action handler="lua:outgame:procGenerateName()" />
</proc>
<!-- Name Sex. -->
<proc id="proc_appear_name_sex_label_change">
<action handler="lua:outgame:procUpdateNameSexLabel()" />
<action handler="lua:outgame:procUpdateNameSexLabel()" />
</proc>
<proc id="proc_appear_name_sex_add_one">
<action handler="set" params="dblink=UI:TEMP:NAME_SEX|value=min(add(@UI:TEMP:NAME_SEX,1),2)" />
<action handler="lua:outgame:procUpdateNameSexLabel()" />
<action handler="lua:outgame:procUpdateNameSexLabel()" />
</proc>
<proc id="proc_appear_name_sex_sub_one">
<action handler="set" params="dblink=UI:TEMP:NAME_SEX|value=max(sub(@UI:TEMP:NAME_SEX,1),1)" />
<action handler="lua:outgame:procUpdateNameSexLabel()" />
<action handler="lua:outgame:procUpdateNameSexLabel()" />
</proc>
<!-- Name Race. -->
<proc id="proc_appear_name_race_label_change">
<action handler="lua:outgame:procUpdateNameRaceLabel()" />
<action handler="lua:outgame:procUpdateNameRaceLabel()" />
</proc>
<proc id="proc_appear_name_race_add_one">
<action handler="set" params="dblink=UI:TEMP:NAME_RACE|value=min(add(@UI:TEMP:NAME_RACE,1),@UI:TEMP:NAME_RACE_NB)" />
<action handler="lua:outgame:procUpdateNameRaceLabel()" />
<action handler="lua:outgame:procUpdateNameRaceLabel()" />
</proc>
<proc id="proc_appear_name_race_sub_one">
<action handler="set" params="dblink=UI:TEMP:NAME_RACE|value=max(sub(@UI:TEMP:NAME_RACE,1),1)" />
<action handler="lua:outgame:procUpdateNameRaceLabel()" />
<action handler="lua:outgame:procUpdateNameRaceLabel()" />
</proc>
<!-- Name Sub Race. -->
<proc id="proc_appear_name_sub_race_label_change">
<action handler="lua:outgame:procUpdateNameSubRaceLabel()" />
<proc id="proc_appear_name_sub_race_first_name_label_change">
<action handler="lua:outgame:procUpdateNameSubRaceFirstNameLabel()" />
</proc>
<proc id="proc_appear_name_sub_race_add_one">
<action handler="set" params="dblink=UI:TEMP:NAME_SUB_RACE|value=min(add(@UI:TEMP:NAME_SUB_RACE,1),5)" />
<action handler="lua:outgame:procUpdateNameSubRaceLabel()" />
<proc id="proc_appear_name_sub_race_first_name_add_one">
<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:procUpdateNameSubRaceFirstNameLabel()" />
</proc>
<proc id="proc_appear_name_sub_race_sub_one">
<action handler="set" params="dblink=UI:TEMP:NAME_SUB_RACE|value=max(sub(@UI:TEMP:NAME_SUB_RACE,1),1)" />
<action handler="lua:outgame:procUpdateNameSubRaceLabel()" />
<proc id="proc_appear_name_sub_race_first_name_sub_one">
<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:procUpdateNameSubRaceFirstNameLabel()" />
</proc>
<!-- Name Sub Race2. -->
<proc id="proc_appear_name_sub_race2_label_change">
<action handler="lua:outgame:procUpdateNameSubRace2Label()" />
<proc id="proc_appear_name_sub_race_last_name_label_change">
<action handler="lua:outgame:procUpdateNameSubRaceLastNameLabel()" />
</proc>
<proc id="proc_appear_name_sub_race2_add_one">
<action handler="set" params="dblink=UI:TEMP:NAME_SUB_RACE2|value=min(add(@UI:TEMP:NAME_SUB_RACE2,1),4)" />
<action handler="lua:outgame:procUpdateNameSubRace2Label()" />
<proc id="proc_appear_name_sub_race_last_name_add_one">
<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:procUpdateNameSubRaceLastNameLabel()" />
</proc>
<proc id="proc_appear_name_sub_race2_sub_one">
<action handler="set" params="dblink=UI:TEMP:NAME_SUB_RACE2|value=max(sub(@UI:TEMP:NAME_SUB_RACE2,1),1)" />
<action handler="lua:outgame:procUpdateNameSubRace2Label()" />
<proc id="proc_appear_name_sub_race_last_name_sub_one">
<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:procUpdateNameSubRaceLastNameLabel()" />
</proc>
<!-- End Name Generator. -->

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

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

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

@ -30,13 +30,6 @@
#include <csignal>
#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/command.h"
#include "nel/net/tcp_sock.h"
@ -226,23 +219,6 @@ int main(int argc, char **argv)
}
#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)
#ifdef TEST_CRASH_COUNTER
@ -291,6 +267,10 @@ int main(int argc, char **argv)
// TODO for Linux : splashscreen
#endif
// initialize log
initLog();
// initialize patch manager and set the ryzom full path, before it's used
CPatchManager *pPM = CPatchManager::getInstance();
pPM->setRyzomFilename(Args.getProgramPath() + Args.getProgramName());

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

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

@ -105,6 +105,12 @@ extern HINSTANCE HInstance;
extern HWND SlashScreen;
#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 <new>
@ -796,6 +802,65 @@ static bool addRyzomIconBitmap(const std::string &directory, vector<CBitmap> &bi
}
#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 :
// Initialize the application before login
@ -848,21 +913,6 @@ void prelogInit()
// Due to Bug #906, we disable the stl xml allocation
// 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
initDebugMemory();

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

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

@ -2635,7 +2635,13 @@ public:
{
ucstring 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++;
}
}

@ -922,21 +922,23 @@ void CPatchManager::createBatchFile(CProductDescriptionForClient &descFile, bool
contentPrefix += "set RYZOM_CLIENT=\"%1\"\n";
contentPrefix += "set UNPACKPATH=\"%2\"\n";
contentPrefix += "set ROOTPATH=\"%3\"\n";
contentPrefix += "set STARTUPPATH=\"%4\"\n";
contentPrefix += toString("set UPGRADE_FILE=\"%%ROOTPATH%%\\%s\"\n", UpgradeBatchFilename.c_str());
contentPrefix += "\n";
contentPrefix += "set LOGIN=%4\n";
contentPrefix += "set PASSWORD=%5\n";
contentPrefix += "set SHARDID=%6\n";
contentPrefix += "set LOGIN=%5\n";
contentPrefix += "set PASSWORD=%6\n";
contentPrefix += "set SHARDID=%7\n";
#else
contentPrefix += "#!/bin/sh\n";
contentPrefix += "export RYZOM_CLIENT=$1\n";
contentPrefix += "export UNPACKPATH=$2\n";
contentPrefix += "export ROOTPATH=$3\n";
contentPrefix += "export STARTUPPATH=$4\n";
contentPrefix += toString("export UPGRADE_FILE=$ROOTPATH/%s\n", UpgradeBatchFilename.c_str());
contentPrefix += "\n";
contentPrefix += "LOGIN=$4\n";
contentPrefix += "PASSWORD=$5\n";
contentPrefix += "SHARDID=$6\n";
contentPrefix += "LOGIN=$5\n";
contentPrefix += "PASSWORD=$6\n";
contentPrefix += "SHARDID=$7\n";
#endif
contentPrefix += "\n";
@ -958,7 +960,7 @@ void CPatchManager::createBatchFile(CProductDescriptionForClient &descFile, bool
if (wantRyzomRestart)
{
// 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
if (wantRyzomRestart)
@ -976,7 +978,7 @@ void CPatchManager::createBatchFile(CProductDescriptionForClient &descFile, bool
if (wantRyzomRestart)
{
// change to previous client directory
contentSuffix += "cd \"$ROOTPATH\"\n\n";
contentSuffix += "cd \"$STARTUPPATH\"\n\n";
// launch new client
contentSuffix += toString("\"$RYZOM_CLIENT\" %s $LOGIN $PASSWORD $SHARDID\n", additionalParams.c_str());
@ -1017,30 +1019,32 @@ void CPatchManager::executeBatchFile()
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::string startupPath = Args.getStartupPath();
// 3 first parameters are Ryzom client full path, patch directory full path and client root directory full path
#ifdef NL_OS_WINDOWS
batchFilename = CPath::standardizeDosPath(ClientRootPath);
arguments.push_back(CPath::standardizeDosPath(RyzomFilename));
arguments.push_back(CPath::standardizeDosPath(ClientPatchPath));
arguments.push_back(CPath::standardizeDosPath(ClientRootPath));
arguments.push_back(CPath::standardizeDosPath(startupPath));
#else
batchFilename = ClientRootPath;
arguments.push_back(RyzomFilename);
arguments.push_back(ClientPatchPath);
arguments.push_back(ClientRootPath);
arguments.push_back(startupPath);
#endif
batchFilename += UpdateBatchFilename;
// make script executable
CFile::setRWAccess(batchFilename);
// append login, password and shard
if (!LoginLogin.empty())
{
@ -1414,7 +1418,8 @@ void CPatchManager::downloadFileWithCurl (const string &source, const string &de
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));
}
curl_easy_setopt(curl, CURLOPT_FILE, fp);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, fp);
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, fwrite);
//CurrentFilesToGet++;

@ -1340,7 +1340,7 @@ bool mainLoop()
if (!ClientCfg.Local)
{
if(NetMngr.getCurrentServerTick() > LastGameCycle)
RT.updateRyzomClock(NetMngr.getCurrentServerTick(), ryzomGetLocalTime() * 0.001);
RT.updateRyzomClock(NetMngr.getCurrentServerTick());
}
else if (ClientCfg.SimulateServerTick)
{
@ -1348,7 +1348,7 @@ bool mainLoop()
uint numTicks = (uint) floor(SimulatedServerDate * 10);
SimulatedServerTick += numTicks;
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"))
{
RT.increaseTickOffset( (uint32)(2000 * displayHourDelta) );
RT.updateRyzomClock(NetMngr.getCurrentServerTick(), ryzomGetLocalTime() * 0.001);
RT.updateRyzomClock(NetMngr.getCurrentServerTick());
}
// Ctrl-L decrease hour
if (Actions.valide ("dec_hour"))
{
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()));
if (IGCallbacks)
{

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

@ -132,7 +132,7 @@ void CWeatherManagerClient::update(uint64 day, float hour, const CWeatherContext
// build current weather state
EGSPD::CSeason::TSeason season = CRyzomTime::getSeasonByDay((uint32)day);
//
manualUpdate(day, hour, wc, weatherValue, season);
manualUpdateImpl(day, hour, wc, weatherValue, season);
_LastEvalHour = hour;
_LastEvalDay = day;
}
@ -147,25 +147,29 @@ void CWeatherManagerClient::update(uint64 day, float hour, const CWeatherContext
// build current weather state
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;
_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)
{
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)
if (!wc.WF) return;
manualUpdate(day, hour, wc, weatherValue, season);
manualUpdateImpl(day, hour, wc, weatherValue, season);
setupFXs(camMat, wc.GR, continent);
setupWind(&(wc.WF[season]));
float scaledWeatherValue = weatherValue * (wc.WF[season].getNumWeatherSetups() - 1);
updateThunder(day, hour, wc, true, scaledWeatherValue, season);
_LastEvalHour = hour;
_LastEvalDay = day;
// Sound stuff
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)
{
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)
if (!wc.WF) return;
@ -269,11 +280,8 @@ void CWeatherManagerClient::manualUpdate(uint64 day, float hour, const CWeatherC
// blend client specific part
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)
{

@ -105,6 +105,8 @@ protected:
// from CWeatherManager
virtual void setupLoaded(CWeatherSetup *setup);
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;
// A vector of precipitation pointers
typedef std::vector<CPrecipitation *> TPrecipitationVect;

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

@ -205,7 +205,7 @@ inline bool CMirroredDataSet::propIsList( TPropertyIndex propIndex ) const
* Display the values of one property for all entities
*/
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;
// ss << "Mirror property " << propIndex << ":" << endl;

@ -83,4 +83,19 @@ namespace 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;
_RyzomTime = 0.f;
_LocalTime = 0.0;
_TickOffset = 0;
}
// Update ryzom clock when tick occurs, local time must be given if localUpdateRyzomClock() and getLocalRyzomTime() is used
void updateRyzomClock( uint32 gameCyle, double localTime = 0 )
{
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;
}
void updateRyzomClock(uint32 gameCyle);
// get ryzom time (synchronized with server)
inline float getRyzomTime() const { return _RyzomTime; }
@ -202,7 +195,6 @@ private:
uint32 _RyzomDay;
float _RyzomTime;
double _LocalTime;
uint32 _TickOffset;
};

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

@ -18,6 +18,7 @@
#include "nel/misc/types_nl.h"
#include <time.h>
#include "nel/misc/file.h"
#include "nel/misc/common.h"
#include "nel/misc/sstring.h"
#include "nel/misc/mutable_container.h"
#include "nel/net/service.h"
@ -195,7 +196,7 @@ namespace ADMIN
// read the persistent state file if any
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)
{
char buffer[1024];
@ -232,7 +233,7 @@ namespace ADMIN
if (_NeedToWriteStateFile)
{
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)
{
CSString line;

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

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

@ -25,6 +25,7 @@
#include "entities_game_service.h"
#include "egs_globals.h"
#include "nel/misc/noise_value.h"
#include "nel/misc/common.h"
#include "nel/misc/variable.h"
#include "nel/misc/words_dictionary.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 )
{
depositReportCreated = true;
depositReportFile = fopen( "deposit_contents.csv", "wt" ); // fclose() auto?
depositReportFile = nlfopen( "deposit_contents.csv", "wt" ); // fclose() auto?
if ( depositReportFile )
{
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() )
{
FILE * f;
f = fopen(fileName.c_str(),"w");
FILE *f = nlfopen(fileName, "w");
if(f)
{

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

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

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

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

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

@ -118,7 +118,7 @@ void CSession::log(const NLMISC::CSString& lang,const NLMISC::CSString& txt)
nlassert(!fileName.empty());
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);
}
fprintf(_Files[lang],"%s\n",txt.c_str());

@ -391,7 +391,7 @@ void CRepositoryReceiver::beginFile(NLNET::IModuleProxy *sender, const std::stri
_CurrentFileExpected= fileSize;
// 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);
}

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

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

@ -21,6 +21,7 @@
// nel
#include "nel/misc/variable.h"
#include "nel/misc/file.h"
#include "nel/misc/common.h"
// game share
#include "game_share/utils.h"
@ -599,7 +600,7 @@ namespace PATCHMAN
// nldebug("- Reading file data @offset: %d (%d bytes)",newFileEntry.StartOffset,fileSize);
// 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);
uint32 bytesRead=(uint32)fread(&_CacheBuffer[newFileEntry.StartOffset],1,fileSize,inf);
fclose(inf);

@ -409,7 +409,7 @@ void CRepositoryReceiver::fileList(NLNET::IModuleProxy *sender, uint32 version,
// _CurrentFileExpected= fileSize;
//
// // 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);
// }
//

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

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

@ -19,6 +19,7 @@
#include "nel/misc/types_nl.h"
#include "nel/misc/file.h"
#include "nel/misc/path.h"
#include "nel/misc/common.h"
#include "nel/misc/sstring.h"
#include "nel/net/service.h"
#include "game_share/utils.h"
@ -101,7 +102,7 @@ public:
ptm = gmtime(&endTime);
// write to the log file
FILE* fileHandle= fopen(DailyActivityLogFileName,"ab");
FILE* fileHandle= nlfopen(DailyActivityLogFileName,"ab");
nlassert(fileHandle!=NULL);
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 );

@ -19,6 +19,7 @@
#include "nel/misc/types_nl.h"
#include "nel/misc/file.h"
#include "nel/misc/path.h"
#include "nel/misc/common.h"
#include "nel/misc/sstring.h"
#include "nel/net/service.h"
#include "game_share/utils.h"
@ -101,7 +102,7 @@ public:
ptm = gmtime(&endTime);
// write to the log file
FILE* fileHandle= fopen(HourlyActivityLogFileName,"ab");
FILE* fileHandle= nlfopen(HourlyActivityLogFileName,"ab");
nlassert(fileHandle!=NULL);
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 );

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

@ -27,11 +27,7 @@ SET(CLIENT_CONFIG_UIS
sys_info_widget.ui
)
SET(CLIENT_CONFIG_TRANS
${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
)
FILE(GLOB CLIENT_CONFIG_TRANS translations/*.ts)
CONFIGURE_FILE(translations/translations.qrc ${CMAKE_CURRENT_BINARY_DIR}/translations.qrc COPYONLY)
SET(CLIENT_CONFIG_RCS resources.qrc ${CMAKE_CURRENT_BINARY_DIR}/translations.qrc )
@ -47,6 +43,8 @@ IF(WITH_QT)
ADD_DEFINITIONS(${QT_DEFINITIONS})
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_RESOURCES(CLIENT_CONFIG_RC_SRCS ${CLIENT_CONFIG_RCS})
QT5_WRAP_CPP(CLIENT_CONFIG_MOC_SRC ${CLIENT_CONFIG_HDR})

@ -31,6 +31,10 @@
#include <QtGui>
#include <QMessageBox>
#include "nel/misc/cmd_args.h"
extern NLMISC::CCmdArgs Args;
CClientConfigDialog::CClientConfigDialog( QWidget *parent ) :
QDialog( parent )
{
@ -145,16 +149,29 @@ void CClientConfigDialog::onClickPlay()
{
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
started = QProcess::startDetached( "ryzom_client_r.exe" );
if( !started )
QProcess::startDetached( "ryzom_client_d.exe" );
#ifdef _DEBUG
clientFullPath += "ryzom_client_d.exe";
#else
clientFullPath += "ryzom_client_r.exe";
#endif
#elif defined(Q_OS_MAC)
started = QProcess::startDetached( "./Ryzom.app" );
clientFullPath += "Ryzom";
#else
started = QProcess::startDetached( "./ryzom_client" );
clientFullPath += "ryzom_client";
#endif
started = QProcess::startDetached(clientFullPath, arguments);
onClickOK();
}

@ -17,6 +17,10 @@
#include "stdpch.h"
#include "config.h"
#include "nel/misc/common.h"
#include "nel/misc/i18n.h"
#include "nel/misc/path.h"
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
{
cf.load( fileName );
cf.load(fileName);
std::string def = getString( "RootConfigFilename" );
if( def.compare( "" ) != 0 )
dcf.load( def );
std::string def = getString("RootConfigFilename");
if (!def.empty())
dcf.load(def);
}
catch( NLMISC::Exception &e )
catch (const NLMISC::Exception &e)
{
nlwarning( "%s", e.what() );
return false;
@ -51,7 +88,7 @@ bool CConfig::reload()
cf.clear();
cf.reparse();
}
catch( NLMISC::Exception &e )
catch (const NLMISC::Exception &e)
{
nlwarning( "%s", e.what() );
return false;
@ -112,7 +149,7 @@ bool CConfig::save()
{
cf.save();
}
catch( NLMISC::Exception &e )
catch (const NLMISC::Exception &e)
{
nlwarning( "%s", e.what() );
return false;

@ -28,12 +28,20 @@ public:
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.
@param fileName - The file to load
@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

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

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

@ -25,7 +25,7 @@
<item>
<widget class="QLabel" name="label">
<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>
</widget>
</item>
@ -78,7 +78,7 @@
<item>
<widget class="QLabel" name="label_3">
<property name="text">
<string>Specify a video mode</string>
<string>Specify a video mode:</string>
</property>
</widget>
</item>

@ -43,11 +43,6 @@
<string>German</string>
</property>
</item>
<item>
<property name="text">
<string>Hungarian</string>
</property>
</item>
</widget>
</item>
<item>
@ -97,7 +92,7 @@
<item>
<widget class="QCheckBox" name="lowPriorityProcessCheckBox">
<property name="text">
<string>Slow down the game ( process low priority )</string>
<string>Slow down the game (process low priority)</string>
</property>
</widget>
</item>

@ -18,6 +18,7 @@
#include "client_config_dialog.h"
#include "system.h"
#include "nel/misc/cmd_args.h"
#include <QSplashScreen>
@ -36,27 +37,117 @@
#endif
NLMISC::CCmdArgs Args;
int main(sint32 argc, char **argv)
{
NLMISC::CApplicationContext applicationContext;
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"));
QPixmap pixmap(":/resources/splash_screen.png" );
QSplashScreen splash( pixmap );
splash.show();
QString locale = QLocale::system().name().left(2);
QLocale locale = QLocale::system();
// load application translations
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;
d.show();

@ -42,7 +42,7 @@
<item>
<widget class="QCheckBox" name="softwareCheckBox">
<property name="text">
<string>Software sound buffer ( may increase FPS )</string>
<string>Software sound buffer (may increase FPS)</string>
</property>
</widget>
</item>

@ -27,7 +27,7 @@ CSysInfoWidget::CSysInfoWidget( QWidget *parent ) :
osLabel->setText(QString::fromUtf8(CSystem::GetInstance().sysInfo.osName.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()));
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;
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 )
{
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>

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

Loading…
Cancel
Save