From 25eabdf30548ba87a49ef10c15f70e8d9439745b Mon Sep 17 00:00:00 2001 From: kervala Date: Sat, 25 Sep 2010 16:02:33 +0200 Subject: [PATCH] Changed: Removed using namespace in *.h --- code/nel/tools/3d/tile_edit/Browse.cpp | 15 ++++- code/nel/tools/3d/tile_edit/PIC/pic.h | 16 +++++ code/nel/tools/3d/tile_edit/PIC/pic_private.h | 16 +++++ code/nel/tools/3d/tile_edit/PIC/readpic.cpp | 15 +++++ code/nel/tools/3d/tile_edit/PIC/readpic.h | 16 ++++- .../3d/tile_edit/SelectionTerritoire.cpp | 15 ++++- code/nel/tools/3d/tile_edit/View.cpp | 15 ++++- code/nel/tools/3d/tile_edit/View.h | 16 +++++ code/nel/tools/3d/tile_edit/stdafx.h | 18 +++++- .../src/client_sheets/sky_object_sheet.cpp | 2 + .../src/client_sheets/sky_object_sheet.h | 6 +- .../client/src/continent_manager_build.cpp | 1 + .../client/src/interface_v3/group_map.cpp | 1 + .../src/interface_v3/interface_manager.cpp | 2 + .../src/interface_v3/interface_parser.cpp | 1 + .../client/src/r2/displayer_visual_shape.h | 2 +- .../client/src/r2/dmc/com_lua_module.cpp | 1 + code/ryzom/client/src/r2/entity_sorter.cpp | 2 + code/ryzom/client/src/r2/instance.cpp | 2 + .../ryzom/client/src/r2/instance_map_deco.cpp | 2 + code/ryzom/client/src/r2/instance_map_deco.h | 2 +- code/ryzom/client/src/r2/tool_choose_pos.h | 2 +- .../ryzom/client/src/r2/tool_choose_pos_lua.h | 2 +- code/ryzom/client/src/r2/tool_draw_prim.h | 2 +- code/ryzom/client/src/sky.h | 4 +- code/ryzom/client/src/sky_object.h | 48 +++++++------- .../server/src/frontend_service/client_host.h | 4 +- .../frontend_service/distance_prioritizer.h | 64 +++++++++---------- .../src/frontend_service/entity_container.cpp | 1 + .../src/frontend_service/entity_container.h | 30 ++++----- .../gateway_fes_transport.cpp | 1 + 31 files changed, 232 insertions(+), 92 deletions(-) diff --git a/code/nel/tools/3d/tile_edit/Browse.cpp b/code/nel/tools/3d/tile_edit/Browse.cpp index 4b6c61595..a9bae7f9e 100644 --- a/code/nel/tools/3d/tile_edit/Browse.cpp +++ b/code/nel/tools/3d/tile_edit/Browse.cpp @@ -1,5 +1,18 @@ -// Browse.cpp : implementation file +// Ryzom - MMORPG Framework +// 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 . #include "stdafx.h" diff --git a/code/nel/tools/3d/tile_edit/PIC/pic.h b/code/nel/tools/3d/tile_edit/PIC/pic.h index a3207042f..eb3387041 100644 --- a/code/nel/tools/3d/tile_edit/PIC/pic.h +++ b/code/nel/tools/3d/tile_edit/PIC/pic.h @@ -1,3 +1,19 @@ +// Ryzom - MMORPG Framework +// 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 . + #ifndef _PIC_H_ #define _PIC_H_ diff --git a/code/nel/tools/3d/tile_edit/PIC/pic_private.h b/code/nel/tools/3d/tile_edit/PIC/pic_private.h index 4a6a5eee4..b6db240f3 100644 --- a/code/nel/tools/3d/tile_edit/PIC/pic_private.h +++ b/code/nel/tools/3d/tile_edit/PIC/pic_private.h @@ -1,3 +1,19 @@ +// Ryzom - MMORPG Framework +// 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 . + #ifndef _PIC_PRIVATE_H_ #define _PIC_PRIVATE_H_ diff --git a/code/nel/tools/3d/tile_edit/PIC/readpic.cpp b/code/nel/tools/3d/tile_edit/PIC/readpic.cpp index 1b96ebefa..b8cd30357 100644 --- a/code/nel/tools/3d/tile_edit/PIC/readpic.cpp +++ b/code/nel/tools/3d/tile_edit/PIC/readpic.cpp @@ -1,3 +1,18 @@ +// Ryzom - MMORPG Framework +// 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 . #include diff --git a/code/nel/tools/3d/tile_edit/PIC/readpic.h b/code/nel/tools/3d/tile_edit/PIC/readpic.h index 3934d63b4..1a0711968 100644 --- a/code/nel/tools/3d/tile_edit/PIC/readpic.h +++ b/code/nel/tools/3d/tile_edit/PIC/readpic.h @@ -1,4 +1,18 @@ - +// Ryzom - MMORPG Framework +// 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 . #ifndef _READPIC_H_ #define _READPIC_H_ diff --git a/code/nel/tools/3d/tile_edit/SelectionTerritoire.cpp b/code/nel/tools/3d/tile_edit/SelectionTerritoire.cpp index f31ba4ed8..858146d8c 100644 --- a/code/nel/tools/3d/tile_edit/SelectionTerritoire.cpp +++ b/code/nel/tools/3d/tile_edit/SelectionTerritoire.cpp @@ -1,5 +1,18 @@ -// SelectionTerritoire.cpp : implementation file +// Ryzom - MMORPG Framework +// 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 . #include "stdafx.h" #include "resource.h" diff --git a/code/nel/tools/3d/tile_edit/View.cpp b/code/nel/tools/3d/tile_edit/View.cpp index 0f3b1f1f8..a7c91fbbd 100644 --- a/code/nel/tools/3d/tile_edit/View.cpp +++ b/code/nel/tools/3d/tile_edit/View.cpp @@ -1,5 +1,18 @@ -// View.cpp : implementation file +// Ryzom - MMORPG Framework +// 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 . #include "stdafx.h" #include "resource.h" diff --git a/code/nel/tools/3d/tile_edit/View.h b/code/nel/tools/3d/tile_edit/View.h index 6c8667ffe..e9efc6581 100644 --- a/code/nel/tools/3d/tile_edit/View.h +++ b/code/nel/tools/3d/tile_edit/View.h @@ -1,3 +1,19 @@ +// Ryzom - MMORPG Framework +// 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 . + #if !defined(AFX_CTView_H__72269322_0419_4F61_BAA3_1B1BB2D3E34E__INCLUDED_) #define AFX_CTView_H__72269322_0419_4F61_BAA3_1B1BB2D3E34E__INCLUDED_ diff --git a/code/nel/tools/3d/tile_edit/stdafx.h b/code/nel/tools/3d/tile_edit/stdafx.h index e96ced3b4..127cc661b 100644 --- a/code/nel/tools/3d/tile_edit/stdafx.h +++ b/code/nel/tools/3d/tile_edit/stdafx.h @@ -1,6 +1,18 @@ -#include "afxwin.h" -#include "afxcmn.h" -#include "afxdlgs.h" +// Ryzom - MMORPG Framework +// 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 . #ifndef STDAFX_H #define STDAFX_H diff --git a/code/ryzom/client/src/client_sheets/sky_object_sheet.cpp b/code/ryzom/client/src/client_sheets/sky_object_sheet.cpp index 06f967fb9..ae4703dee 100644 --- a/code/ryzom/client/src/client_sheets/sky_object_sheet.cpp +++ b/code/ryzom/client/src/client_sheets/sky_object_sheet.cpp @@ -17,6 +17,8 @@ #include "stdpch.h" #include "sky_object_sheet.h" +using namespace NLMISC; + ///////////////////////////////// // CSkyObjectSheet::CColorInfo // ///////////////////////////////// diff --git a/code/ryzom/client/src/client_sheets/sky_object_sheet.h b/code/ryzom/client/src/client_sheets/sky_object_sheet.h index f103bbbc6..fd40c4b7f 100644 --- a/code/ryzom/client/src/client_sheets/sky_object_sheet.h +++ b/code/ryzom/client/src/client_sheets/sky_object_sheet.h @@ -27,8 +27,6 @@ #include -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]; diff --git a/code/ryzom/client/src/continent_manager_build.cpp b/code/ryzom/client/src/continent_manager_build.cpp index f1ba08f6e..a32fdbbd4 100644 --- a/code/ryzom/client/src/continent_manager_build.cpp +++ b/code/ryzom/client/src/continent_manager_build.cpp @@ -37,6 +37,7 @@ extern NLLIGO::CLigoConfig LigoConfig; // *************************************************************************** using namespace std; +using namespace NLMISC; using namespace NLLIGO; // *************************************************************************** diff --git a/code/ryzom/client/src/interface_v3/group_map.cpp b/code/ryzom/client/src/interface_v3/group_map.cpp index aa101c449..6c5a3c15c 100644 --- a/code/ryzom/client/src/interface_v3/group_map.cpp +++ b/code/ryzom/client/src/interface_v3/group_map.cpp @@ -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; diff --git a/code/ryzom/client/src/interface_v3/interface_manager.cpp b/code/ryzom/client/src/interface_v3/interface_manager.cpp index d859d48d4..19bf7aa59 100644 --- a/code/ryzom/client/src/interface_v3/interface_manager.cpp +++ b/code/ryzom/client/src/interface_v3/interface_manager.cpp @@ -119,6 +119,8 @@ #include "../bg_downloader_access.h" +using namespace NLMISC; + extern CClientChatManager ChatMngr; extern CContinentManager ContinentMngr; extern CStringMapper *_UIStringMapper; diff --git a/code/ryzom/client/src/interface_v3/interface_parser.cpp b/code/ryzom/client/src/interface_v3/interface_parser.cpp index 9585558d4..585b6cb58 100644 --- a/code/ryzom/client/src/interface_v3/interface_parser.cpp +++ b/code/ryzom/client/src/interface_v3/interface_parser.cpp @@ -112,6 +112,7 @@ #endif const uint32 UI_CACHE_SERIAL_CHECK = (uint32) 'IUG_'; +using namespace NLMISC; void saveXMLTree(COFile &f, xmlNodePtr node) { diff --git a/code/ryzom/client/src/r2/displayer_visual_shape.h b/code/ryzom/client/src/r2/displayer_visual_shape.h index 88da5ce61..72ae05e01 100644 --- a/code/ryzom/client/src/r2/displayer_visual_shape.h +++ b/code/ryzom/client/src/r2/displayer_visual_shape.h @@ -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; diff --git a/code/ryzom/client/src/r2/dmc/com_lua_module.cpp b/code/ryzom/client/src/r2/dmc/com_lua_module.cpp index 654f74154..9b95802b5 100644 --- a/code/ryzom/client/src/r2/dmc/com_lua_module.cpp +++ b/code/ryzom/client/src/r2/dmc/com_lua_module.cpp @@ -53,6 +53,7 @@ #include "../../entities.h" +using namespace NLMISC; using namespace R2; diff --git a/code/ryzom/client/src/r2/entity_sorter.cpp b/code/ryzom/client/src/r2/entity_sorter.cpp index 21d9937fe..a56130cda 100644 --- a/code/ryzom/client/src/r2/entity_sorter.cpp +++ b/code/ryzom/client/src/r2/entity_sorter.cpp @@ -20,6 +20,8 @@ #include "../user_entity.h" #include "../time_client.h" +using namespace NLMISC; + namespace R2 { diff --git a/code/ryzom/client/src/r2/instance.cpp b/code/ryzom/client/src/r2/instance.cpp index afe5d76bc..d30d2bd9b 100644 --- a/code/ryzom/client/src/r2/instance.cpp +++ b/code/ryzom/client/src/r2/instance.cpp @@ -30,6 +30,8 @@ #include "displayer_visual_entity.h" +using namespace NLMISC; + namespace R2 { diff --git a/code/ryzom/client/src/r2/instance_map_deco.cpp b/code/ryzom/client/src/r2/instance_map_deco.cpp index aec958373..ea351dca6 100644 --- a/code/ryzom/client/src/r2/instance_map_deco.cpp +++ b/code/ryzom/client/src/r2/instance_map_deco.cpp @@ -27,6 +27,8 @@ // #include "game_share/scenario_entry_points.h" +using namespace NLMISC; + namespace R2 { diff --git a/code/ryzom/client/src/r2/instance_map_deco.h b/code/ryzom/client/src/r2/instance_map_deco.h index 397262669..f81a3f022 100644 --- a/code/ryzom/client/src/r2/instance_map_deco.h +++ b/code/ryzom/client/src/r2/instance_map_deco.h @@ -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 diff --git a/code/ryzom/client/src/r2/tool_choose_pos.h b/code/ryzom/client/src/r2/tool_choose_pos.h index 7b02a41ea..9eddb3fd6 100644 --- a/code/ryzom/client/src/r2/tool_choose_pos.h +++ b/code/ryzom/client/src/r2/tool_choose_pos.h @@ -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 &polyList = std::vector(), + const std::vector &polyList = std::vector(), const CPrimLook &polyValidLook = CPrimLook(), const CPrimLook &polyInvalidLook = CPrimLook() ); diff --git a/code/ryzom/client/src/r2/tool_choose_pos_lua.h b/code/ryzom/client/src/r2/tool_choose_pos_lua.h index 6f08664e9..8e21c716e 100644 --- a/code/ryzom/client/src/r2/tool_choose_pos_lua.h +++ b/code/ryzom/client/src/r2/tool_choose_pos_lua.h @@ -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 &polyList = std::vector(), + const std::vector &polyList = std::vector(), const CPrimLook &polyValidLook = CPrimLook(), const CPrimLook &polyInvalidLook = CPrimLook() ); diff --git a/code/ryzom/client/src/r2/tool_draw_prim.h b/code/ryzom/client/src/r2/tool_draw_prim.h index 584f36c81..fd85bd498 100644 --- a/code/ryzom/client/src/r2/tool_draw_prim.h +++ b/code/ryzom/client/src/r2/tool_draw_prim.h @@ -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 &splitPoly) const; + bool isValidPolyShape(bool ignoreLast, std::list &splitPoly) const; bool testAccessibleEdges(bool ignoreLast); void doUpdateBeforeRender(); }; diff --git a/code/ryzom/client/src/sky.h b/code/ryzom/client/src/sky.h index 05cca81b3..db34f0f21 100644 --- a/code/ryzom/client/src/sky.h +++ b/code/ryzom/client/src/sky.h @@ -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 &bitmapByName, - std::vector &builtBitmaps, + std::map &bitmapByName, + std::vector &builtBitmaps, bool &alreadyBuilt ); diff --git a/code/ryzom/client/src/sky_object.h b/code/ryzom/client/src/sky_object.h index 1891897e3..51b252166 100644 --- a/code/ryzom/client/src/sky_object.h +++ b/code/ryzom/client/src/sky_object.h @@ -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 &bitmapByName, - std::vector &buildBitmap); + std::map &bitmapByName, + std::vector &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 WeatherToGradient; - CBitmap Slice0[2]; // 2 column for slice 0 - CBitmap Slice1[2]; // 2 columns for slice 1 - CBitmap Final; + std::vector 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 &bitmapByName, - std::vector &buildBitmap); - void setup(NL3D::UInstance instance, float dayPart, float weatherLevel, CBitmap &gradientCache, CBitmap &gradientCacheBlurred); + std::map &bitmapByName, + std::vector &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 &bitmapByName, - std::vector &builtBitmaps, + std::map &bitmapByName, + std::vector &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); }; diff --git a/code/ryzom/server/src/frontend_service/client_host.h b/code/ryzom/server/src/frontend_service/client_host.h index 9f2f22442..a6ccf86c3 100644 --- a/code/ryzom/server/src/frontend_service/client_host.h +++ b/code/ryzom/server/src/frontend_service/client_host.h @@ -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; diff --git a/code/ryzom/server/src/frontend_service/distance_prioritizer.h b/code/ryzom/server/src/frontend_service/distance_prioritizer.h index 397a86e97..2698eb4aa 100644 --- a/code/ryzom/server/src/frontend_service/distance_prioritizer.h +++ b/code/ryzom/server/src/frontend_service/distance_prioritizer.h @@ -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 - bool discreetPropertyHasChanged(const CPropertyHistory::CPropertyEntry& entry, const CMirrorPropValueRO& currentValue, TPropIndex propIndex, T* ) const + bool discreetPropertyHasChanged(const CPropertyHistory::CPropertyEntry& entry, const CMirrorPropValueRO& 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& currentValue, TPropIndex propIndex, TDataSetRow* ) const + bool discreetPropertyHasChanged(const CPropertyHistory::CPropertyEntry& entry, const CMirrorPropValueRO& currentValue, CLFECOMMON::TPropIndex propIndex, TDataSetRow* ) const { if (entry.HasValue) { @@ -678,7 +678,7 @@ public: * Test the criterion for target list + initialized */ template - 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; }; diff --git a/code/ryzom/server/src/frontend_service/entity_container.cpp b/code/ryzom/server/src/frontend_service/entity_container.cpp index 2d9b9d487..d7ce16e0a 100644 --- a/code/ryzom/server/src/frontend_service/entity_container.cpp +++ b/code/ryzom/server/src/frontend_service/entity_container.cpp @@ -23,6 +23,7 @@ using namespace std; using namespace NLMISC; +using namespace CLFECOMMON; const TDataSetIndex LAST_VISION_CHANGE = LAST_CHANGED; diff --git a/code/ryzom/server/src/frontend_service/entity_container.h b/code/ryzom/server/src/frontend_service/entity_container.h index 5eb8a65a2..6d6ab32ed 100644 --- a/code/ryzom/server/src/frontend_service/entity_container.h +++ b/code/ryzom/server/src/frontend_service/entity_container.h @@ -41,8 +41,6 @@ inline uint32 asUInt32 (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 X; + CMirrorPropValueROCF X; /// Property Y direct access + previous value - CMirrorPropValueROCF Y; + CMirrorPropValueROCF Y; #ifdef STORE_MIRROR_VP_IN_CLASS CMirrorPropValueRO 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 - 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 - bool checkPropertyInitialized( TPropIndex propIndex, TPropertyIndex dsPropertyIndex, const TEntityIndex& entityIndex, T* ) + bool checkPropertyInitialized( CLFECOMMON::TPropIndex propIndex, TPropertyIndex dsPropertyIndex, const TEntityIndex& entityIndex, T* ) { CMirrorPropValueRO 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 value( *DataSet, entityIndex, dsPropertyIndex ); return PropInitialized[propIndex] = ( asUInt32(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; diff --git a/code/ryzom/server/src/frontend_service/gateway_fes_transport.cpp b/code/ryzom/server/src/frontend_service/gateway_fes_transport.cpp index 3f3872508..98ae8cc68 100644 --- a/code/ryzom/server/src/frontend_service/gateway_fes_transport.cpp +++ b/code/ryzom/server/src/frontend_service/gateway_fes_transport.cpp @@ -26,6 +26,7 @@ using namespace std; using namespace NLMISC; using namespace NLNET; +using namespace CLFECOMMON; extern CGenericXmlMsgHeaderManager GenericXmlMsgHeaderMngr;