Changeset 44 for trunk/src/game/Map.h
- Timestamp:
- 11/19/08 13:27:40 (17 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/game/Map.h
r2 r44 1 1 /* 2 * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/> 2 * Copyright (C) 2008 Trinity <http://www.trinitycore.org/> 3 * 4 * Thanks to the original authors: MaNGOS <http://www.mangosproject.org/> 3 5 * 4 6 * This program is free software; you can redistribute it and/or modify … … 9 11 * This program is distributed in the hope that it will be useful, 10 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 14 * GNU General Public License for more details. 13 15 * 14 16 * You should have received a copy of the GNU General Public License 15 17 * along with this program; if not, write to the Free Software 16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307USA18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 19 */ 18 20 19 #ifndef MANGOS_MAP_H20 #define MANGOS_MAP_H21 #ifndef TRINITY_MAP_H 22 #define TRINITY_MAP_H 21 23 22 24 #include "Platform/Define.h" … … 54 56 { 55 57 RGuard(MUTEX &l) : i_lock(l.getReadLock()) {} 56 MaNGOS::GeneralLock<LOCK_TYPE> i_lock;58 Trinity::GeneralLock<LOCK_TYPE> i_lock; 57 59 }; 58 60 … … 61 63 { 62 64 WGuard(MUTEX &l) : i_lock(l.getWriteLock()) {} 63 MaNGOS::GeneralLock<LOCK_TYPE> i_lock;65 Trinity::GeneralLock<LOCK_TYPE> i_lock; 64 66 }; 65 67 66 68 typedef RGuard<GridRWLock, ZThread::Lockable> GridReadGuard; 67 69 typedef WGuard<GridRWLock, ZThread::Lockable> GridWriteGuard; 68 typedef MaNGOS::SingleThreaded<GridRWLock>::Lock NullGuard;70 typedef Trinity::SingleThreaded<GridRWLock>::Lock NullGuard; 69 71 70 72 typedef struct … … 123 125 #define MIN_UNLOAD_DELAY 1 // immediate unload 124 126 125 class MANGOS_DLL_SPEC Map : public GridRefManager<NGridType>, public MaNGOS::ObjectLevelLockable<Map, ZThread::Mutex>127 class TRINITY_DLL_SPEC Map : public GridRefManager<NGridType>, public Trinity::ObjectLevelLockable<Map, ZThread::Mutex> 126 128 { 127 129 public: … … 151 153 inline bool IsRemovalGrid(float x, float y) const 152 154 { 153 GridPair p = MaNGOS::ComputeGridPair(x, y);155 GridPair p = Trinity::ComputeGridPair(x, y); 154 156 return( !getNGrid(p.x_coord, p.y_coord) || getNGrid(p.x_coord, p.y_coord)->GetGridState() == GRID_STATE_REMOVAL ); 155 157 } … … 273 275 274 276 protected: 275 typedef MaNGOS::ObjectLevelLockable<Map, ZThread::Mutex>::Lock Guard;277 typedef Trinity::ObjectLevelLockable<Map, ZThread::Mutex>::Lock Guard; 276 278 277 279 MapEntry const* i_mapEntry; … … 317 319 }; 318 320 319 class MANGOS_DLL_SPEC InstanceMap : public Map321 class TRINITY_DLL_SPEC InstanceMap : public Map 320 322 { 321 323 public: … … 351 353 }; 352 354 353 class MANGOS_DLL_SPEC BattleGroundMap : public Map355 class TRINITY_DLL_SPEC BattleGroundMap : public Map 354 356 { 355 357 public: