mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-14 13:54:49 +00:00
Changed: Removed using namespace in *.h
This commit is contained in:
parent
7778e8c161
commit
8602c91b04
31 changed files with 232 additions and 92 deletions
|
@ -1,5 +1,18 @@
|
|||
// Browse.cpp : implementation file
|
||||
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
|
||||
// Copyright (C) 2010 Winch Gate Property Limited
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as
|
||||
// published by the Free Software Foundation, either version 3 of the
|
||||
// License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU Affero General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include "stdafx.h"
|
||||
|
||||
|
|
|
@ -1,3 +1,19 @@
|
|||
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
|
||||
// Copyright (C) 2010 Winch Gate Property Limited
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as
|
||||
// published by the Free Software Foundation, either version 3 of the
|
||||
// License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU Affero General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#ifndef _PIC_H_
|
||||
#define _PIC_H_
|
||||
|
||||
|
|
|
@ -1,3 +1,19 @@
|
|||
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
|
||||
// Copyright (C) 2010 Winch Gate Property Limited
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as
|
||||
// published by the Free Software Foundation, either version 3 of the
|
||||
// License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU Affero General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#ifndef _PIC_PRIVATE_H_
|
||||
#define _PIC_PRIVATE_H_
|
||||
|
||||
|
|
|
@ -1,3 +1,18 @@
|
|||
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
|
||||
// Copyright (C) 2010 Winch Gate Property Limited
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as
|
||||
// published by the Free Software Foundation, either version 3 of the
|
||||
// License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU Affero General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
#include <assert.h>
|
||||
|
|
|
@ -1,4 +1,18 @@
|
|||
|
||||
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
|
||||
// Copyright (C) 2010 Winch Gate Property Limited
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as
|
||||
// published by the Free Software Foundation, either version 3 of the
|
||||
// License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU Affero General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#ifndef _READPIC_H_
|
||||
#define _READPIC_H_
|
||||
|
|
|
@ -1,5 +1,18 @@
|
|||
// SelectionTerritoire.cpp : implementation file
|
||||
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
|
||||
// Copyright (C) 2010 Winch Gate Property Limited
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as
|
||||
// published by the Free Software Foundation, either version 3 of the
|
||||
// License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU Affero General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "resource.h"
|
||||
|
|
|
@ -1,5 +1,18 @@
|
|||
// View.cpp : implementation file
|
||||
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
|
||||
// Copyright (C) 2010 Winch Gate Property Limited
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as
|
||||
// published by the Free Software Foundation, either version 3 of the
|
||||
// License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU Affero General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "resource.h"
|
||||
|
|
|
@ -1,3 +1,19 @@
|
|||
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
|
||||
// Copyright (C) 2010 Winch Gate Property Limited
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as
|
||||
// published by the Free Software Foundation, either version 3 of the
|
||||
// License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU Affero General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#if !defined(AFX_CTView_H__72269322_0419_4F61_BAA3_1B1BB2D3E34E__INCLUDED_)
|
||||
#define AFX_CTView_H__72269322_0419_4F61_BAA3_1B1BB2D3E34E__INCLUDED_
|
||||
|
||||
|
|
|
@ -1,6 +1,18 @@
|
|||
#include "afxwin.h"
|
||||
#include "afxcmn.h"
|
||||
#include "afxdlgs.h"
|
||||
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
|
||||
// Copyright (C) 2010 Winch Gate Property Limited
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as
|
||||
// published by the Free Software Foundation, either version 3 of the
|
||||
// License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU Affero General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#ifndef STDAFX_H
|
||||
#define STDAFX_H
|
||||
|
|
|
@ -17,6 +17,8 @@
|
|||
#include "stdpch.h"
|
||||
#include "sky_object_sheet.h"
|
||||
|
||||
using namespace NLMISC;
|
||||
|
||||
/////////////////////////////////
|
||||
// CSkyObjectSheet::CColorInfo //
|
||||
/////////////////////////////////
|
||||
|
|
|
@ -27,8 +27,6 @@
|
|||
#include <string>
|
||||
|
||||
|
||||
using namespace NLMISC;
|
||||
|
||||
const uint SKY_MAX_NUM_STAGE = 4;
|
||||
const uint SKY_MAX_NUM_FX_USER_PARAMS = 4;
|
||||
|
||||
|
@ -88,8 +86,8 @@ public:
|
|||
CColorInfoSheet ParticleEmitters;
|
||||
CColorInfoSheet ConstantColor[SKY_MAX_NUM_STAGE];
|
||||
CColorGradientInfoSheet ColorGradient;
|
||||
CUV TexPanner[SKY_MAX_NUM_STAGE];
|
||||
CUV OffsetFactor[SKY_MAX_NUM_STAGE];
|
||||
NLMISC::CUV TexPanner[SKY_MAX_NUM_STAGE];
|
||||
NLMISC::CUV OffsetFactor[SKY_MAX_NUM_STAGE];
|
||||
std::string FXUserParamBitmap[SKY_MAX_NUM_FX_USER_PARAMS];
|
||||
// texture scaling : each bitmap gives a scaling factor depending on weather and the hour of the day
|
||||
std::string OffsetUBitmap[SKY_MAX_NUM_STAGE];
|
||||
|
|
|
@ -37,6 +37,7 @@ extern NLLIGO::CLigoConfig LigoConfig;
|
|||
// ***************************************************************************
|
||||
|
||||
using namespace std;
|
||||
using namespace NLMISC;
|
||||
using namespace NLLIGO;
|
||||
|
||||
// ***************************************************************************
|
||||
|
|
|
@ -65,6 +65,7 @@ extern NL3D::UDriver *Driver;
|
|||
extern NL3D::UScene *Scene;
|
||||
extern CEntityManager EntitiesMngr;
|
||||
|
||||
using namespace NLMISC;
|
||||
using NLMISC::CUV;
|
||||
using NLMISC::CI18N;
|
||||
using NLMISC::CRGBA;
|
||||
|
|
|
@ -119,6 +119,8 @@
|
|||
|
||||
#include "../bg_downloader_access.h"
|
||||
|
||||
using namespace NLMISC;
|
||||
|
||||
extern CClientChatManager ChatMngr;
|
||||
extern CContinentManager ContinentMngr;
|
||||
extern CStringMapper *_UIStringMapper;
|
||||
|
|
|
@ -112,6 +112,7 @@
|
|||
#endif
|
||||
const uint32 UI_CACHE_SERIAL_CHECK = (uint32) 'IUG_';
|
||||
|
||||
using namespace NLMISC;
|
||||
|
||||
void saveXMLTree(COFile &f, xmlNodePtr node)
|
||||
{
|
||||
|
|
|
@ -86,7 +86,7 @@ private:
|
|||
CInstanceMapDeco _MapDeco;
|
||||
bool _VisualSnapToGroundDone;
|
||||
float _LastCamDist;
|
||||
CMatrix _BBoxMatrix;
|
||||
NLMISC::CMatrix _BBoxMatrix;
|
||||
NL3D::UVisualCollisionEntity *_VisualCollisionEntity;
|
||||
private:
|
||||
void drawBBox(NLMISC::CRGBA color) const;
|
||||
|
|
|
@ -53,6 +53,7 @@
|
|||
|
||||
#include "../../entities.h"
|
||||
|
||||
using namespace NLMISC;
|
||||
using namespace R2;
|
||||
|
||||
|
||||
|
|
|
@ -20,6 +20,8 @@
|
|||
#include "../user_entity.h"
|
||||
#include "../time_client.h"
|
||||
|
||||
using namespace NLMISC;
|
||||
|
||||
namespace R2
|
||||
{
|
||||
|
||||
|
|
|
@ -30,6 +30,8 @@
|
|||
#include "displayer_visual_entity.h"
|
||||
|
||||
|
||||
using namespace NLMISC;
|
||||
|
||||
namespace R2
|
||||
{
|
||||
|
||||
|
|
|
@ -27,6 +27,8 @@
|
|||
//
|
||||
#include "game_share/scenario_entry_points.h"
|
||||
|
||||
using namespace NLMISC;
|
||||
|
||||
namespace R2
|
||||
{
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ public:
|
|||
void setDisplayedInstance(CInstance *instance, bool orientable);
|
||||
bool isAddedToMap() const { return _AddedToMap; }
|
||||
|
||||
CVector2f getWorldPos() const;
|
||||
NLMISC::CVector2f getWorldPos() const;
|
||||
|
||||
/** Set the texture to use when the view in the world map is zoomed-in enough
|
||||
* When empty, no close view display is done
|
||||
|
|
|
@ -50,7 +50,7 @@ public:
|
|||
CToolChoosePos(sint ghostSlot,
|
||||
const std::string &cursValid = "curs_create.tga",
|
||||
const std::string &cursInvalid = "curs_stop.tga",
|
||||
const std::vector<CPolygon2D> &polyList = std::vector<CPolygon2D>(),
|
||||
const std::vector<NLMISC::CPolygon2D> &polyList = std::vector<NLMISC::CPolygon2D>(),
|
||||
const CPrimLook &polyValidLook = CPrimLook(),
|
||||
const CPrimLook &polyInvalidLook = CPrimLook()
|
||||
);
|
||||
|
|
|
@ -42,7 +42,7 @@ public:
|
|||
const std::string &toolName,
|
||||
const std::string &cursValid = "curs_create.tga",
|
||||
const std::string &cursInvalid = "curs_stop.tga",
|
||||
const std::vector<CPolygon2D> &polyList = std::vector<CPolygon2D>(),
|
||||
const std::vector<NLMISC::CPolygon2D> &polyList = std::vector<NLMISC::CPolygon2D>(),
|
||||
const CPrimLook &polyValidLook = CPrimLook(),
|
||||
const CPrimLook &polyInvalidLook = CPrimLook()
|
||||
);
|
||||
|
|
|
@ -95,7 +95,7 @@ private:
|
|||
bool checkRoomLeft();
|
||||
void displayNoMoreRoomLeftMsg();
|
||||
// for closed polygon only : test if the current shape is valid (e.g not intersecting, with at least 3 points)
|
||||
bool isValidPolyShape(bool ignoreLast, std::list<CPolygon> &splitPoly) const;
|
||||
bool isValidPolyShape(bool ignoreLast, std::list<NLMISC::CPolygon> &splitPoly) const;
|
||||
bool testAccessibleEdges(bool ignoreLast);
|
||||
void doUpdateBeforeRender();
|
||||
};
|
||||
|
|
|
@ -85,8 +85,8 @@ private:
|
|||
|
||||
// retrieve a bitmap from its name, find it in the map if it has already been built, or load it and add it otherwise
|
||||
NLMISC::CBitmap *buildSharedBitmap(const std::string &filename,
|
||||
std::map<std::string, CBitmap *> &bitmapByName,
|
||||
std::vector<CBitmap *> &builtBitmaps,
|
||||
std::map<std::string, NLMISC::CBitmap *> &bitmapByName,
|
||||
std::vector<NLMISC::CBitmap *> &builtBitmaps,
|
||||
bool &alreadyBuilt
|
||||
);
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ public:
|
|||
class CColorInfo
|
||||
{
|
||||
public:
|
||||
CBitmap *Map; // color computed from a map depending on hour & weather (NULL if color is unseted)
|
||||
NLMISC::CBitmap *Map; // color computed from a map depending on hour & weather (NULL if color is unseted)
|
||||
TSkyColorMode Mode; // how the color is to be used
|
||||
public:
|
||||
CColorInfo() : Map(NULL) {}
|
||||
|
@ -52,10 +52,10 @@ public:
|
|||
* \param buildBitmap list of used bitmap (to be completed if required bitmap id not in "bitmapByName")
|
||||
*/
|
||||
void init(const CSkyObjectSheet::CColorInfoSheet &ci,
|
||||
std::map<std::string, CBitmap *> &bitmapByName,
|
||||
std::vector<CBitmap *> &buildBitmap);
|
||||
std::map<std::string, NLMISC::CBitmap *> &bitmapByName,
|
||||
std::vector<NLMISC::CBitmap *> &buildBitmap);
|
||||
// compute color depending on hour & weather & fog color
|
||||
CRGBA computeColor(float dayPart, float weatherLevel, CRGBA fogColor);
|
||||
NLMISC::CRGBA computeColor(float dayPart, float weatherLevel, NLMISC::CRGBA fogColor);
|
||||
};
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// tells how a color gradient is computed in the shape (-> sky dome gradient) //
|
||||
|
@ -69,10 +69,10 @@ public:
|
|||
* for intermediary weather values, the two nearest bitmap are blended to get the value of the gradient
|
||||
*/
|
||||
|
||||
std::vector<CBitmap *> WeatherToGradient;
|
||||
CBitmap Slice0[2]; // 2 column for slice 0
|
||||
CBitmap Slice1[2]; // 2 columns for slice 1
|
||||
CBitmap Final;
|
||||
std::vector<NLMISC::CBitmap *> WeatherToGradient;
|
||||
NLMISC::CBitmap Slice0[2]; // 2 column for slice 0
|
||||
NLMISC::CBitmap Slice1[2]; // 2 columns for slice 1
|
||||
NLMISC::CBitmap Final;
|
||||
public:
|
||||
// ctor
|
||||
CColorGradientInfo() : TargetTextureStage(0) {}
|
||||
|
@ -82,9 +82,9 @@ public:
|
|||
* \param buildBitmap list of used bitmap (to be completed if required bitmaps are not in "bitmapByName")
|
||||
*/
|
||||
void init(const CSkyObjectSheet::CColorGradientInfoSheet &cgi,
|
||||
std::map<std::string, CBitmap *> &bitmapByName,
|
||||
std::vector<CBitmap *> &buildBitmap);
|
||||
void setup(NL3D::UInstance instance, float dayPart, float weatherLevel, CBitmap &gradientCache, CBitmap &gradientCacheBlurred);
|
||||
std::map<std::string, NLMISC::CBitmap *> &bitmapByName,
|
||||
std::vector<NLMISC::CBitmap *> &buildBitmap);
|
||||
void setup(NL3D::UInstance instance, float dayPart, float weatherLevel, NLMISC::CBitmap &gradientCache, NLMISC::CBitmap &gradientCacheBlurred);
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -97,19 +97,19 @@ public:
|
|||
CColorGradientInfo ColorGradient;
|
||||
TSkyRefColor RefColor; // tells which color info is used to test if object is visible (when alpha is 0, the object must be hidden)
|
||||
// cache last colors
|
||||
CRGBA LastDiffuseColor;
|
||||
CRGBA LastParticleEmittersColor;
|
||||
CRGBA LastConstantColor[SKY_MAX_NUM_STAGE];
|
||||
NLMISC::CRGBA LastDiffuseColor;
|
||||
NLMISC::CRGBA LastParticleEmittersColor;
|
||||
NLMISC::CRGBA LastConstantColor[SKY_MAX_NUM_STAGE];
|
||||
// cache last gradient
|
||||
CBitmap GradientCache;
|
||||
CBitmap GradientCacheBlurred;
|
||||
CUV TexPanner[SKY_MAX_NUM_STAGE];
|
||||
CUV OffsetFactor[SKY_MAX_NUM_STAGE];
|
||||
CBitmap *FXUserParams[SKY_MAX_NUM_FX_USER_PARAMS];
|
||||
NLMISC::CBitmap GradientCache;
|
||||
NLMISC::CBitmap GradientCacheBlurred;
|
||||
NLMISC::CUV TexPanner[SKY_MAX_NUM_STAGE];
|
||||
NLMISC::CUV OffsetFactor[SKY_MAX_NUM_STAGE];
|
||||
NLMISC::CBitmap *FXUserParams[SKY_MAX_NUM_FX_USER_PARAMS];
|
||||
|
||||
// texture scaling depending on weather and time
|
||||
CBitmap *OffsetUBitmap[SKY_MAX_NUM_STAGE];
|
||||
CBitmap *OffsetVBitmap[SKY_MAX_NUM_STAGE];
|
||||
NLMISC::CBitmap *OffsetUBitmap[SKY_MAX_NUM_STAGE];
|
||||
NLMISC::CBitmap *OffsetVBitmap[SKY_MAX_NUM_STAGE];
|
||||
|
||||
std::string Name;
|
||||
bool Active;
|
||||
|
@ -149,8 +149,8 @@ public:
|
|||
*/
|
||||
void init(const CSkyObjectSheet::CVersionSheet &sheet,
|
||||
NL3D::UInstance instance,
|
||||
std::map<std::string, CBitmap *> &bitmapByName,
|
||||
std::vector<CBitmap *> &builtBitmaps,
|
||||
std::map<std::string, NLMISC::CBitmap *> &bitmapByName,
|
||||
std::vector<NLMISC::CBitmap *> &builtBitmaps,
|
||||
bool visibleInMainScene,
|
||||
bool visibleInEnvMap
|
||||
);
|
||||
|
@ -158,7 +158,7 @@ public:
|
|||
* \param duskSetup true if the setup os for the dusk (dawn otherwise)
|
||||
* \return true if the object is visible
|
||||
*/
|
||||
bool setup(const CClientDate &date, const CClientDate &animationDate, float numHoursInDay, float weatherLevel, CRGBA fogColor, bool envMapScene);
|
||||
bool setup(const CClientDate &date, const CClientDate &animationDate, float numHoursInDay, float weatherLevel, NLMISC::CRGBA fogColor, bool envMapScene);
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -394,9 +394,9 @@ public:
|
|||
}
|
||||
|
||||
// get Pair state
|
||||
TPairState& getPairState(TCLEntityId e);
|
||||
TPairState& getPairState(CLFECOMMON::TCLEntityId e);
|
||||
// get Pair state
|
||||
const TPairState& getPairState(TCLEntityId e) const;
|
||||
const TPairState& getPairState(CLFECOMMON::TCLEntityId e) const;
|
||||
|
||||
/// User identifier
|
||||
TUid Uid;
|
||||
|
|
|
@ -67,28 +67,28 @@ class CClientHost;
|
|||
class CVisionProvider;
|
||||
|
||||
|
||||
void fillSHEET( TOutBox& outbox, TPropIndex );
|
||||
void fillBEHAVIOUR( TOutBox& outbox, TPropIndex );
|
||||
void fillNAME_STRING_ID( TOutBox& outbox, TPropIndex );
|
||||
void fillTARGET_LIST( TOutBox& outbox, TPropIndex );
|
||||
void fillVISUAL_FX( TOutBox& outbox, TPropIndex );
|
||||
void fillBARS( TOutBox& outbox, TPropIndex );
|
||||
void fillVisualPropertyABC( TOutBox& outbox, TPropIndex );
|
||||
void fillCONTEXTUAL( TOutBox& outbox, TPropIndex propIndex );
|
||||
void fillMODE( TOutBox& outbox, TPropIndex );
|
||||
void fillGUILD_SYMBOL( TOutBox& outbox, TPropIndex );
|
||||
void fillGUILD_NAME_ID( TOutBox& outbox, TPropIndex );
|
||||
void fillEVENT_FACTION_ID( TOutBox& outbox, TPropIndex );
|
||||
void fillPVP_MODE( TOutBox& outbox, TPropIndex );
|
||||
void fillPVP_CLAN( TOutBox& outbox, TPropIndex );
|
||||
void fillOWNER_PEOPLE( TOutBox& outbox, TPropIndex );
|
||||
void fillOUTPOST_INFOS( TOutBox& outbox, TPropIndex );
|
||||
void fillRowProperty( TOutBox& outbox, TPropIndex propIndex );
|
||||
void fillSHEET( TOutBox& outbox, CLFECOMMON::TPropIndex );
|
||||
void fillBEHAVIOUR( TOutBox& outbox, CLFECOMMON::TPropIndex );
|
||||
void fillNAME_STRING_ID( TOutBox& outbox, CLFECOMMON::TPropIndex );
|
||||
void fillTARGET_LIST( TOutBox& outbox, CLFECOMMON::TPropIndex );
|
||||
void fillVISUAL_FX( TOutBox& outbox, CLFECOMMON::TPropIndex );
|
||||
void fillBARS( TOutBox& outbox, CLFECOMMON::TPropIndex );
|
||||
void fillVisualPropertyABC( TOutBox& outbox, CLFECOMMON::TPropIndex );
|
||||
void fillCONTEXTUAL( TOutBox& outbox, CLFECOMMON::TPropIndex propIndex );
|
||||
void fillMODE( TOutBox& outbox, CLFECOMMON::TPropIndex );
|
||||
void fillGUILD_SYMBOL( TOutBox& outbox, CLFECOMMON::TPropIndex );
|
||||
void fillGUILD_NAME_ID( TOutBox& outbox, CLFECOMMON::TPropIndex );
|
||||
void fillEVENT_FACTION_ID( TOutBox& outbox, CLFECOMMON::TPropIndex );
|
||||
void fillPVP_MODE( TOutBox& outbox, CLFECOMMON::TPropIndex );
|
||||
void fillPVP_CLAN( TOutBox& outbox, CLFECOMMON::TPropIndex );
|
||||
void fillOWNER_PEOPLE( TOutBox& outbox, CLFECOMMON::TPropIndex );
|
||||
void fillOUTPOST_INFOS( TOutBox& outbox, CLFECOMMON::TPropIndex );
|
||||
void fillRowProperty( TOutBox& outbox, CLFECOMMON::TPropIndex propIndex );
|
||||
|
||||
|
||||
class CDistancePrioritizer;
|
||||
|
||||
typedef void (*TFillFunc) (TOutBox&, TPropIndex);
|
||||
typedef void (*TFillFunc) (TOutBox&, CLFECOMMON::TPropIndex);
|
||||
|
||||
/*
|
||||
* Visual property tree node
|
||||
|
@ -236,7 +236,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
#define INIT_FLAT_VP_TREE( vpname ) FlatVPTree[ PROPERTY_##vpname ] = (TVPNodeServer*)(discreetRoot->get##vpname##node())
|
||||
#define INIT_FLAT_VP_TREE( vpname ) FlatVPTree[ CLFECOMMON::PROPERTY_##vpname ] = (TVPNodeServer*)(discreetRoot->get##vpname##node())
|
||||
#define SET_FILLFUNC( name ) INIT_FLAT_VP_TREE(name); ((TVPNodeServer*)(discreetRoot->get##name##node()))->FillFunc = fill##name
|
||||
#define SET_FILLFUNC2( nameProp, nameFunc ) INIT_FLAT_VP_TREE(nameProp); ((TVPNodeServer*)(discreetRoot->get##nameProp##node()))->FillFunc = fill##nameFunc
|
||||
|
||||
|
@ -247,20 +247,20 @@ public:
|
|||
TVPNodeBase *discreetRoot = VPB->VPB;
|
||||
|
||||
// setup position a orientation manually
|
||||
FlatVPTree[ PROPERTY_POSITION ] = (TVPNodeServer*)VPA;
|
||||
FlatVPTree[ PROPERTY_POSX ] = FlatVPTree[ PROPERTY_POSITION ];
|
||||
FlatVPTree[ PROPERTY_POSY ] = FlatVPTree[ PROPERTY_POSITION ];
|
||||
FlatVPTree[ PROPERTY_POSZ ] = FlatVPTree[ PROPERTY_POSITION ];
|
||||
FlatVPTree[ PROPERTY_ORIENTATION ] = (TVPNodeServer*)(VPB->VPA);
|
||||
FlatVPTree[ CLFECOMMON::PROPERTY_POSITION ] = (TVPNodeServer*)VPA;
|
||||
FlatVPTree[ CLFECOMMON::PROPERTY_POSX ] = FlatVPTree[ CLFECOMMON::PROPERTY_POSITION ];
|
||||
FlatVPTree[ CLFECOMMON::PROPERTY_POSY ] = FlatVPTree[ CLFECOMMON::PROPERTY_POSITION ];
|
||||
FlatVPTree[ CLFECOMMON::PROPERTY_POSZ ] = FlatVPTree[ CLFECOMMON::PROPERTY_POSITION ];
|
||||
FlatVPTree[ CLFECOMMON::PROPERTY_ORIENTATION ] = (TVPNodeServer*)(VPB->VPA);
|
||||
|
||||
SET_FILLFUNC( SHEET );
|
||||
SET_FILLFUNC( BEHAVIOUR );
|
||||
SET_FILLFUNC( NAME_STRING_ID );
|
||||
SET_FILLFUNC( TARGET_LIST );
|
||||
FlatVPTree[ PROPERTY_TARGET_LIST_0 ] = FlatVPTree[ PROPERTY_TARGET_LIST ];
|
||||
FlatVPTree[ PROPERTY_TARGET_LIST_1 ] = FlatVPTree[ PROPERTY_TARGET_LIST ];
|
||||
FlatVPTree[ PROPERTY_TARGET_LIST_2 ] = FlatVPTree[ PROPERTY_TARGET_LIST ];
|
||||
FlatVPTree[ PROPERTY_TARGET_LIST_3 ] = FlatVPTree[ PROPERTY_TARGET_LIST ];
|
||||
FlatVPTree[ CLFECOMMON::PROPERTY_TARGET_LIST_0 ] = FlatVPTree[ CLFECOMMON::PROPERTY_TARGET_LIST ];
|
||||
FlatVPTree[ CLFECOMMON::PROPERTY_TARGET_LIST_1 ] = FlatVPTree[ CLFECOMMON::PROPERTY_TARGET_LIST ];
|
||||
FlatVPTree[ CLFECOMMON::PROPERTY_TARGET_LIST_2 ] = FlatVPTree[ CLFECOMMON::PROPERTY_TARGET_LIST ];
|
||||
FlatVPTree[ CLFECOMMON::PROPERTY_TARGET_LIST_3 ] = FlatVPTree[ CLFECOMMON::PROPERTY_TARGET_LIST ];
|
||||
SET_FILLFUNC( VISUAL_FX );
|
||||
SET_FILLFUNC( CONTEXTUAL );
|
||||
SET_FILLFUNC( MODE );
|
||||
|
@ -546,7 +546,7 @@ public:
|
|||
* Test the criterion for discreet properties + initialized
|
||||
*/
|
||||
template <class T>
|
||||
bool discreetPropertyHasChanged(const CPropertyHistory::CPropertyEntry& entry, const CMirrorPropValueRO<T>& currentValue, TPropIndex propIndex, T* ) const
|
||||
bool discreetPropertyHasChanged(const CPropertyHistory::CPropertyEntry& entry, const CMirrorPropValueRO<T>& currentValue, CLFECOMMON::TPropIndex propIndex, T* ) const
|
||||
{
|
||||
// Although the client should already know the sheet id of the controlled player, let's send it
|
||||
//if ( (propIndex==PROPERTY_SHEET) && (TVPNodeServer::PrioContext.Slot == 0) )
|
||||
|
@ -585,7 +585,7 @@ public:
|
|||
/*
|
||||
* Test the criterion + initialized: overload for row properties (specialization syntax is too much different among compilers)
|
||||
*/
|
||||
bool discreetPropertyHasChanged(const CPropertyHistory::CPropertyEntry& entry, const CMirrorPropValueRO<TEntityIndex>& currentValue, TPropIndex propIndex, TDataSetRow* ) const
|
||||
bool discreetPropertyHasChanged(const CPropertyHistory::CPropertyEntry& entry, const CMirrorPropValueRO<TEntityIndex>& currentValue, CLFECOMMON::TPropIndex propIndex, TDataSetRow* ) const
|
||||
{
|
||||
if (entry.HasValue)
|
||||
{
|
||||
|
@ -678,7 +678,7 @@ public:
|
|||
* Test the criterion for target list + initialized
|
||||
*/
|
||||
template <class T>
|
||||
bool targetListHasChanged(const CPropertyHistory::CPropertyEntry& entry, TPropIndex propIndex, T* ) const
|
||||
bool targetListHasChanged(const CPropertyHistory::CPropertyEntry& entry, CLFECOMMON::TPropIndex propIndex, T* ) const
|
||||
{
|
||||
// Although the client should already know the sheet id of the controlled player, let's send it
|
||||
//if ( (propIndex==PROPERTY_SHEET) && (TVPNodeServer::PrioContext.Slot == 0) )
|
||||
|
@ -731,7 +731,7 @@ private:
|
|||
CHistory *_History;
|
||||
|
||||
/// Distance threshold
|
||||
CLFECOMMON::TCoord _DistThresholdTable [NB_VISUAL_PROPERTIES];
|
||||
CLFECOMMON::TCoord _DistThresholdTable [CLFECOMMON::NB_VISUAL_PROPERTIES];
|
||||
|
||||
uint32 _DistanceDeltaRatio;
|
||||
};
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
|
||||
using namespace std;
|
||||
using namespace NLMISC;
|
||||
using namespace CLFECOMMON;
|
||||
|
||||
const TDataSetIndex LAST_VISION_CHANGE = LAST_CHANGED;
|
||||
|
||||
|
|
|
@ -41,8 +41,6 @@ inline uint32 asUInt32<TDataSetRow> (const TDataSetRow& obj)
|
|||
return obj.getIndex();
|
||||
}
|
||||
|
||||
using namespace CLFECOMMON;
|
||||
|
||||
extern bool verboseVision;
|
||||
|
||||
extern NLMISC::CLog *TmpDebugLogger;
|
||||
|
@ -89,13 +87,13 @@ typedef std::set< CLFECOMMON::TCLEntityId > TSetOfRemovedEntities;
|
|||
struct CEntity
|
||||
{
|
||||
/// Cache for property initialized
|
||||
bool PropInitialized[NB_VISUAL_PROPERTIES];
|
||||
bool PropInitialized[CLFECOMMON::NB_VISUAL_PROPERTIES];
|
||||
|
||||
/// Property X direct access + previous value
|
||||
CMirrorPropValueROCF<TCoord> X;
|
||||
CMirrorPropValueROCF<CLFECOMMON::TCoord> X;
|
||||
|
||||
/// Property Y direct access + previous value
|
||||
CMirrorPropValueROCF<TCoord> Y;
|
||||
CMirrorPropValueROCF<CLFECOMMON::TCoord> Y;
|
||||
|
||||
#ifdef STORE_MIRROR_VP_IN_CLASS
|
||||
CMirrorPropValueRO<TYPE_SHEET> VP_SHEET;
|
||||
|
@ -192,7 +190,7 @@ struct CEntity
|
|||
}
|
||||
|
||||
/// Return the current cached state without checking the value
|
||||
bool propIsInitializedState( TPropIndex propIndex ) const
|
||||
bool propIsInitializedState( CLFECOMMON::TPropIndex propIndex ) const
|
||||
{
|
||||
return PropInitialized[propIndex];
|
||||
}
|
||||
|
@ -201,7 +199,7 @@ struct CEntity
|
|||
* For positions, use positionIsInitialized() instead.
|
||||
*/
|
||||
template <class T>
|
||||
bool propertyIsInitialized( TPropIndex propIndex, TPropertyIndex dsPropertyIndex, const TEntityIndex& entityIndex, T* pt )
|
||||
bool propertyIsInitialized( CLFECOMMON::TPropIndex propIndex, TPropertyIndex dsPropertyIndex, const TEntityIndex& entityIndex, T* pt )
|
||||
{
|
||||
return PropInitialized[propIndex] || checkPropertyInitialized( propIndex, dsPropertyIndex, entityIndex, pt );
|
||||
}
|
||||
|
@ -209,18 +207,18 @@ struct CEntity
|
|||
/// Return if the position of the current processed entity is initialized
|
||||
bool positionIsInitialized( const TEntityIndex& entityIndex )
|
||||
{
|
||||
return PropInitialized[PROPERTY_POSITION] || checkPositionInitialized( entityIndex );
|
||||
return PropInitialized[CLFECOMMON::PROPERTY_POSITION] || checkPositionInitialized( entityIndex );
|
||||
}
|
||||
|
||||
/// Return if the position of the current processed entity is initialized
|
||||
bool positionIsInitialized()
|
||||
{
|
||||
return PropInitialized[PROPERTY_POSITION] || checkPositionInitialized();
|
||||
return PropInitialized[CLFECOMMON::PROPERTY_POSITION] || checkPositionInitialized();
|
||||
}
|
||||
|
||||
/// Helper for propertyIsInitialized()
|
||||
template <class T>
|
||||
bool checkPropertyInitialized( TPropIndex propIndex, TPropertyIndex dsPropertyIndex, const TEntityIndex& entityIndex, T* )
|
||||
bool checkPropertyInitialized( CLFECOMMON::TPropIndex propIndex, TPropertyIndex dsPropertyIndex, const TEntityIndex& entityIndex, T* )
|
||||
{
|
||||
CMirrorPropValueRO<T> value( *DataSet, entityIndex, dsPropertyIndex );
|
||||
return PropInitialized[propIndex] = ( value() != 0 );
|
||||
|
@ -236,7 +234,7 @@ struct CEntity
|
|||
}
|
||||
|
||||
/// Helper for propertyIsInitialized(): overload for row properties (specialization syntax is too much different among compilers)
|
||||
bool checkPropertyInitialized( TPropIndex propIndex, TPropertyIndex dsPropertyIndex, const TEntityIndex& entityIndex, TDataSetRow* )
|
||||
bool checkPropertyInitialized( CLFECOMMON::TPropIndex propIndex, TPropertyIndex dsPropertyIndex, const TEntityIndex& entityIndex, TDataSetRow* )
|
||||
{
|
||||
CMirrorPropValueRO<TDataSetRow> value( *DataSet, entityIndex, dsPropertyIndex );
|
||||
return PropInitialized[propIndex] = ( asUInt32<TDataSetRow>(value()) != 0 );
|
||||
|
@ -254,7 +252,7 @@ struct CEntity
|
|||
/// Helper for positionIsInitialized()
|
||||
bool checkPositionInitialized( const TEntityIndex& entityIndex )
|
||||
{
|
||||
return PropInitialized[PROPERTY_POSITION] = (X() != 0 || Y() != 0);
|
||||
return PropInitialized[CLFECOMMON::PROPERTY_POSITION] = (X() != 0 || Y() != 0);
|
||||
/*
|
||||
if ( ! ((X() == 0) && (Y() == 0)) ) // not local pos because can be 0 0
|
||||
{
|
||||
|
@ -272,7 +270,7 @@ struct CEntity
|
|||
/// Helper for positionIsInitialized()
|
||||
bool checkPositionInitialized()
|
||||
{
|
||||
return PropInitialized[PROPERTY_POSITION] = (X() != 0 || Y() != 0);
|
||||
return PropInitialized[CLFECOMMON::PROPERTY_POSITION] = (X() != 0 || Y() != 0);
|
||||
}
|
||||
|
||||
|
||||
|
@ -355,7 +353,7 @@ struct CEntity
|
|||
//H_AFTER(YMileage)
|
||||
}
|
||||
|
||||
void displayProperties( const TEntityIndex& entityIndex, NLMISC::CLog *log=NLMISC::InfoLog, TClientId optClientId=INVALID_CLIENT, CLFECOMMON::TCLEntityId optSlot=INVALID_SLOT ) const;
|
||||
void displayProperties( const TEntityIndex& entityIndex, NLMISC::CLog *log=NLMISC::InfoLog, TClientId optClientId=INVALID_CLIENT, CLFECOMMON::TCLEntityId optSlot=CLFECOMMON::INVALID_SLOT ) const;
|
||||
|
||||
static void fillVisualPropertiesFromMirror( uint64 properties[], const TEntityIndex& entityIndex );
|
||||
};
|
||||
|
@ -404,7 +402,7 @@ public:
|
|||
}
|
||||
|
||||
/// Convert a visual property index into a dataset property index (access to a static array)
|
||||
static TPropertyIndex propertyIndexInDataSetToVisualPropIndex( TPropIndex vPropIndex )
|
||||
static TPropertyIndex propertyIndexInDataSetToVisualPropIndex( CLFECOMMON::TPropIndex vPropIndex )
|
||||
{
|
||||
return _VisualPropIndexToDataSet[vPropIndex];
|
||||
}
|
||||
|
@ -430,7 +428,7 @@ public:
|
|||
protected:
|
||||
|
||||
/// Set the mapping and return the dataset property index
|
||||
TPropertyIndex mapVisualPropIndex( const std::string& propName, TPropIndex vPropIndex );
|
||||
TPropertyIndex mapVisualPropIndex( const std::string& propName, CLFECOMMON::TPropIndex vPropIndex );
|
||||
|
||||
/// Return the property index at startup
|
||||
TPropertyIndex getPropertyIndex( const std::string& propName ) const;
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
using namespace std;
|
||||
using namespace NLMISC;
|
||||
using namespace NLNET;
|
||||
using namespace CLFECOMMON;
|
||||
|
||||
extern CGenericXmlMsgHeaderManager GenericXmlMsgHeaderMngr;
|
||||
|
||||
|
|
Loading…
Reference in a new issue