From eed323847803b687f104f4e8a6aa88e53a86fb82 Mon Sep 17 00:00:00 2001 From: CocoSimone Date: Tue, 3 May 2022 23:00:03 +0200 Subject: [PATCH] start to lay down scheduler --- src/core/CMakeLists.txt | 7 ++++++- src/core/Scheduler.cpp | 6 ++++++ src/core/Scheduler.hpp | 10 ++++++++++ src/core/common.hpp | 5 ++++- src/frontend/sdl/Frontend.cpp | 2 -- 5 files changed, 26 insertions(+), 4 deletions(-) create mode 100644 src/core/Scheduler.cpp create mode 100644 src/core/Scheduler.hpp diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index 50808a1b..f9f2a37c 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -5,5 +5,10 @@ set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) add_subdirectory(gb) -add_library(cores BaseCore.cpp BaseCore.hpp common.hpp) +add_library(cores + BaseCore.cpp + BaseCore.hpp + Scheduler.cpp + Scheduler.hpp + common.hpp) target_include_directories(cores PUBLIC .) diff --git a/src/core/Scheduler.cpp b/src/core/Scheduler.cpp new file mode 100644 index 00000000..0cd88357 --- /dev/null +++ b/src/core/Scheduler.cpp @@ -0,0 +1,6 @@ +#include + +namespace natsukashii::core { +Scheduler::Scheduler() { +} +} \ No newline at end of file diff --git a/src/core/Scheduler.hpp b/src/core/Scheduler.hpp new file mode 100644 index 00000000..70a99da8 --- /dev/null +++ b/src/core/Scheduler.hpp @@ -0,0 +1,10 @@ +#pragma once +#include + +namespace natsukashii::core { +struct Scheduler { + Scheduler(); +private: + u128 currentTime = 0; +}; +} \ No newline at end of file diff --git a/src/core/common.hpp b/src/core/common.hpp index 8836a8d8..10ea8d0e 100644 --- a/src/core/common.hpp +++ b/src/core/common.hpp @@ -1,6 +1,7 @@ #pragma once #include #include +#include using u8 = uint8_t; using u16 = uint16_t; @@ -10,4 +11,6 @@ using s8 = int8_t; using s16 = int16_t; using s32 = int32_t; using s64 = int64_t; -using i128 = std::bitset<128>; // there isn't really a sign to a bitset +using u128 = __uint128_t; +using s128 = __int128_t; +using m128 = __m128i; \ No newline at end of file diff --git a/src/frontend/sdl/Frontend.cpp b/src/frontend/sdl/Frontend.cpp index ce612989..75fcb8cf 100644 --- a/src/frontend/sdl/Frontend.cpp +++ b/src/frontend/sdl/Frontend.cpp @@ -1,6 +1,4 @@ #include -#include -#include namespace natsukashii::frontend { App::~App() {