Skip to content

Commit

Permalink
A big bunch of architecture changes (Segs#542)
Browse files Browse the repository at this point in the history
* A big bunch of architecture changes

Added/Changed:

* Event serialization using cereal
* EventProcessor serialization support skeleton and introduced a thin
EventSrc class
* Ability to single-step event processing
* add thread libraries to required link libraries for all users of ACE
* Remove old gmock from testing builds, update lua-Sol2
* BitStream is now cereal-serializeable, also a small cleanup/split in
serialization helper headers
* Event classes are marked with  helper comments to ease the serializer
generation
* Add event scanning macros to CMake, use template specialization macros
in serializers.
* Timeout events are no longer using pointers as data variables, since
simple int is the payload they need.
* All Events live in SEGSEvents namespace
* Only 'root' events can have `Event` suffix - this is used by `event
gen` to detect events
* Convoluted Event classes with enums converted to stand-alone enums,
normalized names.
* Character helper function to their own file
* Reduced dependencies between game server files and
    mapserver's DataHelpers.h
* added FX behavior and info serialization support
* added particle system load/save functions.
* begin and abort logout are now callable from lua
* Placate grumpy windows, by disentegration ! :)
* MSVC fix, missing <array> include
  • Loading branch information
nemerle authored Sep 3, 2018
1 parent dc92ea0 commit 1596a6c
Show file tree
Hide file tree
Showing 239 changed files with 12,972 additions and 5,966 deletions.
14 changes: 0 additions & 14 deletions 3rd_party/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,3 @@ if(ENABLE_SCRIPTING_ENGINE)
include(ExternalProject_SOL2.cmake)
endif()

if(ENABLE_TESTS)
enable_testing()
ExternalProject_Add(
GMOCK_BUILD
DOWNLOAD_DIR ${PROJECT_SOURCE_DIR}/3rd_party/gmock
URL http://googlemock.googlecode.com/files/gmock-1.6.0.zip
UPDATE_COMMAND ""
PATCH_COMMAND patch -N -t -p1 < ../gmock.patch
SOURCE_DIR ${PROJECT_SOURCE_DIR}/3rd_party/gmock
INSTALL_DIR ${PROJECT_SOURCE_DIR}/3rd_party/
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
)
set(GTest_LIBRARIES gtest gtest_main ${CMAKE_THREAD_LIBS_INIT})
endif()
2 changes: 2 additions & 0 deletions 3rd_party/ExternalProject_ACE.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@ ExternalProject_Add(
CMAKE_GENERATOR_TOOLSET ${CMAKE_GENERATOR_TOOLSET}
BUILD_BYPRODUCTS ${ace_LIBRARY_SHARED} ${ace_LIBRARY_STATIC} ${ace_LIBRARY_IMP}
)
find_package(Threads)
ADD_LIBRARY(ace_IMP SHARED IMPORTED GLOBAL)
add_dependencies(ace_IMP ACE_BUILD)
set_shared_lib_properties(ace)
set_property(TARGET ace_IMP APPEND PROPERTY INTERFACE_COMPILE_DEFINITIONS ACE_HAS_DLL=1)
set_property(TARGET ace_IMP APPEND PROPERTY INTERFACE_LINK_LIBRARIES Threads::Threads)
message(${ace_LIBRARY_SHARED})
install(FILES ${ace_LIBRARY_SHARED} DESTINATION deploy)
6 changes: 6 additions & 0 deletions 3rd_party/cereal/include/cereal/types/array.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ namespace cereal
|| !std::is_arithmetic<T>::value, void>::type
CEREAL_SAVE_FUNCTION_NAME( Archive & ar, std::array<T, N> const & array )
{
size_type size=N;
ar( make_size_tag( size ) );
for( auto const & i : array )
ar( i );
}
Expand All @@ -71,6 +73,10 @@ namespace cereal
|| !std::is_arithmetic<T>::value, void>::type
CEREAL_LOAD_FUNCTION_NAME( Archive & ar, std::array<T, N> & array )
{
size_type size;
ar( make_size_tag( size ) );
if(N!=size)
throw cereal::Exception("Wrong std::array size while loading");
for( auto & i : array )
ar( i );
}
Expand Down
Loading

0 comments on commit 1596a6c

Please sign in to comment.