Compare commits
3 Commits
e64b8ed194
...
31ebef777b
| Author | SHA1 | Date | |
|---|---|---|---|
| 31ebef777b | |||
| cb9005bf80 | |||
| b457ecce47 |
32
CMakeLists.txt
Normal file
32
CMakeLists.txt
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
cmake_minimum_required(VERSION 3.10)
|
||||||
|
|
||||||
|
project(Tourmaline VERSION 1)
|
||||||
|
|
||||||
|
set(CMAKE_CXX_STANDARD 23)
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
|
||||||
|
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -fsanitize=address")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
include(GNUInstallDirs)
|
||||||
|
|
||||||
|
include_directories(headers)
|
||||||
|
add_library(${PROJECT_NAME} SHARED
|
||||||
|
"source/ECS/Component.cpp"
|
||||||
|
"source/ECS/World.cpp"
|
||||||
|
"source/Systems/Logging.cpp"
|
||||||
|
"source/Systems/Random.cpp"
|
||||||
|
"source/Types/UUID.cpp")
|
||||||
|
|
||||||
|
set_target_properties(${PROJECT_NAME} PROPERTIES VERSION ${PROJECT_VERSION})
|
||||||
|
|
||||||
|
# Nothing to link right now
|
||||||
|
target_link_libraries(${PROJECT_NAME})
|
||||||
|
|
||||||
|
install(
|
||||||
|
TARGETS ${PROJECT_NAME}
|
||||||
|
EXPORT ${PROJECT_NAME}Targets
|
||||||
|
LIBRARY DESTINATION lib
|
||||||
|
ARCHIVE DESTINATION lib
|
||||||
|
RUNTIME DESTINATION bin)
|
||||||
|
install(DIRECTORY headers/ DESTINATION include/${PROJECT_NAME})
|
||||||
@@ -6,7 +6,8 @@
|
|||||||
* v. 2.0. If a copy of the MPL was not distributed with this file, You can
|
* v. 2.0. If a copy of the MPL was not distributed with this file, You can
|
||||||
* obtain one at http://mozilla.org/MPL/2.0/.
|
* obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
#ifndef GUARD_TOURMALINE_LOGGING_H
|
||||||
|
#define GUARD_TOURMALINE_LOGGING_H
|
||||||
#include <array>
|
#include <array>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <string>
|
#include <string>
|
||||||
@@ -33,3 +34,4 @@ private:
|
|||||||
static std::array<const std::string, 6> LogLevelToString;
|
static std::array<const std::string, 6> LogLevelToString;
|
||||||
};
|
};
|
||||||
} // namespace Tourmaline::Systems
|
} // namespace Tourmaline::Systems
|
||||||
|
#endif
|
||||||
@@ -73,7 +73,7 @@ static inline void jump_state(const int_t jump_table[4], rng_t &rng)
|
|||||||
int_t s3 = 0;
|
int_t s3 = 0;
|
||||||
for (int i = 0; i < 4; i++)
|
for (int i = 0; i < 4; i++)
|
||||||
{
|
{
|
||||||
for (int b = 0; b < 8*sizeof(int_t); b++)
|
for (int b = 0; b < static_cast<int>(8*sizeof(int_t)); b++) // static_cast has been added by Tourmaline Engine!
|
||||||
{
|
{
|
||||||
if (jump_table[i] & ((int_t)1) << b)
|
if (jump_table[i] & ((int_t)1) << b)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
* obtain one at http://mozilla.org/MPL/2.0/.
|
* obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../ECS.hpp"
|
#include "../../headers/ECS.hpp"
|
||||||
|
|
||||||
using namespace Tourmaline::ECS;
|
using namespace Tourmaline::ECS;
|
||||||
|
|
||||||
|
|||||||
@@ -7,8 +7,8 @@
|
|||||||
* obtain one at http://mozilla.org/MPL/2.0/.
|
* obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../ECS.hpp"
|
#include "../../headers/ECS.hpp"
|
||||||
#include "../Systems/Random.hpp"
|
#include "../../headers/Systems/Random.hpp"
|
||||||
|
|
||||||
using namespace Tourmaline::ECS;
|
using namespace Tourmaline::ECS;
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,8 @@
|
|||||||
* obtain one at http://mozilla.org/MPL/2.0/.
|
* obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../Logging.hpp"
|
#include "../../headers/Systems/Logging.hpp"
|
||||||
|
|
||||||
#include <cerrno>
|
#include <cerrno>
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
@@ -6,7 +6,8 @@
|
|||||||
* v. 2.0. If a copy of the MPL was not distributed with this file, You can
|
* v. 2.0. If a copy of the MPL was not distributed with this file, You can
|
||||||
* obtain one at http://mozilla.org/MPL/2.0/.
|
* obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
#include "../Random.hpp"
|
#include "../../headers/Systems/Random.hpp"
|
||||||
|
|
||||||
#include <bit>
|
#include <bit>
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <ctime>
|
#include <ctime>
|
||||||
@@ -7,7 +7,8 @@
|
|||||||
* obtain one at http://mozilla.org/MPL/2.0/.
|
* obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../Types.hpp"
|
#include "../../headers/Types.hpp"
|
||||||
|
|
||||||
#include <charconv>
|
#include <charconv>
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
|||||||
Reference in New Issue
Block a user