diff --git a/CMakeLists.txt b/CMakeLists.txt index 37eb4a82..2141254d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -35,7 +35,6 @@ set(HEADERS Flakkari/Logger/Logger.hpp Flakkari/Network/Network.hpp - Flakkari/Network/Packed.hpp Flakkari/Network/Address.hpp Flakkari/Network/Buffer.hpp Flakkari/Network/Socket.hpp @@ -78,7 +77,6 @@ set(HEADER_LIB_LOGGER set(HEADER_LIB_NETWORK Flakkari/Network/Network.hpp - Flakkari/Network/Packed.hpp Flakkari/Network/Address.hpp Flakkari/Network/Buffer.hpp Flakkari/Network/Socket.hpp @@ -198,6 +196,7 @@ add_library(flakkari_network SHARED ${SOURCES_LIB_NETWORK} ${HEADER_LIB_NETWORK} # Include Directories: target_include_directories(flakkari_network PRIVATE ${CMAKE_SOURCE_DIR}/Flakkari) +target_include_directories(flakkari_network PRIVATE ${singleton_SOURCE_DIR}) # Link Libraries: target_link_libraries(flakkari_network PRIVATE nlohmann_json::nlohmann_json) diff --git a/Flakkari/Engine/EntityComponentSystem/Components/2D/Collider.hpp b/Flakkari/Engine/EntityComponentSystem/Components/2D/Collider.hpp index c8af2d07..04f4606c 100644 --- a/Flakkari/Engine/EntityComponentSystem/Components/2D/Collider.hpp +++ b/Flakkari/Engine/EntityComponentSystem/Components/2D/Collider.hpp @@ -13,8 +13,6 @@ #include "../../../Math/Vector.hpp" #include -#include "Network/Packed.hpp" - namespace Flakkari::Engine::ECS::Components::_2D { PACKED_START diff --git a/Flakkari/Engine/EntityComponentSystem/Components/2D/Control.hpp b/Flakkari/Engine/EntityComponentSystem/Components/2D/Control.hpp index f960414b..a0290018 100644 --- a/Flakkari/Engine/EntityComponentSystem/Components/2D/Control.hpp +++ b/Flakkari/Engine/EntityComponentSystem/Components/2D/Control.hpp @@ -2,7 +2,7 @@ ** EPITECH PROJECT, 2024 ** Title: Flakkari ** Author: MasterLaplace -** Created: 2023-01-11 +** Created: 2024-01-11 ** File description: ** Control */ diff --git a/Flakkari/Engine/EntityComponentSystem/Components/2D/Movable.hpp b/Flakkari/Engine/EntityComponentSystem/Components/2D/Movable.hpp index a7091e98..372deedb 100644 --- a/Flakkari/Engine/EntityComponentSystem/Components/2D/Movable.hpp +++ b/Flakkari/Engine/EntityComponentSystem/Components/2D/Movable.hpp @@ -2,7 +2,7 @@ ** EPITECH PROJECT, 2024 ** Title: Flakkari ** Author: MasterLaplace -** Created: 2023-01-06 +** Created: 2024-01-06 ** File description: ** Movable */ diff --git a/Flakkari/Engine/EntityComponentSystem/Components/2D/RigidBody.hpp b/Flakkari/Engine/EntityComponentSystem/Components/2D/RigidBody.hpp index b45874c6..2122a01c 100644 --- a/Flakkari/Engine/EntityComponentSystem/Components/2D/RigidBody.hpp +++ b/Flakkari/Engine/EntityComponentSystem/Components/2D/RigidBody.hpp @@ -2,7 +2,7 @@ ** EPITECH PROJECT, 2024 ** Title: Flakkari ** Author: MasterLaplace -** Created: 2023-01-14 +** Created: 2024-01-14 ** File description: ** RigidBody */ @@ -12,8 +12,6 @@ #include "../../../Math/Vector.hpp" -#include "Network/Packed.hpp" - namespace Flakkari::Engine::ECS::Components::_2D { PACKED_START diff --git a/Flakkari/Engine/EntityComponentSystem/Components/2D/Transform.hpp b/Flakkari/Engine/EntityComponentSystem/Components/2D/Transform.hpp index 598d6caa..19c1e280 100644 --- a/Flakkari/Engine/EntityComponentSystem/Components/2D/Transform.hpp +++ b/Flakkari/Engine/EntityComponentSystem/Components/2D/Transform.hpp @@ -2,7 +2,7 @@ ** EPITECH PROJECT, 2024 ** Title: Flakkari ** Author: MasterLaplace -** Created: 2023-01-06 +** Created: 2024-01-06 ** File description: ** Transform */ diff --git a/Flakkari/Engine/EntityComponentSystem/Components/Common/Child.hpp b/Flakkari/Engine/EntityComponentSystem/Components/Common/Child.hpp index e423af38..f749edfc 100644 --- a/Flakkari/Engine/EntityComponentSystem/Components/Common/Child.hpp +++ b/Flakkari/Engine/EntityComponentSystem/Components/Common/Child.hpp @@ -2,7 +2,7 @@ ** EPITECH PROJECT, 2024 ** Title: Flakkari ** Author: MasterLaplace -** Created: 2023-01-06 +** Created: 2024-01-06 ** File description: ** Child */ diff --git a/Flakkari/Engine/EntityComponentSystem/Components/Common/Evolve.hpp b/Flakkari/Engine/EntityComponentSystem/Components/Common/Evolve.hpp index 59dd17d2..3433c786 100644 --- a/Flakkari/Engine/EntityComponentSystem/Components/Common/Evolve.hpp +++ b/Flakkari/Engine/EntityComponentSystem/Components/Common/Evolve.hpp @@ -2,7 +2,7 @@ ** EPITECH PROJECT, 2024 ** Title: Flakkari ** Author: MasterLaplace -** Created: 2023-01-13 +** Created: 2024-01-13 ** File description: ** Evolve */ diff --git a/Flakkari/Engine/EntityComponentSystem/Components/Common/Health.hpp b/Flakkari/Engine/EntityComponentSystem/Components/Common/Health.hpp index 43e2edbe..910678b1 100644 --- a/Flakkari/Engine/EntityComponentSystem/Components/Common/Health.hpp +++ b/Flakkari/Engine/EntityComponentSystem/Components/Common/Health.hpp @@ -2,7 +2,7 @@ ** EPITECH PROJECT, 2024 ** Title: Flakkari ** Author: MasterLaplace -** Created: 2023-01-14 +** Created: 2024-01-14 ** File description: ** Health */ @@ -12,7 +12,7 @@ #include -#include "Network/Packed.hpp" +#include "config.h.in" namespace Flakkari::Engine::ECS::Components::Common { PACKED_START diff --git a/Flakkari/Engine/EntityComponentSystem/Components/Common/Id.hpp b/Flakkari/Engine/EntityComponentSystem/Components/Common/Id.hpp index f89eda98..d8dd97ba 100644 --- a/Flakkari/Engine/EntityComponentSystem/Components/Common/Id.hpp +++ b/Flakkari/Engine/EntityComponentSystem/Components/Common/Id.hpp @@ -12,7 +12,7 @@ #include -#include "Network/Packed.hpp" +#include "config.h.in" namespace Flakkari::Engine::ECS::Components::Common { PACKED_START diff --git a/Flakkari/Engine/EntityComponentSystem/Components/Common/Level.hpp b/Flakkari/Engine/EntityComponentSystem/Components/Common/Level.hpp index 15a6ed07..f6805123 100644 --- a/Flakkari/Engine/EntityComponentSystem/Components/Common/Level.hpp +++ b/Flakkari/Engine/EntityComponentSystem/Components/Common/Level.hpp @@ -2,7 +2,7 @@ ** EPITECH PROJECT, 2024 ** Title: Flakkari ** Author: MasterLaplace -** Created: 2023-01-14 +** Created: 2024-01-14 ** File description: ** Level */ @@ -13,7 +13,7 @@ #include #include -#include "Network/Packed.hpp" +#include "config.h.in" namespace Flakkari::Engine::ECS::Components::Common { diff --git a/Flakkari/Engine/EntityComponentSystem/Components/Common/NetworkEvent.hpp b/Flakkari/Engine/EntityComponentSystem/Components/Common/NetworkEvent.hpp index 1ca94073..70e33bef 100644 --- a/Flakkari/Engine/EntityComponentSystem/Components/Common/NetworkEvent.hpp +++ b/Flakkari/Engine/EntityComponentSystem/Components/Common/NetworkEvent.hpp @@ -2,7 +2,7 @@ ** EPITECH PROJECT, 2024 ** Title: Flakkari ** Author: MasterLaplace -** Created: 2023-01-14 +** Created: 2024-01-14 ** File description: ** NetworkEvent */ diff --git a/Flakkari/Engine/EntityComponentSystem/Components/Common/Parent.hpp b/Flakkari/Engine/EntityComponentSystem/Components/Common/Parent.hpp index fc6da130..f4517f92 100644 --- a/Flakkari/Engine/EntityComponentSystem/Components/Common/Parent.hpp +++ b/Flakkari/Engine/EntityComponentSystem/Components/Common/Parent.hpp @@ -2,7 +2,7 @@ ** EPITECH PROJECT, 2024 ** Title: Flakkari ** Author: MasterLaplace -** Created: 2023-01-06 +** Created: 2024-01-06 ** File description: ** Parent */ @@ -12,7 +12,7 @@ #include -#include "Network/Packed.hpp" +#include "config.h.in" namespace Flakkari::Engine::ECS::Components::Common { PACKED_START diff --git a/Flakkari/Engine/EntityComponentSystem/Components/Common/Spawned.hpp b/Flakkari/Engine/EntityComponentSystem/Components/Common/Spawned.hpp index 9754c96c..97ccf8a2 100644 --- a/Flakkari/Engine/EntityComponentSystem/Components/Common/Spawned.hpp +++ b/Flakkari/Engine/EntityComponentSystem/Components/Common/Spawned.hpp @@ -2,7 +2,7 @@ ** EPITECH PROJECT, 2024 ** Title: Flakkari ** Author: MasterLaplace -** Created: 2023-01-14 +** Created: 2024-01-14 ** File description: ** Spawned */ @@ -13,7 +13,7 @@ #include #include -#include "Network/Packed.hpp" +#include "config.h.in" namespace Flakkari::Engine::ECS::Components::Common { PACKED_START diff --git a/Flakkari/Engine/EntityComponentSystem/Components/Common/Tag.hpp b/Flakkari/Engine/EntityComponentSystem/Components/Common/Tag.hpp index a674d6b5..eb4e0c85 100644 --- a/Flakkari/Engine/EntityComponentSystem/Components/Common/Tag.hpp +++ b/Flakkari/Engine/EntityComponentSystem/Components/Common/Tag.hpp @@ -2,7 +2,7 @@ ** EPITECH PROJECT, 2024 ** Title: Flakkari ** Author: MasterLaplace -** Created: 2023-01-06 +** Created: 2024-01-06 ** File description: ** Tag */ diff --git a/Flakkari/Engine/EntityComponentSystem/Components/Common/Weapon.hpp b/Flakkari/Engine/EntityComponentSystem/Components/Common/Weapon.hpp index 02735a51..cd31d2e0 100644 --- a/Flakkari/Engine/EntityComponentSystem/Components/Common/Weapon.hpp +++ b/Flakkari/Engine/EntityComponentSystem/Components/Common/Weapon.hpp @@ -2,7 +2,7 @@ ** EPITECH PROJECT, 2024 ** Title: Flakkari ** Author: MasterLaplace -** Created: 2023-01-14 +** Created: 2024-01-14 ** File description: ** Weapon */ @@ -13,7 +13,7 @@ #include #include -#include "Network/Packed.hpp" +#include "config.h.in" namespace Flakkari::Engine::ECS::Components::Common { PACKED_START diff --git a/Flakkari/Engine/EntityComponentSystem/Components/Components2D.hpp b/Flakkari/Engine/EntityComponentSystem/Components/Components2D.hpp index 56d9d33e..ad831a61 100644 --- a/Flakkari/Engine/EntityComponentSystem/Components/Components2D.hpp +++ b/Flakkari/Engine/EntityComponentSystem/Components/Components2D.hpp @@ -10,7 +10,7 @@ * https://opensource.org/licenses/MIT * © 2023 @MasterLaplace * @version 0.3.0 - * @date 2023-01-06 + * @date 2024-01-06 **************************************************************************/ #ifndef FLAKKARI_COMPONENTS2D_HPP_ diff --git a/Flakkari/Engine/EntityComponentSystem/Components/ComponentsCommon.hpp b/Flakkari/Engine/EntityComponentSystem/Components/ComponentsCommon.hpp index 664e82c7..0e3ce81d 100644 --- a/Flakkari/Engine/EntityComponentSystem/Components/ComponentsCommon.hpp +++ b/Flakkari/Engine/EntityComponentSystem/Components/ComponentsCommon.hpp @@ -11,7 +11,7 @@ * https://opensource.org/licenses/MIT * © 2023 @MasterLaplace * @version 0.3.0 - * @date 2023-01-06 + * @date 2024-01-06 **************************************************************************/ #ifndef FLAKKARI_COMPONENTSCOMMON_HPP_ diff --git a/Flakkari/Engine/EntityComponentSystem/Entity.hpp b/Flakkari/Engine/EntityComponentSystem/Entity.hpp index e666716b..f0061f1e 100644 --- a/Flakkari/Engine/EntityComponentSystem/Entity.hpp +++ b/Flakkari/Engine/EntityComponentSystem/Entity.hpp @@ -9,7 +9,7 @@ * https://opensource.org/licenses/MIT * © 2023 @MasterLaplace * @version 0.3.0 - * @date 2023-01-05 + * @date 2024-01-05 **************************************************************************/ #ifndef FLAKKARI_ENTITY_HPP_ diff --git a/Flakkari/Engine/EntityComponentSystem/Registry.cpp b/Flakkari/Engine/EntityComponentSystem/Registry.cpp index ae8f0577..8579cd1d 100644 --- a/Flakkari/Engine/EntityComponentSystem/Registry.cpp +++ b/Flakkari/Engine/EntityComponentSystem/Registry.cpp @@ -2,7 +2,7 @@ ** EPITECH PROJECT, 2024 ** Title: Flakkari ** Author: MasterLaplace -** Created: 2023-01-05 +** Created: 2024-01-05 ** File description: ** Registry */ diff --git a/Flakkari/Engine/EntityComponentSystem/Registry.hpp b/Flakkari/Engine/EntityComponentSystem/Registry.hpp index c59713c9..fc807303 100644 --- a/Flakkari/Engine/EntityComponentSystem/Registry.hpp +++ b/Flakkari/Engine/EntityComponentSystem/Registry.hpp @@ -9,7 +9,7 @@ * https://opensource.org/licenses/MIT * © 2023 @MasterLaplace * @version 0.3.0 - * @date 2023-01-05 + * @date 2024-01-05 **************************************************************************/ #ifndef FLAKKARI_REGISTRY_HPP_ diff --git a/Flakkari/Engine/EntityComponentSystem/SparseArrays.hpp b/Flakkari/Engine/EntityComponentSystem/SparseArrays.hpp index 7c24015d..c10c522e 100644 --- a/Flakkari/Engine/EntityComponentSystem/SparseArrays.hpp +++ b/Flakkari/Engine/EntityComponentSystem/SparseArrays.hpp @@ -9,7 +9,7 @@ * https://opensource.org/licenses/MIT * © 2023 @MasterLaplace * @version 0.3.0 - * @date 2023-01-05 + * @date 2024-01-05 **************************************************************************/ #ifndef FLAKKARI_SPARSEARRAYS_HPP_ diff --git a/Flakkari/Engine/EntityComponentSystem/Systems/Systems.cpp b/Flakkari/Engine/EntityComponentSystem/Systems/Systems.cpp index 96cbd429..2b466978 100644 --- a/Flakkari/Engine/EntityComponentSystem/Systems/Systems.cpp +++ b/Flakkari/Engine/EntityComponentSystem/Systems/Systems.cpp @@ -2,7 +2,7 @@ ** EPITECH PROJECT, 2024 ** Title: Flakkari ** Author: MasterLaplace -** Created: 2023-01-06 +** Created: 2024-01-06 ** File description: ** Systems */ diff --git a/Flakkari/Engine/EntityComponentSystem/Systems/Systems.hpp b/Flakkari/Engine/EntityComponentSystem/Systems/Systems.hpp index ea455d14..41682860 100644 --- a/Flakkari/Engine/EntityComponentSystem/Systems/Systems.hpp +++ b/Flakkari/Engine/EntityComponentSystem/Systems/Systems.hpp @@ -10,7 +10,7 @@ * https://opensource.org/licenses/MIT * © 2023 @MasterLaplace * @version 0.3.0 - * @date 2023-01-06 + * @date 2024-01-06 **************************************************************************/ #ifndef FLAKKARI_SYSTEMS_HPP_ diff --git a/Flakkari/Engine/Math/Vector.cpp b/Flakkari/Engine/Math/Vector.cpp index 1a5c0861..733de04a 100644 --- a/Flakkari/Engine/Math/Vector.cpp +++ b/Flakkari/Engine/Math/Vector.cpp @@ -2,7 +2,7 @@ ** EPITECH PROJECT, 2023 ** Title: Flakkari ** Author: MasterLaplace -** Created: 2023-01-05 +** Created: 2024-01-05 ** File description: ** Vector */ diff --git a/Flakkari/Engine/Math/Vector.hpp b/Flakkari/Engine/Math/Vector.hpp index 812cd01e..29bc308e 100644 --- a/Flakkari/Engine/Math/Vector.hpp +++ b/Flakkari/Engine/Math/Vector.hpp @@ -12,7 +12,7 @@ * https://opensource.org/licenses/MIT * © 2023 @MasterLaplace * @version 0.3.0 - * @date 2023-01-05 + * @date 2024-01-05 **************************************************************************/ #ifndef FLAKKARI_VECTOR_HPP_ @@ -21,7 +21,7 @@ #include #include -#include "Network/Packed.hpp" +#include "config.h.in" namespace Flakkari::Engine::Math { diff --git a/Flakkari/Logger/Logger.hpp b/Flakkari/Logger/Logger.hpp index 5c55db78..59cabb30 100644 --- a/Flakkari/Logger/Logger.hpp +++ b/Flakkari/Logger/Logger.hpp @@ -1,13 +1,27 @@ -/* -** EPITECH PROJECT, 2023 -** Flakkari -** File description: -** Flakkari::Logger -*/ +/************************************************************************** + * Flakkari Library v0.3.0 + * + * Flakkari Library is a C++ Library for Network. + * @file Logger.hpp + * @brief Logger class header. Can be used to log messages. + * + * Flakkari Library is under MIT License. + * https://opensource.org/licenses/MIT + * © 2023 @MasterLaplace + * @version 0.3.0 + * @date 2023-12-19 + **************************************************************************/ #ifndef FLAKKARI_LOGGER_HPP_ #define FLAKKARI_LOGGER_HPP_ +#include "config.h.in" + +#include +#include +#include +#include + #define LOG_INFO 0 #define LOG_LOG 1 #define LOG_DEBUG 2 @@ -15,11 +29,6 @@ #define LOG_ERROR 4 #define LOG_FATAL 5 -#include -#include -#include -#include - #define FLAKKARI_LOG(level, message) Flakkari::Logger::log(level, message, __LINE__, __FILE__) #define FLAKKARI_LOG_INFO(message) FLAKKARI_LOG(LOG_INFO, message) #define FLAKKARI_LOG_LOG(message) FLAKKARI_LOG(LOG_LOG, message) @@ -28,7 +37,7 @@ #define FLAKKARI_LOG_ERROR(message) FLAKKARI_LOG(LOG_ERROR, message) #define FLAKKARI_LOG_FATAL(message) FLAKKARI_LOG(LOG_FATAL, message) -#ifdef _WIN32 +#ifdef FLAKKARI_SYSTEM_WINDOWS # define STD_ERROR \ []() -> std::string { \ char buffer[256]; \ @@ -42,7 +51,7 @@ # define SPECIAL_ERROR STD_ERROR #endif -#if _WIN32 +#ifdef FLAKKARI_SYSTEM_WINDOWS # define WIN32_LEAN_AND_MEAN # define _WINSOCK_DEPRECATED_NO_WARNINGS # define _CRT_SECURE_NO_WARNINGS @@ -86,6 +95,7 @@ #endif namespace Flakkari { + class Logger { public: enum class Mode { @@ -101,6 +111,7 @@ class Logger { static void log(int level, std::string message, int line, std::string file = "") noexcept; static void log(int level, std::string message) noexcept; }; + } /* namespace Flakkari */ #endif /* !FLAKKARI_LOGGER_HPP_ */ diff --git a/Flakkari/Network/Packed.hpp b/Flakkari/Network/Packed.hpp deleted file mode 100644 index e62c8631..00000000 --- a/Flakkari/Network/Packed.hpp +++ /dev/null @@ -1,54 +0,0 @@ -/************************************************************************** - * Flakkari Library v0.3.0 - * - * Flakkari Library is a C++ Library for Network. - * @file Packed.hpp - * @brief Packed header. Contains PACKED macros. - * (PACKED_START, PACKED_END, PACKED) - * - * @details PACKED_START and PACKED_END macros are used to pack structs: - * PACKED_<_> macros are used to pack structs: - * PACKED_START struct _ {}; PACKED_END - * PACKED macros are used to pack structs: - * struct _ {} PACKED; - * - * Flakkari Library is under MIT License. - * https://opensource.org/licenses/MIT - * © 2023 @MasterLaplace - * @version 0.3.0 - * @date 2023-01-10 - **************************************************************************/ - -#ifndef PACKED_HPP_ -#define PACKED_HPP_ - -#ifdef _MSC_VER -# define PACKED_START __pragma(pack(push, 1)) -# define PACKED_END __pragma(pack(pop)) -#else -# define PACKED_START _Pragma("pack(1)") -# define PACKED_END _Pragma("pack()") -#endif - -#if __GNUC__ -# define __PACKED __attribute__((packed)) - -# define PACKED(name, body) \ - do \ - { \ - struct name body __PACKED; \ - } while (0) - -#else - -# define __PACKED(name, body) \ - do \ - { \ - PACKED_START \ - struct name body; \ - PACKED_END \ - } while (0) - -#endif - -#endif /* !PACKED_HPP_ */ diff --git a/Flakkari/Protocol/Events.hpp b/Flakkari/Protocol/Events.hpp index 01665c9c..86272e37 100644 --- a/Flakkari/Protocol/Events.hpp +++ b/Flakkari/Protocol/Events.hpp @@ -17,9 +17,7 @@ #ifndef EVENTS_HPP_ #define EVENTS_HPP_ -#include - -#include "../Network/Packed.hpp" +#include "config.h.in" namespace Flakkari::Protocol { diff --git a/Flakkari/Protocol/Header.hpp b/Flakkari/Protocol/Header.hpp index 602fb1b5..2d1d0c70 100644 --- a/Flakkari/Protocol/Header.hpp +++ b/Flakkari/Protocol/Header.hpp @@ -20,8 +20,9 @@ #define PROTOCOL_VERSION 1 +#include "config.h.in" + #include "../Network/Buffer.hpp" -#include "../Network/Packed.hpp" #include "Commands.hpp" #include diff --git a/Flakkari/Protocol/PacketFactory.hpp b/Flakkari/Protocol/PacketFactory.hpp index c1d90f7d..a873ce5c 100644 --- a/Flakkari/Protocol/PacketFactory.hpp +++ b/Flakkari/Protocol/PacketFactory.hpp @@ -17,7 +17,7 @@ #ifndef PACKETFACTORY_HPP_ #define PACKETFACTORY_HPP_ -#include "Packet.hpp" +#include "config.h.in" #include "Engine/EntityComponentSystem/Systems/Systems.hpp" diff --git a/Flakkari/Server/Game/Game.cpp b/Flakkari/Server/Game/Game.cpp index 9a0df2c2..9331e8a5 100644 --- a/Flakkari/Server/Game/Game.cpp +++ b/Flakkari/Server/Game/Game.cpp @@ -2,7 +2,7 @@ ** EPITECH PROJECT, 2024 ** Title: Flakkari ** Author: MasterLaplace -** Created: 2023-01-06 +** Created: 2024-01-06 ** File description: ** Game */ diff --git a/Flakkari/Server/Game/Game.hpp b/Flakkari/Server/Game/Game.hpp index b242c52b..769f135c 100644 --- a/Flakkari/Server/Game/Game.hpp +++ b/Flakkari/Server/Game/Game.hpp @@ -13,7 +13,7 @@ * https://opensource.org/licenses/MIT * © 2023 @MasterLaplace * @version 0.3.0 - * @date 2023-01-06 + * @date 2024-01-06 **************************************************************************/ #ifndef GAME_HPP_ diff --git a/Flakkari/Server/Game/GameManager.cpp b/Flakkari/Server/Game/GameManager.cpp index d9885648..d9205368 100644 --- a/Flakkari/Server/Game/GameManager.cpp +++ b/Flakkari/Server/Game/GameManager.cpp @@ -2,7 +2,7 @@ ** EPITECH PROJECT, 2024 ** Title: Flakkari ** Author: MasterLaplace -** Created: 2023-01-07 +** Created: 2024-01-07 ** File description: ** GameManager */ diff --git a/Flakkari/Server/Game/GameManager.hpp b/Flakkari/Server/Game/GameManager.hpp index d99369a6..db56659c 100644 --- a/Flakkari/Server/Game/GameManager.hpp +++ b/Flakkari/Server/Game/GameManager.hpp @@ -11,7 +11,7 @@ * https://opensource.org/licenses/MIT * © 2023 @MasterLaplace * @version 0.3.0 - * @date 2023-01-06 + * @date 2024-01-06 **************************************************************************/ #ifndef GAMEMANAGER_HPP_ diff --git a/Flakkari/Server/Game/ResourceManager.cpp b/Flakkari/Server/Game/ResourceManager.cpp index 241491d9..c7797df2 100644 --- a/Flakkari/Server/Game/ResourceManager.cpp +++ b/Flakkari/Server/Game/ResourceManager.cpp @@ -2,7 +2,7 @@ ** EPITECH PROJECT, 2024 ** Title: Flakkari ** Author: MasterLaplace -** Created: 2023-01-12 +** Created: 2024-01-12 ** File description: ** ResourceManager */ diff --git a/Flakkari/Server/Internals/CommandManager.cpp b/Flakkari/Server/Internals/CommandManager.cpp index 089be4fb..06de46b9 100644 --- a/Flakkari/Server/Internals/CommandManager.cpp +++ b/Flakkari/Server/Internals/CommandManager.cpp @@ -2,7 +2,7 @@ ** EPITECH PROJECT, 2024 ** Title: Flakkari ** Author: MasterLaplace -** Created: 2023-01-05 +** Created: 2024-01-05 ** File description: ** CommandManager */ diff --git a/Flakkari/Server/Internals/CommandManager.hpp b/Flakkari/Server/Internals/CommandManager.hpp index d9786066..06572025 100644 --- a/Flakkari/Server/Internals/CommandManager.hpp +++ b/Flakkari/Server/Internals/CommandManager.hpp @@ -13,7 +13,7 @@ * https://opensource.org/licenses/MIT * © 2023 @MasterLaplace * @version 0.3.0 - * @date 2023-01-05 + * @date 2024-01-05 **************************************************************************/ #ifndef COMMANDMANAGER_HPP_ diff --git a/Flakkari/config.h.in b/Flakkari/config.h.in index 8264a92a..c46553ce 100644 --- a/Flakkari/config.h.in +++ b/Flakkari/config.h.in @@ -17,7 +17,7 @@ * * @author @MasterLaplace * @version 0.3.0 - * @date 2023-01-06 + * @date 2024-01-06 **************************************************************************/ // clang-format off @@ -50,7 +50,7 @@ //////////////////////////////////////////////////////////// // Define portable NULL pointer using C++11 nullptr keyword //////////////////////////////////////////////////////////// -#ifdef __cplusplus && __cplusplus >= 201103L +#if defined(__cplusplus) && __cplusplus >= 201103L #elif !defined(NULL) #define nullptr ((void*)0) #else @@ -89,10 +89,16 @@ \**********************************************************/ #if defined(__GNUC__) || defined(__GNUG__) #define PACKED( __Declaration__ ) __Declaration__ __attribute__((__packed__)) + #define PACKED_START _Pragma("pack(1)") + #define PACKED_END _Pragma("pack()") #elif _MSC_VER #define PACKED( __Declaration__ ) __pragma(pack(push, 1)) __Declaration__ __pragma(pack(pop)) + #define PACKED_START __pragma(pack(push, 1)) + #define PACKED_END __pragma(pack(pop)) #else #define PACKED( __Declaration__ ) __Declaration__ + #define PACKED_START _Pragma("pack(1)") + #define PACKED_END _Pragma("pack()") #endif ////////////////////////////////////////////////////////////