mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-25 18:30:53 +00:00
Merge with develop
--HG-- branch : compatibility-develop
This commit is contained in:
commit
b9d366372e
15 changed files with 121 additions and 87 deletions
|
@ -1203,6 +1203,7 @@ sint CDriverGL::getTotalVideoMemory() const
|
||||||
{
|
{
|
||||||
H_AUTO_OGL(CDriverGL_getTotalVideoMemory);
|
H_AUTO_OGL(CDriverGL_getTotalVideoMemory);
|
||||||
|
|
||||||
|
#ifndef USE_OPENGLES
|
||||||
if (_Extensions.NVXGPUMemoryInfo)
|
if (_Extensions.NVXGPUMemoryInfo)
|
||||||
{
|
{
|
||||||
GLint memoryInKiB = 0;
|
GLint memoryInKiB = 0;
|
||||||
|
@ -1306,6 +1307,10 @@ sint CDriverGL::getTotalVideoMemory() const
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#else
|
||||||
|
// TODO: implement for OpenGL ES
|
||||||
|
#endif
|
||||||
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -293,7 +293,7 @@ std::string CI18N::getSystemLanguageCode ()
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
nlerror("Unable to convert CFStringRef to string");
|
nlwarning("Unable to convert CFStringRef to string");
|
||||||
}
|
}
|
||||||
|
|
||||||
delete [] tmp;
|
delete [] tmp;
|
||||||
|
@ -306,11 +306,20 @@ std::string CI18N::getSystemLanguageCode ()
|
||||||
CFRelease(langCF);
|
CFRelease(langCF);
|
||||||
}
|
}
|
||||||
|
|
||||||
// only keep language code if supported by NeL
|
if (!lang.empty())
|
||||||
if (!lang.empty() && isLanguageCodeSupported(lang))
|
|
||||||
{
|
{
|
||||||
s_cachedSystemLanguage = lang;
|
// fix language code if country is specified
|
||||||
break;
|
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))
|
||||||
|
{
|
||||||
|
s_cachedSystemLanguage = lang;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
fyrosLastNames = {"Abyan", "Abybus", "Abycaan", "Abycabus", "Abycacaon", "Abycacus", "Abycadix", "Abycadon", "Abycados", "Abycaion"
|
fyrosFirstNames = {"Abyan", "Abybus", "Abycaan", "Abycabus", "Abycacaon", "Abycacus", "Abycadix", "Abycadon", "Abycados", "Abycaion"
|
||||||
, "Abycakos", "Abycala", "Abycalaus", "Abycalion", "Abycallo", "Abycalus", "Abycamus", "Abycan", "Abycanix", "Abycaon", "Abycaps"
|
, "Abycakos", "Abycala", "Abycalaus", "Abycalion", "Abycallo", "Abycalus", "Abycamus", "Abycan", "Abycanix", "Abycaon", "Abycaps"
|
||||||
, "Abycarius", "Abycaron", "Abycaros", "Abycarus", "Abycaseus", "Abycasse", "Abycatheus", "Abycathus", "Abycatis", "Abycaton", "Abycaxius"
|
, "Abycarius", "Abycaron", "Abycaros", "Abycarus", "Abycaseus", "Abycasse", "Abycatheus", "Abycathus", "Abycatis", "Abycaton", "Abycaxius"
|
||||||
, "Abycus", "Abydix", "Abydon", "Abydos", "Abygrian", "Abygribus", "Abygricaon", "Abygricus", "Abygridix", "Abygridon", "Abygridos"
|
, "Abycus", "Abydix", "Abydon", "Abydos", "Abygrian", "Abygribus", "Abygricaon", "Abygricus", "Abygridix", "Abygridon", "Abygridos"
|
||||||
|
@ -286,7 +286,7 @@ fyrosLastNames = {"Abyan", "Abybus", "Abycaan", "Abycabus", "Abycacaon", "Abycac
|
||||||
, "Zenathus", "Zenatis", "Zenaton", "Zenaxius", "Zenbus", "Zencaon", "Zencus", "Zendix", "Zendon", "Zendos", "Zenion", "Zenix", "Zenkos", "Zenla", "Zenlaus", "Zenlion", "Zenllo", "Zenlus", "Zenmus", "Zenn", "Zennix", "Zenps", "Zenrius", "Zenron", "Zenros", "Zenrus", "Zenseus", "Zensse", "Zentheus"
|
, "Zenathus", "Zenatis", "Zenaton", "Zenaxius", "Zenbus", "Zencaon", "Zencus", "Zendix", "Zendon", "Zendos", "Zenion", "Zenix", "Zenkos", "Zenla", "Zenlaus", "Zenlion", "Zenllo", "Zenlus", "Zenmus", "Zenn", "Zennix", "Zenps", "Zenrius", "Zenron", "Zenros", "Zenrus", "Zenseus", "Zensse", "Zentheus"
|
||||||
, "Zenthus", "Zentis", "Zenton", "Zenxius", "Zeperian", "Zeperibus", "Zepericaon", "Zepericus", "Zeperidix", "Zeperidon", "Zeperidos", "Zeperiion", "Zeperikos", "Zeperila", "Zeperilaus", "Zeperilion", "Zeperillo", "Zeperilus", "Zeperimus", "Zeperin", "Zeperinix", "Zeperips", "Zeperirius", "Zeperiron", "Zeperiros", "Zeperirus", "Zeperiseus", "Zeperisse", "Zeperitheus", "Zeperithus", "Zeperitis", "Zeperiton", "Zeperixius", "Zephaan", "Zephabus", "Zephacaon", "Zephacus", "Zephadix", "Zephadon", "Zephados", "Zephaion", "Zephakos", "Zephala", "Zephalaus", "Zephalion", "Zephallo", "Zephalus", "Zephamus", "Zephan", "Zephanix", "Zephaps", "Zepharius", "Zepharon", "Zepharos", "Zepharus", "Zephaseus", "Zephasse", "Zephatheus", "Zephathus", "Zephatis", "Zephaton", "Zephaxius", "Zephoan", "Zephobus", "Zephocaon", "Zephocus", "Zephodix", "Zephodon", "Zephodos", "Zephoion", "Zephokos", "Zephola", "Zepholaus", "Zepholion", "Zephollo", "Zepholus", "Zephomus", "Zephon", "Zephonix", "Zephops", "Zephorius", "Zephoron", "Zephoros", "Zephorus", "Zephoseus", "Zephosse", "Zephotheus", "Zephothus", "Zephotis", "Zephoton", "Zephoxius", "Zephyan", "Zephybus", "Zephycaon", "Zephycus", "Zephydix", "Zephydon", "Zephydos", "Zephyion", "Zephykos", "Zephyla", "Zephylaus", "Zephylion", "Zephyllo", "Zephylus", "Zephymus", "Zephyn", "Zephynix", "Zephyps", "Zephyrius", "Zephyron", "Zephyros", "Zephyrus", "Zephyseus", "Zephysse", "Zephytheus", "Zephythus", "Zephytis", "Zephyton", "Zephyxius", "Zeps", "Zeraan", "Zerabus", "Zeracaon", "Zeracus", "Zeradix", "Zeradon", "Zerados", "Zeraion", "Zerakos", "Zerala", "Zeralaus", "Zeralion", "Zerallo", "Zeralus", "Zeramus", "Zeran", "Zeranix", "Zeraps", "Zerarius", "Zeraron", "Zeraros", "Zerarus", "Zeraseus", "Zerasse", "Zeratheus", "Zerathus", "Zeratis", "Zeraton", "Zeraxius", "Zerian", "Zeribus", "Zericaon", "Zericus", "Zeridix", "Zeridon", "Zeridos", "Zeriion", "Zerikos", "Zerila", "Zerilaus", "Zerilion", "Zerillo", "Zerilus", "Zerimus", "Zerin", "Zerinix", "Zerips", "Zeririus", "Zeriron", "Zeriros", "Zerirus", "Zeriseus", "Zerisse", "Zeritheus", "Zerithus", "Zeritis", "Zeriton", "Zerius", "Zerixius", "Zeron", "Zeros", "Zerus", "Zeryaan", "Zeryabus", "Zeryacaon", "Zeryacus", "Zeryadix", "Zeryadon", "Zeryados", "Zeryaion", "Zeryakos", "Zeryala", "Zeryalaus", "Zeryalion", "Zeryallo", "Zeryalus", "Zeryamus", "Zeryan", "Zeryanix", "Zeryaps", "Zeryarius", "Zeryaron", "Zeryaros", "Zeryarus", "Zeryaseus", "Zeryasse", "Zeryatheus", "Zeryathus", "Zeryatis", "Zeryaton", "Zeryaxius", "Zeseus", "Zesse", "Zessean", "Zessebus", "Zessecaon", "Zessecus", "Zessedix", "Zessedon", "Zessedos", "Zesseion", "Zessekos", "Zessela", "Zesselaus", "Zesselion", "Zessello", "Zesselus", "Zessemus", "Zessen", "Zessenix", "Zesseps", "Zesserius", "Zesseron", "Zesseros", "Zesserus", "Zesseseus", "Zessesse", "Zessetheus", "Zessethus", "Zessetis", "Zesseton", "Zessexius", "Zetheus", "Zethus", "Zetis", "Zeton", "Zexius"}
|
, "Zenthus", "Zentis", "Zenton", "Zenxius", "Zeperian", "Zeperibus", "Zepericaon", "Zepericus", "Zeperidix", "Zeperidon", "Zeperidos", "Zeperiion", "Zeperikos", "Zeperila", "Zeperilaus", "Zeperilion", "Zeperillo", "Zeperilus", "Zeperimus", "Zeperin", "Zeperinix", "Zeperips", "Zeperirius", "Zeperiron", "Zeperiros", "Zeperirus", "Zeperiseus", "Zeperisse", "Zeperitheus", "Zeperithus", "Zeperitis", "Zeperiton", "Zeperixius", "Zephaan", "Zephabus", "Zephacaon", "Zephacus", "Zephadix", "Zephadon", "Zephados", "Zephaion", "Zephakos", "Zephala", "Zephalaus", "Zephalion", "Zephallo", "Zephalus", "Zephamus", "Zephan", "Zephanix", "Zephaps", "Zepharius", "Zepharon", "Zepharos", "Zepharus", "Zephaseus", "Zephasse", "Zephatheus", "Zephathus", "Zephatis", "Zephaton", "Zephaxius", "Zephoan", "Zephobus", "Zephocaon", "Zephocus", "Zephodix", "Zephodon", "Zephodos", "Zephoion", "Zephokos", "Zephola", "Zepholaus", "Zepholion", "Zephollo", "Zepholus", "Zephomus", "Zephon", "Zephonix", "Zephops", "Zephorius", "Zephoron", "Zephoros", "Zephorus", "Zephoseus", "Zephosse", "Zephotheus", "Zephothus", "Zephotis", "Zephoton", "Zephoxius", "Zephyan", "Zephybus", "Zephycaon", "Zephycus", "Zephydix", "Zephydon", "Zephydos", "Zephyion", "Zephykos", "Zephyla", "Zephylaus", "Zephylion", "Zephyllo", "Zephylus", "Zephymus", "Zephyn", "Zephynix", "Zephyps", "Zephyrius", "Zephyron", "Zephyros", "Zephyrus", "Zephyseus", "Zephysse", "Zephytheus", "Zephythus", "Zephytis", "Zephyton", "Zephyxius", "Zeps", "Zeraan", "Zerabus", "Zeracaon", "Zeracus", "Zeradix", "Zeradon", "Zerados", "Zeraion", "Zerakos", "Zerala", "Zeralaus", "Zeralion", "Zerallo", "Zeralus", "Zeramus", "Zeran", "Zeranix", "Zeraps", "Zerarius", "Zeraron", "Zeraros", "Zerarus", "Zeraseus", "Zerasse", "Zeratheus", "Zerathus", "Zeratis", "Zeraton", "Zeraxius", "Zerian", "Zeribus", "Zericaon", "Zericus", "Zeridix", "Zeridon", "Zeridos", "Zeriion", "Zerikos", "Zerila", "Zerilaus", "Zerilion", "Zerillo", "Zerilus", "Zerimus", "Zerin", "Zerinix", "Zerips", "Zeririus", "Zeriron", "Zeriros", "Zerirus", "Zeriseus", "Zerisse", "Zeritheus", "Zerithus", "Zeritis", "Zeriton", "Zerius", "Zerixius", "Zeron", "Zeros", "Zerus", "Zeryaan", "Zeryabus", "Zeryacaon", "Zeryacus", "Zeryadix", "Zeryadon", "Zeryados", "Zeryaion", "Zeryakos", "Zeryala", "Zeryalaus", "Zeryalion", "Zeryallo", "Zeryalus", "Zeryamus", "Zeryan", "Zeryanix", "Zeryaps", "Zeryarius", "Zeryaron", "Zeryaros", "Zeryarus", "Zeryaseus", "Zeryasse", "Zeryatheus", "Zeryathus", "Zeryatis", "Zeryaton", "Zeryaxius", "Zeseus", "Zesse", "Zessean", "Zessebus", "Zessecaon", "Zessecus", "Zessedix", "Zessedon", "Zessedos", "Zesseion", "Zessekos", "Zessela", "Zesselaus", "Zesselion", "Zessello", "Zesselus", "Zessemus", "Zessen", "Zessenix", "Zesseps", "Zesserius", "Zesseron", "Zesseros", "Zesserus", "Zesseseus", "Zessesse", "Zessetheus", "Zessethus", "Zessetis", "Zesseton", "Zessexius", "Zetheus", "Zethus", "Zetis", "Zeton", "Zexius"}
|
||||||
|
|
||||||
fyrosFirstNames = {"Abyan", "Abybus", "Abycaon", "Abycus", "Abydix", "Abydon", "Abydos", "Abyion", "Abykos", "Abyla", "Abylaus", "Abylion"
|
fyrosLastNames = {"Abyan", "Abybus", "Abycaon", "Abycus", "Abydix", "Abydon", "Abydos", "Abyion", "Abykos", "Abyla", "Abylaus", "Abylion"
|
||||||
, "Abyllo", "Abylus", "Abymus", "Abyn", "Abynix", "Abyps", "Abyrius", "Abyron", "Abyros", "Abyrus", "Abyseus", "Abysse", "Abytheus", "Abythus"
|
, "Abyllo", "Abylus", "Abymus", "Abyn", "Abynix", "Abyps", "Abyrius", "Abyron", "Abyros", "Abyrus", "Abyseus", "Abysse", "Abytheus", "Abythus"
|
||||||
, "Abytis", "Abyton", "Abyxius", "Aean", "Aebus", "Aecaon", "Aecus", "Aedix", "Aedon", "Aedos", "Aeion", "Aekos", "Aela", "Aelaus", "Aelion"
|
, "Abytis", "Abyton", "Abyxius", "Aean", "Aebus", "Aecaon", "Aecus", "Aedix", "Aedon", "Aedos", "Aeion", "Aekos", "Aela", "Aelaus", "Aelion"
|
||||||
, "Aello", "Aelus", "Aemus", "Aen", "Aenix", "Aeps", "Aerius", "Aeron", "Aeros", "Aerus", "Aeseus", "Aesse", "Aetheus", "Aethus", "Aetis"
|
, "Aello", "Aelus", "Aemus", "Aen", "Aenix", "Aeps", "Aerius", "Aeron", "Aeros", "Aerus", "Aeseus", "Aesse", "Aetheus", "Aethus", "Aetis"
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -19,80 +19,80 @@ end
|
||||||
-- tryker: given name 4500, FirstName 4335
|
-- tryker: given name 4500, FirstName 4335
|
||||||
|
|
||||||
-- Fyros
|
-- Fyros
|
||||||
function outgame:getFyrosLastName()
|
|
||||||
local nbFyrosLastNames = 0;
|
|
||||||
for _ in pairs(fyrosLastNames) do nbFyrosLastNames = nbFyrosLastNames + 1 end
|
|
||||||
|
|
||||||
return fyrosLastNames[math.random(nbFyrosLastNames)]
|
|
||||||
end
|
|
||||||
function outgame:getFyrosFirstName()
|
function outgame:getFyrosFirstName()
|
||||||
local nbFyrosFirstNames = 0;
|
local nbFyrosFirstNames = 0;
|
||||||
for _ in pairs(fyrosFirstNames) do nbFyrosFirstNames = nbFyrosFirstNames + 1 end
|
for _ in pairs(fyrosFirstNames) do nbFyrosFirstNames = nbFyrosFirstNames + 1 end
|
||||||
|
|
||||||
return fyrosFirstNames[math.random(nbFyrosFirstNames)]
|
return fyrosFirstNames[math.random(nbFyrosFirstNames)]
|
||||||
end
|
end
|
||||||
|
function outgame:getFyrosLastName()
|
||||||
|
local nbFyrosLastNames = 0;
|
||||||
|
for _ in pairs(fyrosLastNames) do nbFyrosLastNames = nbFyrosLastNames + 1 end
|
||||||
|
|
||||||
|
return fyrosLastNames[math.random(nbFyrosLastNames)]
|
||||||
|
end
|
||||||
|
|
||||||
-- Matis
|
-- Matis
|
||||||
function outgame:getMatisLastName(sex)
|
function outgame:getMatisFirstName(sex)
|
||||||
local dbNameSex = getDbProp("UI:TEMP:NAME_SEX");
|
local dbNameSex = getDbProp("UI:TEMP:NAME_SEX");
|
||||||
|
|
||||||
if sex ~= nil then
|
if sex ~= nil then
|
||||||
dbNameSex = sex;
|
dbNameSex = sex;
|
||||||
end
|
end
|
||||||
|
|
||||||
local LastName = ""
|
local FirstName = ""
|
||||||
if tonumber( dbNameSex )== 1 then
|
if tonumber( dbNameSex )== 1 then
|
||||||
local nbMatisMaleLastNames = 0;
|
local nbMatisMaleFirstNames = 0;
|
||||||
for _ in pairs(matisMaleLastNames) do nbMatisMaleLastNames = nbMatisMaleLastNames + 1 end
|
for _ in pairs(matisMaleFirstNames) do nbMatisMaleFirstNames = nbMatisMaleFirstNames + 1 end
|
||||||
LastName = matisMaleLastNames[math.random(nbMatisMaleLastNames)];
|
FirstName = matisMaleFirstNames[math.random(nbMatisMaleFirstNames)];
|
||||||
else
|
else
|
||||||
local nbMatisFemaleLastNames = 0;
|
local nbMatisFemaleFirstNames = 0;
|
||||||
for _ in pairs(matisFemaleLastNames) do nbMatisFemaleLastNames = nbMatisFemaleLastNames + 1 end
|
for _ in pairs(matisFemaleFirstNames) do nbMatisFemaleFirstNames = nbMatisFemaleFirstNames + 1 end
|
||||||
LastName = matisFemaleLastNames[math.random(nbMatisFemaleLastNames)];
|
FirstName = matisFemaleFirstNames[math.random(nbMatisFemaleFirstNames)];
|
||||||
end
|
end
|
||||||
|
|
||||||
return LastName;
|
return FirstName;
|
||||||
end
|
end
|
||||||
|
|
||||||
function outgame:getMatisFirstName()
|
function outgame:getMatisLastName()
|
||||||
|
|
||||||
local nbMatisFirstNames = 0;
|
local nbMatisLastNames = 0;
|
||||||
for _ in pairs(matisFirstNames) do nbMatisFirstNames = nbMatisFirstNames + 1 end
|
for _ in pairs(matisLastNames) do nbMatisLastNames = nbMatisLastNames + 1 end
|
||||||
|
|
||||||
return matisFirstNames[math.random(nbMatisFirstNames)]
|
return matisLastNames[math.random(nbMatisLastNames)]
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Tryker
|
-- Tryker
|
||||||
function outgame:getTrykerLastName()
|
|
||||||
local nbTrykerLastNames = 0;
|
|
||||||
for _ in pairs(trykerLastNames) do nbTrykerLastNames = nbTrykerLastNames + 1 end
|
|
||||||
|
|
||||||
return trykerLastNames[math.random(nbTrykerLastNames)]
|
|
||||||
end
|
|
||||||
function outgame:getTrykerFirstName()
|
function outgame:getTrykerFirstName()
|
||||||
local nbTrykerFirstNames = 0;
|
local nbTrykerFirstNames = 0;
|
||||||
for _ in pairs(trykerFirstNames) do nbTrykerFirstNames = nbTrykerFirstNames + 1 end
|
for _ in pairs(trykerFirstNames) do nbTrykerFirstNames = nbTrykerFirstNames + 1 end
|
||||||
|
|
||||||
return trykerFirstNames[math.random(nbTrykerFirstNames)]
|
return trykerFirstNames[math.random(nbTrykerFirstNames)]
|
||||||
end
|
end
|
||||||
|
function outgame:getTrykerLastName()
|
||||||
|
local nbTrykerLastNames = 0;
|
||||||
|
for _ in pairs(trykerLastNames) do nbTrykerLastNames = nbTrykerLastNames + 1 end
|
||||||
|
|
||||||
|
return trykerLastNames[math.random(nbTrykerLastNames)]
|
||||||
|
end
|
||||||
|
|
||||||
-- Zoraï
|
-- Zoraï
|
||||||
function outgame:getZoraiLastName()
|
|
||||||
local nbLastNamesOne = 0;
|
|
||||||
for _ in pairs(zoraiLastNamesOne) do nbLastNamesOne = nbLastNamesOne + 1 end
|
|
||||||
local lastNameOne = zoraiLastNamesOne[math.random(nbLastNamesOne)];
|
|
||||||
|
|
||||||
local nbLastNamesTwo = 0;
|
|
||||||
for _ in pairs(zoraiLastNamesTwo) do nbLastNamesTwo = nbLastNamesTwo + 1 end
|
|
||||||
local lastNameTwo = zoraiLastNamesTwo[math.random(nbLastNamesTwo)];
|
|
||||||
|
|
||||||
return lastNameOne .. "-" .. lastNameTwo
|
|
||||||
end
|
|
||||||
function outgame:getZoraiFirstName()
|
function outgame:getZoraiFirstName()
|
||||||
local nbFirstNames = 0;
|
local nbFirstNamesOne = 0;
|
||||||
for _ in pairs(zoraiFirstNames) do nbFirstNames = nbFirstNames + 1 end
|
for _ in pairs(zoraiFirstNamesOne) do nbFirstNamesOne = nbFirstNamesOne + 1 end
|
||||||
|
local FirstNameOne = zoraiFirstNamesOne[math.random(nbFirstNamesOne)];
|
||||||
|
|
||||||
return zoraiFirstNames[math.random(nbFirstNames)]
|
local nbFirstNamesTwo = 0;
|
||||||
|
for _ in pairs(zoraiFirstNamesTwo) do nbFirstNamesTwo = nbFirstNamesTwo + 1 end
|
||||||
|
local FirstNameTwo = zoraiFirstNamesTwo[math.random(nbFirstNamesTwo)];
|
||||||
|
|
||||||
|
return FirstNameOne .. "-" .. FirstNameTwo
|
||||||
|
end
|
||||||
|
function outgame:getZoraiLastName()
|
||||||
|
local nbLastNames = 0;
|
||||||
|
for _ in pairs(zoraiLastNames) do nbLastNames = nbLastNames + 1 end
|
||||||
|
|
||||||
|
return zoraiLastNames[math.random(nbLastNames)]
|
||||||
end
|
end
|
||||||
|
|
||||||
function outgame:procGenerateName()
|
function outgame:procGenerateName()
|
||||||
|
@ -114,25 +114,25 @@ function outgame:procGenerateName()
|
||||||
lastName = self:getFyrosLastName()
|
lastName = self:getFyrosLastName()
|
||||||
firstName = self:getFyrosFirstName()
|
firstName = self:getFyrosFirstName()
|
||||||
fullnameResult = lastName .. " " .. firstName
|
fullnameResult = lastName .. " " .. firstName
|
||||||
nameResult = lastName
|
nameResult = firstName
|
||||||
elseif tonumber( dbNameRace ) == 2 then
|
elseif tonumber( dbNameRace ) == 2 then
|
||||||
-- Matis
|
-- Matis
|
||||||
lastName = self:getMatisLastName()
|
lastName = self:getMatisLastName()
|
||||||
firstName = self:getMatisFirstName()
|
firstName = self:getMatisFirstName()
|
||||||
fullnameResult = lastName .. " " .. firstName
|
fullnameResult = lastName .. " " .. firstName
|
||||||
nameResult = lastName
|
nameResult = firstName
|
||||||
elseif tonumber( dbNameRace ) == 3 then
|
elseif tonumber( dbNameRace ) == 3 then
|
||||||
-- Tryker
|
-- Tryker
|
||||||
lastName = self:getTrykerLastName()
|
lastName = self:getTrykerLastName()
|
||||||
firstName = self:getTrykerFirstName()
|
firstName = self:getTrykerFirstName()
|
||||||
fullnameResult = firstName .. " " .. lastName
|
fullnameResult = firstName .. " " .. lastName
|
||||||
nameResult = lastName
|
nameResult = firstName
|
||||||
elseif tonumber( dbNameRace ) == 4 then
|
elseif tonumber( dbNameRace ) == 4 then
|
||||||
-- Zorai
|
-- Zorai
|
||||||
lastName = self:getZoraiLastName()
|
lastName = self:getZoraiLastName()
|
||||||
firstName = self:getZoraiFirstName()
|
firstName = self:getZoraiFirstName()
|
||||||
fullnameResult = firstName .. " " .. lastName
|
fullnameResult = firstName .. " " .. lastName
|
||||||
nameResult = lastName
|
nameResult = firstName
|
||||||
elseif tonumber( dbNameRace ) == 5 then
|
elseif tonumber( dbNameRace ) == 5 then
|
||||||
-- Maraudeurs
|
-- Maraudeurs
|
||||||
-- lastName
|
-- lastName
|
||||||
|
@ -170,7 +170,7 @@ function outgame:procGenerateName()
|
||||||
end
|
end
|
||||||
|
|
||||||
fullnameResult = lastName .. " " .. firstName
|
fullnameResult = lastName .. " " .. firstName
|
||||||
nameResult = lastName
|
nameResult = firstName
|
||||||
end
|
end
|
||||||
|
|
||||||
uiNameFull.hardtext = fullnameResult;
|
uiNameFull.hardtext = fullnameResult;
|
||||||
|
|
|
@ -1245,10 +1245,10 @@ void CFarTP::sendReady()
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Set season
|
// Set season
|
||||||
RT.updateRyzomClock(NetMngr.getCurrentServerTick(), ryzomGetLocalTime() * 0.001);
|
RT.updateRyzomClock(NetMngr.getCurrentServerTick());
|
||||||
DayNightCycleHour = (float)RT.getRyzomTime();
|
DayNightCycleHour = (float)RT.getRyzomTime();
|
||||||
CurrSeason = RT.getRyzomSeason();
|
CurrSeason = RT.getRyzomSeason();
|
||||||
RT.updateRyzomClock(NetMngr.getCurrentServerTick(), ryzomGetLocalTime() * 0.001);
|
RT.updateRyzomClock(NetMngr.getCurrentServerTick());
|
||||||
DayNightCycleHour = (float)RT.getRyzomTime();
|
DayNightCycleHour = (float)RT.getRyzomTime();
|
||||||
ManualSeasonValue = RT.getRyzomSeason();
|
ManualSeasonValue = RT.getRyzomSeason();
|
||||||
|
|
||||||
|
|
|
@ -797,10 +797,10 @@ void initMainLoop()
|
||||||
|
|
||||||
{
|
{
|
||||||
// setup good day / season before ig are added.
|
// setup good day / season before ig are added.
|
||||||
RT.updateRyzomClock(NetMngr.getCurrentServerTick(), ryzomGetLocalTime() * 0.001);
|
RT.updateRyzomClock(NetMngr.getCurrentServerTick());
|
||||||
updateDayNightCycleHour();
|
updateDayNightCycleHour();
|
||||||
StartupSeason = CurrSeason = RT.getRyzomSeason();
|
StartupSeason = CurrSeason = RT.getRyzomSeason();
|
||||||
RT.updateRyzomClock(NetMngr.getCurrentServerTick(), ryzomGetLocalTime() * 0.001);
|
RT.updateRyzomClock(NetMngr.getCurrentServerTick());
|
||||||
updateDayNightCycleHour();
|
updateDayNightCycleHour();
|
||||||
ManualSeasonValue = RT.getRyzomSeason();
|
ManualSeasonValue = RT.getRyzomSeason();
|
||||||
|
|
||||||
|
|
|
@ -1340,7 +1340,7 @@ bool mainLoop()
|
||||||
if (!ClientCfg.Local)
|
if (!ClientCfg.Local)
|
||||||
{
|
{
|
||||||
if(NetMngr.getCurrentServerTick() > LastGameCycle)
|
if(NetMngr.getCurrentServerTick() > LastGameCycle)
|
||||||
RT.updateRyzomClock(NetMngr.getCurrentServerTick(), ryzomGetLocalTime() * 0.001);
|
RT.updateRyzomClock(NetMngr.getCurrentServerTick());
|
||||||
}
|
}
|
||||||
else if (ClientCfg.SimulateServerTick)
|
else if (ClientCfg.SimulateServerTick)
|
||||||
{
|
{
|
||||||
|
@ -1348,7 +1348,7 @@ bool mainLoop()
|
||||||
uint numTicks = (uint) floor(SimulatedServerDate * 10);
|
uint numTicks = (uint) floor(SimulatedServerDate * 10);
|
||||||
SimulatedServerTick += numTicks;
|
SimulatedServerTick += numTicks;
|
||||||
SimulatedServerDate = (float)((double)SimulatedServerDate - (double) numTicks * 0.1);
|
SimulatedServerDate = (float)((double)SimulatedServerDate - (double) numTicks * 0.1);
|
||||||
RT.updateRyzomClock((uint32)SimulatedServerTick, ryzomGetLocalTime() * 0.001);
|
RT.updateRyzomClock((uint32)SimulatedServerTick);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -2092,14 +2092,14 @@ bool mainLoop()
|
||||||
if (Actions.valide ("inc_hour"))
|
if (Actions.valide ("inc_hour"))
|
||||||
{
|
{
|
||||||
RT.increaseTickOffset( (uint32)(2000 * displayHourDelta) );
|
RT.increaseTickOffset( (uint32)(2000 * displayHourDelta) );
|
||||||
RT.updateRyzomClock(NetMngr.getCurrentServerTick(), ryzomGetLocalTime() * 0.001);
|
RT.updateRyzomClock(NetMngr.getCurrentServerTick());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Ctrl-L decrease hour
|
// Ctrl-L decrease hour
|
||||||
if (Actions.valide ("dec_hour"))
|
if (Actions.valide ("dec_hour"))
|
||||||
{
|
{
|
||||||
RT.decreaseTickOffset( (uint32)(2000 * displayHourDelta) );
|
RT.decreaseTickOffset( (uint32)(2000 * displayHourDelta) );
|
||||||
RT.updateRyzomClock(NetMngr.getCurrentServerTick(), ryzomGetLocalTime() * 0.001);
|
RT.updateRyzomClock(NetMngr.getCurrentServerTick());
|
||||||
CTimedFXManager::getInstance().setDate(CClientDate(RT.getRyzomDay(), (float) RT.getRyzomTime()));
|
CTimedFXManager::getInstance().setDate(CClientDate(RT.getRyzomDay(), (float) RT.getRyzomTime()));
|
||||||
if (IGCallbacks)
|
if (IGCallbacks)
|
||||||
{
|
{
|
||||||
|
|
|
@ -430,6 +430,9 @@ void displayDebug()
|
||||||
TextContext->printfAt(1.f, line, "TEST WEATHER FUNCTION");
|
TextContext->printfAt(1.f, line, "TEST WEATHER FUNCTION");
|
||||||
line += lineStep;
|
line += lineStep;
|
||||||
}
|
}
|
||||||
|
// thunder
|
||||||
|
TextContext->printfAt(1.f, line, "Thunder level : %.02f", WeatherManager.getThunderLevel());
|
||||||
|
line += lineStep;
|
||||||
// season
|
// season
|
||||||
TextContext->printfAt(1.f, line, "Season : %s", EGSPD::CSeason::toString(CurrSeason).c_str());
|
TextContext->printfAt(1.f, line, "Season : %s", EGSPD::CSeason::toString(CurrSeason).c_str());
|
||||||
line += lineStep;
|
line += lineStep;
|
||||||
|
|
|
@ -132,7 +132,7 @@ void CWeatherManagerClient::update(uint64 day, float hour, const CWeatherContext
|
||||||
// build current weather state
|
// build current weather state
|
||||||
EGSPD::CSeason::TSeason season = CRyzomTime::getSeasonByDay((uint32)day);
|
EGSPD::CSeason::TSeason season = CRyzomTime::getSeasonByDay((uint32)day);
|
||||||
//
|
//
|
||||||
manualUpdate(day, hour, wc, weatherValue, season);
|
manualUpdateImpl(day, hour, wc, weatherValue, season);
|
||||||
_LastEvalHour = hour;
|
_LastEvalHour = hour;
|
||||||
_LastEvalDay = day;
|
_LastEvalDay = day;
|
||||||
}
|
}
|
||||||
|
@ -147,25 +147,29 @@ void CWeatherManagerClient::update(uint64 day, float hour, const CWeatherContext
|
||||||
// build current weather state
|
// build current weather state
|
||||||
EGSPD::CSeason::TSeason season = CRyzomTime::getSeasonByDay((uint32)day);
|
EGSPD::CSeason::TSeason season = CRyzomTime::getSeasonByDay((uint32)day);
|
||||||
//
|
//
|
||||||
manualUpdate(day, hour, wc, weatherValue, season, camMat, continent);
|
manualUpdateImpl(day, hour, wc, weatherValue, season, camMat, continent);
|
||||||
_LastEvalHour = hour;
|
_LastEvalHour = hour;
|
||||||
_LastEvalDay = day;
|
_LastEvalDay = day;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//================================================================================================
|
//================================================================================================
|
||||||
void CWeatherManagerClient::manualUpdate(uint64 day, float hour, const CWeatherContext &wc, float weatherValue, EGSPD::CSeason::TSeason season, const NLMISC::CMatrix &camMat, const CContinent &continent)
|
void CWeatherManagerClient::manualUpdate(uint64 day, float hour, const CWeatherContext &wc, float weatherValue, EGSPD::CSeason::TSeason season, const NLMISC::CMatrix &camMat, const CContinent &continent)
|
||||||
|
{
|
||||||
|
manualUpdateImpl(day, hour, wc, weatherValue, season, camMat, continent);
|
||||||
|
_LastEvalHour = hour;
|
||||||
|
_LastEvalDay = day;
|
||||||
|
}
|
||||||
|
|
||||||
|
//================================================================================================
|
||||||
|
void CWeatherManagerClient::manualUpdateImpl(uint64 day, float hour, const CWeatherContext &wc, float weatherValue, EGSPD::CSeason::TSeason season, const NLMISC::CMatrix &camMat, const CContinent &continent)
|
||||||
{
|
{
|
||||||
H_AUTO_USE(RZ_WeatherManagerClient)
|
H_AUTO_USE(RZ_WeatherManagerClient)
|
||||||
if (!wc.WF) return;
|
if (!wc.WF) return;
|
||||||
manualUpdate(day, hour, wc, weatherValue, season);
|
manualUpdateImpl(day, hour, wc, weatherValue, season);
|
||||||
setupFXs(camMat, wc.GR, continent);
|
setupFXs(camMat, wc.GR, continent);
|
||||||
setupWind(&(wc.WF[season]));
|
setupWind(&(wc.WF[season]));
|
||||||
float scaledWeatherValue = weatherValue * (wc.WF[season].getNumWeatherSetups() - 1);
|
float scaledWeatherValue = weatherValue * (wc.WF[season].getNumWeatherSetups() - 1);
|
||||||
updateThunder(day, hour, wc, true, scaledWeatherValue, season);
|
updateThunder(day, hour, wc, true, scaledWeatherValue, season);
|
||||||
_LastEvalHour = hour;
|
|
||||||
_LastEvalDay = day;
|
|
||||||
|
|
||||||
// Sound stuff
|
// Sound stuff
|
||||||
if (SoundMngr != 0)
|
if (SoundMngr != 0)
|
||||||
|
@ -250,9 +254,16 @@ void CWeatherManagerClient::manualUpdate(uint64 day, float hour, const CWeatherC
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//================================================================================================
|
//================================================================================================
|
||||||
void CWeatherManagerClient::manualUpdate(uint64 day, float hour, const CWeatherContext &wc, float weatherValue, EGSPD::CSeason::TSeason season)
|
void CWeatherManagerClient::manualUpdate(uint64 day, float hour, const CWeatherContext &wc, float weatherValue, EGSPD::CSeason::TSeason season)
|
||||||
|
{
|
||||||
|
manualUpdateImpl(day, hour, wc, weatherValue, season);
|
||||||
|
_LastEvalHour = hour;
|
||||||
|
_LastEvalDay = day;
|
||||||
|
}
|
||||||
|
|
||||||
|
//================================================================================================
|
||||||
|
void CWeatherManagerClient::manualUpdateImpl(uint64 day, float hour, const CWeatherContext &wc, float weatherValue, EGSPD::CSeason::TSeason season)
|
||||||
{
|
{
|
||||||
H_AUTO_USE(RZ_WeatherManagerClient)
|
H_AUTO_USE(RZ_WeatherManagerClient)
|
||||||
if (!wc.WF) return;
|
if (!wc.WF) return;
|
||||||
|
@ -269,11 +280,8 @@ void CWeatherManagerClient::manualUpdate(uint64 day, float hour, const CWeatherC
|
||||||
// blend client specific part
|
// blend client specific part
|
||||||
CWeatherStateClient::blend(_CurrWeatherStateClient, safe_cast<const CWeatherSetupClient *>(floorSetup)->WeatherStateClient, safe_cast<const CWeatherSetupClient *>(ceilSetup)->WeatherStateClient, blendFactor);
|
CWeatherStateClient::blend(_CurrWeatherStateClient, safe_cast<const CWeatherSetupClient *>(floorSetup)->WeatherStateClient, safe_cast<const CWeatherSetupClient *>(ceilSetup)->WeatherStateClient, blendFactor);
|
||||||
}
|
}
|
||||||
_LastEvalHour = hour;
|
|
||||||
_LastEvalDay = day;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//================================================================================================
|
//================================================================================================
|
||||||
void CWeatherManagerClient::setupWind(const CWeatherFunction *wf)
|
void CWeatherManagerClient::setupWind(const CWeatherFunction *wf)
|
||||||
{
|
{
|
||||||
|
|
|
@ -105,6 +105,8 @@ protected:
|
||||||
// from CWeatherManager
|
// from CWeatherManager
|
||||||
virtual void setupLoaded(CWeatherSetup *setup);
|
virtual void setupLoaded(CWeatherSetup *setup);
|
||||||
private:
|
private:
|
||||||
|
void manualUpdateImpl(uint64 day, float hour, const CWeatherContext &wc, float weatherValue, EGSPD::CSeason::TSeason season);
|
||||||
|
void manualUpdateImpl(uint64 day, float hour, const CWeatherContext &wc, float weatherValue, EGSPD::CSeason::TSeason season, const NLMISC::CMatrix &camMat, const class CContinent &continent);
|
||||||
typedef std::map<std::string, CPrecipitation> TPrecipitationMap;
|
typedef std::map<std::string, CPrecipitation> TPrecipitationMap;
|
||||||
// A vector of precipitation pointers
|
// A vector of precipitation pointers
|
||||||
typedef std::vector<CPrecipitation *> TPrecipitationVect;
|
typedef std::vector<CPrecipitation *> TPrecipitationVect;
|
||||||
|
|
|
@ -83,4 +83,19 @@ namespace WEEKDAY
|
||||||
}; // WEEKDAY
|
}; // WEEKDAY
|
||||||
|
|
||||||
|
|
||||||
|
void CRyzomTime::updateRyzomClock(uint32 gameCyle)
|
||||||
|
{
|
||||||
|
static const uint32 ticksPerDay = (RYZOM_DAY_IN_HOUR * RYZOM_HOURS_IN_TICKS);
|
||||||
|
static const float ticksPerHour = (float)RYZOM_HOURS_IN_TICKS;
|
||||||
|
|
||||||
|
uint32 totalTicks = gameCyle + _TickOffset;
|
||||||
|
uint32 days = totalTicks / ticksPerDay;
|
||||||
|
uint32 dayCycle = totalTicks - (days * ticksPerDay);
|
||||||
|
days -= RYZOM_START_SPRING;
|
||||||
|
float hours = (float)dayCycle / ticksPerHour;
|
||||||
|
|
||||||
|
_RyzomDay = days;
|
||||||
|
_RyzomTime = hours;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* end of file */
|
||||||
|
|
|
@ -135,18 +135,11 @@ public:
|
||||||
{
|
{
|
||||||
_RyzomDay = 0;
|
_RyzomDay = 0;
|
||||||
_RyzomTime = 0.f;
|
_RyzomTime = 0.f;
|
||||||
_LocalTime = 0.0;
|
|
||||||
_TickOffset = 0;
|
_TickOffset = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update ryzom clock when tick occurs, local time must be given if localUpdateRyzomClock() and getLocalRyzomTime() is used
|
// Update ryzom clock when tick occurs, local time must be given if localUpdateRyzomClock() and getLocalRyzomTime() is used
|
||||||
void updateRyzomClock( uint32 gameCyle, double localTime = 0 )
|
void updateRyzomClock(uint32 gameCyle);
|
||||||
{
|
|
||||||
float hours = ( gameCyle + _TickOffset ) / float(RYZOM_HOURS_IN_TICKS);
|
|
||||||
_RyzomDay = ( (uint)hours / RYZOM_DAY_IN_HOUR ) - RYZOM_START_SPRING;
|
|
||||||
_RyzomTime = (float) fmod( hours, (float)RYZOM_DAY_IN_HOUR );
|
|
||||||
_LocalTime = localTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
// get ryzom time (synchronized with server)
|
// get ryzom time (synchronized with server)
|
||||||
inline float getRyzomTime() const { return _RyzomTime; }
|
inline float getRyzomTime() const { return _RyzomTime; }
|
||||||
|
@ -202,7 +195,6 @@ private:
|
||||||
|
|
||||||
uint32 _RyzomDay;
|
uint32 _RyzomDay;
|
||||||
float _RyzomTime;
|
float _RyzomTime;
|
||||||
double _LocalTime;
|
|
||||||
uint32 _TickOffset;
|
uint32 _TickOffset;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue