mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-12-25 18:10:54 +00:00
Changed: #825 Remove all warnings when compiling Ryzom (patch provided by abelgar)
This commit is contained in:
parent
98c24e3a40
commit
c0c147af4e
33 changed files with 142 additions and 104 deletions
|
@ -194,7 +194,7 @@ bool buildLMConts(const std::string &worldSheet, const std::string &primitivesPa
|
||||||
|
|
||||||
|
|
||||||
// get alias and region name
|
// get alias and region name
|
||||||
uint32 alias;
|
uint32 alias = 0;
|
||||||
string primName, primAlias;
|
string primName, primAlias;
|
||||||
vGenRes[i]->getPropertyByName("name", primName);
|
vGenRes[i]->getPropertyByName("name", primName);
|
||||||
|
|
||||||
|
|
|
@ -2130,8 +2130,8 @@ public:
|
||||||
{
|
{
|
||||||
uint8 *linePtr = lineBuffer;
|
uint8 *linePtr = lineBuffer;
|
||||||
uint8 *linePtrHM = lineBufferHM;
|
uint8 *linePtrHM = lineBufferHM;
|
||||||
uint8 pointBuffer;
|
uint8 pointBuffer = 0;
|
||||||
uint8 pointBufferHM;
|
uint8 pointBufferHM = 0;
|
||||||
|
|
||||||
CMapPosition pos(scanpos);
|
CMapPosition pos(scanpos);
|
||||||
|
|
||||||
|
|
|
@ -241,12 +241,12 @@ public:
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
inline CCellTblIteratorLinear():
|
inline CCellTblIteratorLinear():
|
||||||
_matrix(NULL), _tbl(NULL), _x(0), _y(0), _runLengthRemaining(0)
|
_x(0), _y(0), _matrix(NULL), _tbl(NULL), _runLengthRemaining(0)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
inline CCellTblIteratorLinear(const CAIEntityMatrix<T> *matrix,const CAIEntityMatrixIteratorTblLinear *tbl,const CAIVector &pos):
|
inline CCellTblIteratorLinear(const CAIEntityMatrix<T> *matrix,const CAIEntityMatrixIteratorTblLinear *tbl,const CAIVector &pos):
|
||||||
_matrix(matrix), _tbl(tbl), _x((uint16)pos.x().asInt16Meters()), _y((uint16)pos.y().asInt16Meters())
|
_x((uint16)pos.x().asInt16Meters()), _y((uint16)pos.y().asInt16Meters()), _matrix(matrix), _tbl(tbl)
|
||||||
{
|
{
|
||||||
#ifdef NL_DEBUG
|
#ifdef NL_DEBUG
|
||||||
nlassert(_tbl!=NULL);
|
nlassert(_tbl!=NULL);
|
||||||
|
|
|
@ -41,15 +41,15 @@
|
||||||
inline
|
inline
|
||||||
CAIEntityPhysical::CAIEntityPhysical(CPersistentOfPhysical& owner, TDataSetRow const& entityIndex, NLMISC::CEntityId const& id, float radius, uint32 level, RYAI_MAP_CRUNCH::TAStarFlag const& AStarFlags)
|
CAIEntityPhysical::CAIEntityPhysical(CPersistentOfPhysical& owner, TDataSetRow const& entityIndex, NLMISC::CEntityId const& id, float radius, uint32 level, RYAI_MAP_CRUNCH::TAStarFlag const& AStarFlags)
|
||||||
: CAIEntity()
|
: CAIEntity()
|
||||||
, _dataSetRow(entityIndex)
|
|
||||||
, _pos(entityIndex)
|
|
||||||
, CSpawnable<CPersistentOfPhysical >(owner)
|
, CSpawnable<CPersistentOfPhysical >(owner)
|
||||||
, _id(id)
|
, _pos(entityIndex)
|
||||||
|
, _dataSetRow(entityIndex)
|
||||||
, _Stuned(0)
|
, _Stuned(0)
|
||||||
, _Rooted(0)
|
, _Rooted(0)
|
||||||
, _Blinded(0)
|
, _Blinded(0)
|
||||||
, _Feared(0)
|
, _Feared(0)
|
||||||
//, _UnreachableTarget((CAIEntityPhysical*)NULL)
|
//, _UnreachableTarget((CAIEntityPhysical*)NULL)
|
||||||
|
, _id(id)
|
||||||
, _radius(radius)
|
, _radius(radius)
|
||||||
, _food(_radius)
|
, _food(_radius)
|
||||||
, _Level(level)
|
, _Level(level)
|
||||||
|
|
|
@ -67,12 +67,12 @@ void CBotProfileFight::resumeProfile()
|
||||||
|
|
||||||
CBotProfileFight::CBotProfileFight(CProfileOwner* owner, CAIEntityPhysical* ennemy)
|
CBotProfileFight::CBotProfileFight(CProfileOwner* owner, CAIEntityPhysical* ennemy)
|
||||||
: CBotProfileFightHeal()
|
: CBotProfileFightHeal()
|
||||||
, _Ennemy(ennemy)
|
|
||||||
, _Bot(NLMISC::safe_cast<CSpawnBot*>(owner))
|
, _Bot(NLMISC::safe_cast<CSpawnBot*>(owner))
|
||||||
|
, _Ennemy(ennemy)
|
||||||
, _PathPos(NLMISC::safe_cast<CSpawnBot*>(owner)->theta())
|
, _PathPos(NLMISC::safe_cast<CSpawnBot*>(owner)->theta())
|
||||||
|
, _PathCont(NLMISC::safe_cast<CSpawnBot*>(owner)->getAStarFlag())
|
||||||
, _RangeCalculated(false)
|
, _RangeCalculated(false)
|
||||||
, _SearchAlternativePath(false)
|
, _SearchAlternativePath(false)
|
||||||
, _PathCont(NLMISC::safe_cast<CSpawnBot*>(owner)->getAStarFlag())
|
|
||||||
{
|
{
|
||||||
#ifdef NL_DEBUG_PTR
|
#ifdef NL_DEBUG_PTR
|
||||||
_Bot.setData(this);
|
_Bot.setData(this);
|
||||||
|
@ -226,12 +226,12 @@ void CBotProfileHeal::resumeProfile()
|
||||||
|
|
||||||
CBotProfileHeal::CBotProfileHeal(const TDataSetRow &row, CProfileOwner *owner)
|
CBotProfileHeal::CBotProfileHeal(const TDataSetRow &row, CProfileOwner *owner)
|
||||||
: CBotProfileFightHeal()
|
: CBotProfileFightHeal()
|
||||||
, _Row(row)
|
|
||||||
, _Bot(NLMISC::safe_cast<CSpawnBot*>(owner))
|
, _Bot(NLMISC::safe_cast<CSpawnBot*>(owner))
|
||||||
, _PathPos(NLMISC::safe_cast<CSpawnBot*>(owner)->theta())
|
, _PathPos(NLMISC::safe_cast<CSpawnBot*>(owner)->theta())
|
||||||
|
, _PathCont(NLMISC::safe_cast<CSpawnBot*>(owner)->getAStarFlag())
|
||||||
|
, _Row(row)
|
||||||
, _RangeCalculated(false)
|
, _RangeCalculated(false)
|
||||||
, _SearchAlternativePath(false)
|
, _SearchAlternativePath(false)
|
||||||
, _PathCont(NLMISC::safe_cast<CSpawnBot*>(owner)->getAStarFlag())
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -252,10 +252,10 @@ CBotProfileHeal::~CBotProfileHeal()
|
||||||
|
|
||||||
CBotProfileFlee::CBotProfileFlee(CProfileOwner *owner)
|
CBotProfileFlee::CBotProfileFlee(CProfileOwner *owner)
|
||||||
: CAIBaseProfile()
|
: CAIBaseProfile()
|
||||||
, _Bot(NLMISC::safe_cast<CSpawnBot*>(owner))
|
|
||||||
, _PathPos(NLMISC::safe_cast<CSpawnBot*>(owner)->theta())
|
|
||||||
, _DenyFlags(NLMISC::safe_cast<CSpawnBot*>(owner)->getAStarFlag())
|
, _DenyFlags(NLMISC::safe_cast<CSpawnBot*>(owner)->getAStarFlag())
|
||||||
|
, _PathPos(NLMISC::safe_cast<CSpawnBot*>(owner)->theta())
|
||||||
, _fightFleePathContainer(NLMISC::safe_cast<CSpawnBot*>(owner)->getAStarFlag())
|
, _fightFleePathContainer(NLMISC::safe_cast<CSpawnBot*>(owner)->getAStarFlag())
|
||||||
|
, _Bot(NLMISC::safe_cast<CSpawnBot*>(owner))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -521,14 +521,20 @@ bool CFightOrganizer::reorganizeIteration(CBot* bot)
|
||||||
if (!entity->isAlive())
|
if (!entity->isAlive())
|
||||||
{
|
{
|
||||||
if (ai_profile_npc_VerboseLog)
|
if (ai_profile_npc_VerboseLog)
|
||||||
|
{
|
||||||
nldebug("<FIGHT>Entity %s have aggro for dead entity %s, forgetting it.", spawnBot->getEntityId().toString().c_str(), entity->getEntityId().toString().c_str());
|
nldebug("<FIGHT>Entity %s have aggro for dead entity %s, forgetting it.", spawnBot->getEntityId().toString().c_str(), entity->getEntityId().toString().c_str());
|
||||||
|
}
|
||||||
|
|
||||||
spawnBot->forgetAggroFor(entity->dataSetRow());
|
spawnBot->forgetAggroFor(entity->dataSetRow());
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (!entity->isBotAttackable())
|
if (!entity->isBotAttackable())
|
||||||
{
|
{
|
||||||
if (ai_profile_npc_VerboseLog)
|
if (ai_profile_npc_VerboseLog)
|
||||||
|
{
|
||||||
nldebug("<FIGHT>Entity %s have aggro for non bot attackable entity %s, forgetting it.", spawnBot->getEntityId().toString().c_str(), entity->getEntityId().toString().c_str());
|
nldebug("<FIGHT>Entity %s have aggro for non bot attackable entity %s, forgetting it.", spawnBot->getEntityId().toString().c_str(), entity->getEntityId().toString().c_str());
|
||||||
|
}
|
||||||
|
|
||||||
spawnBot->forgetAggroFor(entity->dataSetRow());
|
spawnBot->forgetAggroFor(entity->dataSetRow());
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
|
@ -676,7 +676,8 @@ void CGrpProfileBandit::beginProfile()
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// look for aggro range parameter or set a default value
|
// look for aggro range parameter or set a default value
|
||||||
float aggroRangeFloat;
|
float aggroRangeFloat = 0.f;
|
||||||
|
|
||||||
if (!_Grp->getProfileParameter("aggro range", aggroRangeFloat))
|
if (!_Grp->getProfileParameter("aggro range", aggroRangeFloat))
|
||||||
_AggroRange =static_cast<uint32>( CGrpProfileBanditFactory::getDefaultBanditAggroRange() );
|
_AggroRange =static_cast<uint32>( CGrpProfileBanditFactory::getDefaultBanditAggroRange() );
|
||||||
else
|
else
|
||||||
|
@ -991,7 +992,7 @@ void CGrpProfileGuard::updateProfile(uint ticksSinceLastUpdate)
|
||||||
}
|
}
|
||||||
|
|
||||||
string s;
|
string s;
|
||||||
float f;
|
float f = 0.f;
|
||||||
if (_Grp->getProfileParameter("faction", s) && !s.empty())
|
if (_Grp->getProfileParameter("faction", s) && !s.empty())
|
||||||
{
|
{
|
||||||
factionIndex = CStaticFames::getInstance().getFactionIndex(s);
|
factionIndex = CStaticFames::getInstance().getFactionIndex(s);
|
||||||
|
@ -1703,10 +1704,10 @@ CGrpProfileFollowRoute::CGrpProfileFollowRoute(CProfileOwner *owner)
|
||||||
|
|
||||||
CGrpProfileFollowRoute::CGrpProfileFollowRoute(CProfileOwner *owner,const std::vector<CShape::TPosition> &geometry,const TVerticalPos &verticalPos, bool dontSendEvent)
|
CGrpProfileFollowRoute::CGrpProfileFollowRoute(CProfileOwner *owner,const std::vector<CShape::TPosition> &geometry,const TVerticalPos &verticalPos, bool dontSendEvent)
|
||||||
: CMoveProfile(owner)
|
: CMoveProfile(owner)
|
||||||
, _Geometry(&geometry)
|
|
||||||
, _GeometryComeFromState(false)
|
|
||||||
, _VerticalPos(verticalPos)
|
|
||||||
, _PathCont(NLMISC::safe_cast<CSpawnGroup*>(owner)->getPersistent().getAStarFlag())
|
, _PathCont(NLMISC::safe_cast<CSpawnGroup*>(owner)->getPersistent().getAStarFlag())
|
||||||
|
, _GeometryComeFromState(false)
|
||||||
|
, _Geometry(&geometry)
|
||||||
|
, _VerticalPos(verticalPos)
|
||||||
, _DontSendEvent(dontSendEvent)
|
, _DontSendEvent(dontSendEvent)
|
||||||
{
|
{
|
||||||
PROFILE_LOG("group", "follow_route", "ctor2", "");
|
PROFILE_LOG("group", "follow_route", "ctor2", "");
|
||||||
|
@ -2402,8 +2403,8 @@ std::string CGrpProfileIdle::getOneLineInfoString() const
|
||||||
|
|
||||||
CGrpProfileWander::CGrpProfileWander(CProfileOwner* owner, CNpcZone const* npcZone)
|
CGrpProfileWander::CGrpProfileWander(CProfileOwner* owner, CNpcZone const* npcZone)
|
||||||
: CMoveProfile(owner)
|
: CMoveProfile(owner)
|
||||||
, _NpcZone(npcZone)
|
|
||||||
, _Social(false)
|
, _Social(false)
|
||||||
|
, _NpcZone(npcZone)
|
||||||
{
|
{
|
||||||
PROFILE_LOG("group", "wander", "ctor", "");
|
PROFILE_LOG("group", "wander", "ctor", "");
|
||||||
_BotStandProfileType = BOT_STAND_AT_POS;
|
_BotStandProfileType = BOT_STAND_AT_POS;
|
||||||
|
@ -2748,8 +2749,8 @@ std::string CGrpProfileWander::getOneLineInfoString() const
|
||||||
|
|
||||||
CGrpProfileWanderNoPrim::CGrpProfileWanderNoPrim(CProfileOwner* owner, NLMISC::CSmartPtr<CNpcZonePlaceNoPrim> const& npcZone)
|
CGrpProfileWanderNoPrim::CGrpProfileWanderNoPrim(CProfileOwner* owner, NLMISC::CSmartPtr<CNpcZonePlaceNoPrim> const& npcZone)
|
||||||
: CMoveProfile(owner)
|
: CMoveProfile(owner)
|
||||||
, _NpcZone(npcZone)
|
|
||||||
, _Social(false)
|
, _Social(false)
|
||||||
|
, _NpcZone(npcZone)
|
||||||
{
|
{
|
||||||
PROFILE_LOG("group", "wander", "ctor", "");
|
PROFILE_LOG("group", "wander", "ctor", "");
|
||||||
_BotStandProfileType = BOT_STAND_AT_POS;
|
_BotStandProfileType = BOT_STAND_AT_POS;
|
||||||
|
@ -3043,10 +3044,10 @@ CGrpProfileStandAtStartPoint::CBotPositionner::CBotPositionner(RYAI_MAP_CRUNCH::
|
||||||
}
|
}
|
||||||
|
|
||||||
CGrpProfileStandAtStartPoint::CBotPositionner::CBotPositionner(TVerticalPos verticalPos, CAIPos position, RYAI_MAP_CRUNCH::TAStarFlag flag)
|
CGrpProfileStandAtStartPoint::CBotPositionner::CBotPositionner(TVerticalPos verticalPos, CAIPos position, RYAI_MAP_CRUNCH::TAStarFlag flag)
|
||||||
: _BotAtDest(false)
|
: _PathCont(flag)
|
||||||
, _Position(position)
|
, _Position(position)
|
||||||
, _VerticalPos(verticalPos)
|
, _VerticalPos(verticalPos)
|
||||||
, _PathCont(flag)
|
, _BotAtDest(false)
|
||||||
{
|
{
|
||||||
_PathCont.setDestination(verticalPos, position);
|
_PathCont.setDestination(verticalPos, position);
|
||||||
}
|
}
|
||||||
|
@ -4019,9 +4020,9 @@ CBotProfileMoveTo::CBotProfileMoveTo(AITYPES::TVerticalPos verticalPos, RYAI_MAP
|
||||||
: CAIBaseProfile()
|
: CAIBaseProfile()
|
||||||
, _VerticalPos(verticalPos)
|
, _VerticalPos(verticalPos)
|
||||||
, _Dest(dest)
|
, _Dest(dest)
|
||||||
, _Bot(NLMISC::safe_cast<CSpawnBotNpc*>(owner))
|
|
||||||
, _PathPos(NLMISC::safe_cast<CSpawnBotNpc*>(owner)->theta())
|
|
||||||
, _PathCont(NLMISC::safe_cast<CSpawnBotNpc*>(owner)->getAStarFlag())
|
, _PathCont(NLMISC::safe_cast<CSpawnBotNpc*>(owner)->getAStarFlag())
|
||||||
|
, _PathPos(NLMISC::safe_cast<CSpawnBotNpc*>(owner)->theta())
|
||||||
|
, _Bot(NLMISC::safe_cast<CSpawnBotNpc*>(owner))
|
||||||
{
|
{
|
||||||
PROFILE_LOG("bot", "move_to", "ctor", "");
|
PROFILE_LOG("bot", "move_to", "ctor", "");
|
||||||
#ifdef NL_DEBUG_PTR
|
#ifdef NL_DEBUG_PTR
|
||||||
|
@ -4095,11 +4096,11 @@ std::string CBotProfileMoveTo::getOneLineInfoString() const
|
||||||
|
|
||||||
CBotProfileFollowPos::CBotProfileFollowPos(CBotProfileFollowPos const& other)
|
CBotProfileFollowPos::CBotProfileFollowPos(CBotProfileFollowPos const& other)
|
||||||
: CAIBaseProfile()
|
: CAIBaseProfile()
|
||||||
, _PathCont(const_cast<CBotProfileFollowPos&>(other)._PathCont)
|
, _PathPos(const_cast<CBotProfileFollowPos&>(other)._PathPos._Angle) // Just to debug...
|
||||||
, _Bot(const_cast<CBotProfileFollowPos&>(other)._Bot)
|
, _Bot(const_cast<CBotProfileFollowPos&>(other)._Bot)
|
||||||
|
, _PathCont(const_cast<CBotProfileFollowPos&>(other)._PathCont)
|
||||||
, _MaxWalkSpeed(FLT_MAX)
|
, _MaxWalkSpeed(FLT_MAX)
|
||||||
, _MaxRunSpeed(FLT_MAX)
|
, _MaxRunSpeed(FLT_MAX)
|
||||||
, _PathPos(const_cast<CBotProfileFollowPos&>(other)._PathPos._Angle) // Just to debug...
|
|
||||||
, _Stop(false)
|
, _Stop(false)
|
||||||
{
|
{
|
||||||
PROFILE_LOG("bot", "follow_pos", "ctor", "");
|
PROFILE_LOG("bot", "follow_pos", "ctor", "");
|
||||||
|
@ -4110,11 +4111,11 @@ CBotProfileFollowPos::CBotProfileFollowPos(CBotProfileFollowPos const& other)
|
||||||
|
|
||||||
CBotProfileFollowPos::CBotProfileFollowPos(CPathCont* pathCont, CProfileOwner* owner)
|
CBotProfileFollowPos::CBotProfileFollowPos(CPathCont* pathCont, CProfileOwner* owner)
|
||||||
: CAIBaseProfile()
|
: CAIBaseProfile()
|
||||||
, _PathCont(pathCont)
|
, _PathPos(NLMISC::safe_cast<CSpawnBotNpc*>(owner)->theta())
|
||||||
, _Bot(NLMISC::safe_cast<CSpawnBotNpc*>(owner))
|
, _Bot(NLMISC::safe_cast<CSpawnBotNpc*>(owner))
|
||||||
|
, _PathCont(pathCont)
|
||||||
, _MaxWalkSpeed(FLT_MAX)
|
, _MaxWalkSpeed(FLT_MAX)
|
||||||
, _MaxRunSpeed(FLT_MAX)
|
, _MaxRunSpeed(FLT_MAX)
|
||||||
, _PathPos(NLMISC::safe_cast<CSpawnBotNpc*>(owner)->theta())
|
|
||||||
, _Stop(false)
|
, _Stop(false)
|
||||||
{
|
{
|
||||||
PROFILE_LOG("bot", "follow_pos", "ctor", "");
|
PROFILE_LOG("bot", "follow_pos", "ctor", "");
|
||||||
|
@ -4530,9 +4531,9 @@ CGrpProfileStandOnVertices::CBotPositionner::CBotPositionner(RYAI_MAP_CRUNCH::TA
|
||||||
}
|
}
|
||||||
|
|
||||||
CGrpProfileStandOnVertices::CBotPositionner::CBotPositionner(uint32 geomIndex, RYAI_MAP_CRUNCH::TAStarFlag flags)
|
CGrpProfileStandOnVertices::CBotPositionner::CBotPositionner(uint32 geomIndex, RYAI_MAP_CRUNCH::TAStarFlag flags)
|
||||||
: _BotAtDest(false)
|
: _PathCont(flags)
|
||||||
, _GeomIndex(geomIndex)
|
, _GeomIndex(geomIndex)
|
||||||
, _PathCont(flags)
|
, _BotAtDest(false)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -143,9 +143,9 @@ bool CAliasTreeOwner::CAliasDiff::operator()(CAliasTreeOwner const* other) const
|
||||||
|
|
||||||
inline
|
inline
|
||||||
CAliasTreeOwner::CAliasTreeOwner(CAIAliasDescriptionNode* aliasTree)
|
CAliasTreeOwner::CAliasTreeOwner(CAIAliasDescriptionNode* aliasTree)
|
||||||
: _AliasTree(aliasTree)
|
: _Alias(0)
|
||||||
, _Alias(0)
|
|
||||||
, _Name(std::string())
|
, _Name(std::string())
|
||||||
|
, _AliasTree(aliasTree)
|
||||||
{
|
{
|
||||||
if (aliasTree)
|
if (aliasTree)
|
||||||
{
|
{
|
||||||
|
@ -159,9 +159,9 @@ CAliasTreeOwner::CAliasTreeOwner(CAIAliasDescriptionNode* aliasTree)
|
||||||
|
|
||||||
inline
|
inline
|
||||||
CAliasTreeOwner::CAliasTreeOwner(uint32 alias, std::string const& name)
|
CAliasTreeOwner::CAliasTreeOwner(uint32 alias, std::string const& name)
|
||||||
: _AliasTree(NULL)
|
: _Alias(alias)
|
||||||
, _Alias(alias)
|
|
||||||
, _Name(name)
|
, _Name(name)
|
||||||
|
, _AliasTree(NULL)
|
||||||
{
|
{
|
||||||
CAliasTreeOwnerLocator::getInstance()->addEntity(_Alias, _Name, this);
|
CAliasTreeOwnerLocator::getInstance()->addEntity(_Alias, _Name, this);
|
||||||
}
|
}
|
||||||
|
|
|
@ -126,8 +126,8 @@ bool CAICircle::isInside(V const& pos)
|
||||||
|
|
||||||
inline
|
inline
|
||||||
CAabb::CAabb()
|
CAabb::CAabb()
|
||||||
: _VMax(INT_MIN/CAICoord::UNITS_PER_METER, INT_MIN/CAICoord::UNITS_PER_METER)
|
: _VMin(INT_MAX/CAICoord::UNITS_PER_METER, INT_MAX/CAICoord::UNITS_PER_METER)
|
||||||
, _VMin(INT_MAX/CAICoord::UNITS_PER_METER, INT_MAX/CAICoord::UNITS_PER_METER)
|
, _VMax(INT_MIN/CAICoord::UNITS_PER_METER, INT_MIN/CAICoord::UNITS_PER_METER)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -50,7 +50,7 @@ public:
|
||||||
static bool exists( const TDataSetRow& entityIndex );
|
static bool exists( const TDataSetRow& entityIndex );
|
||||||
static const NLMISC::CEntityId& getEntityId( const TDataSetRow& entityIndex );
|
static const NLMISC::CEntityId& getEntityId( const TDataSetRow& entityIndex );
|
||||||
static TDataSetRow getDataSetRow( const NLMISC::CEntityId& entityId );
|
static TDataSetRow getDataSetRow( const NLMISC::CEntityId& entityId );
|
||||||
static const uint16 getTeamId(const TDataSetRow& entityIndex);
|
static uint16 getTeamId(const TDataSetRow& entityIndex);
|
||||||
|
|
||||||
static CAICoord x( const TDataSetRow& entityIndex );
|
static CAICoord x( const TDataSetRow& entityIndex );
|
||||||
static CAICoord y( const TDataSetRow& entityIndex );
|
static CAICoord y( const TDataSetRow& entityIndex );
|
||||||
|
|
|
@ -344,14 +344,14 @@ CTokenTestResult::CTokenTestResult()
|
||||||
}
|
}
|
||||||
inline
|
inline
|
||||||
CTokenTestResult::CTokenTestResult(const NLMISC::CSmartPtr<CCodeNode> &codeNode)
|
CTokenTestResult::CTokenTestResult(const NLMISC::CSmartPtr<CCodeNode> &codeNode)
|
||||||
: _codeNode(codeNode)
|
: _res(BRULE_VALID)
|
||||||
, _res(BRULE_VALID)
|
, _codeNode(codeNode)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
inline
|
inline
|
||||||
CTokenTestResult::CTokenTestResult(const NLMISC::CSmartPtr<CCodeNode> &codeNode, TBasicTokenTestRes res)
|
CTokenTestResult::CTokenTestResult(const NLMISC::CSmartPtr<CCodeNode> &codeNode, TBasicTokenTestRes res)
|
||||||
: _codeNode(codeNode)
|
: _res(BRULE_VALID)
|
||||||
, _res(res)
|
, _codeNode(codeNode)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
inline
|
inline
|
||||||
|
|
|
@ -556,10 +556,10 @@ inline
|
||||||
CStringSeparator::CStringSeparator(const std::string &str, const std::string &motif)
|
CStringSeparator::CStringSeparator(const std::string &str, const std::string &motif)
|
||||||
:_Index(0)
|
:_Index(0)
|
||||||
,_NewIndex(0)
|
,_NewIndex(0)
|
||||||
,_Str(str)
|
|
||||||
,_Motif(motif)
|
|
||||||
,_Delta(0)
|
,_Delta(0)
|
||||||
,_StartIndex(0)
|
,_StartIndex(0)
|
||||||
|
,_Str(str)
|
||||||
|
,_Motif(motif)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
inline
|
inline
|
||||||
|
|
|
@ -583,9 +583,9 @@ void CStateInstance::setNextPunctualState(CAIState* state)
|
||||||
inline
|
inline
|
||||||
CPersistentStateInstance::CPersistentStateInstance(CStateMachine& reactionContainer)
|
CPersistentStateInstance::CPersistentStateInstance(CStateMachine& reactionContainer)
|
||||||
: CKeyWordOwner()
|
: CKeyWordOwner()
|
||||||
|
, CStateInstance(NULL)
|
||||||
, _StartState()
|
, _StartState()
|
||||||
, _Container(reactionContainer)
|
, _Container(reactionContainer)
|
||||||
, CStateInstance(NULL)
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -100,6 +100,7 @@ public:
|
||||||
case TypeFloat: return NLMISC::toString(_f);
|
case TypeFloat: return NLMISC::toString(_f);
|
||||||
// case TypeAliasTree: return _a->treeToString();
|
// case TypeAliasTree: return _a->treeToString();
|
||||||
// case TypeEventTree: return _e->toString();
|
// case TypeEventTree: return _e->toString();
|
||||||
|
default: break;
|
||||||
}
|
}
|
||||||
return "<Invalid Argument Type>";
|
return "<Invalid Argument Type>";
|
||||||
}
|
}
|
||||||
|
@ -115,6 +116,7 @@ public:
|
||||||
case TypeFloat: f.serial(_f); break;
|
case TypeFloat: f.serial(_f); break;
|
||||||
// case TypeAliasTree: f.serial(_a); break;
|
// case TypeAliasTree: f.serial(_a); break;
|
||||||
// case TypeEventTree: f.serial(_e); break;
|
// case TypeEventTree: f.serial(_e); break;
|
||||||
|
default: break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1313,7 +1313,7 @@ static void parsePrimGrpFaunaSpawn(const CAIAliasDescriptionNode *treeNode,const
|
||||||
|
|
||||||
// deal with the weight
|
// deal with the weight
|
||||||
std::string s;
|
std::string s;
|
||||||
uint32 weight;
|
uint32 weight = 0;
|
||||||
if (prim->getPropertyByName("weight",s))
|
if (prim->getPropertyByName("weight",s))
|
||||||
{
|
{
|
||||||
weight=atoi(s.c_str());
|
weight=atoi(s.c_str());
|
||||||
|
@ -2409,7 +2409,9 @@ static void parsePrimDynNpcZoneShape(const CAIAliasDescriptionNode *aliasNode, c
|
||||||
static void parsePrimRoadTrigger(const CAIAliasDescriptionNode *aliasNode, const IPrimitive *prim)
|
static void parsePrimRoadTrigger(const CAIAliasDescriptionNode *aliasNode, const IPrimitive *prim)
|
||||||
{
|
{
|
||||||
CPrimVector t1, t2, sp;
|
CPrimVector t1, t2, sp;
|
||||||
float t1r, t2r, spr;
|
float t1r = 0.f;
|
||||||
|
float t2r = 0.f;
|
||||||
|
float spr = 0.f;
|
||||||
string s;
|
string s;
|
||||||
|
|
||||||
for (uint i=0; i<prim->getNumChildren(); ++i)
|
for (uint i=0; i<prim->getNumChildren(); ++i)
|
||||||
|
@ -2494,6 +2496,8 @@ static void parsePrimDynRoad(const CAIAliasDescriptionNode *aliasNode, const IPr
|
||||||
case AITypeRoadTrigger:
|
case AITypeRoadTrigger:
|
||||||
parsePrimRoadTrigger(nextTreeNode(aliasNode,child),child);
|
parsePrimRoadTrigger(nextTreeNode(aliasNode,child),child);
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2527,6 +2531,8 @@ static void parsePrimGeomItems(const CAIAliasDescriptionNode *aliasNode, const I
|
||||||
case AITypeDynRoad:
|
case AITypeDynRoad:
|
||||||
parsePrimDynRoad(nextTreeNode(aliasNode,child),child);
|
parsePrimDynRoad(nextTreeNode(aliasNode,child),child);
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2643,6 +2649,8 @@ static void parsePrimCellZones(const CAIAliasDescriptionNode *aliasNode, const I
|
||||||
case AITypeCellZone:
|
case AITypeCellZone:
|
||||||
parsePrimCellZone(nextTreeNode(aliasNode,child),child);
|
parsePrimCellZone(nextTreeNode(aliasNode,child),child);
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2847,6 +2855,8 @@ static void parsePrimGroupTemplate(const CAIAliasDescriptionNode *aliasNode, con
|
||||||
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -2895,6 +2905,8 @@ static void parsePrimGroupFamilyProfileFaunaContent(const CAIAliasDescriptionNod
|
||||||
case AITypeGroupTemplateFauna:
|
case AITypeGroupTemplateFauna:
|
||||||
parsePrimGroupTemplate(nextTreeNode(aliasNode,child),child,"C");
|
parsePrimGroupTemplate(nextTreeNode(aliasNode,child),child,"C");
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -2942,6 +2954,8 @@ static void parsePrimGroupFamilyProfileTribeContent(const CAIAliasDescriptionNod
|
||||||
case AITypeGroupTemplateMultiLevel:
|
case AITypeGroupTemplateMultiLevel:
|
||||||
parsePrimGroupTemplate(nextTreeNode(aliasNode,child),child,"C");
|
parsePrimGroupTemplate(nextTreeNode(aliasNode,child),child,"C");
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -2980,6 +2994,8 @@ static void parsePrimGroupFamilyProfileNpcContent(const CAIAliasDescriptionNode
|
||||||
case AITypeGroupTemplateMultiLevel:
|
case AITypeGroupTemplateMultiLevel:
|
||||||
parsePrimGroupTemplate(nextTreeNode(aliasNode,child),child,"C");
|
parsePrimGroupTemplate(nextTreeNode(aliasNode,child),child,"C");
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -3047,6 +3063,8 @@ static void parsePrimGroupDescriptions(const CAIAliasDescriptionNode *aliasNode,
|
||||||
// case AITypeGroupFamilyProfileGeneric:
|
// case AITypeGroupFamilyProfileGeneric:
|
||||||
// parsePrimGroupFamilyProfileGeneric(nextTreeNode(aliasNode,child),child, GroupFamilyTribe);
|
// parsePrimGroupFamilyProfileGeneric(nextTreeNode(aliasNode,child),child, GroupFamilyTribe);
|
||||||
// break;
|
// break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3354,6 +3372,8 @@ static void parsePrimDynSystem(const IPrimitive *prim, const std::string &mapNam
|
||||||
case AITypeOutpost:
|
case AITypeOutpost:
|
||||||
parsePrimOutpost(child, mapName, filename);
|
parsePrimOutpost(child, mapName, filename);
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3388,6 +3408,8 @@ static void parsePrimNogoPointList(const IPrimitive *prim, const std::string &ma
|
||||||
CAIActions::exec("SETNOGO", x, y);
|
CAIActions::exec("SETNOGO", x, y);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -4049,7 +4071,7 @@ NLMISC_COMMAND(loadMapsFromCommon,"load all primitive defined in usedPrimitives
|
||||||
|
|
||||||
const vector<string> &basePrim = CPrimitiveCfg::getMap(args[0]);
|
const vector<string> &basePrim = CPrimitiveCfg::getMap(args[0]);
|
||||||
set<string> filter(basePrim.begin(), basePrim.end());
|
set<string> filter(basePrim.begin(), basePrim.end());
|
||||||
for ( uint i = 0; (sint)i<usedPrimitives.size(); ++i)
|
for ( uint i = 0; i < usedPrimitives.size(); ++i)
|
||||||
{
|
{
|
||||||
const vector<string> &prims = CPrimitiveCfg::getMap(usedPrimitives.asString(i));
|
const vector<string> &prims = CPrimitiveCfg::getMap(usedPrimitives.asString(i));
|
||||||
for (uint j=0; j<prims.size(); ++j)
|
for (uint j=0; j<prims.size(); ++j)
|
||||||
|
|
|
@ -125,8 +125,8 @@ private:
|
||||||
|
|
||||||
inline
|
inline
|
||||||
CAStarHeapNode::CAStarHeapNode(CTopology::TTopologyRef Ref, uint Father, float Distance, bool Open)
|
CAStarHeapNode::CAStarHeapNode(CTopology::TTopologyRef Ref, uint Father, float Distance, bool Open)
|
||||||
: _Ref(Ref)
|
: CABaseStarNode(Father, Distance, Open)
|
||||||
, CABaseStarNode(Father, Distance, Open)
|
, _Ref(Ref)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -197,7 +197,7 @@ class CInsideAStarHeapNode : public CABaseStarNode
|
||||||
public:
|
public:
|
||||||
friend class CAStarNode;
|
friend class CAStarNode;
|
||||||
|
|
||||||
explicit CInsideAStarHeapNode(const CAStarNode &node, uint Father, CDirection Direction, float Distance, bool Open) : _Node(node), _Direction(Direction), CABaseStarNode(Father,Distance,Open)
|
explicit CInsideAStarHeapNode(const CAStarNode &node, uint Father, CDirection Direction, float Distance, bool Open) : CABaseStarNode(Father,Distance,Open), _Direction(Direction), _Node(node)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -924,6 +924,9 @@ void CWorldMap::countCells(uint &compute, uint &white, uint &simple, uint &multi
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
@ -1126,6 +1129,8 @@ void CWorldMap::countCells(uint &compute, uint &white, uint &simple, uint &multi
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
@ -1205,7 +1210,8 @@ void CWorldMap::countCells(uint &compute, uint &white, uint &simple, uint &multi
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -1319,7 +1325,8 @@ void CWorldMap::countCells(uint &compute, uint &white, uint &simple, uint &multi
|
||||||
temp.setPosS(pos);
|
temp.setPosS(pos);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1487,8 +1487,8 @@ uint32 CTopology::TTopologyId::getVal() const
|
||||||
|
|
||||||
inline
|
inline
|
||||||
CTopology::TTopologyRef::TTopologyRef()
|
CTopology::TTopologyRef::TTopologyRef()
|
||||||
: _RootCell(NULL)
|
: TTopologyId()
|
||||||
, TTopologyId()
|
, _RootCell(NULL)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2238,7 +2238,7 @@ private:
|
||||||
|
|
||||||
inline
|
inline
|
||||||
CWhiteCell::CWhiteCell(CWorldMap const& worldMapPtr)
|
CWhiteCell::CWhiteCell(CWorldMap const& worldMapPtr)
|
||||||
: _HeightMap(NULL), CRootCell(worldMapPtr)
|
: CRootCell(worldMapPtr), _HeightMap(NULL)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3236,13 +3236,13 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
inline
|
inline
|
||||||
CWorldPosition::CWorldPosition(const CRootCell *cell, const CMapPosition &pos, const CSlot &slot) : _RootCell(cell), CMapPosition(pos), CSlot(slot)
|
CWorldPosition::CWorldPosition(const CRootCell *cell, const CMapPosition &pos, const CSlot &slot) : CMapPosition(pos), CSlot(slot), _RootCell(cell)
|
||||||
{
|
{
|
||||||
_cellLinkage=_RootCell->getCellLink(*this);
|
_cellLinkage=_RootCell->getCellLink(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline
|
inline
|
||||||
CWorldPosition::CWorldPosition(const CRootCell *cell, const CMapPosition &pos, const CSlot &slot,bool generationOnly) : _RootCell(cell), CMapPosition(pos), CSlot(slot)
|
CWorldPosition::CWorldPosition(const CRootCell *cell, const CMapPosition &pos, const CSlot &slot,bool generationOnly) : CMapPosition(pos), CSlot(slot), _RootCell(cell)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
#include "module_core.h"
|
#include "module_core.h"
|
||||||
#include "module_utils.h"
|
#include "module_utils.h"
|
||||||
|
|
||||||
class ::IModuleCore;
|
class IModuleCore;
|
||||||
class ::IModule;
|
class IModule;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A module parent is a class encapsulating the modules contained in a module core
|
* A module parent is a class encapsulating the modules contained in a module core
|
||||||
|
|
|
@ -418,6 +418,8 @@ bool CDBDescriptionParser::loadAttribute(xmlNodePtr node, CTableNode& table)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -727,6 +729,8 @@ bool CDBDescriptionParser::buildColumns(uint tableIndex)
|
||||||
table.Columns.push_back(column);
|
table.Columns.push_back(column);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -104,6 +104,8 @@ std::string CDbMessage::buildLogString(const CDBDescriptionParser& description)
|
||||||
else if (typenode.ByteSize == 4) result += NLMISC::toString(*(uint32*)dataptr);
|
else if (typenode.ByteSize == 4) result += NLMISC::toString(*(uint32*)dataptr);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -166,6 +168,8 @@ void CDbMessage::getHRContent(const CDBDescriptionParser& description, std::stri
|
||||||
else if (column.ByteSize == 4) strValue = NLMISC::toString(asUint32());
|
else if (column.ByteSize == 4) strValue = NLMISC::toString(asUint32());
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
result = NLMISC::toString("%-12s: ", "UpdateValue");
|
result = NLMISC::toString("%-12s: ", "UpdateValue");
|
||||||
|
|
|
@ -1016,7 +1016,7 @@ class CUpdateLog
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
CUpdateLog() : UpdateId(0xffffffff), _Updates(NULL), _OwnUpdates(false) { }
|
CUpdateLog() : UpdateId(0xffffffff), _OwnUpdates(false), _Updates(NULL) { }
|
||||||
|
|
||||||
~CUpdateLog();
|
~CUpdateLog();
|
||||||
|
|
||||||
|
@ -1373,12 +1373,6 @@ inline uint32 CDbMessage::getMessageHeaderSize()
|
||||||
size += sizeof(_Value3[0]);
|
size += sizeof(_Value3[0]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case AddString:
|
|
||||||
break;
|
|
||||||
|
|
||||||
case UnmapString:
|
|
||||||
break;
|
|
||||||
|
|
||||||
case ReleaseRow:
|
case ReleaseRow:
|
||||||
size += sizeof(_ObjectIndex.Table)+sizeof(_ObjectIndex.Row);
|
size += sizeof(_ObjectIndex.Table)+sizeof(_ObjectIndex.Row);
|
||||||
break;
|
break;
|
||||||
|
@ -1388,10 +1382,7 @@ inline uint32 CDbMessage::getMessageHeaderSize()
|
||||||
size += 2;
|
size += 2;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PushContext:
|
default:
|
||||||
break;
|
|
||||||
|
|
||||||
case PopContext:
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -267,7 +267,7 @@ class CMixedStreamFile : public NLMISC::IStream
|
||||||
public:
|
public:
|
||||||
|
|
||||||
/// Constructor
|
/// Constructor
|
||||||
CMixedStreamFile() : _File(NULL), NLMISC::IStream(false)
|
CMixedStreamFile() : NLMISC::IStream(false), _File(NULL)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -157,7 +157,7 @@ class CObjectIndex
|
||||||
public:
|
public:
|
||||||
|
|
||||||
/// Constructor of invalid index
|
/// Constructor of invalid index
|
||||||
explicit CObjectIndex(bool validateChecksum = false) : _Table(INVALID_TABLE_INDEX), _Row(INVALID_ROW_INDEX), _Checksum((TIndexChecksum)~VALID_INDEX_CHECKSUM)
|
explicit CObjectIndex(bool validateChecksum = false) : _Row(INVALID_ROW_INDEX), _Table(INVALID_TABLE_INDEX), _Checksum((TIndexChecksum)~VALID_INDEX_CHECKSUM)
|
||||||
{
|
{
|
||||||
if (validateChecksum)
|
if (validateChecksum)
|
||||||
validate();
|
validate();
|
||||||
|
@ -166,7 +166,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Constructor
|
/// Constructor
|
||||||
CObjectIndex(TTableIndex table, TRowIndex row) : _Table(table), _Row(row) { validate(); }
|
CObjectIndex(TTableIndex table, TRowIndex row) : _Row(row), _Table(table) { validate(); }
|
||||||
|
|
||||||
/// Constructor
|
/// Constructor
|
||||||
CObjectIndex(const CObjectIndex &index) { *this = index; }
|
CObjectIndex(const CObjectIndex &index) { *this = index; }
|
||||||
|
@ -397,13 +397,13 @@ public:
|
||||||
|
|
||||||
/// Constructor
|
/// Constructor
|
||||||
explicit CColumnIndex(TTableIndex table = INVALID_TABLE_INDEX, TRowIndex row = INVALID_ROW_INDEX, TColumnIndex column = INVALID_COLUMN_INDEX)
|
explicit CColumnIndex(TTableIndex table = INVALID_TABLE_INDEX, TRowIndex row = INVALID_ROW_INDEX, TColumnIndex column = INVALID_COLUMN_INDEX)
|
||||||
: _Table(table), _Row(row), _Column(column)
|
: _Table(table), _Column(column), _Row(row)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Constructor
|
/// Constructor
|
||||||
explicit CColumnIndex(const CObjectIndex& object, TColumnIndex column)
|
explicit CColumnIndex(const CObjectIndex& object, TColumnIndex column)
|
||||||
: _Table(INVALID_TABLE_INDEX), _Row(INVALID_ROW_INDEX), _Column(INVALID_COLUMN_INDEX)
|
: _Table(INVALID_TABLE_INDEX), _Column(INVALID_COLUMN_INDEX), _Row(INVALID_ROW_INDEX)
|
||||||
{
|
{
|
||||||
if (!object.isValid())
|
if (!object.isValid())
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -81,7 +81,7 @@ public:
|
||||||
TRowData data() { return (*_MapIt).second + (_Mapped ? sizeof(CMappedHeader) : sizeof(CHeader)); }
|
TRowData data() { return (*_MapIt).second + (_Mapped ? sizeof(CMappedHeader) : sizeof(CHeader)); }
|
||||||
|
|
||||||
/// Get row data
|
/// Get row data
|
||||||
const TRowData data() const { return (*_MapIt).second + (_Mapped ? sizeof(CMappedHeader) : sizeof(CHeader)); }
|
TRowData data() const { return (*_MapIt).second + (_Mapped ? sizeof(CMappedHeader) : sizeof(CHeader)); }
|
||||||
|
|
||||||
/// Default Constructor, should never be used
|
/// Default Constructor, should never be used
|
||||||
explicit CAccessor() { }
|
explicit CAccessor() { }
|
||||||
|
@ -104,7 +104,7 @@ public:
|
||||||
uint64 key() const { return mapped() ? ((CMappedHeader*)fullRow())->getKey() : 0; }
|
uint64 key() const { return mapped() ? ((CMappedHeader*)fullRow())->getKey() : 0; }
|
||||||
|
|
||||||
/// Get Full Row Data
|
/// Get Full Row Data
|
||||||
const TRowData fullRow() const { return (*_MapIt).second; }
|
TRowData fullRow() const { return (*_MapIt).second; }
|
||||||
|
|
||||||
|
|
||||||
/// Equals
|
/// Equals
|
||||||
|
|
|
@ -35,13 +35,13 @@ class CBasicEffect
|
||||||
public:
|
public:
|
||||||
/// Constructor
|
/// Constructor
|
||||||
CBasicEffect(EFFECT_FAMILIES::TEffectFamily family, const TDataSetRow & creatorId, const TDataSetRow & targetRowId)
|
CBasicEffect(EFFECT_FAMILIES::TEffectFamily family, const TDataSetRow & creatorId, const TDataSetRow & targetRowId)
|
||||||
: _Family(family), _CreatorRowId(creatorId), _TargetRowId(targetRowId)
|
: _CreatorRowId(creatorId), _TargetRowId(targetRowId), _Family(family)
|
||||||
{
|
{
|
||||||
_EffectId = ++_EffectCounter;
|
_EffectId = ++_EffectCounter;
|
||||||
}
|
}
|
||||||
|
|
||||||
CBasicEffect( EFFECT_FAMILIES::TEffectFamily family, const TDataSetRow & creatorId, const TDataSetRow & targetRowId, uint32 effectId )
|
CBasicEffect( EFFECT_FAMILIES::TEffectFamily family, const TDataSetRow & creatorId, const TDataSetRow & targetRowId, uint32 effectId )
|
||||||
: _Family(family), _CreatorRowId(creatorId), _TargetRowId(targetRowId), _EffectId(effectId)
|
: _CreatorRowId(creatorId), _TargetRowId(targetRowId), _Family(family), _EffectId(effectId)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -119,7 +119,7 @@ public:
|
||||||
|
|
||||||
uint8 Index; // index of the phrase in the player memorized phrase interface if != 0xff
|
uint8 Index; // index of the phrase in the player memorized phrase interface if != 0xff
|
||||||
|
|
||||||
CEGSExecuteMsg() : Index(0xff), Cyclic(false)
|
CEGSExecuteMsg() : Cyclic(false), Index(0xff)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
virtual void description ()
|
virtual void description ()
|
||||||
|
|
|
@ -121,9 +121,9 @@ namespace MSW
|
||||||
|
|
||||||
|
|
||||||
CResultBase(MYSQL_RES *result)
|
CResultBase(MYSQL_RES *result)
|
||||||
: _Result(result),
|
: _CurrentRow(NULL),
|
||||||
_CurrentRow(NULL),
|
_FieldLength(NULL),
|
||||||
_FieldLength(NULL)
|
_Result(result)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,7 +26,7 @@ CBrain::CBrain(CMood &personality) : CMood(personality)
|
||||||
_UpdateEvery = 0;
|
_UpdateEvery = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
CBrain::CBrain(const CBrain &c)
|
CBrain::CBrain(const CBrain &c) : CMood()
|
||||||
{
|
{
|
||||||
_Personality = c._Personality;
|
_Personality = c._Personality;
|
||||||
_RealTime = c._RealTime;
|
_RealTime = c._RealTime;
|
||||||
|
|
|
@ -95,7 +95,7 @@ private:
|
||||||
enum { DEFAULT, PARA, HEADER, FOOTER, FILE_HEADER, FILE_FOOTER, TBL, TABTBL, TEXT } mode;
|
enum { DEFAULT, PARA, HEADER, FOOTER, FILE_HEADER, FILE_FOOTER, TBL, TABTBL, TEXT } mode;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CCruncher(): mode(DEFAULT), firstTblLine(true)
|
CCruncher(): firstTblLine(true), readColumnName(false), mode(DEFAULT)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -220,7 +220,7 @@ void ProcessDirectory( const CSString& dir, const StringVector& extensions )
|
||||||
|
|
||||||
sixieme = (int)files.size() / 6;
|
sixieme = (int)files.size() / 6;
|
||||||
|
|
||||||
printf( "%d files are processed", files.size() );
|
printf( "%u files are processed", (uint) files.size() );
|
||||||
|
|
||||||
for (uint32 i=0; i<files.size(); ++i)
|
for (uint32 i=0; i<files.size(); ++i)
|
||||||
{
|
{
|
||||||
|
|
|
@ -126,6 +126,8 @@ int main(int argc, char *argv[])
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -149,7 +149,7 @@ int main(int argc, char *argv[])
|
||||||
|
|
||||||
CSheetId::init(false);
|
CSheetId::init(false);
|
||||||
|
|
||||||
for(int f = 0; f < filenames.size(); f++)
|
for(uint f = 0; f < filenames.size(); f++)
|
||||||
{
|
{
|
||||||
fileName = filenames[f];
|
fileName = filenames[f];
|
||||||
|
|
||||||
|
@ -278,6 +278,8 @@ int main(int argc, char *argv[])
|
||||||
if (!pdr.writeToTxtFile(outputFileName.c_str(), CPersistentDataRecord::LINES_STRING))
|
if (!pdr.writeToTxtFile(outputFileName.c_str(), CPersistentDataRecord::LINES_STRING))
|
||||||
goto failureWrite;
|
goto failureWrite;
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// return 0;
|
// return 0;
|
||||||
|
|
|
@ -45,24 +45,21 @@ sint main(sint argc, char **argv)
|
||||||
var = cf.getVarPtr("Paths");
|
var = cf.getVarPtr("Paths");
|
||||||
if (var != NULL)
|
if (var != NULL)
|
||||||
{
|
{
|
||||||
uint i;
|
for (uint i=0; i < var->size(); ++i)
|
||||||
for (i=0; (sint)i<var->size(); ++i)
|
|
||||||
LookupPath.push_back(var->asString(i));
|
LookupPath.push_back(var->asString(i));
|
||||||
}
|
}
|
||||||
|
|
||||||
var = cf.getVarPtr("NoRecursePaths");
|
var = cf.getVarPtr("NoRecursePaths");
|
||||||
if (var != NULL)
|
if (var != NULL)
|
||||||
{
|
{
|
||||||
uint i;
|
for (uint i=0; i < var->size(); ++i)
|
||||||
for (i=0; (sint)i<var->size(); ++i)
|
|
||||||
LookupNoRecursePath.push_back(var->asString(i));
|
LookupNoRecursePath.push_back(var->asString(i));
|
||||||
}
|
}
|
||||||
|
|
||||||
var = cf.getVarPtr("PacsPrimPaths");
|
var = cf.getVarPtr("PacsPrimPaths");
|
||||||
if (var != NULL)
|
if (var != NULL)
|
||||||
{
|
{
|
||||||
uint i;
|
for (uint i=0; i < var->size(); ++i)
|
||||||
for (i=0; (sint)i<var->size(); ++i)
|
|
||||||
PacsPrimPath.push_back(var->asString(i));
|
PacsPrimPath.push_back(var->asString(i));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -77,14 +74,12 @@ sint main(sint argc, char **argv)
|
||||||
var = cf.getVarPtr("Commands");
|
var = cf.getVarPtr("Commands");
|
||||||
if (var != NULL)
|
if (var != NULL)
|
||||||
{
|
{
|
||||||
uint i;
|
for (uint i=0; i < var->size(); ++i)
|
||||||
for (i=0; (sint)i<var->size(); ++i)
|
|
||||||
commands.push_back(var->asString(i));
|
commands.push_back(var->asString(i));
|
||||||
}
|
}
|
||||||
|
|
||||||
uint i;
|
|
||||||
string cmd;
|
string cmd;
|
||||||
for (i=1; (sint)i<argc; ++i)
|
for (sint i=1; i < argc; ++i)
|
||||||
{
|
{
|
||||||
if (string(argv[i]) == string("-"))
|
if (string(argv[i]) == string("-"))
|
||||||
{
|
{
|
||||||
|
@ -108,7 +103,7 @@ sint main(sint argc, char **argv)
|
||||||
NLMISC::createDebug ();
|
NLMISC::createDebug ();
|
||||||
nlinfo("Running commands:");
|
nlinfo("Running commands:");
|
||||||
|
|
||||||
for (i=0; i<commands.size(); ++i)
|
for (uint i=0; i<commands.size(); ++i)
|
||||||
ICommand::execute(commands[i], *InfoLog);
|
ICommand::execute(commands[i], *InfoLog);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -101,8 +101,10 @@ void CPackedWorldBuilder::build(const std::vector<std::string> &zoneNames, const
|
||||||
{
|
{
|
||||||
std::vector<CSmartPtr<CZoneRefCount> > zones;
|
std::vector<CSmartPtr<CZoneRefCount> > zones;
|
||||||
zones.reserve(zoneNames.size());
|
zones.reserve(zoneNames.size());
|
||||||
sint zoneMinX, zoneMaxX;
|
sint zoneMinX = 0;
|
||||||
sint zoneMinY, zoneMaxY;
|
sint zoneMaxX = 0;
|
||||||
|
sint zoneMinY = 0;
|
||||||
|
sint zoneMaxY = 0;
|
||||||
bool firstZoneCorner = true;
|
bool firstZoneCorner = true;
|
||||||
for(uint k = 0; k < zoneNames.size(); ++k)
|
for(uint k = 0; k < zoneNames.size(); ++k)
|
||||||
{
|
{
|
||||||
|
@ -252,7 +254,7 @@ void CPackedWorldBuilder::build(const std::vector<std::string> &zoneNames, const
|
||||||
CIFile f;
|
CIFile f;
|
||||||
if (f.open(cacheFilename))
|
if (f.open(cacheFilename))
|
||||||
{
|
{
|
||||||
CPackedZoneBase *pb;
|
CPackedZoneBase *pb = NULL;
|
||||||
f.serialPolyPtr(pb);
|
f.serialPolyPtr(pb);
|
||||||
packedZoneGrid(x, y) = pb;
|
packedZoneGrid(x, y) = pb;
|
||||||
mustRebuild = false;
|
mustRebuild = false;
|
||||||
|
|
Loading…
Reference in a new issue