-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactoring + rework of saving process #32
base: main
Are you sure you want to change the base?
Changes from all commits
7134a1f
356d6fa
153f603
ce10fc5
709daf8
1a1a5ea
0c2caad
b8ddec3
2ce0fb8
f54578e
70ed69c
380d2bc
3062f17
8f77d0b
281015f
d17a228
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,15 @@ | ||
build | ||
.cache | ||
.vscode | ||
|
||
__cmrc_Assets | ||
_cmrc | ||
CMakeCache.txt | ||
CMakeFiles | ||
GravityDefied | ||
Makefile | ||
cmake_install.cmake | ||
libAssets.a | ||
saves | ||
a.out | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
cmake_minimum_required(VERSION 3.24) | ||
cmake_minimum_required(VERSION 3.10) | ||
project(gravity_defied_cpp C CXX) | ||
set(CMAKE_VERBOSE_MAKEFILE TRUE) | ||
|
||
unset(ENV{PKG_CONFIG_PATH}) | ||
|
||
|
@@ -13,14 +14,18 @@ if(WIN32) | |
endif() | ||
|
||
find_package(PkgConfig REQUIRED) | ||
find_package(OpenSSL REQUIRED) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. OpenSSL, just for the sake of md5 hash, is redundant. Can we use a lighter implementation or another algorithm like crc32. Are there any analogs in the standard c++ library? |
||
|
||
pkg_search_module(SDL2 REQUIRED IMPORTED_TARGET sdl2) | ||
pkg_search_module(SDL2_TTF REQUIRED IMPORTED_TARGET SDL2_ttf) | ||
pkg_search_module(SDL2_IMAGE REQUIRED IMPORTED_TARGET SDL2_image) | ||
|
||
# Create a sources variable with a link to all cpp files to compile | ||
set(SOURCES | ||
src/config.cpp | ||
src/utils/Log.cpp | ||
src/utils/Time.cpp | ||
src/utils/Hashing.cpp | ||
src/utils/EmbedFileStream.cpp | ||
src/main.cpp | ||
src/MathF16.cpp | ||
|
@@ -30,12 +35,14 @@ set(SOURCES | |
src/class_10.cpp | ||
src/GameLevel.cpp | ||
src/LevelLoader.cpp | ||
src/MRGLoader.cpp | ||
src/Micro.cpp | ||
src/TextRender.cpp | ||
src/GameMenu.cpp | ||
src/SettingsStringRender.cpp | ||
src/MenuManager.cpp | ||
src/RecordManager.cpp | ||
src/SettingsManager.cpp | ||
src/Timer.cpp | ||
src/lcdui/CanvasImpl.cpp | ||
src/lcdui/Canvas.cpp | ||
|
@@ -44,8 +51,6 @@ set(SOURCES | |
src/lcdui/Font.cpp | ||
src/lcdui/Command.cpp | ||
src/lcdui/FontStorage.cpp | ||
src/rms/RecordEnumerationImpl.cpp | ||
src/rms/RecordStore.cpp | ||
) | ||
|
||
include(cmake/CMakeRC.cmake) | ||
|
@@ -77,7 +82,7 @@ endif() | |
add_executable(GravityDefied ${SOURCES}) | ||
|
||
target_compile_features(GravityDefied PRIVATE cxx_std_17) | ||
target_compile_options(GravityDefied PRIVATE -Wall -Wextra) | ||
target_compile_options(GravityDefied PRIVATE -Wall -Wextra -fsigned-char) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What is this option for? |
||
|
||
target_include_directories(GravityDefied PRIVATE | ||
${SDL2_INCLUDE_DIRS} | ||
|
@@ -97,12 +102,14 @@ if(WIN32) | |
${SDL2_STATIC_LIBRARIES} | ||
${SDL2_TTF_STATIC_LIBRARIES} | ||
${SDL2_IMAGE_STATIC_LIBRARIES} | ||
OpenSSL::SSL | ||
Assets::Assets) | ||
else() | ||
target_link_libraries(GravityDefied | ||
${SDL2_LIBRARIES} | ||
${SDL2_TTF_LIBRARIES} | ||
${SDL2_IMAGE_LIBRARIES} | ||
OpenSSL::SSL | ||
Assets::Assets) | ||
endif() | ||
|
||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How is it different from what it was? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no need to force this option. You can pass it via
-D
on the command line.