mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-25 02:10:53 +00:00
Changed: #825 Remove all warning when compiling Ryzom on Linux
This commit is contained in:
parent
45c8adf72f
commit
7ffa7858bf
166 changed files with 491 additions and 491 deletions
|
@ -106,7 +106,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
// get number of animation states
|
// get number of animation states
|
||||||
uint getNumAnimationState() const { return _AnimationStates.size(); }
|
uint getNumAnimationState() const { return (uint)_AnimationStates.size(); }
|
||||||
// get an animation state by its index
|
// get an animation state by its index
|
||||||
CAnimationState *getAnimationStateByIndex(uint index);
|
CAnimationState *getAnimationStateByIndex(uint index);
|
||||||
|
|
||||||
|
|
|
@ -276,7 +276,7 @@ CAnimation::TAnimId CAnimationState::chooseAnim(uint32 jobSpecialisation, EGSPD:
|
||||||
{
|
{
|
||||||
uint i;
|
uint i;
|
||||||
uint best;
|
uint best;
|
||||||
const uint count = _Animations.size ();
|
const uint count = (uint)_Animations.size ();
|
||||||
double bestAng = 1000.0; // Big value to be > to the first element.
|
double bestAng = 1000.0; // Big value to be > to the first element.
|
||||||
for (i=0; i<count; i++)
|
for (i=0; i<count; i++)
|
||||||
{
|
{
|
||||||
|
|
|
@ -155,7 +155,7 @@ public:
|
||||||
//@}
|
//@}
|
||||||
|
|
||||||
|
|
||||||
uint getNumAnimation() const { return _Animations.size(); }
|
uint getNumAnimation() const { return (uint)_Animations.size(); }
|
||||||
CAnimation *getAnimationByIndex(uint index);
|
CAnimation *getAnimationByIndex(uint index);
|
||||||
|
|
||||||
// Transform a string in state id
|
// Transform a string in state id
|
||||||
|
|
|
@ -149,7 +149,7 @@ static /*inline*/ void addNode( ICDBNode *newNode, std::string newName, CCDBNode
|
||||||
{
|
{
|
||||||
if ( ! bankName.empty() )
|
if ( ! bankName.empty() )
|
||||||
{
|
{
|
||||||
CCDBNodeBranch::mapNodeByBank( newNode, bankName, clientOnly, nodes.size()-1 );
|
CCDBNodeBranch::mapNodeByBank( newNode, bankName, clientOnly, (uint)nodes.size()-1 );
|
||||||
//nldebug( "CDB: Mapping %s for %s (node %u)", newName.c_str(), bankName.c_str(), nodes.size()-1 );
|
//nldebug( "CDB: Mapping %s for %s (node %u)", newName.c_str(), bankName.c_str(), nodes.size()-1 );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -273,7 +273,7 @@ void CCDBNodeBranch::init( xmlNodePtr node, NLMISC::IProgressCallback &progressC
|
||||||
_IdBits = 0;
|
_IdBits = 0;
|
||||||
for ( uint b=0; b!=NB_CDB_BANKS; ++b )
|
for ( uint b=0; b!=NB_CDB_BANKS; ++b )
|
||||||
{
|
{
|
||||||
uint nbNodesOfBank = _CDBBankToUnifiedIndexMapping[b].size();
|
uint nbNodesOfBank = (uint)_CDBBankToUnifiedIndexMapping[b].size();
|
||||||
uint idb = 0;
|
uint idb = 0;
|
||||||
if ( nbNodesOfBank > 0 )
|
if ( nbNodesOfBank > 0 )
|
||||||
for ( idb=1; nbNodesOfBank > unsigned(1<<idb) ; idb++ ) {}
|
for ( idb=1; nbNodesOfBank > unsigned(1<<idb) ; idb++ ) {}
|
||||||
|
|
|
@ -278,7 +278,7 @@ public:
|
||||||
virtual uint nbStage();
|
virtual uint nbStage();
|
||||||
|
|
||||||
/// Return the number of attached FXs remaining to remove.
|
/// Return the number of attached FXs remaining to remove.
|
||||||
virtual uint nbAttachedFXToRemove() {return _AttachedFXListToRemove.size();}
|
virtual uint nbAttachedFXToRemove() {return (uint)_AttachedFXListToRemove.size();}
|
||||||
|
|
||||||
/// Set the animation state key.
|
/// Set the animation state key.
|
||||||
bool animationStateKey(TAnimationType channel, TAnimStateId value);
|
bool animationStateKey(TAnimationType channel, TAnimStateId value);
|
||||||
|
|
|
@ -176,7 +176,7 @@ static bool send(const string &url)
|
||||||
"Host: crashcounter.nevrax.com\n"
|
"Host: crashcounter.nevrax.com\n"
|
||||||
"User-agent: Ryzom\n"
|
"User-agent: Ryzom\n"
|
||||||
"\n";
|
"\n";
|
||||||
uint32 size = buffer.size();
|
uint32 size = (uint32)buffer.size();
|
||||||
if(!url.empty())
|
if(!url.empty())
|
||||||
{
|
{
|
||||||
if(CrashCounterSock.send((uint8 *)buffer.c_str(), size, false) != CSock::Ok)
|
if(CrashCounterSock.send((uint8 *)buffer.c_str(), size, false) != CSock::Ok)
|
||||||
|
|
|
@ -302,7 +302,7 @@ void CAutomatonStateSheet::serial(class NLMISC::IStream &f) throw(NLMISC::EStrea
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
size = ModeTransition.size ();
|
size = (uint32)ModeTransition.size ();
|
||||||
f.serial (size);
|
f.serial (size);
|
||||||
}
|
}
|
||||||
for (uint i = 0; i < size; i++)
|
for (uint i = 0; i < size; i++)
|
||||||
|
@ -560,7 +560,7 @@ void CAutomatonListSheet::serial(class NLMISC::IStream &f) throw(NLMISC::EStream
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
uint32 nNb = Automatons.size();
|
uint32 nNb = (uint32)Automatons.size();
|
||||||
f.serial(nNb);
|
f.serial(nNb);
|
||||||
map<string, CAutomatonSheet*>::iterator it = Automatons.begin();
|
map<string, CAutomatonSheet*>::iterator it = Automatons.begin();
|
||||||
while (it != Automatons.end())
|
while (it != Automatons.end())
|
||||||
|
|
|
@ -731,7 +731,7 @@ void CCharacterSheet::serial(class NLMISC::IStream &f) throw(NLMISC::EStream)
|
||||||
// body to bone
|
// body to bone
|
||||||
f.serial(BodyToBone);
|
f.serial(BodyToBone);
|
||||||
// attack list
|
// attack list
|
||||||
uint32 size = AttackLists.size();
|
uint32 size = (uint32)AttackLists.size();
|
||||||
f.serial(size);
|
f.serial(size);
|
||||||
AttackLists.resize(size);
|
AttackLists.resize(size);
|
||||||
//
|
//
|
||||||
|
|
|
@ -103,7 +103,7 @@ void CEmotListSheet::serial(class NLMISC::IStream &f) throw(NLMISC::EStream)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
size = Emots.size();
|
size = (uint32)Emots.size();
|
||||||
f.serial (size);
|
f.serial (size);
|
||||||
}
|
}
|
||||||
for (uint i = 0; i < size; i++)
|
for (uint i = 0; i < size; i++)
|
||||||
|
|
|
@ -74,7 +74,7 @@ public:
|
||||||
*/
|
*/
|
||||||
const CPlantInfo *getPlantInfoFromWeightedIndex(uint64 index) const;
|
const CPlantInfo *getPlantInfoFromWeightedIndex(uint64 index) const;
|
||||||
// Plant info access
|
// Plant info access
|
||||||
uint getNumPlantInfos() const { return _Plants.size(); }
|
uint getNumPlantInfos() const { return (uint)_Plants.size(); }
|
||||||
const CPlantInfo &getPlantInfo(uint index) const { return _Plants[index]; }
|
const CPlantInfo &getPlantInfo(uint index) const { return _Plants[index]; }
|
||||||
private:
|
private:
|
||||||
std::vector<CPlantInfo> _Plants;
|
std::vector<CPlantInfo> _Plants;
|
||||||
|
|
|
@ -48,7 +48,7 @@ public:
|
||||||
const char *getAdvantageFX() const;
|
const char *getAdvantageFX() const;
|
||||||
const char *getAttackFX() const;
|
const char *getAttackFX() const;
|
||||||
// static fxs
|
// static fxs
|
||||||
uint getNumStaticFX() const { return _StaticFXs.size(); }
|
uint getNumStaticFX() const { return (uint)_StaticFXs.size(); }
|
||||||
const char *getStaticFXName(uint index) const;
|
const char *getStaticFXName(uint index) const;
|
||||||
const char *getStaticFXBone(uint index) const;
|
const char *getStaticFXBone(uint index) const;
|
||||||
const NLMISC::CVector &getStaticFXOffset(uint index) const;
|
const NLMISC::CVector &getStaticFXOffset(uint index) const;
|
||||||
|
|
|
@ -379,7 +379,7 @@ void CItemSheet::build(const NLGEORGES::UFormElm &item)
|
||||||
nlwarning("<loadCosmetics> Can't load the VPValue from sheet name in sheet %s", Id.toString().c_str() );
|
nlwarning("<loadCosmetics> Can't load the VPValue from sheet name in sheet %s", Id.toString().c_str() );
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
sint i = pos - 1;
|
sint i = (sint)pos - 1;
|
||||||
for(; i >= 0; i-- )
|
for(; i >= 0; i-- )
|
||||||
{
|
{
|
||||||
if ( !isdigit( sheetName[i] ) )
|
if ( !isdigit( sheetName[i] ) )
|
||||||
|
|
|
@ -309,7 +309,7 @@ void CRaceStatsSheet::serial(class NLMISC::IStream &f) throw(NLMISC::EStream)
|
||||||
f.serial(Automaton);
|
f.serial(Automaton);
|
||||||
f.serial(BodyToBone);
|
f.serial(BodyToBone);
|
||||||
// attack list
|
// attack list
|
||||||
uint32 size = AttackLists.size();
|
uint32 size = (uint32)AttackLists.size();
|
||||||
f.serial(size);
|
f.serial(size);
|
||||||
AttackLists.resize(size);
|
AttackLists.resize(size);
|
||||||
//
|
//
|
||||||
|
|
|
@ -174,7 +174,7 @@ void CUnblockTitlesSheet::build(const UFormElm &item)
|
||||||
|
|
||||||
if( !strSkillsNeeded.empty() )
|
if( !strSkillsNeeded.empty() )
|
||||||
{
|
{
|
||||||
uint16 skillsNeededSz = TitlesUnblock[title].SkillsNeeded.size();
|
uint16 skillsNeededSz = (uint16)TitlesUnblock[title].SkillsNeeded.size();
|
||||||
TitlesUnblock[title].SkillsNeeded.resize(skillsNeededSz+1);
|
TitlesUnblock[title].SkillsNeeded.resize(skillsNeededSz+1);
|
||||||
TitlesUnblock[title].SkillsLevelNeeded.resize(skillsNeededSz+1);
|
TitlesUnblock[title].SkillsLevelNeeded.resize(skillsNeededSz+1);
|
||||||
|
|
||||||
|
@ -235,7 +235,7 @@ void CUnblockTitlesSheet::build(const UFormElm &item)
|
||||||
|
|
||||||
if( !strItemsNeeded.empty() )
|
if( !strItemsNeeded.empty() )
|
||||||
{
|
{
|
||||||
uint16 itemsNeededSz = TitlesUnblock[title].ItemsNeeded.size();
|
uint16 itemsNeededSz = (uint16)TitlesUnblock[title].ItemsNeeded.size();
|
||||||
TitlesUnblock[title].ItemsNeeded.resize(itemsNeededSz+1);
|
TitlesUnblock[title].ItemsNeeded.resize(itemsNeededSz+1);
|
||||||
TitlesUnblock[title].ItemsQualityNeeded.resize(itemsNeededSz+1);
|
TitlesUnblock[title].ItemsQualityNeeded.resize(itemsNeededSz+1);
|
||||||
|
|
||||||
|
|
|
@ -116,7 +116,7 @@ CColorSlotManager::TIntCouple CColorSlotManager::findFileExtensionInSlot(const s
|
||||||
TStringVect::const_iterator extIt = std::find(it->begin(), it->end(), ext);
|
TStringVect::const_iterator extIt = std::find(it->begin(), it->end(), ext);
|
||||||
if (extIt != it->end())
|
if (extIt != it->end())
|
||||||
{
|
{
|
||||||
return std::make_pair(it - _Slots.begin(), extIt - it->begin());
|
return std::make_pair((uint)(it - _Slots.begin()), (uint)(extIt - it->begin()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return TIntCouple((uint) NotFound, 0);
|
return TIntCouple((uint) NotFound, 0);
|
||||||
|
@ -136,7 +136,7 @@ uint CColorSlotManager::addSlot(const TStringVect &slotDescs)
|
||||||
{
|
{
|
||||||
NLMISC::strupr(_Slots.back()[k]);
|
NLMISC::strupr(_Slots.back()[k]);
|
||||||
}
|
}
|
||||||
return _Slots.size() - 1;
|
return (uint)_Slots.size() - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -327,7 +327,7 @@ bool CColorSlotManager::addSlotsFromConfigFile(NLMISC::CConfigFile &cf, uint &st
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
uint startSlot = _Slots.size();
|
uint startSlot = (uint)_Slots.size();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -362,7 +362,7 @@ bool CColorSlotManager::addSlotsFromConfigFile(NLMISC::CConfigFile &cf, uint &st
|
||||||
}
|
}
|
||||||
|
|
||||||
startSlotDest = startSlot;
|
startSlotDest = startSlot;
|
||||||
numSlots = _Slots.size() - startSlot;
|
numSlots = (uint)_Slots.size() - startSlot;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -754,7 +754,7 @@ NLMISC_COMMAND(log, "Add/Del Positive/Negative Filters for logs", "Log System <d
|
||||||
|
|
||||||
NLMISC_COMMAND(execScript, "Execute a script file (.cmd)","<FileName>")
|
NLMISC_COMMAND(execScript, "Execute a script file (.cmd)","<FileName>")
|
||||||
{
|
{
|
||||||
int size = args.size();
|
int size = (int)args.size();
|
||||||
if (size != 1)
|
if (size != 1)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
@ -839,7 +839,7 @@ NLMISC_COMMAND(execScript, "Execute a script file (.cmd)","<FileName>")
|
||||||
NLMISC_COMMAND(db, "Modify Database","<Property> <Value>")
|
NLMISC_COMMAND(db, "Modify Database","<Property> <Value>")
|
||||||
{
|
{
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
int size = args.size();
|
int size = (int)args.size();
|
||||||
if (size == 2)
|
if (size == 2)
|
||||||
{
|
{
|
||||||
#if !FINAL_VERSION
|
#if !FINAL_VERSION
|
||||||
|
@ -4046,7 +4046,7 @@ NLMISC_COMMAND(logFaberMpCompatibles, "log all MP compatibles for faber the item
|
||||||
}
|
}
|
||||||
|
|
||||||
// header
|
// header
|
||||||
uint numMpSlots= brick->FaberPlan.ItemPartMps.size();
|
uint numMpSlots= (uint)brick->FaberPlan.ItemPartMps.size();
|
||||||
nlinfo("********** FABERLOG **********");
|
nlinfo("********** FABERLOG **********");
|
||||||
nlinfo(" ItemBuilt Origin: %s", ITEM_ORIGIN::enumToString(itemBuilt->ItemOrigin).c_str() );
|
nlinfo(" ItemBuilt Origin: %s", ITEM_ORIGIN::enumToString(itemBuilt->ItemOrigin).c_str() );
|
||||||
nlinfo(" NumMPSlot: %d", numMpSlots);
|
nlinfo(" NumMPSlot: %d", numMpSlots);
|
||||||
|
@ -5028,8 +5028,8 @@ bool CUserCommand::execute(const std::string &/* rawCommandString */, const std:
|
||||||
|
|
||||||
// Find the good keyword table
|
// Find the good keyword table
|
||||||
CMode *mode = NULL;
|
CMode *mode = NULL;
|
||||||
if (FixedArgModes.find (args.size()) != FixedArgModes.end())
|
if (FixedArgModes.find ((uint)args.size()) != FixedArgModes.end())
|
||||||
mode = &(FixedArgModes[args.size()]);
|
mode = &(FixedArgModes[(uint)args.size()]);
|
||||||
else
|
else
|
||||||
if (!InfiniteMode.Keywords.empty() && (args.size() >= InfiniteMode.KeywordsCount))
|
if (!InfiniteMode.Keywords.empty() && (args.size() >= InfiniteMode.KeywordsCount))
|
||||||
mode = &InfiniteMode;
|
mode = &InfiniteMode;
|
||||||
|
@ -5258,7 +5258,7 @@ NLMISC_COMMAND(dumpPosAsPrim, "ld helper : add current position to pos.primitive
|
||||||
{
|
{
|
||||||
COFile stream;
|
COFile stream;
|
||||||
stream.open(path);
|
stream.open(path);
|
||||||
stream.serialBuffer((uint8 *) &srcFile[0], srcFile.size());
|
stream.serialBuffer((uint8 *) &srcFile[0], (uint)srcFile.size());
|
||||||
}
|
}
|
||||||
catch(NLMISC::EStream &e)
|
catch(NLMISC::EStream &e)
|
||||||
{
|
{
|
||||||
|
|
|
@ -382,7 +382,7 @@ static uint getNumZones()
|
||||||
if (Landscape == NULL) return 0;
|
if (Landscape == NULL) return 0;
|
||||||
std::vector<std::string> zoneLoaded;
|
std::vector<std::string> zoneLoaded;
|
||||||
Landscape->getAllZoneLoaded(zoneLoaded);
|
Landscape->getAllZoneLoaded(zoneLoaded);
|
||||||
return zoneLoaded.size();
|
return (uint)zoneLoaded.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------
|
//-----------------------------------------------
|
||||||
|
|
|
@ -491,7 +491,7 @@ void CContinentManager::serialUserLandMarks(NLMISC::IStream &f)
|
||||||
f.serialVersion(1);
|
f.serialVersion(1);
|
||||||
if (!f.isReading())
|
if (!f.isReading())
|
||||||
{
|
{
|
||||||
uint32 numCont = _Continents.size();
|
uint32 numCont = (uint32)_Continents.size();
|
||||||
f.serial(numCont);
|
f.serial(numCont);
|
||||||
for(TContinents::iterator it = _Continents.begin(); it != _Continents.end(); ++it)
|
for(TContinents::iterator it = _Continents.begin(); it != _Continents.end(); ++it)
|
||||||
{
|
{
|
||||||
|
|
|
@ -147,17 +147,17 @@ void flushDebugStack(const std::string &title)
|
||||||
{
|
{
|
||||||
// Log Title.
|
// Log Title.
|
||||||
string strTmp = toString(" %s\n", title.c_str());
|
string strTmp = toString(" %s\n", title.c_str());
|
||||||
DebugFile.serialBuffer((uint8*)strTmp.c_str(), strTmp.size());
|
DebugFile.serialBuffer((uint8*)strTmp.c_str(), (uint)strTmp.size());
|
||||||
|
|
||||||
for(uint i=0; i<DebugStack.size(); ++i)
|
for(uint i=0; i<DebugStack.size(); ++i)
|
||||||
{
|
{
|
||||||
strTmp = toString(" %s\n", DebugStack[i].c_str());
|
strTmp = toString(" %s\n", DebugStack[i].c_str());
|
||||||
DebugFile.serialBuffer((uint8*)strTmp.c_str(), strTmp.size());
|
DebugFile.serialBuffer((uint8*)strTmp.c_str(), (uint)strTmp.size());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Empty line separator
|
// Empty line separator
|
||||||
strTmp = toString("\n");
|
strTmp = toString("\n");
|
||||||
DebugFile.serialBuffer((uint8*)strTmp.c_str(), strTmp.size());
|
DebugFile.serialBuffer((uint8*)strTmp.c_str(), (uint)strTmp.size());
|
||||||
}
|
}
|
||||||
// No Output File -> nlwarning
|
// No Output File -> nlwarning
|
||||||
else
|
else
|
||||||
|
|
|
@ -305,7 +305,7 @@ void CDecal::renderTriCache(NL3D::IDriver &drv, NL3D::CShadowPolyReceiver &/*
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
CVertexBufferReadWrite vba;
|
CVertexBufferReadWrite vba;
|
||||||
_VB.setNumVertices(_TriCache.size());
|
_VB.setNumVertices((uint32)_TriCache.size());
|
||||||
_VB.lock(vba);
|
_VB.lock(vba);
|
||||||
memcpy(vba.getVertexCoordPointer(), &_TriCache[0], sizeof(CRGBAVertex) * _TriCache.size());
|
memcpy(vba.getVertexCoordPointer(), &_TriCache[0], sizeof(CRGBAVertex) * _TriCache.size());
|
||||||
}
|
}
|
||||||
|
@ -337,23 +337,23 @@ void CDecal::renderTriCache(NL3D::IDriver &drv, NL3D::CShadowPolyReceiver &/*
|
||||||
simpleMat.texEnvArg0RGB(0, CMaterial::Constant, CMaterial::SrcColor);
|
simpleMat.texEnvArg0RGB(0, CMaterial::Constant, CMaterial::SrcColor);
|
||||||
simpleMat.setDoubleSided(true);
|
simpleMat.setDoubleSided(true);
|
||||||
simpleMat.texConstantColor(0, CRGBA::White);
|
simpleMat.texConstantColor(0, CRGBA::White);
|
||||||
drv.renderRawTriangles(simpleMat, 0, _TriCache.size() / 3);
|
drv.renderRawTriangles(simpleMat, 0, (uint32)_TriCache.size() / 3);
|
||||||
IDriver::TPolygonMode pm = drv.getPolygonMode();
|
IDriver::TPolygonMode pm = drv.getPolygonMode();
|
||||||
drv.setPolygonMode(IDriver::Line);
|
drv.setPolygonMode(IDriver::Line);
|
||||||
simpleMat.texConstantColor(0, CRGBA::Red);
|
simpleMat.texConstantColor(0, CRGBA::Red);
|
||||||
drv.renderRawTriangles(simpleMat, 0, _TriCache.size() / 3);
|
drv.renderRawTriangles(simpleMat, 0, (uint32)_TriCache.size() / 3);
|
||||||
drv.setPolygonMode(pm);
|
drv.setPolygonMode(pm);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
drv.renderRawTriangles(_Material, 0, _TriCache.size() / 3);
|
drv.renderRawTriangles(_Material, 0, (uint32)_TriCache.size() / 3);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
CVertexBufferReadWrite vba;
|
CVertexBufferReadWrite vba;
|
||||||
_VB.setNumVertices(_TriCache.size());
|
_VB.setNumVertices((uint32)_TriCache.size());
|
||||||
_VB.lock(vba);
|
_VB.lock(vba);
|
||||||
NLMISC::CRGBA col = _Diffuse;
|
NLMISC::CRGBA col = _Diffuse;
|
||||||
if (drv.getVertexColorFormat()==CVertexBuffer::TBGRA)
|
if (drv.getVertexColorFormat()==CVertexBuffer::TBGRA)
|
||||||
|
@ -391,11 +391,11 @@ void CDecal::renderTriCache(NL3D::IDriver &drv, NL3D::CShadowPolyReceiver &/*
|
||||||
static CMaterial simpleMat2;
|
static CMaterial simpleMat2;
|
||||||
simpleMat2.initUnlit();
|
simpleMat2.initUnlit();
|
||||||
simpleMat2.setDoubleSided(true);
|
simpleMat2.setDoubleSided(true);
|
||||||
drv.renderRawTriangles(simpleMat2, 0, _TriCache.size() / 3);
|
drv.renderRawTriangles(simpleMat2, 0, (uint32)_TriCache.size() / 3);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
drv.renderRawTriangles(_Material, 0, _TriCache.size() / 3);
|
drv.renderRawTriangles(_Material, 0, (uint32)_TriCache.size() / 3);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -515,7 +515,7 @@ void CDecal::render(NL3D::UDriver &/* drv */,
|
||||||
planes[1].make(-CVector::J, camPos - tileNear * CVector::J),
|
planes[1].make(-CVector::J, camPos - tileNear * CVector::J),
|
||||||
planes[2].make(CVector::I, camPos + tileNear * CVector::I),
|
planes[2].make(CVector::I, camPos + tileNear * CVector::I),
|
||||||
planes[3].make(-CVector::I, camPos - tileNear * CVector::I);
|
planes[3].make(-CVector::I, camPos - tileNear * CVector::I);
|
||||||
uint numVerts = clipPoly.Vertices.size();
|
uint numVerts = (uint)clipPoly.Vertices.size();
|
||||||
clipPoly2D.Vertices.resize(numVerts);
|
clipPoly2D.Vertices.resize(numVerts);
|
||||||
for (uint k = 0; k < numVerts; ++k)
|
for (uint k = 0; k < numVerts; ++k)
|
||||||
{
|
{
|
||||||
|
|
|
@ -735,7 +735,7 @@ bool CEntityManager::remove(uint slot, bool warning)
|
||||||
//-----------------------------------------------
|
//-----------------------------------------------
|
||||||
void CEntityManager::removeCollision()
|
void CEntityManager::removeCollision()
|
||||||
{
|
{
|
||||||
const uint nbEntities = _Entities.size();
|
const uint nbEntities = (uint)_Entities.size();
|
||||||
for(uint i=0; i<nbEntities; ++i)
|
for(uint i=0; i<nbEntities; ++i)
|
||||||
{
|
{
|
||||||
// Is the entity allocated.
|
// Is the entity allocated.
|
||||||
|
@ -1391,7 +1391,7 @@ void CEntityManager::updatePostCamera(uint clippedUpdateTime, const std::vector<
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update visible entities post positions.
|
// Update visible entities post positions.
|
||||||
const uint count = _VisibleEntities.size ();
|
const uint count = (uint)_VisibleEntities.size ();
|
||||||
for(i=0; i<count; ++i)
|
for(i=0; i<count; ++i)
|
||||||
{
|
{
|
||||||
CEntityReference &visibleEntity = _VisibleEntities[i];
|
CEntityReference &visibleEntity = _VisibleEntities[i];
|
||||||
|
@ -1419,7 +1419,7 @@ void CEntityManager::updatePostRender()
|
||||||
TextContext->setFontSize(ClientCfg.NameFontSize);
|
TextContext->setFontSize(ClientCfg.NameFontSize);
|
||||||
CRGBA color;
|
CRGBA color;
|
||||||
|
|
||||||
const uint activeCount = _ActiveEntities.size ();
|
const uint activeCount = (uint)_ActiveEntities.size ();
|
||||||
uint i;
|
uint i;
|
||||||
for(i=0; i<activeCount; i++)
|
for(i=0; i<activeCount; i++)
|
||||||
{
|
{
|
||||||
|
@ -1429,7 +1429,7 @@ void CEntityManager::updatePostRender()
|
||||||
visibleEntity.Entity->updateAllPostRender ();
|
visibleEntity.Entity->updateAllPostRender ();
|
||||||
}
|
}
|
||||||
|
|
||||||
const uint count = _VisibleEntities.size ();
|
const uint count = (uint)_VisibleEntities.size ();
|
||||||
for(i=0; i<count; ++i)
|
for(i=0; i<count; ++i)
|
||||||
{
|
{
|
||||||
CEntityReference &visibleEntity = _VisibleEntities[i];
|
CEntityReference &visibleEntity = _VisibleEntities[i];
|
||||||
|
@ -1551,20 +1551,20 @@ void CEntityManager::writeEntities()
|
||||||
return;
|
return;
|
||||||
|
|
||||||
string strTmp = "StartCommands = {\n";
|
string strTmp = "StartCommands = {\n";
|
||||||
f.serialBuffer((uint8*)strTmp.c_str(), strTmp.size());
|
f.serialBuffer((uint8*)strTmp.c_str(), (uint)strTmp.size());
|
||||||
|
|
||||||
const uint nb = _Entities.size();
|
const uint nb = (uint)_Entities.size();
|
||||||
for(uint i=1; i<nb; ++i)
|
for(uint i=1; i<nb; ++i)
|
||||||
{
|
{
|
||||||
if(_Entities[i])
|
if(_Entities[i])
|
||||||
{
|
{
|
||||||
strTmp = toString("\"%s\",\t\"%f\", \"%f\", \"%f\", \"%f\", \"%f\", \"%f\",\t// %3d\n", _Entities[i]->sheetId().toString().c_str(), _Entities[i]->pos().x, _Entities[i]->pos().y, _Entities[i]->pos().z, _Entities[i]->front().x, _Entities[i]->front().y, _Entities[i]->front().z, i);
|
strTmp = toString("\"%s\",\t\"%f\", \"%f\", \"%f\", \"%f\", \"%f\", \"%f\",\t// %3d\n", _Entities[i]->sheetId().toString().c_str(), _Entities[i]->pos().x, _Entities[i]->pos().y, _Entities[i]->pos().z, _Entities[i]->front().x, _Entities[i]->front().y, _Entities[i]->front().z, i);
|
||||||
f.serialBuffer((uint8*)strTmp.c_str(), strTmp.size());
|
f.serialBuffer((uint8*)strTmp.c_str(), (uint)strTmp.size());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
strTmp = "};\n";
|
strTmp = "};\n";
|
||||||
f.serialBuffer((uint8*)strTmp.c_str(), strTmp.size());
|
f.serialBuffer((uint8*)strTmp.c_str(), (uint)strTmp.size());
|
||||||
|
|
||||||
// Close the File.
|
// Close the File.
|
||||||
f.close();
|
f.close();
|
||||||
|
@ -1587,7 +1587,7 @@ void CEntityManager::serial(class NLMISC::IStream &f) throw(NLMISC::EStream)
|
||||||
// f.serial(_EntitiesAllocated); no need to serialize this one except maybe to check.
|
// f.serial(_EntitiesAllocated); no need to serialize this one except maybe to check.
|
||||||
|
|
||||||
// Serialize each entity.
|
// Serialize each entity.
|
||||||
const uint nb = _Entities.size();
|
const uint nb = (uint)_Entities.size();
|
||||||
for(uint i=0; i<nb; ++i)
|
for(uint i=0; i<nb; ++i)
|
||||||
{
|
{
|
||||||
NLMISC::CSheetId si;
|
NLMISC::CSheetId si;
|
||||||
|
@ -1636,7 +1636,7 @@ void CEntityManager::dumpXML(class NLMISC::IStream &f)
|
||||||
// Start the opening of a new node named Identity
|
// Start the opening of a new node named Identity
|
||||||
f.xmlPush("Entities");
|
f.xmlPush("Entities");
|
||||||
|
|
||||||
const uint nb = _Entities.size();
|
const uint nb = (uint)_Entities.size();
|
||||||
for(uint i=0; i<nb; ++i)
|
for(uint i=0; i<nb; ++i)
|
||||||
{
|
{
|
||||||
// Add a comment
|
// Add a comment
|
||||||
|
@ -1731,7 +1731,7 @@ CEntityCL *CEntityManager::getEntityByName (uint32 stringId) const
|
||||||
if (stringId)
|
if (stringId)
|
||||||
{
|
{
|
||||||
uint i;
|
uint i;
|
||||||
const uint count = _Entities.size();
|
const uint count = (uint)_Entities.size();
|
||||||
for (i=0; i<count; i++)
|
for (i=0; i<count; i++)
|
||||||
{
|
{
|
||||||
if(_Entities[i])
|
if(_Entities[i])
|
||||||
|
@ -1747,7 +1747,7 @@ CEntityCL *CEntityManager::getEntityByName (uint32 stringId) const
|
||||||
CEntityCL *CEntityManager::getEntityByName (const ucstring &name, bool caseSensitive, bool complete) const
|
CEntityCL *CEntityManager::getEntityByName (const ucstring &name, bool caseSensitive, bool complete) const
|
||||||
{
|
{
|
||||||
ucstring source = name;
|
ucstring source = name;
|
||||||
const uint size = source.size();
|
const uint size = (uint)source.size();
|
||||||
if (!caseSensitive)
|
if (!caseSensitive)
|
||||||
{
|
{
|
||||||
uint j;
|
uint j;
|
||||||
|
@ -1756,7 +1756,7 @@ CEntityCL *CEntityManager::getEntityByName (const ucstring &name, bool caseSensi
|
||||||
}
|
}
|
||||||
|
|
||||||
uint i;
|
uint i;
|
||||||
const uint count = _Entities.size();
|
const uint count = (uint)_Entities.size();
|
||||||
uint selectedEntityId;
|
uint selectedEntityId;
|
||||||
float selectedEntityDist = FLT_MAX; // No selected Entity
|
float selectedEntityDist = FLT_MAX; // No selected Entity
|
||||||
|
|
||||||
|
@ -1818,7 +1818,7 @@ CEntityCL *CEntityManager::getEntityByCompressedIndex(TDataSetIndex compressedIn
|
||||||
if (compressedIndex != INVALID_DATASET_ROW)
|
if (compressedIndex != INVALID_DATASET_ROW)
|
||||||
{
|
{
|
||||||
uint i;
|
uint i;
|
||||||
const uint count = _Entities.size();
|
const uint count = (uint)_Entities.size();
|
||||||
for (i=0; i<count; i++)
|
for (i=0; i<count; i++)
|
||||||
{
|
{
|
||||||
if(_Entities[i])
|
if(_Entities[i])
|
||||||
|
@ -1861,7 +1861,7 @@ void CEntityManager::managePACSTriggers()
|
||||||
void CEntityManager::removeColUserOther()
|
void CEntityManager::removeColUserOther()
|
||||||
{
|
{
|
||||||
uint i;
|
uint i;
|
||||||
const uint count = _Entities.size();
|
const uint count = (uint)_Entities.size();
|
||||||
for(i=1; i<count; i++)
|
for(i=1; i<count; i++)
|
||||||
{
|
{
|
||||||
if(_Entities[i])
|
if(_Entities[i])
|
||||||
|
@ -1883,7 +1883,7 @@ void CEntityManager::removeColUserOther()
|
||||||
void CEntityManager::restoreColUserOther()
|
void CEntityManager::restoreColUserOther()
|
||||||
{
|
{
|
||||||
uint i;
|
uint i;
|
||||||
const uint count = _Entities.size();
|
const uint count = (uint)_Entities.size();
|
||||||
for(i=1; i<count; i++)
|
for(i=1; i<count; i++)
|
||||||
{
|
{
|
||||||
if(_Entities[i])
|
if(_Entities[i])
|
||||||
|
|
|
@ -325,7 +325,7 @@ public :
|
||||||
/** Count the number of emot
|
/** Count the number of emot
|
||||||
* \return uint : the number of emot already known.
|
* \return uint : the number of emot already known.
|
||||||
*/
|
*/
|
||||||
uint getNbEmots() {return _EmotList->Emots.size();}
|
uint getNbEmots() {return (uint)_EmotList->Emots.size();}
|
||||||
/** Method to get the emot associated to an index.
|
/** Method to get the emot associated to an index.
|
||||||
* \param index : number of the emot asked.
|
* \param index : number of the emot asked.
|
||||||
* \param result : will be filled with the name of the emot associated.
|
* \param result : will be filled with the name of the emot associated.
|
||||||
|
|
|
@ -1184,7 +1184,7 @@ uint32 CEntityCL::addInstance(const string &shapeName, const std::string &stickP
|
||||||
// Create new instance slot?
|
// Create new instance slot?
|
||||||
if(instIdx == CEntityCL::BadIndex)
|
if(instIdx == CEntityCL::BadIndex)
|
||||||
{
|
{
|
||||||
idx= _Instances.size();
|
idx= (uint32)_Instances.size();
|
||||||
_Instances.push_back(SInstanceCL());
|
_Instances.push_back(SInstanceCL());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1255,7 +1255,7 @@ void CEntityCL::show(bool s)
|
||||||
//-----------------------------------------------
|
//-----------------------------------------------
|
||||||
void CEntityCL::hideSkin()
|
void CEntityCL::hideSkin()
|
||||||
{
|
{
|
||||||
const uint nbInst = _Instances.size();
|
const uint nbInst = (uint)_Instances.size();
|
||||||
for(uint i = 0; i<nbInst; ++i)
|
for(uint i = 0; i<nbInst; ++i)
|
||||||
{
|
{
|
||||||
if(!_Instances[i].Current.empty())
|
if(!_Instances[i].Current.empty())
|
||||||
|
@ -2061,7 +2061,7 @@ bool CEntityCL::clipped (const std::vector<NLMISC::CPlane> &clippingPlanes, cons
|
||||||
// Speed Clip: clip just the sphere.
|
// Speed Clip: clip just the sphere.
|
||||||
|
|
||||||
// if out of only plane, entirely out.
|
// if out of only plane, entirely out.
|
||||||
const uint count = clippingPlanes.size ();
|
const uint count = (uint)clippingPlanes.size ();
|
||||||
uint i;
|
uint i;
|
||||||
for(i=0;i<count;i++)
|
for(i=0;i<count;i++)
|
||||||
{
|
{
|
||||||
|
@ -2391,7 +2391,7 @@ ucstring CEntityCL::removeShardFromName(const ucstring &name)
|
||||||
return name;
|
return name;
|
||||||
|
|
||||||
// if it is the same as the shard name of the user, remove it
|
// if it is the same as the shard name of the user, remove it
|
||||||
if(ucstrnicmp(name, p0+1, p1-p0-1, PlayerSelectedHomeShardName)==0)
|
if(ucstrnicmp(name, (uint)p0+1, (uint)(p1-p0-1), PlayerSelectedHomeShardName)==0)
|
||||||
return name.substr(0,p0) + name.substr(p1+1);
|
return name.substr(0,p0) + name.substr(p1+1);
|
||||||
// else don't modify
|
// else don't modify
|
||||||
else
|
else
|
||||||
|
|
|
@ -170,7 +170,7 @@ const std::string& CLoginStateMachine::toString(CLoginStateMachine::TEvent event
|
||||||
string sLog = NLMISC::toString("[%s] %s -> %s\n", CLoginStateMachine::toString(ev).c_str(), CLoginStateMachine::toString(_CurrentState).c_str(), CLoginStateMachine::toString(stateId).c_str()); \
|
string sLog = NLMISC::toString("[%s] %s -> %s\n", CLoginStateMachine::toString(ev).c_str(), CLoginStateMachine::toString(_CurrentState).c_str(), CLoginStateMachine::toString(stateId).c_str()); \
|
||||||
if ( outputF.open( "error_join.log", true, true ) ) \
|
if ( outputF.open( "error_join.log", true, true ) ) \
|
||||||
{ \
|
{ \
|
||||||
outputF.serialBuffer( (uint8*)(&sLog[0]), sLog.size() ); \
|
outputF.serialBuffer( (uint8*)(&sLog[0]), (uint)sLog.size() ); \
|
||||||
outputF.close(); \
|
outputF.close(); \
|
||||||
} \
|
} \
|
||||||
} \
|
} \
|
||||||
|
@ -902,7 +902,7 @@ retryJoinEdit:
|
||||||
time_t currentTime;
|
time_t currentTime;
|
||||||
time( ¤tTime );
|
time( ¤tTime );
|
||||||
string headerS = NLMISC::toString( "\n\n%s%s\n\n", asctime(localtime(¤tTime)), outErrorMsg.c_str() );
|
string headerS = NLMISC::toString( "\n\n%s%s\n\n", asctime(localtime(¤tTime)), outErrorMsg.c_str() );
|
||||||
outputF.serialBuffer( (uint8*)(&headerS[0]), headerS.size() );
|
outputF.serialBuffer( (uint8*)(&headerS[0]), (uint)headerS.size() );
|
||||||
// outputF.serialBuffer( (uint8*)(&res[0]), res.size() );
|
// outputF.serialBuffer( (uint8*)(&res[0]), res.size() );
|
||||||
outputF.close();
|
outputF.close();
|
||||||
}
|
}
|
||||||
|
|
|
@ -320,10 +320,10 @@ void CGroundFXManager::checkIntegrity()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
uint numFX = _ActiveFXs.size();
|
uint numFX = (uint)_ActiveFXs.size();
|
||||||
nlassert(numFX == _NumFX);
|
nlassert(numFX == _NumFX);
|
||||||
nlassert(numFX <= _MaxNumFX);
|
nlassert(numFX <= _MaxNumFX);
|
||||||
uint numCachedFX = _CachedFXs.size();
|
uint numCachedFX = (uint)_CachedFXs.size();
|
||||||
nlassert(numCachedFX == _NumCachedFX);
|
nlassert(numCachedFX == _NumCachedFX);
|
||||||
nlassert(numCachedFX <= _MaxNumCachedFX);
|
nlassert(numCachedFX <= _MaxNumCachedFX);
|
||||||
}
|
}
|
||||||
|
|
|
@ -80,7 +80,7 @@ uint CHairSet::getNumHairItem(EGSPD::CPeople::TPeople gspeople) const
|
||||||
{
|
{
|
||||||
H_AUTO_USE(RZ_HairSet)
|
H_AUTO_USE(RZ_HairSet)
|
||||||
EPeople people = convPeople(gspeople);
|
EPeople people = convPeople(gspeople);
|
||||||
return people != DontKnow ? _Hairs[people].size() : 0;
|
return people != DontKnow ? (uint)_Hairs[people].size() : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -102,7 +102,7 @@ sint CHairSet::getHairItemFromId(EGSPD::CPeople::TPeople gspeople, uint Id) cons
|
||||||
EPeople people = convPeople(gspeople);
|
EPeople people = convPeople(gspeople);
|
||||||
if (people == DontKnow) return -1;
|
if (people == DontKnow) return -1;
|
||||||
TIntArray::const_iterator it = std::find(_Hairs[people].begin(), _Hairs[people].end(), Id);
|
TIntArray::const_iterator it = std::find(_Hairs[people].begin(), _Hairs[people].end(), Id);
|
||||||
if (it != _Hairs[people].end()) return it - _Hairs[people].begin();
|
if (it != _Hairs[people].end()) return (sint)(it - _Hairs[people].begin());
|
||||||
else return -1;
|
else return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -79,7 +79,7 @@ bool CHttpClient::send(const std::string& buffer, bool verbose)
|
||||||
nlassert(_Sock.connected());
|
nlassert(_Sock.connected());
|
||||||
|
|
||||||
if(verbose) nldebug("Sending '%s' to '%s'", buffer.c_str(), _Sock.remoteAddr().asString().c_str());
|
if(verbose) nldebug("Sending '%s' to '%s'", buffer.c_str(), _Sock.remoteAddr().asString().c_str());
|
||||||
uint32 size = buffer.size();
|
uint32 size = (uint32)buffer.size();
|
||||||
if(!buffer.empty())
|
if(!buffer.empty())
|
||||||
{
|
{
|
||||||
if(_Sock.send((uint8 *)buffer.c_str(), size, false) != CSock::Ok)
|
if(_Sock.send((uint8 *)buffer.c_str(), size, false) != CSock::Ok)
|
||||||
|
|
|
@ -30,7 +30,7 @@ using namespace std;
|
||||||
size_t CCurlHttpClient::writeDataFromCurl(void *buffer, size_t size, size_t nmemb, void *pHttpClient)
|
size_t CCurlHttpClient::writeDataFromCurl(void *buffer, size_t size, size_t nmemb, void *pHttpClient)
|
||||||
{
|
{
|
||||||
CCurlHttpClient * httpClient = static_cast<CCurlHttpClient*>(pHttpClient);
|
CCurlHttpClient * httpClient = static_cast<CCurlHttpClient*>(pHttpClient);
|
||||||
httpClient->pushReceivedData((uint8*)buffer, size*nmemb);
|
httpClient->pushReceivedData((uint8*)buffer, (uint)(size*nmemb));
|
||||||
return size*nmemb;
|
return size*nmemb;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -375,7 +375,7 @@ void CIGCallback::CIGInstance::updateFromSheets()
|
||||||
H_AUTO_USE(RZ_IGCallback)
|
H_AUTO_USE(RZ_IGCallback)
|
||||||
nlassert(_EntitySheets.size() == _IG->getNumInstance());
|
nlassert(_EntitySheets.size() == _IG->getNumInstance());
|
||||||
// See for which objects distance should be overriden (object which use a .PLANT sheet)
|
// See for which objects distance should be overriden (object which use a .PLANT sheet)
|
||||||
uint numInstances = _EntitySheets.size();
|
uint numInstances = (uint)_EntitySheets.size();
|
||||||
for(uint k = 0; k < numInstances; ++k)
|
for(uint k = 0; k < numInstances; ++k)
|
||||||
{
|
{
|
||||||
if (_EntitySheets[k] && _EntitySheets[k]->Type == CEntitySheet::PLANT)
|
if (_EntitySheets[k] && _EntitySheets[k]->Type == CEntitySheet::PLANT)
|
||||||
|
@ -402,7 +402,7 @@ void CIGCallback::CIGInstance::updateManagedFXs()
|
||||||
H_AUTO_USE(RZ_IGCallback)
|
H_AUTO_USE(RZ_IGCallback)
|
||||||
nlassert(_EntitySheets.size() == _IG->getNumInstance());
|
nlassert(_EntitySheets.size() == _IG->getNumInstance());
|
||||||
// See for which objects distance should be overriden (object which use a .PLANT sheet)
|
// See for which objects distance should be overriden (object which use a .PLANT sheet)
|
||||||
uint numInstances = _EntitySheets.size();
|
uint numInstances = (uint)_EntitySheets.size();
|
||||||
// vector of fx that should be managed by the dedicated manager. static for malloc perf
|
// vector of fx that should be managed by the dedicated manager. static for malloc perf
|
||||||
static std::vector<CTimedFX> timedFXs;
|
static std::vector<CTimedFX> timedFXs;
|
||||||
timedFXs.clear();
|
timedFXs.clear();
|
||||||
|
|
|
@ -193,7 +193,7 @@ void *XmlMalloc4NeL (size_t size)
|
||||||
// if (XmlAllocUsesSTL)
|
// if (XmlAllocUsesSTL)
|
||||||
{
|
{
|
||||||
int *newB = (int *) xmlStlAlloc.allocate(size + sizeof(int));
|
int *newB = (int *) xmlStlAlloc.allocate(size + sizeof(int));
|
||||||
*newB = size;
|
*newB = (int)size;
|
||||||
return (void *) (newB + 1);
|
return (void *) (newB + 1);
|
||||||
}
|
}
|
||||||
// else
|
// else
|
||||||
|
|
|
@ -207,7 +207,7 @@ struct CStatThread : public NLMISC::IRunnable
|
||||||
name = UserEntity->getEntityName().toString();
|
name = UserEntity->getEntityName().toString();
|
||||||
|
|
||||||
std::string userid = toString("u%d", NetMngr.getUserId())+name;
|
std::string userid = toString("u%d", NetMngr.getUserId())+name;
|
||||||
return toUpper(getMD5((const uint8 *)userid.c_str(), userid.size()).toString());
|
return toUpper(getMD5((const uint8 *)userid.c_str(), (uint32)userid.size()).toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
// return true if we sent the connect because we have all information
|
// return true if we sent the connect because we have all information
|
||||||
|
@ -222,7 +222,7 @@ struct CStatThread : public NLMISC::IRunnable
|
||||||
std::string params;
|
std::string params;
|
||||||
addParam(params, "ra", randomString());
|
addParam(params, "ra", randomString());
|
||||||
std::string session = toString("%d%d", NetMngr.getUserId(), CTime::getSecondsSince1970());
|
std::string session = toString("%d%d", NetMngr.getUserId(), CTime::getSecondsSince1970());
|
||||||
addParam(params, "sessioncookie", toUpper(getMD5((const uint8 *)session.c_str(), session.size()).toString()));
|
addParam(params, "sessioncookie", toUpper(getMD5((const uint8 *)session.c_str(), (uint32)session.size()).toString()));
|
||||||
addParam(params, "cookie", cookie());
|
addParam(params, "cookie", cookie());
|
||||||
addParam(params, "browsertoken", "X");
|
addParam(params, "browsertoken", "X");
|
||||||
addParam(params, "platformtoken", "Win32");
|
addParam(params, "platformtoken", "Win32");
|
||||||
|
|
|
@ -69,7 +69,7 @@ static inline uint getCharacterCategory(ucchar c)
|
||||||
static uint skipUCCharsRight(uint startPos, const ucstring &str)
|
static uint skipUCCharsRight(uint startPos, const ucstring &str)
|
||||||
{
|
{
|
||||||
uint pos = startPos;
|
uint pos = startPos;
|
||||||
uint endIndex = str.length();
|
uint endIndex = (uint)str.length();
|
||||||
uint ccat = getCharacterCategory(str[pos]);
|
uint ccat = getCharacterCategory(str[pos]);
|
||||||
// skip characters of the same category
|
// skip characters of the same category
|
||||||
while (pos != endIndex && getCharacterCategory(str[pos]) == ccat) ++pos;
|
while (pos != endIndex && getCharacterCategory(str[pos]) == ccat) ++pos;
|
||||||
|
@ -284,11 +284,11 @@ class CAHEditGotoLineBegin : public CAHEdit
|
||||||
// go to the start of line
|
// go to the start of line
|
||||||
if (_GroupEdit->getViewText())
|
if (_GroupEdit->getViewText())
|
||||||
{
|
{
|
||||||
sint line = _GroupEdit->getViewText()->getLineFromIndex(_GroupEdit->getCursorPos() + _GroupEdit->getPrompt().length());
|
sint line = _GroupEdit->getViewText()->getLineFromIndex(_GroupEdit->getCursorPos() + (uint)_GroupEdit->getPrompt().length());
|
||||||
if (line == -1) return;
|
if (line == -1) return;
|
||||||
sint newPos = std::max(_GroupEdit->getViewText()->getLineStartIndex(line), (sint) _GroupEdit->getPrompt().length());
|
sint newPos = std::max(_GroupEdit->getViewText()->getLineStartIndex(line), (sint) _GroupEdit->getPrompt().length());
|
||||||
if (newPos == -1) return;
|
if (newPos == -1) return;
|
||||||
_GroupEdit->setCursorPos(newPos - _GroupEdit->getPrompt().length());
|
_GroupEdit->setCursorPos(newPos - (sint32)_GroupEdit->getPrompt().length());
|
||||||
_GroupEdit->setCursorAtPreviousLineEnd(false);
|
_GroupEdit->setCursorAtPreviousLineEnd(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -306,20 +306,20 @@ class CAHEditGotoLineEnd : public CAHEdit
|
||||||
{
|
{
|
||||||
if (_GroupEdit->getViewText()->getMultiLine())
|
if (_GroupEdit->getViewText()->getMultiLine())
|
||||||
{
|
{
|
||||||
sint line = _GroupEdit->getViewText()->getLineFromIndex(_GroupEdit->getCursorPos() + _GroupEdit->getPrompt().length(), _GroupEdit->isCursorAtPreviousLineEnd());
|
sint line = _GroupEdit->getViewText()->getLineFromIndex(_GroupEdit->getCursorPos() + (uint)_GroupEdit->getPrompt().length(), _GroupEdit->isCursorAtPreviousLineEnd());
|
||||||
if (line == -1) return;
|
if (line == -1) return;
|
||||||
sint newPos;
|
sint newPos;
|
||||||
bool endOfPreviousLine;
|
bool endOfPreviousLine;
|
||||||
_GroupEdit->getViewText()->getLineEndIndex(line, newPos, endOfPreviousLine);
|
_GroupEdit->getViewText()->getLineEndIndex(line, newPos, endOfPreviousLine);
|
||||||
if (newPos != -1)
|
if (newPos != -1)
|
||||||
{
|
{
|
||||||
_GroupEdit->setCursorPos(newPos - _GroupEdit->getPrompt().length());
|
_GroupEdit->setCursorPos(newPos - (sint32)_GroupEdit->getPrompt().length());
|
||||||
_GroupEdit->setCursorAtPreviousLineEnd(endOfPreviousLine);
|
_GroupEdit->setCursorAtPreviousLineEnd(endOfPreviousLine);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_GroupEdit->setCursorPos(_GroupEdit->getPrompt().length() + _GroupEdit->getInputString().length());
|
_GroupEdit->setCursorPos((sint32)_GroupEdit->getPrompt().length() + (sint32)_GroupEdit->getInputString().length());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -344,7 +344,7 @@ class CAHEditGotoBlockEnd : public CAHEdit
|
||||||
{
|
{
|
||||||
void actionPart ()
|
void actionPart ()
|
||||||
{
|
{
|
||||||
_GroupEdit->setCursorPos(_GroupEdit->getInputStringRef().length());
|
_GroupEdit->setCursorPos((sint32)_GroupEdit->getInputStringRef().length());
|
||||||
_GroupEdit->setCursorAtPreviousLineEnd(false);
|
_GroupEdit->setCursorAtPreviousLineEnd(false);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -374,7 +374,7 @@ class CAHEditPreviousLine : public CAHEdit
|
||||||
}
|
}
|
||||||
else if (!_GroupEdit->getMaxHistoric() && _GroupEdit->getViewText()->getMultiLine())
|
else if (!_GroupEdit->getMaxHistoric() && _GroupEdit->getViewText()->getMultiLine())
|
||||||
{
|
{
|
||||||
uint cursorPosInText = _GroupEdit->getCursorPos() + _GroupEdit->getPrompt().length();
|
uint cursorPosInText = _GroupEdit->getCursorPos() + (uint)_GroupEdit->getPrompt().length();
|
||||||
if (
|
if (
|
||||||
(_GroupEdit->getCursorPos() == (sint32) _GroupEdit->getInputStringRef().length() && _GroupEdit->getViewText()->getNumLine() == 1) ||
|
(_GroupEdit->getCursorPos() == (sint32) _GroupEdit->getInputStringRef().length() && _GroupEdit->getViewText()->getNumLine() == 1) ||
|
||||||
_GroupEdit->getViewText()->getLineFromIndex(cursorPosInText, _GroupEdit->isCursorAtPreviousLineEnd()) == 0
|
_GroupEdit->getViewText()->getLineFromIndex(cursorPosInText, _GroupEdit->isCursorAtPreviousLineEnd()) == 0
|
||||||
|
@ -392,7 +392,7 @@ class CAHEditPreviousLine : public CAHEdit
|
||||||
_GroupEdit->getViewText()->getCharacterIndexFromPosition(cx, cy, newCharIndex, newLineEnd);
|
_GroupEdit->getViewText()->getCharacterIndexFromPosition(cx, cy, newCharIndex, newLineEnd);
|
||||||
if (newLineEnd)
|
if (newLineEnd)
|
||||||
{
|
{
|
||||||
_GroupEdit->setCursorPos(newCharIndex - _GroupEdit->getPrompt().length());
|
_GroupEdit->setCursorPos(newCharIndex - (sint32)_GroupEdit->getPrompt().length());
|
||||||
_GroupEdit->setCursorAtPreviousLineEnd(true);
|
_GroupEdit->setCursorAtPreviousLineEnd(true);
|
||||||
sint32 newPos = _GroupEdit->getCursorPos();
|
sint32 newPos = _GroupEdit->getCursorPos();
|
||||||
clamp(newPos, (sint32) 0, (sint32) _GroupEdit->getInputStringRef().size());
|
clamp(newPos, (sint32) 0, (sint32) _GroupEdit->getInputStringRef().size());
|
||||||
|
@ -413,7 +413,7 @@ class CAHEditPreviousLine : public CAHEdit
|
||||||
{
|
{
|
||||||
_GroupEdit->setCursorPos(newCharIndex + 1);
|
_GroupEdit->setCursorPos(newCharIndex + 1);
|
||||||
}
|
}
|
||||||
_GroupEdit->setCursorPos(_GroupEdit->getCursorPos()-_GroupEdit->getPrompt().length());
|
_GroupEdit->setCursorPos(_GroupEdit->getCursorPos()-(sint32)_GroupEdit->getPrompt().length());
|
||||||
sint32 newpos = _GroupEdit->getCursorPos();
|
sint32 newpos = _GroupEdit->getCursorPos();
|
||||||
clamp(newpos, (sint32) 0, (sint32)_GroupEdit->getInputStringRef().size());
|
clamp(newpos, (sint32) 0, (sint32)_GroupEdit->getInputStringRef().size());
|
||||||
_GroupEdit->setCursorPos(newpos);
|
_GroupEdit->setCursorPos(newpos);
|
||||||
|
@ -448,7 +448,7 @@ class CAHEditNextLine : public CAHEdit
|
||||||
{
|
{
|
||||||
sint cx, cy;
|
sint cx, cy;
|
||||||
sint height;
|
sint height;
|
||||||
_GroupEdit->getViewText()->getCharacterPositionFromIndex(_GroupEdit->getCursorPos() + _GroupEdit->getPrompt().length(), _GroupEdit->isCursorAtPreviousLineEnd(), cx, cy, height);
|
_GroupEdit->getViewText()->getCharacterPositionFromIndex(_GroupEdit->getCursorPos() + (sint)_GroupEdit->getPrompt().length(), _GroupEdit->isCursorAtPreviousLineEnd(), cx, cy, height);
|
||||||
if (cy != 0)
|
if (cy != 0)
|
||||||
{
|
{
|
||||||
cy -= height;
|
cy -= height;
|
||||||
|
@ -457,7 +457,7 @@ class CAHEditNextLine : public CAHEdit
|
||||||
_GroupEdit->getViewText()->getCharacterIndexFromPosition(cx, cy, newCharIndex, newLineEnd);
|
_GroupEdit->getViewText()->getCharacterIndexFromPosition(cx, cy, newCharIndex, newLineEnd);
|
||||||
if (newLineEnd)
|
if (newLineEnd)
|
||||||
{
|
{
|
||||||
_GroupEdit->setCursorPos(newCharIndex - _GroupEdit->getPrompt().length());
|
_GroupEdit->setCursorPos(newCharIndex - (sint32)_GroupEdit->getPrompt().length());
|
||||||
_GroupEdit->setCursorAtPreviousLineEnd(true);
|
_GroupEdit->setCursorAtPreviousLineEnd(true);
|
||||||
sint32 newPos = _GroupEdit->getCursorPos();
|
sint32 newPos = _GroupEdit->getCursorPos();
|
||||||
clamp(newPos, (sint32) 0, (sint32) _GroupEdit->getInputStringRef().size());
|
clamp(newPos, (sint32) 0, (sint32) _GroupEdit->getInputStringRef().size());
|
||||||
|
@ -478,7 +478,7 @@ class CAHEditNextLine : public CAHEdit
|
||||||
{
|
{
|
||||||
_GroupEdit->setCursorPos(min(sint32(newCharIndex + 1), sint32(_GroupEdit->getInputStringRef().length() + _GroupEdit->getPrompt().length())));
|
_GroupEdit->setCursorPos(min(sint32(newCharIndex + 1), sint32(_GroupEdit->getInputStringRef().length() + _GroupEdit->getPrompt().length())));
|
||||||
}
|
}
|
||||||
_GroupEdit->setCursorPos(_GroupEdit->getCursorPos()-_GroupEdit->getPrompt().length());
|
_GroupEdit->setCursorPos(_GroupEdit->getCursorPos()-(sint32)_GroupEdit->getPrompt().length());
|
||||||
sint32 newPos = _GroupEdit->getCursorPos();
|
sint32 newPos = _GroupEdit->getCursorPos();
|
||||||
clamp(newPos, (sint32) 0, (sint32) _GroupEdit->getInputStringRef().size());
|
clamp(newPos, (sint32) 0, (sint32) _GroupEdit->getInputStringRef().size());
|
||||||
_GroupEdit->setCursorPos(newPos);
|
_GroupEdit->setCursorPos(newPos);
|
||||||
|
|
|
@ -223,7 +223,7 @@ CInterfaceGroup *CInterfaceHelp::activateNextWindow(CDBCtrlSheet *elt, sint forc
|
||||||
|
|
||||||
// update WindowList if possible
|
// update WindowList if possible
|
||||||
initWindows();
|
initWindows();
|
||||||
sint maxHelpWindow= _InfoWindows.size();
|
sint maxHelpWindow= (sint)_InfoWindows.size();
|
||||||
|
|
||||||
|
|
||||||
// Update Active window list
|
// Update Active window list
|
||||||
|
@ -429,7 +429,7 @@ void CInterfaceHelp::closeAll()
|
||||||
{
|
{
|
||||||
// update WindowList if possible
|
// update WindowList if possible
|
||||||
initWindows();
|
initWindows();
|
||||||
sint maxHelpWindow= _InfoWindows.size();
|
sint maxHelpWindow= (sint)_InfoWindows.size();
|
||||||
|
|
||||||
_ActiveWindows.clear();
|
_ActiveWindows.clear();
|
||||||
// For all windows
|
// For all windows
|
||||||
|
@ -447,7 +447,7 @@ void CInterfaceHelp::resetWindowPos(sint y)
|
||||||
|
|
||||||
// update WindowList if possible
|
// update WindowList if possible
|
||||||
initWindows();
|
initWindows();
|
||||||
sint maxHelpWindow= _InfoWindows.size();
|
sint maxHelpWindow= (sint)_InfoWindows.size();
|
||||||
|
|
||||||
uint32 w, h;
|
uint32 w, h;
|
||||||
pIM->getViewRenderer().getScreenSize(w,h);
|
pIM->getViewRenderer().getScreenSize(w,h);
|
||||||
|
@ -473,7 +473,7 @@ void CInterfaceHelp::serialInfoWindows(NLMISC::IStream &f)
|
||||||
resetWindowPos(-100);
|
resetWindowPos(-100);
|
||||||
|
|
||||||
f.serialCont(infoWindowSave);
|
f.serialCont(infoWindowSave);
|
||||||
uint minSize= min(infoWindowSave.size(), _InfoWindows.size());
|
uint minSize= (uint)min(infoWindowSave.size(), _InfoWindows.size());
|
||||||
for(uint i=0;i<minSize;i++)
|
for(uint i=0;i<minSize;i++)
|
||||||
{
|
{
|
||||||
_InfoWindows[i].Window->setX(infoWindowSave[i].X);
|
_InfoWindows[i].Window->setX(infoWindowSave[i].X);
|
||||||
|
@ -2508,7 +2508,7 @@ void refreshMissionHelp(CSheetHelpSetup &setup, const CPrerequisitInfos &infos)
|
||||||
}
|
}
|
||||||
|
|
||||||
// inactivate other lines
|
// inactivate other lines
|
||||||
for (uint i = infos.Prerequisits.size(); i < 15 ; ++i)
|
for (uint i = (uint)infos.Prerequisits.size(); i < 15 ; ++i)
|
||||||
{
|
{
|
||||||
const std::string text = setup.HelpWindow->getId() + ":content:scroll_text_id:text_list:" + NLMISC::toString("text_%u",i+1);
|
const std::string text = setup.HelpWindow->getId() + ":content:scroll_text_id:text_list:" + NLMISC::toString("text_%u",i+1);
|
||||||
CViewText *viewText = dynamic_cast<CViewText *>(setup.HelpWindow->getElement(text));
|
CViewText *viewText = dynamic_cast<CViewText *>(setup.HelpWindow->getElement(text));
|
||||||
|
|
|
@ -57,7 +57,7 @@ public:
|
||||||
void addListeningWindow(CChatWindow *w);
|
void addListeningWindow(CChatWindow *w);
|
||||||
void removeListeningWindow(CChatWindow *w);
|
void removeListeningWindow(CChatWindow *w);
|
||||||
bool isListeningWindow(CChatWindow *w) const;
|
bool isListeningWindow(CChatWindow *w) const;
|
||||||
uint getNumListeningWindows() const { return _ListeningWindows.size(); }
|
uint getNumListeningWindows() const { return (uint)_ListeningWindows.size(); }
|
||||||
CChatWindow *getListeningWindow(uint index);
|
CChatWindow *getListeningWindow(uint index);
|
||||||
// helpers : depending on the 'listening' flag value, remove or add the window from the list
|
// helpers : depending on the 'listening' flag value, remove or add the window from the list
|
||||||
void setWindowState(CChatWindow *cw, bool listening);
|
void setWindowState(CChatWindow *cw, bool listening);
|
||||||
|
|
|
@ -246,7 +246,7 @@ public:
|
||||||
// try to rename a window
|
// try to rename a window
|
||||||
bool rename(const ucstring &oldName, const ucstring &newName, bool newNameLocalize);
|
bool rename(const ucstring &oldName, const ucstring &newName, bool newNameLocalize);
|
||||||
// warning : this is slow
|
// warning : this is slow
|
||||||
uint getNumChatWindow() const { return _ChatWindowMap.size(); }
|
uint getNumChatWindow() const { return (uint)_ChatWindowMap.size(); }
|
||||||
// warning : this is slow : for debug only
|
// warning : this is slow : for debug only
|
||||||
CChatWindow *getChatWindowByIndex(uint index);
|
CChatWindow *getChatWindowByIndex(uint index);
|
||||||
///////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
|
@ -63,7 +63,7 @@ public:
|
||||||
virtual CCtrlBase *getSubCtrl (sint32 /* x */, sint32 /* y */) { return this; }
|
virtual CCtrlBase *getSubCtrl (sint32 /* x */, sint32 /* y */) { return this; }
|
||||||
|
|
||||||
/// Debug
|
/// Debug
|
||||||
virtual uint32 getMemory() { return sizeof(*this)+_Id.size(); }
|
virtual uint32 getMemory() { return (uint32)(sizeof(*this)+_Id.size()); }
|
||||||
|
|
||||||
|
|
||||||
/// Get the ContextHelp for this control. Default is to return _ContextHelp
|
/// Get the ContextHelp for this control. Default is to return _ContextHelp
|
||||||
|
|
|
@ -48,7 +48,7 @@ public:
|
||||||
|
|
||||||
virtual void updateCoords();
|
virtual void updateCoords();
|
||||||
|
|
||||||
virtual uint32 getMemory() { return sizeof(*this)+_Id.size(); }
|
virtual uint32 getMemory() { return (uint32)(sizeof(*this)+_Id.size()); }
|
||||||
|
|
||||||
// Display part
|
// Display part
|
||||||
virtual void draw();
|
virtual void draw();
|
||||||
|
|
|
@ -50,7 +50,7 @@ void CCtrlPolygon::updateBoudingRect()
|
||||||
sint32 ymin = INT_MAX;
|
sint32 ymin = INT_MAX;
|
||||||
sint32 xmax = INT_MIN;
|
sint32 xmax = INT_MIN;
|
||||||
sint32 ymax = INT_MIN;
|
sint32 ymax = INT_MIN;
|
||||||
uint numVerts = _Poly.Vertices.size();
|
uint numVerts = (uint)_Poly.Vertices.size();
|
||||||
_XFormPoly.Vertices.resize(numVerts);
|
_XFormPoly.Vertices.resize(numVerts);
|
||||||
for(uint k = 0; k < numVerts; ++k)
|
for(uint k = 0; k < numVerts; ++k)
|
||||||
{
|
{
|
||||||
|
@ -155,7 +155,7 @@ void CCtrlPolygon::draw()
|
||||||
if (_Touched)
|
if (_Touched)
|
||||||
{
|
{
|
||||||
_RealTris.clear();
|
_RealTris.clear();
|
||||||
uint numTris = _Tris.size();
|
uint numTris = (uint)_Tris.size();
|
||||||
sint32 cornerX, cornerY;
|
sint32 cornerX, cornerY;
|
||||||
static std::vector<NLMISC::CTriangle> winTris;
|
static std::vector<NLMISC::CTriangle> winTris;
|
||||||
winTris.resize(numTris);
|
winTris.resize(numTris);
|
||||||
|
|
|
@ -42,7 +42,7 @@ class CCtrlPolygon : public CCtrlBase
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CCtrlPolygon();
|
CCtrlPolygon();
|
||||||
virtual uint32 getMemory() { return sizeof(*this)+_Id.size(); }
|
virtual uint32 getMemory() { return (uint32)(sizeof(*this)+_Id.size()); }
|
||||||
virtual void updateCoords();
|
virtual void updateCoords();
|
||||||
virtual void draw();
|
virtual void draw();
|
||||||
/** Change the vertices. This is costly because concav / complex polys are split in a list of triangles
|
/** Change the vertices. This is costly because concav / complex polys are split in a list of triangles
|
||||||
|
|
|
@ -44,7 +44,7 @@ public:
|
||||||
bool parse(xmlNodePtr cur,CInterfaceGroup *parentGroup);
|
bool parse(xmlNodePtr cur,CInterfaceGroup *parentGroup);
|
||||||
virtual void updateCoords();
|
virtual void updateCoords();
|
||||||
virtual void draw();
|
virtual void draw();
|
||||||
virtual uint32 getMemory() { return sizeof(*this)+_Id.size(); }
|
virtual uint32 getMemory() { return (uint32)(sizeof(*this)+_Id.size()); }
|
||||||
|
|
||||||
// from CViewBase
|
// from CViewBase
|
||||||
virtual sint32 getAlpha() const { return (sint32) _Color.A; }
|
virtual sint32 getAlpha() const { return (sint32) _Color.A; }
|
||||||
|
|
|
@ -45,8 +45,8 @@ sint CCtrlSheetSelection::addGroup(const std::string &name)
|
||||||
return - 1;
|
return - 1;
|
||||||
}
|
}
|
||||||
_Groups.push_back(CSheetSelectionGroup(name));
|
_Groups.push_back(CSheetSelectionGroup(name));
|
||||||
_GroupNameToIndex[name] = _Groups.size() - 1;
|
_GroupNameToIndex[name] = (uint)_Groups.size() - 1;
|
||||||
return _Groups.size() - 1;
|
return (sint)_Groups.size() - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
//=============================================================
|
//=============================================================
|
||||||
|
|
|
@ -47,7 +47,7 @@ public:
|
||||||
|
|
||||||
virtual void updateCoords();
|
virtual void updateCoords();
|
||||||
|
|
||||||
virtual uint32 getMemory() { return sizeof(*this)+_Id.size(); }
|
virtual uint32 getMemory() { return (uint32)(sizeof(*this)+_Id.size()); }
|
||||||
|
|
||||||
// Display part
|
// Display part
|
||||||
virtual void draw();
|
virtual void draw();
|
||||||
|
|
|
@ -322,7 +322,7 @@ void CDBGroupBuildPhrase::startComposition(const CSPhraseCom &phrase)
|
||||||
// simulate a root selection
|
// simulate a root selection
|
||||||
validateRoot(rootBrick);
|
validateRoot(rootBrick);
|
||||||
// setup params of the root
|
// setup params of the root
|
||||||
numParam= rootBrick->ParameterFamilies.size();
|
numParam= (uint)rootBrick->ParameterFamilies.size();
|
||||||
brickIndexForParam= 0;
|
brickIndexForParam= 0;
|
||||||
|
|
||||||
// For all brick not the root
|
// For all brick not the root
|
||||||
|
@ -344,7 +344,7 @@ void CDBGroupBuildPhrase::startComposition(const CSPhraseCom &phrase)
|
||||||
curParam++;
|
curParam++;
|
||||||
// If this parameter has additonal parameter they follow
|
// If this parameter has additonal parameter they follow
|
||||||
if( brick && !brick->ParameterFamilies.empty() )
|
if( brick && !brick->ParameterFamilies.empty() )
|
||||||
numParam+= brick->ParameterFamilies.size();
|
numParam+= (uint)brick->ParameterFamilies.size();
|
||||||
}
|
}
|
||||||
// a mandatory/optional/credit?
|
// a mandatory/optional/credit?
|
||||||
else
|
else
|
||||||
|
@ -363,7 +363,7 @@ void CDBGroupBuildPhrase::startComposition(const CSPhraseCom &phrase)
|
||||||
curParam= 0;
|
curParam= 0;
|
||||||
numParam= 0;
|
numParam= 0;
|
||||||
if(brick)
|
if(brick)
|
||||||
numParam= brick->ParameterFamilies.size();
|
numParam= (uint)brick->ParameterFamilies.size();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1749,7 +1749,7 @@ void CDBGroupBuildPhrase::updateDisplayFromRootBrick()
|
||||||
// else ok, setup the composition
|
// else ok, setup the composition
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_NumMandatories= brick->MandatoryFamilies.size();
|
_NumMandatories= (uint32)brick->MandatoryFamilies.size();
|
||||||
// Don't enable any optional/credit by default
|
// Don't enable any optional/credit by default
|
||||||
_NumCredits= 0;
|
_NumCredits= 0;
|
||||||
_NumOptionals= 0;
|
_NumOptionals= 0;
|
||||||
|
|
|
@ -68,7 +68,7 @@ public:
|
||||||
const ucstring &getText(uint i) const;
|
const ucstring &getText(uint i) const;
|
||||||
const ucstring &getTexture(uint i) const;
|
const ucstring &getTexture(uint i) const;
|
||||||
void removeText(uint i);
|
void removeText(uint i);
|
||||||
uint getNumTexts() const {return _Texts.size();}
|
uint getNumTexts() const {return (uint)_Texts.size();}
|
||||||
|
|
||||||
// selection
|
// selection
|
||||||
void setSelection(sint32 val);
|
void setSelection(sint32 val);
|
||||||
|
|
|
@ -297,7 +297,7 @@ void CDBGroupListSheet::updateCoords ()
|
||||||
uint numValidSheets;
|
uint numValidSheets;
|
||||||
if (_Array)
|
if (_Array)
|
||||||
{
|
{
|
||||||
numValidSheets = _SheetChildren.size();
|
numValidSheets = (uint)_SheetChildren.size();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -59,7 +59,7 @@ public:
|
||||||
// Get the index of a sheet inserted in this list. Returns -1 if it is not an index of that list
|
// Get the index of a sheet inserted in this list. Returns -1 if it is not an index of that list
|
||||||
virtual sint getIndexOf(const CDBCtrlSheet *sheet) const;
|
virtual sint getIndexOf(const CDBCtrlSheet *sheet) const;
|
||||||
// get number of sheets
|
// get number of sheets
|
||||||
virtual uint getNbSheet() const { return _SheetChildren.size(); }
|
virtual uint getNbSheet() const { return (uint)_SheetChildren.size(); }
|
||||||
// get a sheet by its index
|
// get a sheet by its index
|
||||||
virtual CDBCtrlSheet *getSheet(uint index) const;
|
virtual CDBCtrlSheet *getSheet(uint index) const;
|
||||||
// Get the number of active elements
|
// Get the number of active elements
|
||||||
|
|
|
@ -91,7 +91,7 @@ void CDBGroupListSheetBonusMalus::draw ()
|
||||||
// sint32 drl= getRenderLayer()+1;
|
// sint32 drl= getRenderLayer()+1;
|
||||||
|
|
||||||
// May draw disable bitmaps on the ctrl sheets if disabled.
|
// May draw disable bitmaps on the ctrl sheets if disabled.
|
||||||
uint numCtrls= min(_SheetChildren.size(), _DisableStates.size());
|
uint numCtrls= (uint)min(_SheetChildren.size(), _DisableStates.size());
|
||||||
for(uint i=0;i<numCtrls;i++)
|
for(uint i=0;i<numCtrls;i++)
|
||||||
{
|
{
|
||||||
CDBCtrlSheet *ctrl= _SheetChildren[i]->Ctrl;
|
CDBCtrlSheet *ctrl= _SheetChildren[i]->Ctrl;
|
||||||
|
|
|
@ -49,7 +49,7 @@ public:
|
||||||
CDBGroupListSheetText(const TCtorParam ¶m);
|
CDBGroupListSheetText(const TCtorParam ¶m);
|
||||||
virtual ~CDBGroupListSheetText(); // AJM: make base class destructors virtual to avoid memory leaks!
|
virtual ~CDBGroupListSheetText(); // AJM: make base class destructors virtual to avoid memory leaks!
|
||||||
|
|
||||||
virtual uint getNbSheet() const { return _SheetChildren.size(); }
|
virtual uint getNbSheet() const { return (uint)_SheetChildren.size(); }
|
||||||
|
|
||||||
/// CInterfaceGroup Interface
|
/// CInterfaceGroup Interface
|
||||||
virtual bool parse (xmlNodePtr cur, CInterfaceGroup *parentGroup);
|
virtual bool parse (xmlNodePtr cur, CInterfaceGroup *parentGroup);
|
||||||
|
|
|
@ -50,7 +50,7 @@ public:
|
||||||
void setType (TViewBar vb);
|
void setType (TViewBar vb);
|
||||||
|
|
||||||
bool parse(xmlNodePtr cur,CInterfaceGroup * parentGroup);
|
bool parse(xmlNodePtr cur,CInterfaceGroup * parentGroup);
|
||||||
virtual uint32 getMemory() { return sizeof(*this)+_Id.size(); }
|
virtual uint32 getMemory() { return (uint32)(sizeof(*this)+_Id.size()); }
|
||||||
virtual void updateCoords ();
|
virtual void updateCoords ();
|
||||||
virtual void draw ();
|
virtual void draw ();
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@ public:
|
||||||
CDBViewBar3(const TCtorParam ¶m);
|
CDBViewBar3(const TCtorParam ¶m);
|
||||||
|
|
||||||
bool parse(xmlNodePtr cur,CInterfaceGroup * parentGroup);
|
bool parse(xmlNodePtr cur,CInterfaceGroup * parentGroup);
|
||||||
virtual uint32 getMemory() { return sizeof(*this)+_Id.size(); }
|
virtual uint32 getMemory() { return (uint32)(sizeof(*this)+_Id.size()); }
|
||||||
virtual void updateCoords ();
|
virtual void updateCoords ();
|
||||||
|
|
||||||
void setMini (bool mini);
|
void setMini (bool mini);
|
||||||
|
|
|
@ -132,7 +132,7 @@ void CEncyclopediaManager::updateAlbum(const CEncyMsgAlbum &a)
|
||||||
CEncyMsgAlbum *pA = getAlbum(a.Name);
|
CEncyMsgAlbum *pA = getAlbum(a.Name);
|
||||||
if (pA == NULL)
|
if (pA == NULL)
|
||||||
{
|
{
|
||||||
uint32 nBack = _Albums.size();
|
uint32 nBack = (uint32)_Albums.size();
|
||||||
_Albums.push_back(CEncyMsgAlbum());
|
_Albums.push_back(CEncyMsgAlbum());
|
||||||
pA = &_Albums[nBack];
|
pA = &_Albums[nBack];
|
||||||
}
|
}
|
||||||
|
@ -152,7 +152,7 @@ void CEncyclopediaManager::updateThema(uint32 nAlbumName, const CEncyMsgThema &t
|
||||||
// Thema not found add it !
|
// Thema not found add it !
|
||||||
if (pT == NULL)
|
if (pT == NULL)
|
||||||
{
|
{
|
||||||
uint32 nBack = pA->Themas.size();
|
uint32 nBack = (uint32)pA->Themas.size();
|
||||||
pA->Themas.push_back(CEncyMsgThema());
|
pA->Themas.push_back(CEncyMsgThema());
|
||||||
pT = &pA->Themas[nBack];
|
pT = &pA->Themas[nBack];
|
||||||
|
|
||||||
|
|
|
@ -887,7 +887,7 @@ void CGroupCompasMenu::setActive (bool state)
|
||||||
|
|
||||||
// and add each entry
|
// and add each entry
|
||||||
const std::vector<CCompassDialogsManager::CCompassDialogsEntry> & entries = CCompassDialogsManager::getInstance().getEntries();
|
const std::vector<CCompassDialogsManager::CCompassDialogsEntry> & entries = CCompassDialogsManager::getInstance().getEntries();
|
||||||
const uint size = entries.size();
|
const uint size = (uint)entries.size();
|
||||||
for( uint i = 0; i < size; ++i)
|
for( uint i = 0; i < size; ++i)
|
||||||
{
|
{
|
||||||
CCompassTarget ct;
|
CCompassTarget ct;
|
||||||
|
@ -993,7 +993,7 @@ class CCompassDialogsStringCallback : public IStringWaitCallback
|
||||||
{
|
{
|
||||||
virtual void onDynStringAvailable(uint /* stringId */, const ucstring &value)
|
virtual void onDynStringAvailable(uint /* stringId */, const ucstring &value)
|
||||||
{
|
{
|
||||||
uint size = CCompassDialogsManager::getInstance()._Entries.size();
|
uint size = (uint)CCompassDialogsManager::getInstance()._Entries.size();
|
||||||
for ( uint i = 0; i < size; i++)
|
for ( uint i = 0; i < size; i++)
|
||||||
{
|
{
|
||||||
ucstring name;
|
ucstring name;
|
||||||
|
|
|
@ -208,7 +208,7 @@ bool CGroupEditBox::parse(xmlNodePtr cur, CInterfaceGroup * parentGroup)
|
||||||
prop = (char*) xmlGetProp( cur, (xmlChar*)"negative_filter" );
|
prop = (char*) xmlGetProp( cur, (xmlChar*)"negative_filter" );
|
||||||
if (prop)
|
if (prop)
|
||||||
{
|
{
|
||||||
uint length = strlen(prop);
|
uint length = (uint)strlen(prop);
|
||||||
_NegativeFilter.resize(length);
|
_NegativeFilter.resize(length);
|
||||||
std::copy((const char *) prop, (const char *) prop + length, _NegativeFilter.begin());
|
std::copy((const char *) prop, (const char *) prop + length, _NegativeFilter.begin());
|
||||||
}
|
}
|
||||||
|
@ -254,8 +254,8 @@ void CGroupEditBox::draw ()
|
||||||
sint32 blankTextId= rVR.getBlankTextureId();
|
sint32 blankTextId= rVR.getBlankTextureId();
|
||||||
CRGBA col= _BackSelectColor;
|
CRGBA col= _BackSelectColor;
|
||||||
col.A= pIM->getGlobalColorForContent().A;
|
col.A= pIM->getGlobalColorForContent().A;
|
||||||
sint32 minPos= min(_CursorPos, _SelectCursorPos) + _Prompt.length();
|
sint32 minPos= min(_CursorPos, _SelectCursorPos) + (sint32)_Prompt.length();
|
||||||
sint32 maxPos= max(_CursorPos, _SelectCursorPos) + _Prompt.length();
|
sint32 maxPos= max(_CursorPos, _SelectCursorPos) + (sint32)_Prompt.length();
|
||||||
|
|
||||||
// get its position on screen
|
// get its position on screen
|
||||||
sint cxMinPos, cyMinPos;
|
sint cxMinPos, cyMinPos;
|
||||||
|
@ -311,7 +311,7 @@ void CGroupEditBox::draw ()
|
||||||
// get its position on screen
|
// get its position on screen
|
||||||
sint cx, cy;
|
sint cx, cy;
|
||||||
sint height;
|
sint height;
|
||||||
_ViewText->getCharacterPositionFromIndex(_CursorPos + _Prompt.length(), _CursorAtPreviousLineEnd, cx, cy, height);
|
_ViewText->getCharacterPositionFromIndex(_CursorPos + (sint)_Prompt.length(), _CursorAtPreviousLineEnd, cx, cy, height);
|
||||||
// display the cursor
|
// display the cursor
|
||||||
// get the texture for the cursor
|
// get the texture for the cursor
|
||||||
if (_CursorTexID == -1)
|
if (_CursorTexID == -1)
|
||||||
|
@ -394,7 +394,7 @@ void CGroupEditBox::paste()
|
||||||
else
|
else
|
||||||
sString = (const char*)hLock;
|
sString = (const char*)hLock;
|
||||||
|
|
||||||
sint length = sString.length();
|
sint length = (sint)sString.length();
|
||||||
|
|
||||||
ucstring toAppend;
|
ucstring toAppend;
|
||||||
// filter character depending on the netry type
|
// filter character depending on the netry type
|
||||||
|
@ -524,14 +524,14 @@ void CGroupEditBox::paste()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
length = toAppend.size();
|
length = (sint)toAppend.size();
|
||||||
if ((uint) (_InputString.length() + length) > _MaxNumChar)
|
if ((uint) (_InputString.length() + length) > _MaxNumChar)
|
||||||
{
|
{
|
||||||
length = _MaxNumChar - _InputString.length();
|
length = _MaxNumChar - (sint)_InputString.length();
|
||||||
}
|
}
|
||||||
ucstring toAdd = toAppend.substr(0, length);
|
ucstring toAdd = toAppend.substr(0, length);
|
||||||
_InputString = _InputString.substr(0, _CursorPos) + toAdd + _InputString.substr(_CursorPos);
|
_InputString = _InputString.substr(0, _CursorPos) + toAdd + _InputString.substr(_CursorPos);
|
||||||
_CursorPos += toAdd.length();
|
_CursorPos += (sint32)toAdd.length();
|
||||||
GlobalUnlock (hObj);
|
GlobalUnlock (hObj);
|
||||||
nlinfo ("Chat input was pasted from the clipboard");
|
nlinfo ("Chat input was pasted from the clipboard");
|
||||||
}
|
}
|
||||||
|
@ -712,7 +712,7 @@ bool CGroupEditBox::undo()
|
||||||
setInputString(_StartInputString);
|
setInputString(_StartInputString);
|
||||||
_CanUndo = false;
|
_CanUndo = false;
|
||||||
_CanRedo = true;
|
_CanRedo = true;
|
||||||
setCursorPos(_InputString.length());
|
setCursorPos((sint32)_InputString.length());
|
||||||
setSelectionAll();
|
setSelectionAll();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -726,7 +726,7 @@ bool CGroupEditBox::redo()
|
||||||
setInputString(_ModifiedInputString);
|
setInputString(_ModifiedInputString);
|
||||||
_CanUndo = true;
|
_CanUndo = true;
|
||||||
_CanRedo = false;
|
_CanRedo = false;
|
||||||
setCursorPos(_InputString.length());
|
setCursorPos((sint32)_InputString.length());
|
||||||
setSelectionAll();
|
setSelectionAll();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -769,7 +769,7 @@ bool CGroupEditBox::expand()
|
||||||
// then back to ucstring
|
// then back to ucstring
|
||||||
_InputString.fromUtf8(command);
|
_InputString.fromUtf8(command);
|
||||||
_InputString = '/' + _InputString;
|
_InputString = '/' + _InputString;
|
||||||
_CursorPos = _InputString.length();
|
_CursorPos = (sint32)_InputString.length();
|
||||||
_CursorAtPreviousLineEnd = false;
|
_CursorAtPreviousLineEnd = false;
|
||||||
triggerOnChangeAH();
|
triggerOnChangeAH();
|
||||||
return true;
|
return true;
|
||||||
|
@ -895,7 +895,7 @@ bool CGroupEditBox::handleEvent (const CEventDescriptor& event)
|
||||||
_ViewText->getCharacterIndexFromPosition(eventDesc.getX() - _ViewText->getXReal(), eventDesc.getY() - _ViewText->getYReal(), newCurPos, cursorAtPreviousLineEnd);
|
_ViewText->getCharacterIndexFromPosition(eventDesc.getX() - _ViewText->getXReal(), eventDesc.getY() - _ViewText->getYReal(), newCurPos, cursorAtPreviousLineEnd);
|
||||||
_CursorAtPreviousLineEnd = cursorAtPreviousLineEnd;
|
_CursorAtPreviousLineEnd = cursorAtPreviousLineEnd;
|
||||||
_CursorPos = newCurPos;
|
_CursorPos = newCurPos;
|
||||||
_CursorPos -= _Prompt.length();
|
_CursorPos -= (sint32)_Prompt.length();
|
||||||
_CursorPos = std::max(_CursorPos, sint32(0));
|
_CursorPos = std::max(_CursorPos, sint32(0));
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -990,7 +990,7 @@ void CGroupEditBox::updateCoords()
|
||||||
// Check if cursor visible
|
// Check if cursor visible
|
||||||
sint xCursVT, xCurs, yTmp, hTmp;
|
sint xCursVT, xCurs, yTmp, hTmp;
|
||||||
// Get the cursor pos from the BL of the viewtext
|
// Get the cursor pos from the BL of the viewtext
|
||||||
_ViewText->getCharacterPositionFromIndex(_CursorPos+_Prompt.size(), false, xCursVT, yTmp, hTmp);
|
_ViewText->getCharacterPositionFromIndex(_CursorPos+(sint)_Prompt.size(), false, xCursVT, yTmp, hTmp);
|
||||||
// Get the cursor pos from the BL of the edit box
|
// Get the cursor pos from the BL of the edit box
|
||||||
xCurs = xCursVT - (_XReal - _ViewText->getXReal());
|
xCurs = xCursVT - (_XReal - _ViewText->getXReal());
|
||||||
// If the cursor is outside the edit box move the view text to show the cursor
|
// If the cursor is outside the edit box move the view text to show the cursor
|
||||||
|
@ -1098,7 +1098,7 @@ void CGroupEditBox::setInputString(const ucstring &str)
|
||||||
_InputString = str;
|
_InputString = str;
|
||||||
if (_CursorPos > (sint32) str.length())
|
if (_CursorPos > (sint32) str.length())
|
||||||
{
|
{
|
||||||
_CursorPos = str.length();
|
_CursorPos = (sint32)str.length();
|
||||||
_CursorAtPreviousLineEnd = false;
|
_CursorAtPreviousLineEnd = false;
|
||||||
}
|
}
|
||||||
if (!_ViewText) return;
|
if (!_ViewText) return;
|
||||||
|
@ -1192,7 +1192,7 @@ void CGroupEditBox::setSelectionAll()
|
||||||
{
|
{
|
||||||
_CurrSelection = this;
|
_CurrSelection = this;
|
||||||
_SelectCursorPos= 0;
|
_SelectCursorPos= 0;
|
||||||
_CursorPos= _InputString.size();
|
_CursorPos= (sint32)_InputString.size();
|
||||||
_CursorAtPreviousLineEnd = false;
|
_CursorAtPreviousLineEnd = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1254,7 +1254,7 @@ void CGroupEditBox::setCommand(const ucstring &command, bool execute)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
CInterfaceManager::getInstance()->setCaptureKeyboard (this);
|
CInterfaceManager::getInstance()->setCaptureKeyboard (this);
|
||||||
_CursorPos = _InputString.length();
|
_CursorPos = (sint32)_InputString.length();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1392,8 +1392,8 @@ void CGroupEditBox::setFocusOnText()
|
||||||
pIM->setCaptureKeyboard (this);
|
pIM->setCaptureKeyboard (this);
|
||||||
|
|
||||||
_CurrSelection = this;
|
_CurrSelection = this;
|
||||||
_SelectCursorPos= _InputString.size();
|
_SelectCursorPos= (sint32)_InputString.size();
|
||||||
_CursorPos= _InputString.size();
|
_CursorPos= (sint32)_InputString.size();
|
||||||
_CursorAtPreviousLineEnd = false;
|
_CursorAtPreviousLineEnd = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -65,7 +65,7 @@ extern CActionsContext ActionsContext;
|
||||||
string CGroupHTML::localImageName(const string &url)
|
string CGroupHTML::localImageName(const string &url)
|
||||||
{
|
{
|
||||||
string dest = "cache/";
|
string dest = "cache/";
|
||||||
dest += getMD5((uint8 *)url.c_str(), url.size()).toString();
|
dest += getMD5((uint8 *)url.c_str(), (uint32)url.size()).toString();
|
||||||
dest += ".cache";
|
dest += ".cache";
|
||||||
return dest;
|
return dest;
|
||||||
}
|
}
|
||||||
|
@ -358,7 +358,7 @@ void CGroupHTML::addText (const char * buf, int len)
|
||||||
// Build the final unicode string
|
// Build the final unicode string
|
||||||
ucstring tmp;
|
ucstring tmp;
|
||||||
tmp.reserve(len);
|
tmp.reserve(len);
|
||||||
uint ucLen = inputUCString.size();
|
uint ucLen = (uint)inputUCString.size();
|
||||||
//uint ucLenWithoutSpace = 0;
|
//uint ucLenWithoutSpace = 0;
|
||||||
for (uint i=0; i<ucLen; i++)
|
for (uint i=0; i<ucLen; i++)
|
||||||
{
|
{
|
||||||
|
@ -1096,7 +1096,7 @@ void CGroupHTML::beginElement (uint element_number, const BOOL *present, const c
|
||||||
_Forms.back().Entries.back().SelectValues.push_back(optionValue);
|
_Forms.back().Entries.back().SelectValues.push_back(optionValue);
|
||||||
if (selected)
|
if (selected)
|
||||||
{
|
{
|
||||||
_Forms.back().Entries.back().InitialSelection = _Forms.back().Entries.back().SelectValues.size() - 1;
|
_Forms.back().Entries.back().InitialSelection = (sint)_Forms.back().Entries.back().SelectValues.size() - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -2181,7 +2181,7 @@ CInterfaceGroup *CGroupHTML::addTextArea(const std::string &templateName, const
|
||||||
templateParams.push_back (std::pair<std::string,std::string> ("enter_recover_focus", "false"));
|
templateParams.push_back (std::pair<std::string,std::string> ("enter_recover_focus", "false"));
|
||||||
templateParams.push_back (std::pair<std::string,std::string> ("max_num_chars", "1024"));
|
templateParams.push_back (std::pair<std::string,std::string> ("max_num_chars", "1024"));
|
||||||
CInterfaceGroup *textArea = im->createGroupInstance (templateName.c_str(),
|
CInterfaceGroup *textArea = im->createGroupInstance (templateName.c_str(),
|
||||||
getParagraph()->getId(), templateParams.empty()?NULL:&(templateParams[0]), templateParams.size());
|
getParagraph()->getId(), templateParams.empty()?NULL:&(templateParams[0]), (uint)templateParams.size());
|
||||||
|
|
||||||
// Group created ?
|
// Group created ?
|
||||||
if (textArea)
|
if (textArea)
|
||||||
|
@ -2221,7 +2221,7 @@ CDBGroupComboBox *CGroupHTML::addComboBox(const std::string &templateName, const
|
||||||
std::vector<std::pair<std::string,std::string> > templateParams;
|
std::vector<std::pair<std::string,std::string> > templateParams;
|
||||||
templateParams.push_back (std::pair<std::string,std::string> ("id", name));
|
templateParams.push_back (std::pair<std::string,std::string> ("id", name));
|
||||||
CInterfaceGroup *group = im->createGroupInstance (templateName.c_str(),
|
CInterfaceGroup *group = im->createGroupInstance (templateName.c_str(),
|
||||||
getParagraph()->getId(), templateParams.empty()?NULL:&(templateParams[0]), templateParams.size());
|
getParagraph()->getId(), templateParams.empty()?NULL:&(templateParams[0]), (uint)templateParams.size());
|
||||||
|
|
||||||
// Group created ?
|
// Group created ?
|
||||||
if (group)
|
if (group)
|
||||||
|
|
|
@ -58,7 +58,7 @@ static string getWebAuthKey()
|
||||||
UserEntity->getDisplayName().toString() +
|
UserEntity->getDisplayName().toString() +
|
||||||
toString(cid) +
|
toString(cid) +
|
||||||
NetMngr.getLoginCookie().toString();
|
NetMngr.getLoginCookie().toString();
|
||||||
string key = getMD5((const uint8*)rawKey.c_str(), rawKey.size()).toString();
|
string key = getMD5((const uint8*)rawKey.c_str(), (uint32)rawKey.size()).toString();
|
||||||
//nlinfo("rawkey = '%s'", rawKey.c_str());
|
//nlinfo("rawkey = '%s'", rawKey.c_str());
|
||||||
//nlinfo("authkey = %s", key.c_str());
|
//nlinfo("authkey = %s", key.c_str());
|
||||||
return key;
|
return key;
|
||||||
|
|
|
@ -686,7 +686,7 @@ class CHandlerResetCharacterInScene : public IActionHandler
|
||||||
bool pvpOnly= nlstricmp(sParams,"pvponly")==0;
|
bool pvpOnly= nlstricmp(sParams,"pvponly")==0;
|
||||||
// Reset all entities
|
// Reset all entities
|
||||||
uint i;
|
uint i;
|
||||||
uint numEntity = EntitiesMngr.entities().size();
|
uint numEntity = (uint)EntitiesMngr.entities().size();
|
||||||
for (i=0; i<numEntity; i++)
|
for (i=0; i<numEntity; i++)
|
||||||
{
|
{
|
||||||
CEntityCL *entity = EntitiesMngr.entity(i);
|
CEntityCL *entity = EntitiesMngr.entity(i);
|
||||||
|
@ -1098,7 +1098,7 @@ CGroupInSceneUserInfo *CGroupInSceneUserInfo::newGroupInScene(const std::string
|
||||||
std::vector<std::pair<std::string,std::string> > templateParams;
|
std::vector<std::pair<std::string,std::string> > templateParams;
|
||||||
templateParams.push_back (std::pair<std::string,std::string>("id", id));
|
templateParams.push_back (std::pair<std::string,std::string>("id", id));
|
||||||
groupInfo = CInterfaceManager::getInstance()->createGroupInstance ( templateName,
|
groupInfo = CInterfaceManager::getInstance()->createGroupInstance ( templateName,
|
||||||
"ui:interface", templateParams.empty()?NULL:&(templateParams[0]), templateParams.size());
|
"ui:interface", templateParams.empty()?NULL:&(templateParams[0]), (uint)templateParams.size());
|
||||||
}
|
}
|
||||||
|
|
||||||
CGroupInSceneUserInfo *info = dynamic_cast<CGroupInSceneUserInfo*>(groupInfo);
|
CGroupInSceneUserInfo *info = dynamic_cast<CGroupInSceneUserInfo*>(groupInfo);
|
||||||
|
|
|
@ -76,10 +76,10 @@ void CGroupList::addChild (CViewBase* child, bool deleteOnRemove)
|
||||||
}
|
}
|
||||||
|
|
||||||
// add child at last index
|
// add child at last index
|
||||||
addChildAtIndex(child, _Elements.size(), deleteOnRemove);
|
addChildAtIndex(child, (uint)_Elements.size(), deleteOnRemove);
|
||||||
if (_Elements.size() >= 2)
|
if (_Elements.size() >= 2)
|
||||||
{
|
{
|
||||||
setOrder(_Elements.size() - 1, getOrder(_Elements.size() - 2) + 1);
|
setOrder((uint)_Elements.size() - 1, getOrder((uint)_Elements.size() - 2) + 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -86,7 +86,7 @@ public:
|
||||||
void removeHead();
|
void removeHead();
|
||||||
|
|
||||||
// Get the number of children
|
// Get the number of children
|
||||||
uint getNumChildren() const { return _Elements.size(); }
|
uint getNumChildren() const { return (uint)_Elements.size(); }
|
||||||
|
|
||||||
// Get the number of active children
|
// Get the number of active children
|
||||||
uint getNumActiveChildren() const;
|
uint getNumActiveChildren() const;
|
||||||
|
@ -132,7 +132,7 @@ public:
|
||||||
virtual CInterfaceElement* getElement (const std::string &id)
|
virtual CInterfaceElement* getElement (const std::string &id)
|
||||||
{ return CInterfaceGroup::getElement (id); }
|
{ return CInterfaceGroup::getElement (id); }
|
||||||
|
|
||||||
sint32 getNbElement() { return _Elements.size(); }
|
sint32 getNbElement() { return (sint32)_Elements.size(); }
|
||||||
sint32 getSpace() { return _Space; }
|
sint32 getSpace() { return _Space; }
|
||||||
|
|
||||||
void setDynamicDisplaySize (bool dds) { _DynamicDisplaySize = dds; }
|
void setDynamicDisplaySize (bool dds) { _DynamicDisplaySize = dds; }
|
||||||
|
|
|
@ -1175,7 +1175,7 @@ void CGroupMap::checkCoords()
|
||||||
uint i;
|
uint i;
|
||||||
if (_RespawnPos.size() < _RespawnLM.size())
|
if (_RespawnPos.size() < _RespawnLM.size())
|
||||||
{
|
{
|
||||||
for (i = _RespawnPos.size(); i < _RespawnLM.size(); i++)
|
for (i = (uint)_RespawnPos.size(); i < _RespawnLM.size(); i++)
|
||||||
{
|
{
|
||||||
delCtrl(_RespawnLM[i]);
|
delCtrl(_RespawnLM[i]);
|
||||||
_RespawnLM[i] = NULL;
|
_RespawnLM[i] = NULL;
|
||||||
|
@ -2245,7 +2245,7 @@ void CGroupMap::setScale(float newScale)
|
||||||
//============================================================================================================
|
//============================================================================================================
|
||||||
void CGroupMap::updateLandMarkList(TLandMarkButtonVect &lmVect)
|
void CGroupMap::updateLandMarkList(TLandMarkButtonVect &lmVect)
|
||||||
{
|
{
|
||||||
uint numLM = lmVect.size();
|
uint numLM = (uint)lmVect.size();
|
||||||
for(uint k = 0; k < numLM; ++k)
|
for(uint k = 0; k < numLM; ++k)
|
||||||
{
|
{
|
||||||
CLandMarkButton *lmb = lmVect[k];
|
CLandMarkButton *lmb = lmVect[k];
|
||||||
|
@ -2259,7 +2259,7 @@ void CGroupMap::updateLandMarkList(TLandMarkButtonVect &lmVect)
|
||||||
//============================================================================================================
|
//============================================================================================================
|
||||||
void CGroupMap::updateLandMarkTextList(TLandMarkTextVect &lmVect)
|
void CGroupMap::updateLandMarkTextList(TLandMarkTextVect &lmVect)
|
||||||
{
|
{
|
||||||
uint numLM = lmVect.size();
|
uint numLM = (uint)lmVect.size();
|
||||||
for(uint k = 0; k < numLM; ++k)
|
for(uint k = 0; k < numLM; ++k)
|
||||||
{
|
{
|
||||||
CLandMarkText *lmt = lmVect[k];
|
CLandMarkText *lmt = lmVect[k];
|
||||||
|
@ -2276,7 +2276,7 @@ void CGroupMap::updateLandMarkTextList(TLandMarkTextVect &lmVect)
|
||||||
//============================================================================================================
|
//============================================================================================================
|
||||||
void CGroupMap::removeLandMarks(TLandMarkButtonVect &lm)
|
void CGroupMap::removeLandMarks(TLandMarkButtonVect &lm)
|
||||||
{
|
{
|
||||||
uint numLM = lm.size();
|
uint numLM = (uint)lm.size();
|
||||||
for(uint k = 0; k < numLM; ++k)
|
for(uint k = 0; k < numLM; ++k)
|
||||||
{
|
{
|
||||||
if (lm[k])
|
if (lm[k])
|
||||||
|
@ -2491,7 +2491,7 @@ CCtrlButton *CGroupMap::addUserLandMark(const NLMISC::CVector2f &pos, const ucst
|
||||||
_CurContinent->UserLandMarks.push_back(ulm);
|
_CurContinent->UserLandMarks.push_back(ulm);
|
||||||
|
|
||||||
// add a landmark with a menu to remove it
|
// add a landmark with a menu to remove it
|
||||||
addLandMark(_UserLM, pos, title, getUserLandMarkOptions(_CurContinent->UserLandMarks.size() - 1));
|
addLandMark(_UserLM, pos, title, getUserLandMarkOptions((uint32)_CurContinent->UserLandMarks.size() - 1));
|
||||||
|
|
||||||
// Save the config file each time a user landmark is created
|
// Save the config file each time a user landmark is created
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
|
@ -2571,7 +2571,7 @@ void CGroupMap::removeExceedingUserLandMarks(uint maxNumber)
|
||||||
uint CGroupMap::getNumUserLandMarks() const
|
uint CGroupMap::getNumUserLandMarks() const
|
||||||
{
|
{
|
||||||
if (_CurContinent == NULL) return 0;
|
if (_CurContinent == NULL) return 0;
|
||||||
return _CurContinent->UserLandMarks.size();
|
return (uint)_CurContinent->UserLandMarks.size();
|
||||||
}
|
}
|
||||||
//============================================================================================================
|
//============================================================================================================
|
||||||
CLandMarkOptions CGroupMap::getUserLandMarkOptions(uint32 lmindex) const
|
CLandMarkOptions CGroupMap::getUserLandMarkOptions(uint32 lmindex) const
|
||||||
|
|
|
@ -342,7 +342,7 @@ bool CGroupSubMenu::parse (xmlNodePtr cur, CInterfaceGroup *parent)
|
||||||
string completeId = _Parent->getId() + ":" + _Lines[_Lines.size()-1].Id;
|
string completeId = _Parent->getId() + ":" + _Lines[_Lines.size()-1].Id;
|
||||||
CInterfaceGroup *pUGLeft = im->createGroupInstance((const char*)usergroup, completeId, vparams);
|
CInterfaceGroup *pUGLeft = im->createGroupInstance((const char*)usergroup, completeId, vparams);
|
||||||
if (pUGLeft)
|
if (pUGLeft)
|
||||||
setUserGroupLeft(_Lines.size()-1, pUGLeft, true);
|
setUserGroupLeft((uint)_Lines.size()-1, pUGLeft, true);
|
||||||
}
|
}
|
||||||
usergroup = (char*) xmlGetProp (cur, (xmlChar*)"usergroup_r");
|
usergroup = (char*) xmlGetProp (cur, (xmlChar*)"usergroup_r");
|
||||||
if (usergroup)
|
if (usergroup)
|
||||||
|
@ -357,7 +357,7 @@ bool CGroupSubMenu::parse (xmlNodePtr cur, CInterfaceGroup *parent)
|
||||||
string completeId = _Parent->getId() + ":" + _Lines[_Lines.size()-1].Id;
|
string completeId = _Parent->getId() + ":" + _Lines[_Lines.size()-1].Id;
|
||||||
CInterfaceGroup *pUG = im->createGroupInstance((const char*)usergroup, completeId, vparams);
|
CInterfaceGroup *pUG = im->createGroupInstance((const char*)usergroup, completeId, vparams);
|
||||||
if (pUG)
|
if (pUG)
|
||||||
setUserGroupRight(_Lines.size()-1, pUG, true);
|
setUserGroupRight((uint)_Lines.size()-1, pUG, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
cur = cur->next;
|
cur = cur->next;
|
||||||
|
@ -1123,7 +1123,7 @@ CInterfaceElement* CGroupSubMenu::getElement (const std::string &id)
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
void CGroupSubMenu::addSeparator(const std::string &id)
|
void CGroupSubMenu::addSeparator(const std::string &id)
|
||||||
{
|
{
|
||||||
addSeparatorAtIndex(_Lines.size(), id);
|
addSeparatorAtIndex((uint)_Lines.size(), id);
|
||||||
}
|
}
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
|
@ -1377,7 +1377,7 @@ void CGroupSubMenu::hideSubMenus ()
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
void CGroupSubMenu::reset()
|
void CGroupSubMenu::reset()
|
||||||
{
|
{
|
||||||
uint lineCount = _Lines.size();
|
uint lineCount = (uint)_Lines.size();
|
||||||
for(sint k = lineCount - 1; k >= 0; --k)
|
for(sint k = lineCount - 1; k >= 0; --k)
|
||||||
{
|
{
|
||||||
removeLine(k);
|
removeLine(k);
|
||||||
|
@ -1516,7 +1516,7 @@ void CGroupSubMenu::setUserGroupLeft(uint line, CInterfaceGroup *group, bool own
|
||||||
CGroupSubMenu *CGroupSubMenu::cloneMenu(CGroupSubMenu *appendToMenu, CGroupMenu *newFather, CInterfaceGroup *initGroup /* = NULL */) const
|
CGroupSubMenu *CGroupSubMenu::cloneMenu(CGroupSubMenu *appendToMenu, CGroupMenu *newFather, CInterfaceGroup *initGroup /* = NULL */) const
|
||||||
{
|
{
|
||||||
CGroupSubMenu *copyMenu = appendToMenu ? appendToMenu : new CGroupSubMenu(CViewText::TCtorParam());
|
CGroupSubMenu *copyMenu = appendToMenu ? appendToMenu : new CGroupSubMenu(CViewText::TCtorParam());
|
||||||
uint startSize = copyMenu->_Lines.size();
|
uint startSize = (uint)copyMenu->_Lines.size();
|
||||||
copyMenu->_GroupMenu = newFather;
|
copyMenu->_GroupMenu = newFather;
|
||||||
copyMenu->initOptions(initGroup);
|
copyMenu->initOptions(initGroup);
|
||||||
copyMenu->_Lines.reserve(_Lines.size() + startSize);
|
copyMenu->_Lines.reserve(_Lines.size() + startSize);
|
||||||
|
|
|
@ -128,7 +128,7 @@ public:
|
||||||
void addSeparatorAtIndex(uint index, const std::string &id = "");
|
void addSeparatorAtIndex(uint index, const std::string &id = "");
|
||||||
|
|
||||||
|
|
||||||
uint getNumLine() const { return _Lines.size(); }
|
uint getNumLine() const { return (uint)_Lines.size(); }
|
||||||
void removeLine(uint index);
|
void removeLine(uint index);
|
||||||
const std::string getActionHandler(uint lineIndex) const;
|
const std::string getActionHandler(uint lineIndex) const;
|
||||||
const std::string getActionHandlerParam(uint lineIndex) const;
|
const std::string getActionHandlerParam(uint lineIndex) const;
|
||||||
|
@ -157,7 +157,7 @@ public:
|
||||||
|
|
||||||
void removeAllUserGroups();
|
void removeAllUserGroups();
|
||||||
|
|
||||||
uint getNumLines() const { return _Lines.size(); }
|
uint getNumLines() const { return (uint)_Lines.size(); }
|
||||||
|
|
||||||
// return pointer to submenu or NULL if there's none
|
// return pointer to submenu or NULL if there's none
|
||||||
CGroupSubMenu *getSubMenu(uint index) const;
|
CGroupSubMenu *getSubMenu(uint index) const;
|
||||||
|
|
|
@ -71,10 +71,10 @@ void CGroupParagraph::addChild (CViewBase* child, bool deleteOnRemove)
|
||||||
}
|
}
|
||||||
|
|
||||||
// add child at last index
|
// add child at last index
|
||||||
addChildAtIndex(child, _Elements.size(), deleteOnRemove);
|
addChildAtIndex(child, (uint)_Elements.size(), deleteOnRemove);
|
||||||
if (_Elements.size() >= 2)
|
if (_Elements.size() >= 2)
|
||||||
{
|
{
|
||||||
setOrder(_Elements.size() - 1, getOrder(_Elements.size() - 2) + 1);
|
setOrder((uint)_Elements.size() - 1, getOrder((uint)_Elements.size() - 2) + 1);
|
||||||
}
|
}
|
||||||
invalidateContent();
|
invalidateContent();
|
||||||
}
|
}
|
||||||
|
@ -487,7 +487,7 @@ void CGroupParagraph::updateCoords()
|
||||||
|
|
||||||
// For each elements, place them
|
// For each elements, place them
|
||||||
uint firstElementOnLine = 0;
|
uint firstElementOnLine = 0;
|
||||||
const uint elmCount = _Elements.size();
|
const uint elmCount = (uint)_Elements.size();
|
||||||
uint i;
|
uint i;
|
||||||
for (i = 0; i < elmCount+1; ++i)
|
for (i = 0; i < elmCount+1; ++i)
|
||||||
{
|
{
|
||||||
|
|
|
@ -102,7 +102,7 @@ public:
|
||||||
// void removeHead();
|
// void removeHead();
|
||||||
|
|
||||||
// Get the number of children
|
// Get the number of children
|
||||||
uint getNumChildren() const { return _Elements.size(); }
|
uint getNumChildren() const { return (uint)_Elements.size(); }
|
||||||
|
|
||||||
// Get the number of active children
|
// Get the number of active children
|
||||||
uint getNumActiveChildren() const;
|
uint getNumActiveChildren() const;
|
||||||
|
@ -150,7 +150,7 @@ public:
|
||||||
virtual CInterfaceElement* getElement (const std::string &id)
|
virtual CInterfaceElement* getElement (const std::string &id)
|
||||||
{ return CInterfaceGroup::getElement (id); }
|
{ return CInterfaceGroup::getElement (id); }
|
||||||
|
|
||||||
sint32 getNbElement() { return _Elements.size(); }
|
sint32 getNbElement() { return (sint32)_Elements.size(); }
|
||||||
sint32 getSpace() { return _Space; }
|
sint32 getSpace() { return _Space; }
|
||||||
|
|
||||||
void forceSizeW (sint32 newSizeW);
|
void forceSizeW (sint32 newSizeW);
|
||||||
|
|
|
@ -246,7 +246,7 @@ void CGroupQuickHelp::beginElement (uint element_number, const BOOL *present, co
|
||||||
|
|
||||||
// Extract the string
|
// Extract the string
|
||||||
step.EventToComplete.insert (events.substr (first, last-first));
|
step.EventToComplete.insert (events.substr (first, last-first));
|
||||||
first = last+1;
|
first = (uint)last+1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -403,7 +403,7 @@ void CGroupTable::updateCoords()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Width of cells and table borders
|
// Width of cells and table borders
|
||||||
sint32 borderWidth = 2*Border + (_Columns.size()+1) * CellSpacing + (_Columns.size()*2) * CellPadding;
|
sint32 borderWidth = 2*Border + ((sint32)_Columns.size()+1) * CellSpacing + ((sint32)_Columns.size()*2) * CellPadding;
|
||||||
|
|
||||||
// Get the width
|
// Get the width
|
||||||
sint32 tableWidthMax = ForceWidthMin?ForceWidthMin:_LastParentW; // getWReal();
|
sint32 tableWidthMax = ForceWidthMin?ForceWidthMin:_LastParentW; // getWReal();
|
||||||
|
@ -786,7 +786,7 @@ sint32 CGroupTable::getMaxUsedW() const
|
||||||
for (i=0; i<columns.size(); i++)
|
for (i=0; i<columns.size(); i++)
|
||||||
maxWidth += columns[i];
|
maxWidth += columns[i];
|
||||||
|
|
||||||
maxWidth += 2*Border + (columns.size()+1) * CellSpacing + (columns.size()*2) * CellPadding;
|
maxWidth += 2*Border + ((sint32)columns.size()+1) * CellSpacing + ((sint32)columns.size()*2) * CellPadding;
|
||||||
|
|
||||||
return maxWidth;
|
return maxWidth;
|
||||||
}
|
}
|
||||||
|
@ -831,7 +831,7 @@ sint32 CGroupTable::getMinUsedW() const
|
||||||
for (i=0; i<columns.size(); i++)
|
for (i=0; i<columns.size(); i++)
|
||||||
maxWidth += columns[i];
|
maxWidth += columns[i];
|
||||||
|
|
||||||
maxWidth += 2*Border + (columns.size()+1) * CellSpacing + (columns.size()*2) * CellPadding;
|
maxWidth += 2*Border + ((sint32)columns.size()+1) * CellSpacing + ((sint32)columns.size()*2) * CellPadding;
|
||||||
|
|
||||||
return maxWidth;
|
return maxWidth;
|
||||||
}
|
}
|
||||||
|
|
|
@ -63,7 +63,7 @@ void CGroupTree::SNode::updateLastVisibleSon()
|
||||||
{
|
{
|
||||||
LastVisibleSon = NULL;
|
LastVisibleSon = NULL;
|
||||||
if (!Show || !Opened) return;
|
if (!Show || !Opened) return;
|
||||||
for (sint sonIndex = Children.size() - 1; sonIndex >= 0; -- sonIndex)
|
for (sint sonIndex = (sint)Children.size() - 1; sonIndex >= 0; -- sonIndex)
|
||||||
{
|
{
|
||||||
if (Children[sonIndex]->Show)
|
if (Children[sonIndex]->Show)
|
||||||
{
|
{
|
||||||
|
@ -82,7 +82,7 @@ CGroupTree::SNode::~SNode()
|
||||||
{
|
{
|
||||||
makeOrphan();
|
makeOrphan();
|
||||||
// IMPORTANT : must delete in reverse order because "makeOrphan" is called when deleting sons, thus changing vector size...
|
// IMPORTANT : must delete in reverse order because "makeOrphan" is called when deleting sons, thus changing vector size...
|
||||||
for (sint i = Children.size() - 1; i >= 0; --i)
|
for (sint i = (sint)Children.size() - 1; i >= 0; --i)
|
||||||
delete Children[i];
|
delete Children[i];
|
||||||
Children.clear();
|
Children.clear();
|
||||||
// TestYoyo
|
// TestYoyo
|
||||||
|
@ -667,7 +667,7 @@ void CGroupTree::draw()
|
||||||
col.A = (uint8)(((sint32)col.A*((sint32)pIM->getGlobalColorForContent().A+1))>>8);
|
col.A = (uint8)(((sint32)col.A*((sint32)pIM->getGlobalColorForContent().A+1))>>8);
|
||||||
}
|
}
|
||||||
|
|
||||||
drawSelection( getHrcIconXEnd(_Lines[_OverLine].Depth + _Lines[_OverLine].getNumAdditionnalBitmap()), (_Lines.size()-_OverLine-1)*_BmpH,
|
drawSelection( getHrcIconXEnd(_Lines[_OverLine].Depth + _Lines[_OverLine].getNumAdditionnalBitmap()), ((sint)_Lines.size()-_OverLine-1)*_BmpH,
|
||||||
_WReal-getHrcIconXEnd(_Lines[_OverLine].Depth + _Lines[_OverLine].getNumAdditionnalBitmap()), col);
|
_WReal-getHrcIconXEnd(_Lines[_OverLine].Depth + _Lines[_OverLine].getNumAdditionnalBitmap()), col);
|
||||||
}
|
}
|
||||||
// Draw extended over
|
// Draw extended over
|
||||||
|
@ -703,7 +703,7 @@ void CGroupTree::draw()
|
||||||
col.A = (uint8)(((sint32)col.A*((sint32)pIM->getGlobalColorForContent().A+1))>>8);
|
col.A = (uint8)(((sint32)col.A*((sint32)pIM->getGlobalColorForContent().A+1))>>8);
|
||||||
}
|
}
|
||||||
|
|
||||||
drawSelection( getHrcIconXEnd(_Lines[_SelectedLine].Depth + _Lines[_SelectedLine].getNumAdditionnalBitmap()), (_Lines.size()-_SelectedLine-1)*_BmpH,
|
drawSelection( getHrcIconXEnd(_Lines[_SelectedLine].Depth + _Lines[_SelectedLine].getNumAdditionnalBitmap()), ((sint)_Lines.size()-_SelectedLine-1)*_BmpH,
|
||||||
_WReal-getHrcIconXEnd(_Lines[_SelectedLine].Depth + _Lines[_SelectedLine].getNumAdditionnalBitmap()), col );
|
_WReal-getHrcIconXEnd(_Lines[_SelectedLine].Depth + _Lines[_SelectedLine].getNumAdditionnalBitmap()), col );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -913,7 +913,7 @@ void CGroupTree::rebuild()
|
||||||
addTextLine (0, _RootNode);
|
addTextLine (0, _RootNode);
|
||||||
|
|
||||||
// Reformating
|
// Reformating
|
||||||
sint32 sizeH = _Lines.size()*_BmpH;
|
sint32 sizeH = (sint32)_Lines.size()*_BmpH;
|
||||||
for (uint i = 0; i < _Lines.size(); ++i)
|
for (uint i = 0; i < _Lines.size(); ++i)
|
||||||
_Lines[i].TextOrTemplate->setY (_Lines[i].Node->YDecal + sizeH - ((1+_Lines[i].TextOrTemplate->getY())*_BmpH));
|
_Lines[i].TextOrTemplate->setY (_Lines[i].Node->YDecal + sizeH - ((1+_Lines[i].TextOrTemplate->getY())*_BmpH));
|
||||||
// Add the hierarchy bitmaps
|
// Add the hierarchy bitmaps
|
||||||
|
@ -1013,7 +1013,7 @@ void CGroupTree::addTextLine (uint8 nDepth, CGroupTree::SNode *pNode)
|
||||||
line.TextOrTemplate->setParent (this);
|
line.TextOrTemplate->setParent (this);
|
||||||
line.TextOrTemplate->setParentPos (NULL);
|
line.TextOrTemplate->setParentPos (NULL);
|
||||||
line.TextOrTemplate->setX (getHrcIconXEnd(nDepth-1 + line.getNumAdditionnalBitmap()));
|
line.TextOrTemplate->setX (getHrcIconXEnd(nDepth-1 + line.getNumAdditionnalBitmap()));
|
||||||
line.TextOrTemplate->setY (_Lines.size());
|
line.TextOrTemplate->setY ((sint32)_Lines.size());
|
||||||
line.TextOrTemplate->setModulateGlobalColor(this->getModulateGlobalColor());
|
line.TextOrTemplate->setModulateGlobalColor(this->getModulateGlobalColor());
|
||||||
if (pNode->DisplayText)
|
if (pNode->DisplayText)
|
||||||
addView (line.TextOrTemplate);
|
addView (line.TextOrTemplate);
|
||||||
|
@ -1099,7 +1099,7 @@ void CGroupTree::addHierarchyBitmaps ()
|
||||||
// A Bitmap must be created
|
// A Bitmap must be created
|
||||||
CViewBitmap *pVB = createViewBitmap(nLine, "t", "blank.tga");
|
CViewBitmap *pVB = createViewBitmap(nLine, "t", "blank.tga");
|
||||||
pVB->setX (getHrcIconXStart(nLayer));
|
pVB->setX (getHrcIconXStart(nLayer));
|
||||||
pVB->setY (_Lines.size()*_BmpH - ((1+nLine)*_BmpH));
|
pVB->setY ((sint32)_Lines.size()*_BmpH - ((1+nLine)*_BmpH));
|
||||||
|
|
||||||
bool bAddBitmap = true;
|
bool bAddBitmap = true;
|
||||||
bool bAddXExtendBitmap = false;
|
bool bAddXExtendBitmap = false;
|
||||||
|
@ -1225,7 +1225,7 @@ void CGroupTree::addHierarchyBitmaps ()
|
||||||
{
|
{
|
||||||
CViewBitmap *pVB = createViewBitmap(nLine, "ext_t", _ArboXExtend);
|
CViewBitmap *pVB = createViewBitmap(nLine, "ext_t", _ArboXExtend);
|
||||||
pVB->setX (getHrcIconXStart(nLayer) - _XExtend);
|
pVB->setX (getHrcIconXStart(nLayer) - _XExtend);
|
||||||
pVB->setY (_Lines.size()*_BmpH - ((1+nLine)*_BmpH));
|
pVB->setY ((sint32)_Lines.size()*_BmpH - ((1+nLine)*_BmpH));
|
||||||
addView (pVB);
|
addView (pVB);
|
||||||
_Lines[nLine].Bmps.push_back(pVB);
|
_Lines[nLine].Bmps.push_back(pVB);
|
||||||
}
|
}
|
||||||
|
@ -1243,7 +1243,7 @@ void CGroupTree::addHierarchyBitmaps ()
|
||||||
{
|
{
|
||||||
CViewBitmap *pVB = createViewBitmap(nLine, "custom_bm", _Lines[nLine].Node->Bitmap);
|
CViewBitmap *pVB = createViewBitmap(nLine, "custom_bm", _Lines[nLine].Node->Bitmap);
|
||||||
pVB->setX (getHrcIconXStart(_Lines[nLine].Depth + 1));
|
pVB->setX (getHrcIconXStart(_Lines[nLine].Depth + 1));
|
||||||
pVB->setY (_Lines.size()*_BmpH - ((1+nLine)*_BmpH));
|
pVB->setY ((sint32)_Lines.size()*_BmpH - ((1+nLine)*_BmpH));
|
||||||
_Lines[nLine].Bmps.push_back(pVB);
|
_Lines[nLine].Bmps.push_back(pVB);
|
||||||
addView (pVB);
|
addView (pVB);
|
||||||
}
|
}
|
||||||
|
|
|
@ -93,7 +93,7 @@ public:
|
||||||
|
|
||||||
void remove(NL3D::UInstanceGroup *pIG);
|
void remove(NL3D::UInstanceGroup *pIG);
|
||||||
|
|
||||||
uint getCharacter3DCount() const { return _Characters.size(); }
|
uint getCharacter3DCount() const { return (uint)_Characters.size(); }
|
||||||
CInterface3DCharacter *getCharacter3D(uint index);
|
CInterface3DCharacter *getCharacter3D(uint index);
|
||||||
|
|
||||||
CInterface3DCamera *getCamera(uint index);
|
CInterface3DCamera *getCamera(uint index);
|
||||||
|
|
|
@ -1232,7 +1232,7 @@ CInterfaceElement *CInterfaceElement::clone()
|
||||||
std::copy(dupStream.buffer(), dupStream.buffer() + dupStream.length(), datas.begin());
|
std::copy(dupStream.buffer(), dupStream.buffer() + dupStream.length(), datas.begin());
|
||||||
dupStream.resetPtrTable();
|
dupStream.resetPtrTable();
|
||||||
dupStream.invert();
|
dupStream.invert();
|
||||||
dupStream.fill(&datas[0], datas.size());
|
dupStream.fill(&datas[0], (uint32)datas.size());
|
||||||
dupStream.serialPolyPtr(begunThisCloneWarHas);
|
dupStream.serialPolyPtr(begunThisCloneWarHas);
|
||||||
}
|
}
|
||||||
catch(NLMISC::EStream &)
|
catch(NLMISC::EStream &)
|
||||||
|
|
|
@ -173,7 +173,7 @@ public:
|
||||||
virtual bool parse (xmlNodePtr cur, CInterfaceGroup *parentGroup);
|
virtual bool parse (xmlNodePtr cur, CInterfaceGroup *parentGroup);
|
||||||
|
|
||||||
/// Debug info on memory
|
/// Debug info on memory
|
||||||
virtual uint32 getMemory () { return sizeof(*this)+_Id.size(); }
|
virtual uint32 getMemory () { return (uint32)(sizeof(*this)+_Id.size()); }
|
||||||
|
|
||||||
/// helper: display a parse error with the id of the lement
|
/// helper: display a parse error with the id of the lement
|
||||||
void parseError (CInterfaceGroup *parentGroup, const char *reason = NULL);
|
void parseError (CInterfaceGroup *parentGroup, const char *reason = NULL);
|
||||||
|
|
|
@ -41,7 +41,7 @@ void CInterfaceExprNodeValue::getDepends(std::vector<ICDBNode *> &/* nodes */)
|
||||||
void CInterfaceExprNodeValueFnCall::eval(CInterfaceExprValue &result)
|
void CInterfaceExprNodeValueFnCall::eval(CInterfaceExprValue &result)
|
||||||
{
|
{
|
||||||
nlassert(Func);
|
nlassert(Func);
|
||||||
uint numParams = Params.size();
|
uint numParams = (uint)Params.size();
|
||||||
std::vector<CInterfaceExprValue> params(numParams);
|
std::vector<CInterfaceExprValue> params(numParams);
|
||||||
for(uint k = 0; k < numParams; ++k)
|
for(uint k = 0; k < numParams; ++k)
|
||||||
{
|
{
|
||||||
|
@ -53,7 +53,7 @@ void CInterfaceExprNodeValueFnCall::eval(CInterfaceExprValue &result)
|
||||||
void CInterfaceExprNodeValueFnCall::evalWithDepends(CInterfaceExprValue &result, std::vector<ICDBNode *> &nodes)
|
void CInterfaceExprNodeValueFnCall::evalWithDepends(CInterfaceExprValue &result, std::vector<ICDBNode *> &nodes)
|
||||||
{
|
{
|
||||||
nlassert(Func);
|
nlassert(Func);
|
||||||
uint numParams = Params.size();
|
uint numParams = (uint)Params.size();
|
||||||
std::vector<CInterfaceExprValue> params(numParams);
|
std::vector<CInterfaceExprValue> params(numParams);
|
||||||
for(uint k = 0; k < numParams; ++k)
|
for(uint k = 0; k < numParams; ++k)
|
||||||
{
|
{
|
||||||
|
@ -64,7 +64,7 @@ void CInterfaceExprNodeValueFnCall::evalWithDepends(CInterfaceExprValue &result,
|
||||||
|
|
||||||
void CInterfaceExprNodeValueFnCall::getDepends(std::vector<ICDBNode *> &nodes)
|
void CInterfaceExprNodeValueFnCall::getDepends(std::vector<ICDBNode *> &nodes)
|
||||||
{
|
{
|
||||||
uint numParams = Params.size();
|
uint numParams = (uint)Params.size();
|
||||||
for(uint k = 0; k < numParams; ++k)
|
for(uint k = 0; k < numParams; ++k)
|
||||||
{
|
{
|
||||||
Params[k]->getDepends(nodes);
|
Params[k]->getDepends(nodes);
|
||||||
|
|
|
@ -430,7 +430,7 @@ static DECLARE_INTERFACE_USER_FCT(userFctSwitch)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
sint64 n = args[0].getInteger();
|
sint64 n = args[0].getInteger();
|
||||||
if ((n > (args.size()-2)) || (n < 0))
|
if ((n > ((sint64)args.size()-2)) || (n < 0))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
result = args[(uint)n+1];
|
result = args[(uint)n+1];
|
||||||
|
|
|
@ -724,7 +724,7 @@ bool CInterfaceGroup::handleEvent (const CEventDescriptor &event)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
// For each child group
|
// For each child group
|
||||||
for (sint i = _ChildrenGroups.size()-1; i >= 0; --i)
|
for (sint i = (sint)_ChildrenGroups.size()-1; i >= 0; --i)
|
||||||
{
|
{
|
||||||
CInterfaceGroup *pIG = _ChildrenGroups[i];
|
CInterfaceGroup *pIG = _ChildrenGroups[i];
|
||||||
if (pIG->getActive())
|
if (pIG->getActive())
|
||||||
|
|
|
@ -69,7 +69,7 @@ public:
|
||||||
bool delElement (const std::string &id, bool noWarning=false);
|
bool delElement (const std::string &id, bool noWarning=false);
|
||||||
bool delElement (CInterfaceElement *pIE, bool noWarning=false);
|
bool delElement (CInterfaceElement *pIE, bool noWarning=false);
|
||||||
|
|
||||||
uint getNumGroup() const { return _ChildrenGroups.size(); }
|
uint getNumGroup() const { return (uint)_ChildrenGroups.size(); }
|
||||||
CInterfaceGroup *getGroup(uint index) const;
|
CInterfaceGroup *getGroup(uint index) const;
|
||||||
|
|
||||||
sint32 getMaxUsedW() const;
|
sint32 getMaxUsedW() const;
|
||||||
|
|
|
@ -89,7 +89,7 @@ public:
|
||||||
*/
|
*/
|
||||||
void removeTarget(CInterfaceElement *elem);
|
void removeTarget(CInterfaceElement *elem);
|
||||||
// Get the number of targets of this link
|
// Get the number of targets of this link
|
||||||
uint getNumTargets() const { return _Targets.size(); }
|
uint getNumTargets() const { return (uint)_Targets.size(); }
|
||||||
// Get the i-th target
|
// Get the i-th target
|
||||||
CInterfaceElement *getTarget(uint index) const { return _Targets[index]._InterfaceElement; }
|
CInterfaceElement *getTarget(uint index) const { return _Targets[index]._InterfaceElement; }
|
||||||
|
|
||||||
|
|
|
@ -2814,7 +2814,7 @@ bool CInterfaceManager::handleEvent (const CEventDescriptor& event)
|
||||||
{
|
{
|
||||||
// Take the top most control.
|
// Take the top most control.
|
||||||
uint nMaxDepth = 0;
|
uint nMaxDepth = 0;
|
||||||
for (sint32 i = _CtrlsUnderPointer.size()-1; i >= 0; i--)
|
for (sint32 i = (sint32)_CtrlsUnderPointer.size()-1; i >= 0; i--)
|
||||||
{
|
{
|
||||||
CCtrlBase *ctrl= _CtrlsUnderPointer[i];
|
CCtrlBase *ctrl= _CtrlsUnderPointer[i];
|
||||||
if (ctrl && ctrl->isCapturable() && isControlInWindow(ctrl, pNewCurrentWnd))
|
if (ctrl && ctrl->isCapturable() && isControlInWindow(ctrl, pNewCurrentWnd))
|
||||||
|
@ -2863,7 +2863,7 @@ bool CInterfaceManager::handleEvent (const CEventDescriptor& event)
|
||||||
// Take the top most control.
|
// Take the top most control.
|
||||||
{
|
{
|
||||||
uint nMaxDepth = 0;
|
uint nMaxDepth = 0;
|
||||||
for (sint32 i = _CtrlsUnderPointer.size()-1; i >= 0; i--)
|
for (sint32 i = (sint32)_CtrlsUnderPointer.size()-1; i >= 0; i--)
|
||||||
{
|
{
|
||||||
CCtrlBase *ctrl= _CtrlsUnderPointer[i];
|
CCtrlBase *ctrl= _CtrlsUnderPointer[i];
|
||||||
if (ctrl && ctrl->isCapturable() && isControlInWindow(ctrl, pNewCurrentWnd))
|
if (ctrl && ctrl->isCapturable() && isControlInWindow(ctrl, pNewCurrentWnd))
|
||||||
|
@ -3956,7 +3956,7 @@ uint CInterfaceManager::getProcedureNumActions(const std::string &procName) cons
|
||||||
if(it!=_ProcedureMap.end())
|
if(it!=_ProcedureMap.end())
|
||||||
{
|
{
|
||||||
const CProcedure &proc= it->second;
|
const CProcedure &proc= it->second;
|
||||||
return proc.Actions.size();
|
return (uint)proc.Actions.size();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -487,7 +487,7 @@ static void interfaceScriptAsMemStream(const std::string &script, CMemStream &de
|
||||||
}
|
}
|
||||||
destStream.seek(0, NLMISC::IStream::begin);
|
destStream.seek(0, NLMISC::IStream::begin);
|
||||||
if (script.empty()) return;
|
if (script.empty()) return;
|
||||||
destStream.serialBuffer(const_cast<uint8 *>((const uint8 *) &script[0]), script.size());
|
destStream.serialBuffer(const_cast<uint8 *>((const uint8 *) &script[0]), (uint)script.size());
|
||||||
destStream.invert();
|
destStream.invert();
|
||||||
destStream.seek(0, NLMISC::IStream::begin);
|
destStream.seek(0, NLMISC::IStream::begin);
|
||||||
}
|
}
|
||||||
|
@ -701,7 +701,7 @@ bool CInterfaceParser::parseXMLDocument(xmlNodePtr root, bool reload)
|
||||||
|
|
||||||
// Resize action category array
|
// Resize action category array
|
||||||
uint actionCategoryCount = CIXml::countChildren(curNode, "action_category");
|
uint actionCategoryCount = CIXml::countChildren(curNode, "action_category");
|
||||||
Actions.reserveCategories(Actions.getCategories ().size()+actionCategoryCount);
|
Actions.reserveCategories((uint)Actions.getCategories ().size()+actionCategoryCount);
|
||||||
EditActions.reserveCategories(1);
|
EditActions.reserveCategories(1);
|
||||||
|
|
||||||
while (curNode)
|
while (curNode)
|
||||||
|
@ -2625,7 +2625,7 @@ bool CInterfaceParser::solveDefine(const std::string &propVal, std::string &n
|
||||||
curPos++;
|
curPos++;
|
||||||
|
|
||||||
// get the id pos
|
// get the id pos
|
||||||
uint startIdPos= curPos;
|
uint startIdPos= (uint)curPos;
|
||||||
while( curPos<propVal.size() && validDefineChar(propVal[curPos]) )
|
while( curPos<propVal.size() && validDefineChar(propVal[curPos]) )
|
||||||
curPos++;
|
curPos++;
|
||||||
// get the id
|
// get the id
|
||||||
|
@ -2754,7 +2754,7 @@ void CInterfaceParser::CAction::buildBlocks (const std::string &in, std::vector
|
||||||
|
|
||||||
// get the id pos
|
// get the id pos
|
||||||
uint countNbDigit = 0;
|
uint countNbDigit = 0;
|
||||||
uint startIdPos= curPos;
|
uint startIdPos= (uint)curPos;
|
||||||
while (curPos<in.size() && in[curPos]>='0' && in[curPos]<='9')
|
while (curPos<in.size() && in[curPos]>='0' && in[curPos]<='9')
|
||||||
{
|
{
|
||||||
curPos++;
|
curPos++;
|
||||||
|
@ -2772,7 +2772,7 @@ void CInterfaceParser::CAction::buildBlocks (const std::string &in, std::vector
|
||||||
// There is some digit it is an argument
|
// There is some digit it is an argument
|
||||||
|
|
||||||
// copy the last not param sub string.
|
// copy the last not param sub string.
|
||||||
sint nbToCopy = curPos-countNbIdent-countNbDigit-lastPos;
|
sint nbToCopy = (sint)(curPos-countNbIdent-countNbDigit-lastPos);
|
||||||
if (nbToCopy > 0)
|
if (nbToCopy > 0)
|
||||||
lastString += in.substr(lastPos, nbToCopy);
|
lastString += in.substr(lastPos, nbToCopy);
|
||||||
|
|
||||||
|
|
|
@ -244,7 +244,7 @@ public:
|
||||||
CInterfaceGroup *createGroupInstance(const std::string &templateName, const std::string &parentID, std::vector<std::pair<std::string, std::string> > &templateParams, bool updateLinks = true)
|
CInterfaceGroup *createGroupInstance(const std::string &templateName, const std::string &parentID, std::vector<std::pair<std::string, std::string> > &templateParams, bool updateLinks = true)
|
||||||
{
|
{
|
||||||
if (templateParams.size() > 0)
|
if (templateParams.size() > 0)
|
||||||
return createGroupInstance(templateName, parentID, &templateParams[0], templateParams.size(), updateLinks);
|
return createGroupInstance(templateName, parentID, &templateParams[0], (uint)templateParams.size(), updateLinks);
|
||||||
else
|
else
|
||||||
return createGroupInstance(templateName, parentID, NULL, 0, updateLinks);
|
return createGroupInstance(templateName, parentID, NULL, 0, updateLinks);
|
||||||
}
|
}
|
||||||
|
@ -258,7 +258,7 @@ public:
|
||||||
CInterfaceElement *createUIElement(const std::string &templateName, const std::string &parentID, std::vector<std::pair<std::string, std::string> > &templateParams, bool updateLinks = true)
|
CInterfaceElement *createUIElement(const std::string &templateName, const std::string &parentID, std::vector<std::pair<std::string, std::string> > &templateParams, bool updateLinks = true)
|
||||||
{
|
{
|
||||||
if (templateParams.size() > 0)
|
if (templateParams.size() > 0)
|
||||||
return createUIElement(templateName, parentID, &templateParams[0], templateParams.size(), updateLinks);
|
return createUIElement(templateName, parentID, &templateParams[0], (uint)templateParams.size(), updateLinks);
|
||||||
else
|
else
|
||||||
return createUIElement(templateName, parentID, NULL, 0, updateLinks);
|
return createUIElement(templateName, parentID, NULL, 0, updateLinks);
|
||||||
}
|
}
|
||||||
|
|
|
@ -113,7 +113,7 @@ ucstring CItemSpecialEffectHelper::getEffect(const std::string &effect, bool &fi
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check number of arguments
|
// Check number of arguments
|
||||||
uint n = (effectMap[name]).size();
|
uint n = (uint)(effectMap[name]).size();
|
||||||
if (params.size() != n)
|
if (params.size() != n)
|
||||||
{
|
{
|
||||||
nlinfo("Bad arguments for : %s", effect.c_str());
|
nlinfo("Bad arguments for : %s", effect.c_str());
|
||||||
|
|
|
@ -434,7 +434,7 @@ PRIVATE int HTNeLReader_read (HTInputStream * me)
|
||||||
/* Read the file desriptor */
|
/* Read the file desriptor */
|
||||||
while (fp)
|
while (fp)
|
||||||
{
|
{
|
||||||
if ((me->b_read = nel_fread(me->data, FILE_BUFFER_SIZE, fp)) == 0)
|
if ((me->b_read = (int)nel_fread(me->data, FILE_BUFFER_SIZE, fp)) == 0)
|
||||||
{
|
{
|
||||||
HTAlertCallback *cbf = HTAlert_find(HT_PROG_DONE);
|
HTAlertCallback *cbf = HTAlert_find(HT_PROG_DONE);
|
||||||
// HTTRACE(PROT_TRACE, "ANSI read... Finished loading file %p\n" _ fp);
|
// HTTRACE(PROT_TRACE, "ANSI read... Finished loading file %p\n" _ fp);
|
||||||
|
@ -509,7 +509,7 @@ PRIVATE int HTNeLReader_close (HTInputStream * me)
|
||||||
PUBLIC int HTNeLReader_consumed (HTInputStream * me, size_t bytes)
|
PUBLIC int HTNeLReader_consumed (HTInputStream * me, size_t bytes)
|
||||||
{
|
{
|
||||||
me->write += bytes;
|
me->write += bytes;
|
||||||
me->b_read -= bytes;
|
me->b_read -= (int)bytes;
|
||||||
HTHost_setRemainingRead(me->host, me->b_read);
|
HTHost_setRemainingRead(me->host, me->b_read);
|
||||||
return HT_OK;
|
return HT_OK;
|
||||||
}
|
}
|
||||||
|
|
|
@ -411,7 +411,7 @@ bool CLuaState::executeFile(const std::string &pathName)
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
script.resize(CFile::getFileSize(pathName));
|
script.resize(CFile::getFileSize(pathName));
|
||||||
inputFile.serialBuffer((uint8 *) &script[0], script.size());
|
inputFile.serialBuffer((uint8 *) &script[0], (uint)script.size());
|
||||||
|
|
||||||
|
|
||||||
// execute the script text, with dbgSrc==filename (use @ for lua internal purpose)
|
// execute the script text, with dbgSrc==filename (use @ for lua internal purpose)
|
||||||
|
|
|
@ -3205,7 +3205,7 @@ int CLuaIHM::tableToString(CLuaState &ls)
|
||||||
while (ls.next(-2))
|
while (ls.next(-2))
|
||||||
{
|
{
|
||||||
ls.toString(-1);
|
ls.toString(-1);
|
||||||
length += ls.strlen(-1);
|
length += (uint)ls.strlen(-1);
|
||||||
ls.pop(2);
|
ls.pop(2);
|
||||||
}
|
}
|
||||||
std::string result;
|
std::string result;
|
||||||
|
@ -3215,7 +3215,7 @@ int CLuaIHM::tableToString(CLuaState &ls)
|
||||||
ls.pushNil();
|
ls.pushNil();
|
||||||
while (ls.next(-2))
|
while (ls.next(-2))
|
||||||
{
|
{
|
||||||
uint length = ls.strlen(-1);
|
uint length = (uint)ls.strlen(-1);
|
||||||
if (length)
|
if (length)
|
||||||
{
|
{
|
||||||
memcpy(dest, ls.toString(-1), length);
|
memcpy(dest, ls.toString(-1), length);
|
||||||
|
@ -3658,7 +3658,7 @@ void CLuaIHM::sortGuildMembers()
|
||||||
sint32 CLuaIHM::getNbGuildMembers()
|
sint32 CLuaIHM::getNbGuildMembers()
|
||||||
{
|
{
|
||||||
//H_AUTO(Lua_CLuaIHM_getNbGuildMembers)
|
//H_AUTO(Lua_CLuaIHM_getNbGuildMembers)
|
||||||
return CGuildManager::getInstance()->getGuildMembers().size();
|
return (sint32)CGuildManager::getInstance()->getGuildMembers().size();
|
||||||
}
|
}
|
||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
|
|
|
@ -83,7 +83,7 @@ void addKeyLine (CGroupList *pParent, const ucstring &keyName, const ucstring &s
|
||||||
{
|
{
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
CMacroCmdManager *pMCM = CMacroCmdManager::getInstance();
|
CMacroCmdManager *pMCM = CMacroCmdManager::getInstance();
|
||||||
uint lineId= pMCM->NewKey->AllLines.size();
|
uint lineId= (uint)pMCM->NewKey->AllLines.size();
|
||||||
string templateId = pParent->getId() + ":k" + NLMISC::toString(lineId);
|
string templateId = pParent->getId() + ":k" + NLMISC::toString(lineId);
|
||||||
vector< pair<string, string> > vParams;
|
vector< pair<string, string> > vParams;
|
||||||
vParams.push_back(make_pair(string("id"), templateId));
|
vParams.push_back(make_pair(string("id"), templateId));
|
||||||
|
|
|
@ -452,7 +452,7 @@ void CHugeListObs::update(ICDBNode * /* node */)
|
||||||
// In the display we want a contiguous set of items. Not For Trading, because of Resale
|
// In the display we want a contiguous set of items. Not For Trading, because of Resale
|
||||||
if(_Category==Trading)
|
if(_Category==Trading)
|
||||||
{
|
{
|
||||||
numLoadedPages= itemPages->size();
|
numLoadedPages= (uint)itemPages->size();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -307,7 +307,7 @@ sint CPeopleList::addPeople(const ucstring &name, uint teamMateIndex /*= 0*/)
|
||||||
_Peoples.push_back(CPeople());
|
_Peoples.push_back(CPeople());
|
||||||
_Peoples.back().Container = gc;
|
_Peoples.back().Container = gc;
|
||||||
_Peoples.back().GlobalID = _CurrPeopleID;
|
_Peoples.back().GlobalID = _CurrPeopleID;
|
||||||
updatePeopleMenu(_Peoples.size() - 1);
|
updatePeopleMenu((uint)_Peoples.size() - 1);
|
||||||
|
|
||||||
++_CurrPeopleID;
|
++_CurrPeopleID;
|
||||||
|
|
||||||
|
|
|
@ -76,7 +76,7 @@ public:
|
||||||
// Get index from the id of the container that represent the people
|
// Get index from the id of the container that represent the people
|
||||||
sint getIndexFromContainerID(const std::string &id) const;
|
sint getIndexFromContainerID(const std::string &id) const;
|
||||||
// Get the number of people in this list
|
// Get the number of people in this list
|
||||||
uint getNumPeople() const { return _Peoples.size(); }
|
uint getNumPeople() const { return (uint)_Peoples.size(); }
|
||||||
// Get name of a people
|
// Get name of a people
|
||||||
ucstring getName(uint index) const;
|
ucstring getName(uint index) const;
|
||||||
// Sort people alphabetically
|
// Sort people alphabetically
|
||||||
|
|
|
@ -281,7 +281,7 @@ sint32 CSBrickManager::CBrickContainer::getNumParameters(NLMISC::CSheetId id) c
|
||||||
CSBrickSheet *brick= pBM->getBrick(id);
|
CSBrickSheet *brick= pBM->getBrick(id);
|
||||||
if(brick)
|
if(brick)
|
||||||
{
|
{
|
||||||
return brick->ParameterFamilies.size();
|
return (sint32)brick->ParameterFamilies.size();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -449,7 +449,7 @@ void CSBrickManager::compileBrickProperties()
|
||||||
textTemp.erase();
|
textTemp.erase();
|
||||||
|
|
||||||
// Parse the text
|
// Parse the text
|
||||||
uint textSize= text.size();
|
uint textSize= (uint)text.size();
|
||||||
for(uint j=0;j<textSize;)
|
for(uint j=0;j<textSize;)
|
||||||
{
|
{
|
||||||
// Property parsing?
|
// Property parsing?
|
||||||
|
|
|
@ -967,7 +967,7 @@ void CSkillManager::tryToUnblockTitleFromItems()
|
||||||
// if (_TitlesUnblocked[i].UnblockedItemLists[j]) // Not already unblocked
|
// if (_TitlesUnblocked[i].UnblockedItemLists[j]) // Not already unblocked
|
||||||
// continue;
|
// continue;
|
||||||
|
|
||||||
uint numItemsFromListToValidate = rTU.ItemsNeeded[j].size();
|
uint numItemsFromListToValidate = (uint)rTU.ItemsNeeded[j].size();
|
||||||
|
|
||||||
for (uint k = 0; k < rTU.ItemsNeeded[j].size(); ++k) // for all items in current item list
|
for (uint k = 0; k < rTU.ItemsNeeded[j].size(); ++k) // for all items in current item list
|
||||||
{
|
{
|
||||||
|
|
|
@ -163,7 +163,7 @@ public:
|
||||||
const CSPhraseCom &getPhrase(uint32 slot) const;
|
const CSPhraseCom &getPhrase(uint32 slot) const;
|
||||||
|
|
||||||
/// get the number of memory lines.
|
/// get the number of memory lines.
|
||||||
uint32 getNbMemoryLines() const { return _Memories.size(); }
|
uint32 getNbMemoryLines() const { return (uint32)_Memories.size(); }
|
||||||
|
|
||||||
/** Allocate a Free Slot (for NEW phrase setup). 0 is not a free slot
|
/** Allocate a Free Slot (for NEW phrase setup). 0 is not a free slot
|
||||||
* NB: the slot is not still correctly filled(), and getPhrase() will return Empty. use setPhrase() just after
|
* NB: the slot is not still correctly filled(), and getPhrase() will return Empty. use setPhrase() just after
|
||||||
|
|
|
@ -49,7 +49,7 @@ public:
|
||||||
virtual void updateCoords() { CInterfaceElement::updateCoords(); }
|
virtual void updateCoords() { CInterfaceElement::updateCoords(); }
|
||||||
|
|
||||||
/// Debug
|
/// Debug
|
||||||
virtual uint32 getMemory() { return sizeof(*this)+_Id.size(); }
|
virtual uint32 getMemory() { return (uint32)(sizeof(*this)+_Id.size()); }
|
||||||
|
|
||||||
/// Reflection
|
/// Reflection
|
||||||
virtual sint32 getAlpha() const { return -1; } // Not obliged to implement this
|
virtual sint32 getAlpha() const { return -1; } // Not obliged to implement this
|
||||||
|
|
|
@ -63,7 +63,7 @@ public:
|
||||||
* \return true if success
|
* \return true if success
|
||||||
*/
|
*/
|
||||||
bool parse(xmlNodePtr cur,CInterfaceGroup * parentGroup);
|
bool parse(xmlNodePtr cur,CInterfaceGroup * parentGroup);
|
||||||
virtual uint32 getMemory() { return sizeof(*this)+_Id.size(); }
|
virtual uint32 getMemory() { return (uint32)(sizeof(*this)+_Id.size()); }
|
||||||
|
|
||||||
virtual void updateCoords ();
|
virtual void updateCoords ();
|
||||||
|
|
||||||
|
|
|
@ -111,7 +111,7 @@ public:
|
||||||
* \return true if success
|
* \return true if success
|
||||||
*/
|
*/
|
||||||
bool parse(xmlNodePtr cur,CInterfaceGroup * parentGroup);
|
bool parse(xmlNodePtr cur,CInterfaceGroup * parentGroup);
|
||||||
virtual uint32 getMemory() { return sizeof(*this)+_Id.size(); }
|
virtual uint32 getMemory() { return (uint32)(sizeof(*this)+_Id.size()); }
|
||||||
/**
|
/**
|
||||||
* draw the view
|
* draw the view
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -47,8 +47,8 @@ public:
|
||||||
* \return true if success
|
* \return true if success
|
||||||
*/
|
*/
|
||||||
bool parse(xmlNodePtr cur,CInterfaceGroup * parentGroup);
|
bool parse(xmlNodePtr cur,CInterfaceGroup * parentGroup);
|
||||||
virtual uint32 getMemory() { return sizeof(*this) + _Id.size() + _AccIconBackString.size() +
|
virtual uint32 getMemory() { return (uint32)(sizeof(*this) + _Id.size() + _AccIconBackString.size() +
|
||||||
_AccIconMainString.size() + _AccIconOverString.size() + _TextureNoItemName.size(); }
|
_AccIconMainString.size() + _AccIconOverString.size() + _TextureNoItemName.size()); }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* draw the view
|
* draw the view
|
||||||
|
|
|
@ -81,7 +81,7 @@ void CViewPolygon::draw()
|
||||||
if (_Touched)
|
if (_Touched)
|
||||||
{
|
{
|
||||||
_RealTris.clear();
|
_RealTris.clear();
|
||||||
uint numTris = _Tris.size();
|
uint numTris = (uint)_Tris.size();
|
||||||
sint32 cornerX, cornerY;
|
sint32 cornerX, cornerY;
|
||||||
static std::vector<NLMISC::CTriangle> winTris;
|
static std::vector<NLMISC::CTriangle> winTris;
|
||||||
winTris.resize(numTris);
|
winTris.resize(numTris);
|
||||||
|
|
|
@ -35,7 +35,7 @@ class CViewPolygon : public CViewBase
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CViewPolygon();
|
CViewPolygon();
|
||||||
virtual uint32 getMemory() { return sizeof(*this)+_Id.size(); }
|
virtual uint32 getMemory() { return (uint32)(sizeof(*this)+_Id.size()); }
|
||||||
virtual void updateCoords();
|
virtual void updateCoords();
|
||||||
virtual void draw();
|
virtual void draw();
|
||||||
void setVertices(const std::vector<NLMISC::CVector> &vertices);
|
void setVertices(const std::vector<NLMISC::CVector> &vertices);
|
||||||
|
|
|
@ -42,7 +42,7 @@ public:
|
||||||
bool parse(xmlNodePtr cur,CInterfaceGroup *parentGroup);
|
bool parse(xmlNodePtr cur,CInterfaceGroup *parentGroup);
|
||||||
virtual void updateCoords();
|
virtual void updateCoords();
|
||||||
virtual void draw();
|
virtual void draw();
|
||||||
virtual uint32 getMemory() { return sizeof(*this)+_Id.size(); }
|
virtual uint32 getMemory() { return (uint32)(sizeof(*this)+_Id.size()); }
|
||||||
|
|
||||||
// from CViewBase
|
// from CViewBase
|
||||||
virtual sint32 getAlpha() const { return (sint32) _Color.A; }
|
virtual sint32 getAlpha() const { return (sint32) _Color.A; }
|
||||||
|
|
|
@ -664,7 +664,7 @@ void CViewRenderer::drawUnclippedTriangles(sint layerId, const std::vector<NLMIS
|
||||||
layerId+= VR_BIAS_LAYER;
|
layerId+= VR_BIAS_LAYER;
|
||||||
nlassert(layerId>=0 && layerId<VR_NUM_LAYER);
|
nlassert(layerId>=0 && layerId<VR_NUM_LAYER);
|
||||||
CLayer &layer = _BlankGlobalTexture->Layers[layerId];
|
CLayer &layer = _BlankGlobalTexture->Layers[layerId];
|
||||||
uint startCount = layer.FilteredAlphaBlendedTris.size();
|
uint startCount = (uint)layer.FilteredAlphaBlendedTris.size();
|
||||||
layer.FilteredAlphaBlendedTris.resize(startCount + tris.size());
|
layer.FilteredAlphaBlendedTris.resize(startCount + tris.size());
|
||||||
const NLMISC::CTriangle *src =&tris[0];
|
const NLMISC::CTriangle *src =&tris[0];
|
||||||
const NLMISC::CTriangle *last = src + tris.size();
|
const NLMISC::CTriangle *last = src + tris.size();
|
||||||
|
@ -1167,7 +1167,7 @@ void CViewRenderer::flush ()
|
||||||
// alpha blended
|
// alpha blended
|
||||||
if (!layer.FilteredAlphaBlendedQuads.empty())
|
if (!layer.FilteredAlphaBlendedQuads.empty())
|
||||||
{
|
{
|
||||||
Driver->drawQuads (&(layer.FilteredAlphaBlendedQuads[0]), layer.FilteredAlphaBlendedQuads.size(), _Material);
|
Driver->drawQuads (&(layer.FilteredAlphaBlendedQuads[0]), (uint32)layer.FilteredAlphaBlendedQuads.size(), _Material);
|
||||||
layer.FilteredAlphaBlendedQuads.clear();
|
layer.FilteredAlphaBlendedQuads.clear();
|
||||||
}
|
}
|
||||||
if (!layer.FilteredAlphaBlendedTris.empty())
|
if (!layer.FilteredAlphaBlendedTris.empty())
|
||||||
|
@ -1182,7 +1182,7 @@ void CViewRenderer::flush ()
|
||||||
_Material.setBlendFunc (NL3D::UMaterial::one, NL3D::UMaterial::one);
|
_Material.setBlendFunc (NL3D::UMaterial::one, NL3D::UMaterial::one);
|
||||||
if (!layer.FilteredAdditifQuads.empty())
|
if (!layer.FilteredAdditifQuads.empty())
|
||||||
{
|
{
|
||||||
Driver->drawQuads (&(layer.FilteredAdditifQuads[0]), layer.FilteredAdditifQuads.size(), _Material);
|
Driver->drawQuads (&(layer.FilteredAdditifQuads[0]), (uint32)layer.FilteredAdditifQuads.size(), _Material);
|
||||||
layer.FilteredAdditifQuads.clear();
|
layer.FilteredAdditifQuads.clear();
|
||||||
}
|
}
|
||||||
if (!layer.FilteredAdditifTris.empty())
|
if (!layer.FilteredAdditifTris.empty())
|
||||||
|
|
|
@ -500,14 +500,14 @@ void CViewText::draw ()
|
||||||
}
|
}
|
||||||
|
|
||||||
// next word
|
// next word
|
||||||
charIndex+= currWord.Text.length();
|
charIndex+= (sint)currWord.Text.length();
|
||||||
}
|
}
|
||||||
charIndex += currLine.getEndSpaces() + (currLine.getLF() ? 1 : 0);
|
charIndex += currLine.getEndSpaces() + (currLine.getLF() ? 1 : 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// draw
|
// draw
|
||||||
for (sint i = _Lines.size()-1; i >= 0; --i)
|
for (sint i = (sint)_Lines.size()-1; i >= 0; --i)
|
||||||
{
|
{
|
||||||
CLine &currLine = *_Lines[i];
|
CLine &currLine = *_Lines[i];
|
||||||
// current x position
|
// current x position
|
||||||
|
@ -848,7 +848,7 @@ void CViewText::updateTextContextMultiLine(uint nMaxWidth)
|
||||||
float rWidthCurrentLine = 0, rWidthLetter;
|
float rWidthCurrentLine = 0, rWidthLetter;
|
||||||
bool linePushed= false;
|
bool linePushed= false;
|
||||||
// for all the text
|
// for all the text
|
||||||
uint textSize= _Text.size();
|
uint textSize= (uint)_Text.size();
|
||||||
uint formatTagIndex= 0;
|
uint formatTagIndex= 0;
|
||||||
for (i = 0; i < textSize; ++i)
|
for (i = 0; i < textSize; ++i)
|
||||||
{
|
{
|
||||||
|
@ -1019,14 +1019,14 @@ void CViewText::updateTextContextMultiLineJustified(uint nMaxWidth, bool expandS
|
||||||
}
|
}
|
||||||
|
|
||||||
// Detect change of wordFormat at the begining of the word
|
// Detect change of wordFormat at the begining of the word
|
||||||
if(isFormatTagChange(spaceEnd, formatTagIndex))
|
if(isFormatTagChange((uint)spaceEnd, formatTagIndex))
|
||||||
{
|
{
|
||||||
getFormatTagChange(spaceEnd, formatTagIndex, wordFormat);
|
getFormatTagChange((uint)spaceEnd, formatTagIndex, wordFormat);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get word until a space, a \n, or a FormatTagChange is encountered
|
// Get word until a space, a \n, or a FormatTagChange is encountered
|
||||||
uint i;
|
uint i;
|
||||||
for(i= spaceEnd;i<_Text.length();i++)
|
for(i= (uint)spaceEnd;i<(uint)_Text.length();i++)
|
||||||
{
|
{
|
||||||
ucchar c= _Text[i];
|
ucchar c= _Text[i];
|
||||||
if(c==' ' || c=='\n')
|
if(c==' ' || c=='\n')
|
||||||
|
@ -1364,7 +1364,7 @@ void CViewText::updateTextContext ()
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
for (sint i = _Text.size() - 1; i >= 0; --i)
|
for (sint i = (sint)_Text.size() - 1; i >= 0; --i)
|
||||||
{
|
{
|
||||||
ucLetter= _Text[i];
|
ucLetter= _Text[i];
|
||||||
ucstring ucStrLetter;
|
ucstring ucStrLetter;
|
||||||
|
@ -1465,7 +1465,7 @@ sint CViewText::getLineFromIndex(uint index, bool cursorDisplayedAtEndOfPrevious
|
||||||
}
|
}
|
||||||
charIndex = newCharIndex;
|
charIndex = newCharIndex;
|
||||||
}
|
}
|
||||||
return _Lines.size() - 1;
|
return (sint)_Lines.size() - 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1629,7 +1629,7 @@ void CViewText::getCharacterPositionFromIndex(sint index, bool cursorAtPreviousL
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
charIndex += currWord.Text.length() + currWord.NumSpaces;
|
charIndex += (uint)currWord.Text.length() + currWord.NumSpaces;
|
||||||
px += currWord.NumSpaces * currLine.getSpaceWidth() + currWord.Info.StringWidth;
|
px += currWord.NumSpaces * currLine.getSpaceWidth() + currWord.Info.StringWidth;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1690,12 +1690,12 @@ void CViewText::getCharacterIndexFromPosition(sint x, sint y, uint &index, bool
|
||||||
float py = 0.f;
|
float py = 0.f;
|
||||||
if (py > y)
|
if (py > y)
|
||||||
{
|
{
|
||||||
index = _Text.length();
|
index = (uint)_Text.length();
|
||||||
cursorAtPreviousLineEnd = false;
|
cursorAtPreviousLineEnd = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
sint line;
|
sint line;
|
||||||
for (line = _Lines.size() - 1; line >= 0; --line)
|
for (line = (uint)_Lines.size() - 1; line >= 0; --line)
|
||||||
{
|
{
|
||||||
float newPy = py + _FontHeight + _MultiLineSpace;
|
float newPy = py + _FontHeight + _MultiLineSpace;
|
||||||
if (newPy > y)
|
if (newPy > y)
|
||||||
|
@ -1758,7 +1758,7 @@ void CViewText::getCharacterIndexFromPosition(sint x, sint y, uint &index, bool
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
px = newPx;
|
px = newPx;
|
||||||
charPos += currWord.Text.length() + currWord.NumSpaces;
|
charPos += (uint)currWord.Text.length() + currWord.NumSpaces;
|
||||||
}
|
}
|
||||||
index = charPos;
|
index = charPos;
|
||||||
cursorAtPreviousLineEnd = false;
|
cursorAtPreviousLineEnd = false;
|
||||||
|
@ -1769,7 +1769,7 @@ void CViewText::getCharacterIndexFromPosition(sint x, sint y, uint &index, bool
|
||||||
cursorAtPreviousLineEnd = false;
|
cursorAtPreviousLineEnd = false;
|
||||||
if (y < 0)
|
if (y < 0)
|
||||||
{
|
{
|
||||||
index = _Text.length();
|
index = (uint)_Text.length();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (y > (sint) _FontHeight)
|
if (y > (sint) _FontHeight)
|
||||||
|
@ -1833,7 +1833,7 @@ uint CViewText::getNumLine() const
|
||||||
{
|
{
|
||||||
if (_MultiLine)
|
if (_MultiLine)
|
||||||
{
|
{
|
||||||
return _Lines.size();
|
return (uint)_Lines.size();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1935,7 +1935,7 @@ void CViewText::CWord::build(const ucstring &text, uint numSpaces/*=0*/)
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
void CViewText::removeEndSpaces()
|
void CViewText::removeEndSpaces()
|
||||||
{
|
{
|
||||||
int i = _Text.size()-1;
|
int i = (int)_Text.size()-1;
|
||||||
while ((i>=0) && ((_Text[i] < 0x20) || (_Text[i] == ' ')))
|
while ((i>=0) && ((_Text[i] < 0x20) || (_Text[i] == ' ')))
|
||||||
{
|
{
|
||||||
i--;
|
i--;
|
||||||
|
@ -2252,7 +2252,7 @@ void CViewText::buildFormatTagText(const ucstring &text, ucstring &textBuild, s
|
||||||
|
|
||||||
// Build the text without the formatTags, and get the color tags separately
|
// Build the text without the formatTags, and get the color tags separately
|
||||||
textBuild.reserve(text.size());
|
textBuild.reserve(text.size());
|
||||||
uint textSize= text.size();
|
uint textSize= (uint)text.size();
|
||||||
// Must herit all the props from old tags.
|
// Must herit all the props from old tags.
|
||||||
CViewText::CFormatTag precTag; // set default.
|
CViewText::CFormatTag precTag; // set default.
|
||||||
for (uint i = 0; i < textSize;)
|
for (uint i = 0; i < textSize;)
|
||||||
|
@ -2263,7 +2263,7 @@ void CViewText::buildFormatTagText(const ucstring &text, ucstring &textBuild, s
|
||||||
CViewText::CFormatTag ct= precTag;
|
CViewText::CFormatTag ct= precTag;
|
||||||
// get new color and skip tag.
|
// get new color and skip tag.
|
||||||
ct.Color= getColorTag(text, i);
|
ct.Color= getColorTag(text, i);
|
||||||
ct.Index= textBuild.size();
|
ct.Index= (uint)textBuild.size();
|
||||||
formatTags.push_back(ct);
|
formatTags.push_back(ct);
|
||||||
}
|
}
|
||||||
else if(isTabTag(text, i, textSize))
|
else if(isTabTag(text, i, textSize))
|
||||||
|
@ -2272,7 +2272,7 @@ void CViewText::buildFormatTagText(const ucstring &text, ucstring &textBuild, s
|
||||||
CViewText::CFormatTag ct= precTag;
|
CViewText::CFormatTag ct= precTag;
|
||||||
// get new Tab and skip tag.
|
// get new Tab and skip tag.
|
||||||
ct.TabX= getTabTag(text, i);
|
ct.TabX= getTabTag(text, i);
|
||||||
ct.Index= textBuild.size();
|
ct.Index= (uint)textBuild.size();
|
||||||
formatTags.push_back(ct);
|
formatTags.push_back(ct);
|
||||||
}
|
}
|
||||||
else if(isTooltipTag(text, i, textSize))
|
else if(isTooltipTag(text, i, textSize))
|
||||||
|
@ -2287,11 +2287,11 @@ void CViewText::buildFormatTagText(const ucstring &text, ucstring &textBuild, s
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ct.IndexTt= tooltips.size();
|
ct.IndexTt= (uint)tooltips.size();
|
||||||
tooltips.push_back(uitt);
|
tooltips.push_back(uitt);
|
||||||
}
|
}
|
||||||
|
|
||||||
ct.Index= textBuild.size();
|
ct.Index= (uint)textBuild.size();
|
||||||
formatTags.push_back(ct);
|
formatTags.push_back(ct);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -2307,7 +2307,7 @@ void CViewText::buildFormatTagText(const ucstring &text, ucstring &textBuild, s
|
||||||
{
|
{
|
||||||
CViewText::CFormatTag ct= precTag;
|
CViewText::CFormatTag ct= precTag;
|
||||||
ct.TabX= 0;
|
ct.TabX= 0;
|
||||||
ct.Index= textBuild.size();
|
ct.Index= (uint)textBuild.size();
|
||||||
formatTags.push_back(ct);
|
formatTags.push_back(ct);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,7 +54,7 @@ public:
|
||||||
|
|
||||||
void parseTextOptions (xmlNodePtr cur);
|
void parseTextOptions (xmlNodePtr cur);
|
||||||
bool parse (xmlNodePtr cur, CInterfaceGroup * parentGroup);
|
bool parse (xmlNodePtr cur, CInterfaceGroup * parentGroup);
|
||||||
virtual uint32 getMemory() { return sizeof(*this)+_Id.size(); }
|
virtual uint32 getMemory() { return (uint32)(sizeof(*this)+_Id.size()); }
|
||||||
|
|
||||||
/// Updating
|
/// Updating
|
||||||
virtual void draw ();
|
virtual void draw ();
|
||||||
|
@ -308,7 +308,7 @@ private:
|
||||||
// Add a new word (and its context) in the line + a number of spaces to append at the end of the line
|
// Add a new word (and its context) in the line + a number of spaces to append at the end of the line
|
||||||
void addWord(const ucstring &word, uint numSpaces, const CFormatInfo &wordFormat, uint fontWidth);
|
void addWord(const ucstring &word, uint numSpaces, const CFormatInfo &wordFormat, uint fontWidth);
|
||||||
void addWord(const CWord &word, uint fontWidth);
|
void addWord(const CWord &word, uint fontWidth);
|
||||||
uint getNumWords() const { return _Words.size(); }
|
uint getNumWords() const { return (uint)_Words.size(); }
|
||||||
CWord &getWord(uint index) { return _Words[index]; }
|
CWord &getWord(uint index) { return _Words[index]; }
|
||||||
float getSpaceWidth() const { return _SpaceWidth; }
|
float getSpaceWidth() const { return _SpaceWidth; }
|
||||||
void setSpaceWidth(float width) { _SpaceWidth = width; }
|
void setSpaceWidth(float width) { _SpaceWidth = width; }
|
||||||
|
|
|
@ -250,7 +250,7 @@ void CYuboChat::sendInternal(const ucstring &msg)
|
||||||
}
|
}
|
||||||
// append linefield
|
// append linefield
|
||||||
toSend+= "\r\n";
|
toSend+= "\r\n";
|
||||||
uint32 size= toSend.size();
|
uint32 size= (uint32)toSend.size();
|
||||||
uint32 off= 0;
|
uint32 off= 0;
|
||||||
// until the whole message is sent
|
// until the whole message is sent
|
||||||
while(size!=0)
|
while(size!=0)
|
||||||
|
@ -262,7 +262,7 @@ void CYuboChat::sendInternal(const ucstring &msg)
|
||||||
}
|
}
|
||||||
// maybe send the rest of the message (very rare....)
|
// maybe send the rest of the message (very rare....)
|
||||||
off+=size;
|
off+=size;
|
||||||
size= toSend.size()-off;
|
size= (uint32)toSend.size()-off;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch(Exception &e)
|
catch(Exception &e)
|
||||||
|
|
|
@ -113,7 +113,7 @@ void CLandscapePolyDrawer::addPoly(const NLMISC::CPolygon2D &poly,
|
||||||
_PolyColor.push_back(color);
|
_PolyColor.push_back(color);
|
||||||
_BBoxes.push_back(bBox);
|
_BBoxes.push_back(bBox);
|
||||||
|
|
||||||
buildShadowVolume(_Polygons.size());
|
buildShadowVolume((uint)_Polygons.size());
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------------------------------------
|
||||||
|
@ -381,7 +381,7 @@ void CLandscapePolyDrawer::buildShadowVolume(uint poly)
|
||||||
CIndexBuffer ib;
|
CIndexBuffer ib;
|
||||||
CVector2f barycenter(0, 0);
|
CVector2f barycenter(0, 0);
|
||||||
const CPolygon2D & polygon = _Polygons[poly-1];
|
const CPolygon2D & polygon = _Polygons[poly-1];
|
||||||
uint verticesNb = polygon.Vertices.size();
|
uint verticesNb = (uint)polygon.Vertices.size();
|
||||||
|
|
||||||
// barycenter polygon
|
// barycenter polygon
|
||||||
for(i=0; i<verticesNb; i++)
|
for(i=0; i<verticesNb; i++)
|
||||||
|
@ -482,7 +482,7 @@ void CLandscapePolyDrawer::drawShadowVolume(uint poly, bool firstPass)
|
||||||
CVertexBuffer & vb = _PolyVB[poly-1];
|
CVertexBuffer & vb = _PolyVB[poly-1];
|
||||||
const CPolygon2D & polygon = _Polygons[poly-1];
|
const CPolygon2D & polygon = _Polygons[poly-1];
|
||||||
const CVector2f & barycenter = _Barycenters[poly-1];
|
const CVector2f & barycenter = _Barycenters[poly-1];
|
||||||
uint verticesNb = polygon.Vertices.size();
|
uint verticesNb = (uint)polygon.Vertices.size();
|
||||||
|
|
||||||
uint i;
|
uint i;
|
||||||
CVector2f vertex;
|
CVector2f vertex;
|
||||||
|
@ -534,7 +534,7 @@ void CLandscapePolyDrawer::drawShadowVolume(uint poly, bool firstPass)
|
||||||
((CDriverUser*)Driver)->getDriver()->activeVertexBuffer(_PolyVB[poly-1]);
|
((CDriverUser*)Driver)->getDriver()->activeVertexBuffer(_PolyVB[poly-1]);
|
||||||
((CDriverUser*)Driver)->getDriver()->activeIndexBuffer(_PolyIB[poly-1]);
|
((CDriverUser*)Driver)->getDriver()->activeIndexBuffer(_PolyIB[poly-1]);
|
||||||
((CDriverUser*)Driver)->getDriver()->renderTriangles(
|
((CDriverUser*)Driver)->getDriver()->renderTriangles(
|
||||||
*GenericMat.getObjectPtr(), 0, 4*_Polygons[poly-1].Vertices.size());
|
*GenericMat.getObjectPtr(), 0, 4*(uint32)_Polygons[poly-1].Vertices.size());
|
||||||
|
|
||||||
if(!firstPass)
|
if(!firstPass)
|
||||||
{
|
{
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue