commit c7597571d7f65b18ba17152f0a4b63fc8bb396a9 Author: Andrew Haynes Date: Wed Feb 25 13:11:11 2026 -0500 batman diff --git a/.clang-format b/.clang-format new file mode 100644 index 0000000..e9e3cb2 --- /dev/null +++ b/.clang-format @@ -0,0 +1,20 @@ +--- +BasedOnStyle: Google +Standard: Latest +# ColumnLimit: 80 +UseTab: Always +TabWidth: 8 +IndentWidth: 8 +BreakBeforeBraces: Allman +SpaceBeforeCpp11BracedList: true +SeparateDefinitionBlocks: Always +Cpp11BracedListStyle: false +BreakAfterReturnType: TopLevel +AlignTrailingComments: + Kind: Always +ReflowComments: Always +AllowShortFunctionsOnASingleLine: All +AllowShortIfStatementsOnASingleLine: AllIfsAndElse +AllowShortLoopsOnASingleLine: true +IndentAccessModifiers: false # Indent access specifiers by one level +AccessModifierOffset: -4 # Optional: adjust offset relative to the class indentation level diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5b79a54 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +build/ +.cache/ \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..fb0fd7b --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,47 @@ +cmake_minimum_required(VERSION 4.2.1) +set(CMAKE_CXX_STANDARD 23) +set(CMAKE_CXX_STANDARD_REQUIRED ON) +set(CMAKE_CXX_EXTENSIONS OFF) +set(CMAKE_EXPORT_COMPILE_COMMANDS ON) +project(engine) + +include_directories(include) +set(SOURCES + src/main.cpp + src/graphics.cpp + src/renderer.cpp + src/data.cpp + src/scheduler.cpp +) + +include(FetchContent) +FetchContent_Declare(SFML + GIT_REPOSITORY https://github.com/SFML/SFML.git + GIT_TAG 3.0.2 + GIT_SHALLOW ON + EXCLUDE_FROM_ALL + SYSTEM) +FetchContent_MakeAvailable(SFML) + +if(APPLE) + message(STATUS "Detected macOS: installing range-v3") + + include(FetchContent) + FetchContent_Declare( + range-v3 + GIT_REPOSITORY https://github.com/ericniebler/range-v3.git + GIT_TAG 0.12.0 + GIT_SHALLOW ON + ) + FetchContent_MakeAvailable(range-v3) + + include_directories(${range-v3_SOURCE_DIR}/include) +endif() + +add_executable(engine ${SOURCES}) +target_link_libraries(engine + PRIVATE + SFML::Graphics + SFML::Window + SFML::System +) diff --git a/assets/pixel.ttf b/assets/pixel.ttf new file mode 100644 index 0000000..2442aff Binary files /dev/null and b/assets/pixel.ttf differ diff --git a/src/main.cpp b/src/main.cpp new file mode 100644 index 0000000..839a118 --- /dev/null +++ b/src/main.cpp @@ -0,0 +1,6 @@ +#include + +int main() { + std::cout << "Hello World\n"; + return 0; +}