Add SFML project with Paddle class and miscellaneous utilities
- Introduced `Paddle` class for player controls in the SFML project. - Added `main.cpp` to demonstrate basic paddle movement and rendering. - Created reusable templates (`templates.h`) and inline class (`inlines.h`) in the `misc` module. - Defined `structs`, `enums`, `unions` in `misc/structs_enums_unions.h`. - Updated CMake configuration for the `sfml` and `misc` modules. - Included new assets for backgrounds, characters, enemies, and tiles.
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
cmake_minimum_required(VERSION 3.28)
|
||||
project(CMakeSFMLProject LANGUAGES CXX)
|
||||
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
||||
|
||||
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)
|
||||
|
||||
add_executable(main
|
||||
src/main.cpp
|
||||
src/Paddle.cpp
|
||||
)
|
||||
target_compile_features(main PRIVATE cxx_std_17)
|
||||
target_link_libraries(main PRIVATE SFML::Graphics)
|
||||
|
||||
set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT main)
|
||||
Reference in New Issue
Block a user