Compare commits

...

20 Commits

Author SHA1 Message Date
Akkadius c0a88de4fb pch 2023-12-16 21:03:58 -06:00
Akkadius 5117843089 Incremental 2023-12-16 19:44:33 -06:00
Akkadius 77c7ea191a Win gate 2023-12-16 19:36:42 -06:00
Akkadius 527798db92 Pull out includes in common 2023-12-16 19:28:55 -06:00
Akkadius 3ea644b732 Remove header only 2023-12-16 19:23:08 -06:00
Akkadius 3850343254 Update eqemu_logsys.h 2023-12-16 19:15:06 -06:00
Akkadius 77597c7868 !!!!! 2023-12-16 19:03:39 -06:00
Akkadius 8a0ef65373 WHAT 2023-12-16 18:59:11 -06:00
Akkadius 75d9e6ffaf FMT test 2023-12-16 18:54:25 -06:00
Akkadius e9ca2b4202 Without lua ? 2023-12-16 18:42:11 -06:00
Akkadius a29a2321f1 Without fmt ? 2023-12-16 18:33:15 -06:00
Akkadius 5ff9407e26 Test 2023-12-16 18:13:43 -06:00
Akkadius 20e135fbc4 PCH main zone primitives 2023-12-16 18:05:20 -06:00
Akkadius e21c386bda Lua headers 2023-12-16 18:00:04 -06:00
Akkadius 73a85135b2 Another one 2023-12-16 17:55:02 -06:00
Akkadius 87b1dc4b03 Another one 2023-12-16 17:48:22 -06:00
Akkadius b2bf1d2b6f Different test 2023-12-16 17:37:58 -06:00
Akkadius 4a8b89f93a GCC test 2023-12-16 17:28:31 -06:00
Akkadius 1cccca45a0 Another run 2023-12-16 17:18:54 -06:00
Akkadius 8af4fb2330 Experiment with PCH 2023-12-16 17:11:23 -06:00
48 changed files with 191 additions and 75 deletions
+4
View File
@@ -787,6 +787,10 @@ INCLUDE_DIRECTORIES(Patches SocketLib StackWalker)
ADD_LIBRARY(common ${common_sources} ${common_headers} ${repositories})
IF(WIN32)
TARGET_PRECOMPILE_HEADERS(common PRIVATE pch/pch.h)
ENDIF(WIN32)
IF (UNIX)
SET_SOURCE_FILES_PROPERTIES("SocketLib/Mime.cpp" PROPERTY COMPILE_FLAGS -Wno-unused-result)
SET_SOURCE_FILES_PROPERTIES("patches/sod.cpp" "patches/sof.cpp" "patches/rof.cpp" "patches/rof2.cpp" "patches/uf.cpp" PROPERTIES COMPILE_FLAGS -O0)
+1 -1
View File
@@ -15,7 +15,7 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <fmt/format.h>
#include <fmt/core.h>
#include "../common/global_define.h"
#include "../common/classes.h"
#include "data_verification.h"
+1 -1
View File
@@ -18,7 +18,7 @@
*
*/
#include <fmt/format.h>
#include <fmt/core.h>
#include "eqemu_command_handler.h"
#include "terminal_color.hpp"
#include "../platform.h"
+1 -1
View File
@@ -22,7 +22,7 @@
#include "linked_list.h"
#include "path_manager.h"
#include <fstream>
#include <fmt/format.h>
#include <fmt/core.h>
struct LoginConfig {
std::string LoginHost;
+3 -2
View File
@@ -33,9 +33,10 @@
#endif
#endif
#include <fmt/format.h>
#undef FMT_HEADER_ONLY
#include <fmt/core.h>
#include "types.h"
namespace Logs {
enum DebugLevel {
General = 1, // 1 - Low-Level general debugging, useful info on single line
@@ -2,7 +2,7 @@
#include "../repositories/character_data_repository.h"
#include "../json/json_archive_single_line.h"
#include <vector>
#include <fmt/format.h>
#include <fmt/core.h>
#include <cereal/archives/json.hpp>
#include <cereal/types/vector.hpp>
+1
View File
@@ -22,6 +22,7 @@
#include "../common/strings.h"
#include "../common/rulesys.h"
#include "../common/util/uuid.h"
#include <fmt/core.h>
#include <fmt/format.h>
const char* const DZ_REPLAY_TIMER_NAME = "Replay Timer"; // see December 14, 2016 patch notes
+1 -1
View File
@@ -35,7 +35,7 @@
#endif
#include <fmt/format.h>
#include <fmt/core.h>
#include <filesystem>
#include <iostream>
+1 -1
View File
@@ -19,7 +19,7 @@
*/
#include <cstring>
#include <fmt/format.h>
#include <fmt/core.h>
#include <csignal>
#include <vector>
#include "ip_util.h"
+1 -1
View File
@@ -1,6 +1,6 @@
#include "console_server.h"
#include "../strings.h"
#include <fmt/format.h>
#include <fmt/core.h>
EQ::Net::ConsoleServer::ConsoleServer(const std::string &addr, int port)
{
+4 -4
View File
@@ -4,7 +4,7 @@
#include "../eqemu_logsys.h"
#include "../servertalk.h"
#include "../rulesys.h"
#include <fmt/format.h>
#include <fmt/core.h>
EQ::Net::ConsoleServerConnection::ConsoleServerConnection(ConsoleServer *parent, std::shared_ptr<TCPConnection> connection)
{
@@ -21,7 +21,7 @@ EQ::Net::ConsoleServerConnection::ConsoleServerConnection(ConsoleServer *parent,
m_connection->OnDisconnect(std::bind(&ConsoleServerConnection::OnDisconnect, this, std::placeholders::_1));
m_connection->Start();
ClearBuffer();
auto addr = m_connection->RemoteIP();
SendLine(fmt::format("Establishing connection from: {0}:{1}", addr, m_connection->RemotePort()));
@@ -85,12 +85,12 @@ void EQ::Net::ConsoleServerConnection::QueueMessage(const std::string &msg)
}
else {
std::string cmd(m_line, m_line + m_cursor);
size_t len = m_user.length() + 2 + cmd.length();
for (size_t i = 0; i < len; ++i) {
Send("\x08");
}
if (msg.length() < cmd.length()) {
Send(msg);
size_t blank_spaces = 2 + cmd.length() - msg.length();
+1 -1
View File
@@ -5,7 +5,7 @@
#include "crc32.h"
#include "../eqemu_logsys.h"
#include <zlib.h>
#include <fmt/format.h>
#include <fmt/core.h>
#include <sstream>
EQ::Net::DaybreakConnectionManager::DaybreakConnectionManager()
+1 -1
View File
@@ -1,7 +1,7 @@
#include "packet.h"
#include "endian.h"
#include <cctype>
#include <fmt/format.h>
#include <fmt/core.h>
void EQ::Net::Packet::PutInt8(size_t offset, int8_t value)
{
+6 -6
View File
@@ -1,7 +1,7 @@
#include "websocket_server.h"
#include "../event/event_loop.h"
#include "../event/timer.h"
#include <fmt/format.h>
#include <fmt/core.h>
#include <map>
#include <unordered_set>
#include <array>
@@ -50,7 +50,7 @@ EQ::Net::WebsocketServer::WebsocketServer(const std::string &addr, int port)
if (iter != _impl->connections.end()) {
iter->second->GetTCPConnection()->Write(data, size);
}
return websocketpp::lib::error_code();
});
@@ -76,7 +76,7 @@ EQ::Net::WebsocketServer::WebsocketServer(const std::string &addr, int port)
_impl->login_handler = [](const WebsocketServerConnection* connection, const std::string& user, const std::string& pass) {
WebsocketLoginStatus ret;
ret.account_name = "admin";
if (connection->RemoteIP() == "127.0.0.1" || connection->RemoteIP() == "::") {
ret.logged_in = true;
return ret;
@@ -125,8 +125,8 @@ Json::Value EQ::Net::WebsocketServer::HandleRequest(WebsocketServerConnection *c
void EQ::Net::WebsocketServer::SetMethodHandler(const std::string &method, MethodHandler handler, int required_status)
{
//Reserved method names
if (method == "subscribe" ||
method == "unsubscribe" ||
if (method == "subscribe" ||
method == "unsubscribe" ||
method == "login") {
return;
}
@@ -171,7 +171,7 @@ Json::Value EQ::Net::WebsocketServer::Login(WebsocketServerConnection *connectio
auto user = params[0].asString();
auto pass = params[1].asString();
auto r = _impl->login_handler(connection, user, pass);
if (r.logged_in) {
+3 -3
View File
@@ -3,7 +3,7 @@
#include "../timer.h"
#include "../util/uuid.h"
#include <sstream>
#include <fmt/format.h>
#include <fmt/core.h>
struct EQ::Net::WebsocketServerConnection::Impl {
WebsocketServer *parent;
@@ -16,7 +16,7 @@ struct EQ::Net::WebsocketServerConnection::Impl {
int status;
};
EQ::Net::WebsocketServerConnection::WebsocketServerConnection(WebsocketServer *parent,
EQ::Net::WebsocketServerConnection::WebsocketServerConnection(WebsocketServer *parent,
std::shared_ptr<TCPConnection> connection,
std::shared_ptr<websocket_connection> ws_connection)
{
@@ -34,7 +34,7 @@ EQ::Net::WebsocketServerConnection::WebsocketServerConnection(WebsocketServer *p
connection->OnDisconnect([this](EQ::Net::TCPConnection *connection) {
_impl->parent->ReleaseConnection(this);
});
connection->OnRead([this](EQ::Net::TCPConnection *c, const unsigned char *buffer, size_t buffer_size) {
_impl->ws_connection->read_all((const char*)buffer, buffer_size);
});
+29
View File
@@ -0,0 +1,29 @@
// types
#include <limits>
#include <string>
#include <cctype>
#include <sstream>
// containers
#include <iterator>
#include <set>
#include <unordered_set>
#include <map>
#include <unordered_map>
#include <list>
#include <vector>
// utilities
#include <iostream>
#include <cassert>
#include <cmath>
#include <memory>
#include <functional>
#include <algorithm>
#include <utility>
#include <tuple>
#include <fstream>
#include <cstdio>
// fmt
#include <fmt/format.h>
+6 -6
View File
@@ -1,17 +1,17 @@
/* EQEMu: Everquest Server Emulator
Copyright (C) 2001-2019 EQEMu Development Team (http://eqemulator.net)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY except by those people which sell it, which
are required to give you total support for your newly bought product;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@@ -22,7 +22,7 @@
#include <string>
#include <list>
#include <fmt/format.h>
#include <fmt/core.h>
class DBcore;
@@ -37,7 +37,7 @@ namespace EQ
static bool AddProfanity(DBcore *db, std::string profanity);
static bool RemoveProfanity(DBcore *db, std::string profanity);
static void RedactMessage(char *message);
static void RedactMessage(std::string &message);
@@ -54,7 +54,7 @@ namespace EQ
static bool load_database_entries(DBcore *db);
static bool clear_database_entries(DBcore *db);
static bool check_for_existing_entry(const std::string& profanity);
};
} /*EQEmu*/
@@ -15,6 +15,7 @@
#include "../../database.h"
#include "../../strings.h"
#include <ctime>
#include <fmt/format.h>
class BaseCharacterExpeditionLockoutsRepository {
public:
+1 -1
View File
@@ -22,7 +22,7 @@
#include "strings.h"
#include <cstdlib>
#include <cstring>
#include <fmt/format.h>
#include <fmt/core.h>
#include "../common/repositories/rule_sets_repository.h"
#include "../common/repositories/rule_values_repository.h"
+1 -1
View File
@@ -18,7 +18,7 @@
#include <iostream>
#include <cstring>
#include <fmt/format.h>
#include <fmt/core.h>
#if defined(_MSC_VER) && _MSC_VER >= 1800
#include <algorithm>
+1 -1
View File
@@ -34,7 +34,7 @@
*/
#include "strings.h"
#include <fmt/format.h>
#include <fmt/core.h>
#include <algorithm>
#include <cctype>
+3 -3
View File
@@ -44,7 +44,7 @@
#include <tuple>
#include <type_traits>
#include <fmt/format.h>
#include <fmt/core.h>
#ifndef _WIN32
// this doesn't appear to affect linux-based systems..need feedback for _WIN64
@@ -206,7 +206,7 @@ const std::string NUM_TO_ENGLISH_Y[] = {
"Fifty ", "Sixty ", "Seventy ", "Eighty ", "Ninety "
};
// _WIN32 builds require that #include<fmt/format.h> be included in whatever code file the invocation is made from (no header files)
// _WIN32 builds require that #include<fmt/core.h> be included in whatever code file the invocation is made from (no header files)
template<typename T1, typename T2>
std::vector<std::string> join_pair(
const std::string &glue,
@@ -239,7 +239,7 @@ std::vector<std::string> join_pair(
return output;
}
// _WIN32 builds require that #include<fmt/format.h> be included in whatever code file the invocation is made from (no header files)
// _WIN32 builds require that #include<fmt/core.h> be included in whatever code file the invocation is made from (no header files)
template<typename T1, typename T2, typename T3, typename T4>
std::vector<std::string> join_tuple(
const std::string &glue,
+1 -1
View File
@@ -1,6 +1,6 @@
#include <cstring>
#include "strings.h"
#include <fmt/format.h>
#include <fmt/core.h>
#include <algorithm>
#include <cctype>
#include <cinttypes>
+1 -1
View File
@@ -1,6 +1,6 @@
#include <cstring>
#include "strings.h"
#include <fmt/format.h>
#include <fmt/core.h>
#include <algorithm>
#include <cctype>
+1 -1
View File
@@ -1,7 +1,7 @@
#include "uuid.h"
#include <ios>
#include <fmt/format.h>
#include <fmt/core.h>
#ifdef _WIN32
#include <objbase.h>
+2
View File
@@ -78,6 +78,8 @@ ADD_EXECUTABLE(world ${world_sources} ${world_headers})
INSTALL(TARGETS world RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
TARGET_PRECOMPILE_HEADERS(world PRIVATE ../common/pch/pch.h)
ADD_DEFINITIONS(-DWORLD)
TARGET_LINK_LIBRARIES(world ${SERVER_LIBS})
+1
View File
@@ -35,6 +35,7 @@
#include "wguild_mgr.h"
#include "../common/zone_store.h"
#include <set>
#include <fmt/format.h>
extern WebInterfaceList web_interface;
+1 -1
View File
@@ -31,7 +31,7 @@
#include "../common/md5.h"
#include "eqemu_api_world_data_service.h"
#include "../common/zone_store.h"
#include <fmt/format.h>
#include <fmt/core.h>
extern ClientList client_list;
extern ZSList zoneserver_list;
+1
View File
@@ -7,6 +7,7 @@
#include "zoneserver.h"
#include "../common/eqemu_logsys.h"
#include "../common/repositories/instance_list_repository.h"
#include <fmt/format.h>
extern ClientList client_list;
extern ZSList zoneserver_list;
+1 -1
View File
@@ -18,7 +18,7 @@
*
*/
#include <fmt/format.h>
#include <fmt/core.h>
#include "clientlist.h"
#include "cliententry.h"
#include "eqemu_api_world_data_service.h"
+1
View File
@@ -23,6 +23,7 @@
#include "../common/repositories/expeditions_repository.h"
#include "../common/repositories/expedition_lockouts_repository.h"
#include "../common/repositories/dynamic_zone_members_repository.h"
#include <fmt/format.h>
void ExpeditionDatabase::PurgeExpiredExpeditions()
{
+1
View File
@@ -16,6 +16,7 @@
#include "../common/repositories/completed_shared_task_activity_state_repository.h"
#include "../common/repositories/shared_task_dynamic_zones_repository.h"
#include <ctime>
#include <fmt/format.h>
extern ClientList client_list;
extern ZSList zoneserver_list;
+1
View File
@@ -28,6 +28,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#include "../common/event_sub.h"
#include "web_interface.h"
#include "../common/zone_store.h"
#include <fmt/format.h>
extern uint32 numzones;
extern EQ::Random emu_random;
+39 -28
View File
@@ -204,33 +204,6 @@ SET(zone_headers
hate_list.h
heal_rotation.h
horse.h
lua_bot.h
lua_bit.h
lua_client.h
lua_corpse.h
lua_door.h
lua_encounter.h
lua_entity.h
lua_entity_list.h
lua_expedition.h
lua_general.h
lua_group.h
lua_hate_list.h
lua_inventory.h
lua_item.h
lua_iteminst.h
lua_mob.h
lua_mod.h
lua_npc.h
lua_object.h
lua_packet.h
lua_parser.h
lua_parser_events.h
lua_ptr.h
lua_raid.h
lua_spawn.h
lua_spell.h
lua_stat_bonuses.h
map.h
masterentity.h
merc.h
@@ -280,10 +253,48 @@ SET(zone_headers
zone_reload.h
zone_cli.cpp)
ADD_EXECUTABLE(zone ${zone_sources} ${zone_headers})
SET (lua_headers
lua_bot.h
lua_bit.h
lua_client.h
lua_corpse.h
lua_door.h
lua_encounter.h
lua_entity.h
lua_entity_list.h
lua_expedition.h
lua_general.h
lua_group.h
lua_hate_list.h
lua_inventory.h
lua_item.h
lua_iteminst.h
lua_mob.h
lua_mod.h
lua_npc.h
lua_object.h
lua_packet.h
lua_parser.h
lua_parser_events.h
lua_ptr.h
lua_raid.h
lua_spawn.h
lua_spell.h
lua_stat_bonuses.h
)
ADD_EXECUTABLE(zone ${zone_sources} ${zone_headers} ${lua_headers})
INSTALL(TARGETS zone RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
IF(WIN32)
TARGET_PRECOMPILE_HEADERS(zone PRIVATE pch.h)
ENDIF(WIN32)
#TARGET_PRECOMPILE_HEADERS(zone PRIVATE ../common/types.h ../common/eqemu_logsys.h ../common/eqemu_logsys_log_aliases.h ../common/features.h ../common/global_define.h)
#TARGET_PRECOMPILE_HEADERS(zone PRIVATE mob.h npc.h corpse.h doors.h bot.h entity.h client.h zone.h)
#TARGET_PRECOMPILE_HEADERS(zone PRIVATE ${lua_headers})
ADD_DEFINITIONS(-DZONE)
TARGET_LINK_LIBRARIES(zone ${ZONE_LIBS})
+1 -1
View File
@@ -65,7 +65,7 @@
#include "dialogue_window.h"
#include "mob.h"
#include <fmt/format.h>
#include <fmt/core.h>
extern QueryServ* QServ;
extern WorldServer worldserver;
+1 -1
View File
@@ -29,7 +29,7 @@
#include "bot.h"
#include "client.h"
#include <fmt/format.h>
#include <fmt/core.h>
bool BotDatabase::LoadBotCommandSettings(std::map<std::string, std::pair<uint8, std::vector<std::string>>> &bot_command_settings)
+1
View File
@@ -69,6 +69,7 @@ extern volatile bool RunLoops;
#include "../common/events/player_events.h"
#include "../common/events/player_event_logs.h"
#include "dialogue_window.h"
#include <fmt/format.h>
extern QueryServ* QServ;
+1 -1
View File
@@ -1,7 +1,7 @@
#include <string.h>
#include <algorithm>
#include <thread>
#include <fmt/format.h>
#include <fmt/core.h>
#include "../common/repositories/command_subsettings_repository.h"
#ifdef _WINDOWS
+1
View File
@@ -23,6 +23,7 @@
#include "expedition.h"
#include "string_ids.h"
#include "worldserver.h"
#include <fmt/format.h>
extern WorldServer worldserver;
+1
View File
@@ -36,6 +36,7 @@
#include "bot.h"
#include "../common/events/player_event_logs.h"
#include "worldserver.h"
#include <fmt/format.h>
extern WorldServer worldserver;
+1
View File
@@ -26,6 +26,7 @@
#include "worldserver.h"
#include "zonedb.h"
#include "../common/repositories/expedition_lockouts_repository.h"
#include <fmt/format.h>
extern WorldServer worldserver;
extern Zone* zone;
+1
View File
@@ -25,6 +25,7 @@
#include "raids.h"
#include "string_ids.h"
#include "../common/repositories/character_expedition_lockouts_repository.h"
#include <fmt/format.h>
constexpr char SystemName[] = "expedition";
+1 -1
View File
@@ -2,7 +2,7 @@
#include "client.h"
#include "pathfinder_null.h"
#include "pathfinder_nav_mesh.h"
#include <fmt/format.h>
#include <fmt/core.h>
#include <sys/stat.h>
IPathfinder *IPathfinder::Load(const std::string &zone) {
+55
View File
@@ -0,0 +1,55 @@
// types
#include <limits>
#include <string>
#include <cctype>
#include <sstream>
// containers
#include <iterator>
#include <set>
#include <unordered_set>
#include <map>
#include <unordered_map>
#include <list>
#include <vector>
// utilities
#include <iostream>
#include <cassert>
#include <cmath>
#include <memory>
#include <functional>
#include <algorithm>
#include <utility>
#include <tuple>
#include <fstream>
#include <cstdio>
// fmt
#include <fmt/format.h>
//# include <fmt/core.h>
//# define FMT_STRING(s) s
// lua
//#include "lua.hpp"
//#include <luabind/luabind.hpp>
//#include <luabind/object.hpp>
// perl
//#include <perlbind/perlbind.h>
#include "../common/types.h"
#include "../common/eqemu_logsys.h"
#include "../common/eqemu_logsys_log_aliases.h"
#include "../common/features.h"
#include "../common/global_define.h"
#include "mob.h"
#include "npc.h"
#include "corpse.h"
#include "doors.h"
#include "bot.h"
#include "entity.h"
#include "client.h"
#include "zone.h"
+1 -1
View File
@@ -16,7 +16,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <fmt/format.h>
#include <fmt/core.h>
#include "../common/global_define.h"
#include "../common/types.h"
+1
View File
@@ -15,6 +15,7 @@
#include "dynamic_zone.h"
#include "string_ids.h"
#include "../common/events/player_event_logs.h"
#include <fmt/format.h>
#define EBON_CRYSTAL 40902
#define RADIANT_CRYSTAL 40903
+1
View File
@@ -9,6 +9,7 @@
#include "tasks.h"
#include "zonedb.h"
#include "../common/repositories/character_task_timers_repository.h"
#include <fmt/format.h>
extern QueryServ *QServ;
+1 -1
View File
@@ -25,7 +25,7 @@
#include <ctime>
#include <iostream>
#include <fmt/format.h>
#include <fmt/core.h>
extern Zone* zone;