Compare commits

..

3 Commits

Author SHA1 Message Date
cat
31ebef777b Added a basic CMAKE script (no find library or pkg-config yet!) 2026-01-06 03:10:55 +02:00
cat
cb9005bf80 Tweaked Xoshiro.h to fix a warn 2026-01-06 03:10:34 +02:00
cat
b457ecce47 Restructing on the project 2026-01-06 03:10:27 +02:00
11 changed files with 45 additions and 8 deletions

32
CMakeLists.txt Normal file
View 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})

View File

@@ -6,7 +6,8 @@
* 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/.
*/
#ifndef GUARD_TOURMALINE_LOGGING_H
#define GUARD_TOURMALINE_LOGGING_H
#include <array>
#include <fstream>
#include <string>
@@ -33,3 +34,4 @@ private:
static std::array<const std::string, 6> LogLevelToString;
};
} // namespace Tourmaline::Systems
#endif

View File

@@ -73,7 +73,7 @@ static inline void jump_state(const int_t jump_table[4], rng_t &rng)
int_t s3 = 0;
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)
{

View File

@@ -7,7 +7,7 @@
* obtain one at http://mozilla.org/MPL/2.0/.
*/
#include "../ECS.hpp"
#include "../../headers/ECS.hpp"
using namespace Tourmaline::ECS;

View File

@@ -7,8 +7,8 @@
* obtain one at http://mozilla.org/MPL/2.0/.
*/
#include "../ECS.hpp"
#include "../Systems/Random.hpp"
#include "../../headers/ECS.hpp"
#include "../../headers/Systems/Random.hpp"
using namespace Tourmaline::ECS;

View File

@@ -7,7 +7,8 @@
* obtain one at http://mozilla.org/MPL/2.0/.
*/
#include "../Logging.hpp"
#include "../../headers/Systems/Logging.hpp"
#include <cerrno>
#include <chrono>
#include <cstddef>

View File

@@ -6,7 +6,8 @@
* 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/.
*/
#include "../Random.hpp"
#include "../../headers/Systems/Random.hpp"
#include <bit>
#include <cstdint>
#include <ctime>

View File

@@ -7,7 +7,8 @@
* obtain one at http://mozilla.org/MPL/2.0/.
*/
#include "../Types.hpp"
#include "../../headers/Types.hpp"
#include <charconv>
#include <cstdint>
#include <cstring>