Skip to content

Commit

Permalink
Fixes compiler errors
Browse files Browse the repository at this point in the history
  • Loading branch information
mattyx14 committed Dec 25, 2016
1 parent c8d69fc commit 19cc92e
Show file tree
Hide file tree
Showing 14 changed files with 36 additions and 84 deletions.
5 changes: 5 additions & 0 deletions path_7_7/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ ipch/
*.opendb
*.sdf
*.cachefile
*.VC.db

# Visual Studio profiler
*.psess
Expand Down Expand Up @@ -170,3 +171,7 @@ pip-log.txt
.*.swp
.*.swo

*.dll
config.lua
theforgottenserver.exe
vc14/theforgottenserver.VC.db
1 change: 1 addition & 0 deletions path_7_7/.travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ addons:
packages:
- libboost-dev
- libboost-system-dev
- libboost-iostreams-dev
- liblua5.2-dev
- libluajit-5.1-dev
- libmysqlclient-dev
Expand Down
13 changes: 4 additions & 9 deletions path_7_7/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,14 @@ set(CMAKE_DISABLE_IN_SOURCE_BUILD ON)

project(tfs)

set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH})
list(INSERT CMAKE_MODULE_PATH 0 "${CMAKE_CURRENT_SOURCE_DIR}/cmake")

include(cotire)

# Initialize CXXFLAGS.
set(CMAKE_CXX_FLAGS "-Wall -Werror -pipe")
set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g")
set(CMAKE_CXX_FLAGS_MINSIZEREL "-Os -DNDEBUG")
set(CMAKE_CXX_FLAGS_RELEASE "-Ofast -march=native -DNDEBUG")
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g")
add_compile_options(-Wall -Werror -pipe -fvisibility=hidden)

