Skip to content
Permalink
Browse files

Update cmake compiler Visual Studio. (#701)

* Update cmake compiler Visual Studio.

* Update CMakeLists.txt

* Update CMakeLists.txt

* Update : namespace C++17

* Update : namespace C++17
  • Loading branch information...
schnek authored and Zyres committed Jul 31, 2019
1 parent 62fd020 commit b0b097affc08fdb3bbead774df9cbe9e25a617f2
Showing 423 changed files with 1,485 additions and 1,518 deletions.
@@ -1,16 +1,16 @@
# Copyright (c) 2014-2019 AscEmu Team <http://www.ascemu.org>

if(MSVC_VERSION VERSION_LESS 19.0.24210) #2015 3
message(FATAL_ERROR "AscEmu requires at least Visual Studio 2015 update 3")
if(MSVC_VERSION VERSION_LESS 19.13) #2017 6
message(FATAL_ERROR "AscEmu requires at least Visual Studio 2017 update 6")
endif()

message(STATUS "Applying settings for ${CMAKE_CXX_COMPILER_ID}")

add_definitions(-D_CRT_SECURE_NO_WARNINGS)

#set defines for msvc
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /EHa /MP /bigobj")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHa /MP /bigobj")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /std:c++17 /EHa /MP /bigobj")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /std:c++17 /EHa /MP /bigobj")

# set build platform specific settings (x86/x64)
if(NOT IS_64BIT)
@@ -7,19 +7,16 @@ This file is released under the MIT license. See README-MIT for more information
#include <exception>
#include <string>

namespace AscEmu
namespace AscEmu::Exception
{
namespace Exception
class AscemuException : public std::exception
{
class AscemuException : public std::exception
{
protected:
const std::string m_exceptionString;
protected:
const std::string m_exceptionString;

public:
const char* AEwhat() { return m_exceptionString.c_str(); }
explicit AscemuException() : exception(), m_exceptionString("An unspecified exception has occurred in AscEmu") { }
explicit AscemuException(const char* exceptionString) : exception(), m_exceptionString(exceptionString) { }
};
}
}
public:
const char* AEwhat() { return m_exceptionString.c_str(); }
explicit AscemuException() : exception(), m_exceptionString("An unspecified exception has occurred in AscEmu") { }
explicit AscemuException(const char* exceptionString) : exception(), m_exceptionString(exceptionString) { }
};
}
@@ -7,14 +7,11 @@ This file is released under the MIT license. See README-MIT for more information

#include "Exceptions.hpp"

namespace AscEmu
namespace AscEmu::Exception
{
namespace Exception
class PlayerNotFoundException : public AscemuException
{
class PlayerNotFoundException : public AscemuException
{
public:
explicit PlayerNotFoundException() : AscemuException("Player not found") { }
};
}
public:
explicit PlayerNotFoundException() : AscemuException("Player not found") { }
};
}
@@ -23,14 +23,16 @@
#ifndef ARCEMU_SYSINFO_HPP
#define ARCEMU_SYSINFO_HPP

