Skip to content

Commit 44b389f

Browse files
authored
Merge pull request #1 from kolyaka32/Other-libraries-test
Creating better readable snake
2 parents e6cdcc6 + ecadffb commit 44b389f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+2854
-473
lines changed

.gitignore

Lines changed: 56 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,58 @@
11
.vscode/
2-
build/
3-
extra-DLLs/
2+
3+
# Build folder
4+
build/.cmake
5+
build/CMakeFiles
6+
build/cmake_install.cmake
7+
build/CMakeCache.txt
8+
build/compile_commands.json
9+
build/Makefile
10+
build/Testing
11+
12+
# Old include libraries
413
i686-w64-mingw32/
5-
x86_64-w64-mingw32/
14+
x86_64-w64-mingw32/
15+
16+
# New include libraries
17+
lib/
18+
include/
19+
20+
# Prerequisites
21+
*.d
22+
23+
# Compiled Object files
24+
*.slo
25+
*.lo
26+
*.o
27+
*.obj
28+
29+
# Precompiled Headers
30+
*.gch
31+
*.pch
32+
33+
# Compiled Dynamic libraries
34+
*.so
35+
*.dylib
36+
*.dll
37+
38+
# Fortran module files
39+
*.mod
40+
*.smod
41+
42+
# Compiled Static libraries
43+
*.lai
44+
*.la
45+
*.a
46+
*.lib
47+
48+
# Executables
49+
*.exe
50+
*.out
51+
*.app
52+
53+
# Archieves
54+
*.7z
55+
*.zip
56+
57+
# Data files
58+
*.dat

CMakeLists.txt

Lines changed: 54 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,72 @@
11
cmake_minimum_required(VERSION 3.10)
22

3-
project(base)
3+
project(base) # Main game project
44

5-
add_executable(base
5+
# Set source files
6+
add_executable( base
7+
# Base includes and defines
8+
src/include.hpp
9+
src/define.hpp
10+
src/structs.hpp
11+
12+
# Function of initialasing all data
13+
src/init.hpp
14+
src/init.cpp
15+
16+
# Functions of loading all in-game data
17+
src/dataLoader.hpp
18+
src/dataLoader.cpp
19+
20+
# Base interface
21+
src/baseHud.hpp
22+
src/baseHud.cpp
23+
24+
# Interface of game pausing
25+
src/pause.hpp
26+
src/pause.cpp
27+
28+
# System of initialasing file loading and unloading
29+
src/initFile.hpp
30+
src/initFile.cpp
31+
32+
# In game classes
33+
src/entity.hpp
34+
src/entity.cpp
35+
36+
# Main function
637
src/main.cpp
38+
39+
# Adding game icone
40+
src/set.rc
741
)
42+
# Setting static dlls
43+
set(CMAKE_CXX_STANDARD_LIBRARIES "-static-libgcc -static-libstdc++ -lwsock32 -lws2_32 -mwindows ${CMAKE_CSS_STANDARD_LIBRARIES}")
44+
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-Bstatic,--whole-archive -lwinpthread -Wl,--no-whole-archive")
845

46+
# Including external libraries
947
set(CMAKE_PREFIX_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
1048

11-
set(CMAKE_CXX_STANDARD_LIBRARIES "-static-libgcc -static-libstdc++ -lwsock32 -lws2_32 ${CMAKE_CSS_STANDARD_LIBRARIES}")
12-
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-Bstatic,--whole-archive -lwinpthread -Wl,--no-whole-archive")
13-
49+
# Finding place of external libraries
50+
# Including SDL-family
1451
find_package(SDL2 REQUIRED)
1552
find_package(SDL2_image REQUIRED)
1653
find_package(SDL2_ttf REQUIRED)
54+
find_package(SDL2_mixer REQUIRED)
55+
# Including libzip
56+
set(CMAKE_PREFIX_PATH "${CMAKE_CURRENT_SOURCE_DIR}/lib/cmake")
57+
find_package(libzip REQUIRED)
1758

18-
19-
target_include_directories(base
59+
# Including external included directories
60+
target_include_directories( base
2061
PUBLIC ${SDL2_INCLUDE_DIRS}
21-
PUBLIC ${SDL2IMAGE_INCLUDE_DIRS}
62+
PUBLIC ${SDL2_image_INCLUDE_DIRS}
2263
PUBLIC ${SDL2_ttf_config_path}
64+
PUBLIC ${SDL2_mixer_config_path}
65+
PUBLIC &{libzip_INCLUDE_DIRS}
2366
)
2467

68+
# Including linked libraries
2569
target_link_libraries(base PUBLIC ${SDL2_LIBRARIES} SDL2_image::SDL2_image mingw32)
2670
target_link_libraries(base PUBLIC ${SDL2_LIBRARIES} SDL2_ttf::SDL2_ttf mingw32)
71+
target_link_libraries(base PUBLIC ${SDL2_LIBRARIES} SDL2_mixer::SDL2_mixer mingw32)
72+
target_link_libraries(base PUBLIC ${libzip_LIBRARIES} libzip::zip)

build/fnt/Arial.ttf

399 KB
Binary file not shown.
File renamed without changes.

build/img/Flag_BEL.png

5.12 KB
Loading

build/img/Flag_RUS.png

220 Bytes
Loading

build/img/Flag_RUS_IMP.png

4.93 KB
Loading

build/img/Flag_USA.png

3.01 KB
Loading

build/img/Game.ico

4.19 KB
Binary file not shown.

build/img/Poloska_pod_polzunom.png

3.71 KB
Loading

0 commit comments

Comments
 (0)