if (CMAKE_COMPILER_IS_GNUCXX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-strict-aliasing")
add_compile_options(-fno-strict-aliasing)
endif()

include(FindCXX11)
Expand All @@ -40,7 +35,7 @@ else()
find_package(Lua)
endif()

find_package(Boost 1.53.0 COMPONENTS system REQUIRED)
find_package(Boost 1.53.0 COMPONENTS system iostreams REQUIRED)

include(src/CMakeLists.txt)
add_executable(tfs ${tfs_SRC})
Expand Down
11 changes: 3 additions & 8 deletions path_7_7/cmake/FindCXX11.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,14 @@ enable_language(CXX)

check_cxx_compiler_flag("-std=c++11" COMPILER_KNOWS_CXX11)
if(COMPILER_KNOWS_CXX11)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
add_compile_options(-std=c++11)

# Tested on Mac OS X 10.8.2 with XCode 4.6 Command Line Tools
# Clang requires this to find the correct c++11 headers
check_cxx_compiler_flag("-stdlib=libc++" COMPILER_KNOWS_STDLIB)
if(APPLE AND COMPILER_KNOWS_STDLIB)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
add_compile_options(-stdlib=libc++)
endif()
else()
check_cxx_compiler_flag("-std=c++0x" COMPILER_KNOWS_CXX0X)
if(COMPILER_KNOWS_CXX0X)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
else()
message(FATAL_ERROR "Your C++ compiler does not support C++11.")
endif()
message(FATAL_ERROR "Your C++ compiler does not support C++11.")
endif()
12 changes: 0 additions & 12 deletions path_7_7/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,6 @@ displayLootMessage = false
UHTrap = true
heightStackBlock = true

-- Critical hits
-- NOTE: criticalChance and extraPercent are percentages, not absolute values.
-- extraPercent is the extra percentage of the damage to be added.
criticalChance = 1
criticalExtra = 100

-- Rates
-- NOTE: rateExp is not used if you have enabled stages in data/XML/stages.xml
rateExp = 5
Expand All @@ -88,12 +82,6 @@ rateLoot = 2
rateMagic = 3
rateSpawn = 1

-- Critical hits
-- NOTE: criticalChance and extraPercent are percentages, not absolute values.
-- extraPercent is the extra percentage of the damage to be added.
criticalChance = 1
criticalExtra = 100

-- Monsters
deSpawnRange = 2
deSpawnRadius = 50
Expand Down
2 changes: 2 additions & 0 deletions path_7_7/vc14/theforgottenserver.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@
<ClCompile Include="..\src\scheduler.cpp" />
<ClCompile Include="..\src\scriptmanager.cpp" />
<ClCompile Include="..\src\server.cpp" />
<ClCompile Include="..\src\signals.cpp" />
<ClCompile Include="..\src\spawn.cpp" />
<ClCompile Include="..\src\spells.cpp" />
<ClCompile Include="..\src\talkaction.cpp" />
Expand Down Expand Up @@ -271,6 +272,7 @@
<ClInclude Include="..\src\scheduler.h" />
<ClInclude Include="..\src\scriptmanager.h" />
<ClInclude Include="..\src\server.h" />
<ClInclude Include="..\src\signals.h" />
<ClInclude Include="..\src\spawn.h" />
<ClInclude Include="..\src\spells.h" />
<ClInclude Include="..\src\talkaction.h" />
Expand Down
12 changes: 0 additions & 12 deletions path_8_5/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,6 @@ classicEquipmentSlots = false
allowWalkthrough = true
autoStackItems = false

-- Critical hits
-- NOTE: criticalChance and extraPercent are percentages, not absolute values.
-- extraPercent is the extra percentage of the damage to be added.
criticalChance = 1
criticalExtra = 100

-- Rates
-- NOTE: rateExp is not used if you have enabled stages in data/XML/stages.xml
rateExp = 5
Expand All @@ -86,12 +80,6 @@ rateLoot = 2
rateMagic = 3
rateSpawn = 1

-- Critical hits
-- NOTE: criticalChance and extraPercent are percentages, not absolute values.
-- extraPercent is the extra percentage of the damage to be added.
criticalChance = 1
criticalExtra = 100

-- Monsters
deSpawnRange = 2
deSpawnRadius = 50
Expand Down
12 changes: 0 additions & 12 deletions path_8_6/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,6 @@ emoteSpells = true
classicEquipmentSlots = false
allowWalkthrough = true

-- Critical hits
-- NOTE: criticalChance and extraPercent are percentages, not absolute values.
-- extraPercent is the extra percentage of the damage to be added.
criticalChance = 1
criticalExtra = 100

-- Rates
-- NOTE: rateExp is not used if you have enabled stages in data/XML/stages.xml
rateExp = 5
Expand All @@ -85,12 +79,6 @@ rateLoot = 2
rateMagic = 3
rateSpawn = 1

-- Critical hits
-- NOTE: criticalChance and extraPercent are percentages, not absolute values.
-- extraPercent is the extra percentage of the damage to be added.
criticalChance = 1
criticalExtra = 100

-- Monsters
deSpawnRange = 2
deSpawnRadius = 50
Expand Down
5 changes: 5 additions & 0 deletions path_8_7/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ ipch/
*.opendb
*.sdf
*.cachefile
*.VC.db

# Visual Studio profiler
*.psess
Expand Down Expand Up @@ -170,3 +171,7 @@ pip-log.txt
.*.swp
.*.swo

*.dll
config.lua
theforgottenserver.exe
vc14/theforgottenserver.VC.db
1 change: 1 addition & 0 deletions path_8_7/.travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ addons:
packages:
- libboost-dev
- libboost-system-dev
- libboost-iostreams-dev
- liblua5.2-dev
- libluajit-5.1-dev
- libmysqlclient-dev
Expand Down
13 changes: 4 additions & 9 deletions path_8_7/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,14 @@ set(CMAKE_DISABLE_IN_SOURCE_BUILD ON)

project(tfs)

set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH})
list(INSERT CMAKE_MODULE_PATH 0 "${CMAKE_CURRENT_SOURCE_DIR}/cmake")

include(cotire)

# Initialize CXXFLAGS.
set(CMAKE_CXX_FLAGS "-Wall -Werror -pipe")
set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g")
set(CMAKE_CXX_FLAGS_MINSIZEREL "-Os -DNDEBUG")
set(CMAKE_CXX_FLAGS_RELEASE "-Ofast -march=native -DNDEBUG")
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g")
add_compile_options(-Wall -Werror -pipe -fvisibility=hidden)