namespace Arcemu{
namespace Arcemu
{
////////////////////////////////////////////////////////
//class SysInfo
// Class with static methods capable of retrieving
// some basic system information
//
///////////////////////////////////////////////////////
class SysInfo{
class SysInfo
{
public:
////////////////////////////////////////////////////////////////////
//static int GetCPUCount()
@@ -16,7 +16,7 @@ using std::chrono::steady_clock;
using std::chrono::milliseconds;
using std::this_thread::sleep_for;

namespace AscEmu { namespace Threading
namespace AscEmu::Threading
{
atomic<unsigned int> AEThread::s_thread_id_counter(0);

@@ -136,4 +136,4 @@ namespace AscEmu { namespace Threading
requestKill();
join();
}
}}
}
@@ -10,7 +10,7 @@ This file is released under the MIT license. See README-MIT for more information
#include <functional>

// Lightweight wrapper for std::thread to provide extensibility
namespace AscEmu { namespace Threading
namespace AscEmu::Threading
{
class AEThread
{
@@ -56,4 +56,4 @@ namespace AscEmu { namespace Threading
void setWork(ThreadFunc work);
bool isWorking() const;
};
}}
}
@@ -16,7 +16,7 @@ using std::string;
using std::unique_ptr;


namespace AscEmu { namespace Threading
namespace AscEmu::Threading
{
unique_ptr<AEThreadPool> AEThreadPool::s_global_thread_pool;

@@ -213,4 +213,4 @@ namespace AscEmu { namespace Threading
[this](AEThread& thread) { this->pulse(thread); }, m_pulseFrequency,
true);
}
}}
}
@@ -12,7 +12,7 @@ This file is released under the MIT license. See README-MIT for more information

#include "AEThread.h"

namespace AscEmu { namespace Threading
namespace AscEmu::Threading
{
class AEThreadPool
{
@@ -77,4 +77,4 @@ namespace AscEmu { namespace Threading
private:
#pragma endregion
};
}}
}
@@ -5,7 +5,7 @@ This file is released under the MIT license. See README-MIT for more information

#pragma once

namespace AscEmu { namespace Threading
namespace AscEmu::Threading
{
enum class ThreadState
{
@@ -15,4 +15,4 @@ namespace AscEmu { namespace Threading
Busy,
Awaiting
};
}}
}
@@ -7,42 +7,39 @@ This file is released under the MIT license. See README-MIT for more information

#include "AreaStorage.hpp"

namespace MapManagement
namespace MapManagement::AreaManagement
{
namespace AreaManagement
enum AreaFlags
{
enum AreaFlags
{
AREA_FLAG_UNK0 = 0x00000001, // Unknown
AREA_FLAG_UNK1 = 0x00000002, // Razorfen Downs, Naxxramas and Acherus: The Ebon Hold (3.3.5a)
AREA_FLAG_UNK2 = 0x00000004, // Only used for areas on map 571 (development before)
AREA_FLAG_SLAVE_CAPITAL = 0x00000008, // city and city subsones
AREA_FLAG_UNK3 = 0x00000010, // can't find common meaning
AREA_FLAG_SLAVE_CAPITAL2 = 0x00000020, // slave capital city flag?
AREA_FLAG_ALLOW_DUELS = 0x00000040, // allow to duel here
AREA_FLAG_ARENA = 0x00000080, // arena, both instanced and world arenas
AREA_FLAG_CAPITAL = 0x00000100, // main capital city flag
AREA_FLAG_CITY = 0x00000200, // only for one zone named "City" (where it located?)
AREA_FLAG_OUTLAND = 0x00000400, // expansion zones? (only Eye of the Storm not have this flag, but have 0x00004000 flag)
AREA_FLAG_SANCTUARY = 0x00000800, // sanctuary area (PvP disabled)
AREA_FLAG_NEED_FLY = 0x00001000, // Respawn alive at the graveyard without corpse
AREA_FLAG_UNUSED1 = 0x00002000, // Unused in 3.3.5a
AREA_FLAG_OUTLAND2 = 0x00004000, // expansion zones? (only Circle of Blood Arena not have this flag, but have 0x00000400 flag)
AREA_FLAG_OUTDOOR_PVP = 0x00008000, // pvp objective area? (Death's Door also has this flag although it's no pvp object area)
AREA_FLAG_ARENA_INSTANCE = 0x00010000, // used by instanced arenas only
AREA_FLAG_UNUSED2 = 0x00020000, // Unused in 3.3.5a
AREA_FLAG_CONTESTED_AREA = 0x00040000, // On PvP servers these areas are considered contested, even though the zone it is contained in is a Horde/Alliance territory.
AREA_FLAG_UNK4 = 0x00080000, // Valgarde and Acherus: The Ebon Hold
AREA_FLAG_LOWLEVEL = 0x00100000, // used for some starting areas with area_level <= 15
AREA_FLAG_TOWN = 0x00200000, // small towns with Inn
AREA_FLAG_REST_ZONE_HORDE = 0x00400000, // Instead of using areatriggers, the zone will act as one for Horde players (Warsong Hold, Acherus: The Ebon Hold, New Agamand Inn, Vengeance Landing Inn, Sunreaver Pavilion, etc)
AREA_FLAG_REST_ZONE_ALLIANCE = 0x00800000, // Instead of using areatriggers, the zone will act as one for Alliance players (Valgarde, Acherus: The Ebon Hold, Westguard Inn, Silver Covenant Pavilion, etc)
AREA_FLAG_WINTERGRASP = 0x01000000, // Wintergrasp and it's subzones
AREA_FLAG_INSIDE = 0x02000000, // used for determinating spell related inside/outside questions in Map::IsOutdoors
AREA_FLAG_OUTSIDE = 0x04000000, // used for determinating spell related inside/outside questions in Map::IsOutdoors
AREA_FLAG_WINTERGRASP_2 = 0x08000000, // Can Hearth And Resurrect From Area
AREA_FLAG_NO_FLY_ZONE = 0x20000000 // Marks zones where you cannot fly
};

} // </ AreaManagementNamespace>
} // </ MapManagementNamespace>
AREA_FLAG_UNK0 = 0x00000001, // Unknown
AREA_FLAG_UNK1 = 0x00000002, // Razorfen Downs, Naxxramas and Acherus: The Ebon Hold (3.3.5a)
AREA_FLAG_UNK2 = 0x00000004, // Only used for areas on map 571 (development before)
AREA_FLAG_SLAVE_CAPITAL = 0x00000008, // city and city subsones
AREA_FLAG_UNK3 = 0x00000010, // can't find common meaning
AREA_FLAG_SLAVE_CAPITAL2 = 0x00000020, // slave capital city flag?
AREA_FLAG_ALLOW_DUELS = 0x00000040, // allow to duel here
AREA_FLAG_ARENA = 0x00000080, // arena, both instanced and world arenas
AREA_FLAG_CAPITAL = 0x00000100, // main capital city flag
AREA_FLAG_CITY = 0x00000200, // only for one zone named "City" (where it located?)
AREA_FLAG_OUTLAND = 0x00000400, // expansion zones? (only Eye of the Storm not have this flag, but have 0x00004000 flag)
AREA_FLAG_SANCTUARY = 0x00000800, // sanctuary area (PvP disabled)
AREA_FLAG_NEED_FLY = 0x00001000, // Respawn alive at the graveyard without corpse
AREA_FLAG_UNUSED1 = 0x00002000, // Unused in 3.3.5a
AREA_FLAG_OUTLAND2 = 0x00004000, // expansion zones? (only Circle of Blood Arena not have this flag, but have 0x00000400 flag)
AREA_FLAG_OUTDOOR_PVP = 0x00008000, // pvp objective area? (Death's Door also has this flag although it's no pvp object area)
AREA_FLAG_ARENA_INSTANCE = 0x00010000, // used by instanced arenas only
AREA_FLAG_UNUSED2 = 0x00020000, // Unused in 3.3.5a
AREA_FLAG_CONTESTED_AREA = 0x00040000, // On PvP servers these areas are considered contested, even though the zone it is contained in is a Horde/Alliance territory.
AREA_FLAG_UNK4 = 0x00080000, // Valgarde and Acherus: The Ebon Hold
AREA_FLAG_LOWLEVEL = 0x00100000, // used for some starting areas with area_level <= 15
AREA_FLAG_TOWN = 0x00200000, // small towns with Inn
AREA_FLAG_REST_ZONE_HORDE = 0x00400000, // Instead of using areatriggers, the zone will act as one for Horde players (Warsong Hold, Acherus: The Ebon Hold, New Agamand Inn, Vengeance Landing Inn, Sunreaver Pavilion, etc)
AREA_FLAG_REST_ZONE_ALLIANCE = 0x00800000, // Instead of using areatriggers, the zone will act as one for Alliance players (Valgarde, Acherus: The Ebon Hold, Westguard Inn, Silver Covenant Pavilion, etc)
AREA_FLAG_WINTERGRASP = 0x01000000, // Wintergrasp and it's subzones
AREA_FLAG_INSIDE = 0x02000000, // used for determinating spell related inside/outside questions in Map::IsOutdoors
AREA_FLAG_OUTSIDE = 0x04000000, // used for determinating spell related inside/outside questions in Map::IsOutdoors
AREA_FLAG_WINTERGRASP_2 = 0x08000000, // Can Hearth And Resurrect From Area
AREA_FLAG_NO_FLY_ZONE = 0x20000000 // Marks zones where you cannot fly
};

} // </ AreaManagementNamespace>

0 comments on commit b0b097a

Please sign in to comment.
You can’t perform that action at this time.