if (CMAKE_COMPILER_IS_GNUCXX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-strict-aliasing")
add_compile_options(-fno-strict-aliasing)
endif()

include(FindCXX11)
Expand All @@ -40,7 +35,7 @@ else()
find_package(Lua)
endif()

find_package(Boost 1.53.0 COMPONENTS system REQUIRED)
find_package(Boost 1.53.0 COMPONENTS system iostreams REQUIRED)

include(src/CMakeLists.txt)
add_executable(tfs ${tfs_SRC})
Expand Down
11 changes: 3 additions & 8 deletions path_8_7/cmake/FindCXX11.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,14 @@ enable_language(CXX)

check_cxx_compiler_flag("-std=c++11" COMPILER_KNOWS_CXX11)
if(COMPILER_KNOWS_CXX11)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
add_compile_options(-std=c++11)

# Tested on Mac OS X 10.8.2 with XCode 4.6 Command Line Tools
# Clang requires this to find the correct c++11 headers
check_cxx_compiler_flag("-stdlib=libc++" COMPILER_KNOWS_STDLIB)
if(APPLE AND COMPILER_KNOWS_STDLIB)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
add_compile_options(-stdlib=libc++)
endif()
else()
check_cxx_compiler_flag("-std=c++0x" COMPILER_KNOWS_CXX0X)
if(COMPILER_KNOWS_CXX0X)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
else()
message(FATAL_ERROR "Your C++ compiler does not support C++11.")
endif()
message(FATAL_ERROR "Your C++ compiler does not support C++11.")
endif()
20 changes: 6 additions & 14 deletions path_8_7/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,19 @@
worldType = "pvp"
hotkeyAimbotEnabled = true
protectionLevel = 1
killsToRedSkull = 3
killsToBlackSkull = 6
pzLocked = 60 * 1000
removeChargesFromRunes = true
timeToDecreaseFrags = 24 * 60 * 60 * 1000
whiteSkullTime = 15 * 60 * 1000
stairJumpExhaustion = 2 * 1000
experienceByKillingPlayers = false
expFromPlayersLevelRange = 75
dayKillsToRedSkull = 3
weekKillsToRedSkull = 5
monthKillsToRedSkull = 10
redSkullDuration = 30
blackSkullDuration = 45
orangeSkullDuration = 7

-- Connection Config
-- NOTE: maxPlayers set to 0 means no limit
Expand Down Expand Up @@ -71,12 +75,6 @@ emoteSpells = true
classicEquipmentSlots = false
allowWalkthrough = true

-- Critical hits
-- NOTE: criticalChance and extraPercent are percentages, not absolute values.
-- extraPercent is the extra percentage of the damage to be added.
criticalChance = 1
criticalExtra = 100

-- Rates
-- NOTE: rateExp is not used if you have enabled stages in data/XML/stages.xml
rateExp = 5
Expand All @@ -85,12 +83,6 @@ rateLoot = 2
rateMagic = 3
rateSpawn = 1

-- Critical hits
-- NOTE: criticalChance and extraPercent are percentages, not absolute values.
-- extraPercent is the extra percentage of the damage to be added.
criticalChance = 1
criticalExtra = 100

-- Monsters
deSpawnRange = 2
deSpawnRadius = 50
Expand Down
2 changes: 2 additions & 0 deletions path_8_7/vc14/theforgottenserver.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@
<ClCompile Include="..\src\scheduler.cpp" />
<ClCompile Include="..\src\scriptmanager.cpp" />
<ClCompile Include="..\src\server.cpp" />
<ClCompile Include="..\src\signals.cpp" />
<ClCompile Include="..\src\spawn.cpp" />
<ClCompile Include="..\src\spells.cpp" />
<ClCompile Include="..\src\talkaction.cpp" />
Expand Down Expand Up @@ -279,6 +280,7 @@
<ClInclude Include="..\src\scheduler.h" />
<ClInclude Include="..\src\scriptmanager.h" />
<ClInclude Include="..\src\server.h" />
<ClInclude Include="..\src\signals.h" />
<ClInclude Include="..\src\spawn.h" />
<ClInclude Include="..\src\spells.h" />
<ClInclude Include="..\src\talkaction.h" />
Expand Down

0 comments on commit 19cc92e

Please sign in to comment.