Skip to content

Commit a5c4287

Browse files
authored
Merge pull request #59 from YGNI-RType/dev
Release v0.3.0
2 parents e0517d3 + f62783f commit a5c4287

189 files changed

Lines changed: 5489 additions & 320 deletions

File tree

Some content is hidden

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

.github/workflows/compilation-gengine.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848

4949
- name: Install ubuntu packages necessary for glfw3
5050
if: matrix.os == 'ubuntu-latest'
51-
run: sudo apt install libxinerama-dev libxcursor-dev xorg-dev libglu1-mesa-dev pkg-config
51+
run: sudo apt update && sudo apt install libxinerama-dev libxcursor-dev xorg-dev libglu1-mesa-dev pkg-config
5252

5353
- name: Install vcpkg and dependencies for Windows
5454
if: matrix.os == 'windows-latest'

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ r-type_server
1414

1515
## tester
1616
Rtype
17-
POC_3D
1817

1918
# Created by https://www.toptal.com/developers/gitignore/api/cmake,macos,c++,conan,visualstudiocode
2019
# Edit at https://www.toptal.com/developers/gitignore?templates=cmake,macos,c++,conan,visualstudiocode

CMakeLists.txt

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@ project(GEngine)
33

44
include(GNUInstallDirs)
55

6+
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
7+
68
include(cmake/automate-vcpkg.cmake)
79
vcpkg_bootstrap()
8-
vcpkg_install_packages(raylib stduuid nlohmann-json)
10+
vcpkg_install_packages(raylib stduuid nlohmann-json portaudio opus bzip2)
911

1012
file(GLOB_RECURSE SOURCES source/*.cpp)
1113
list(FILTER SOURCES EXCLUDE REGEX ".*/deprecated/.*")
@@ -28,11 +30,6 @@ endif()
2830
add_library(GEngine SHARED ${SOURCES} ${HEADERS})
2931
add_library(GEngine_static STATIC ${SOURCES} ${HEADERS})
3032

31-
if(WIN32)
32-
target_link_libraries(GEngine wsock32 ws2_32)
33-
target_link_libraries(GEngine_static wsock32 ws2_32)
34-
endif()
35-
3633
set(CMAKE_DEBUG_POSTFIX d)
3734
set_target_properties(GEngine PROPERTIES
3835
CXX_STANDARD 20
@@ -52,9 +49,20 @@ set_target_properties(GEngine_static PROPERTIES
5249

5350
find_package(raylib CONFIG REQUIRED)
5451
find_package(glfw3 CONFIG REQUIRED) #TODO a supp
52+
find_package(portaudio CONFIG REQUIRED)
53+
find_package(Opus REQUIRED)
54+
find_package(BZip2 REQUIRED)
5555

56-
target_link_libraries(GEngine raylib glfw) #TODO suppr glfw
57-
target_link_libraries(GEngine_static raylib glfw) #TODO suppr glfw
56+
find_package(stduuid CONFIG REQUIRED)
57+
find_package(nlohmann_json CONFIG REQUIRED)
58+
59+
if(WIN32)
60+
target_link_libraries(GEngine wsock32 ws2_32 portaudio ${OPUS_LIBRARIES} BZip2::BZip2 raylib)
61+
target_link_libraries(GEngine_static PRIVATE stduuid nlohmann_json::nlohmann_json PUBLIC wsock32 ws2_32)
62+
else()
63+
target_link_libraries(GEngine portaudio_static ${OPUS_LIBRARIES} BZip2::BZip2 raylib glfw)
64+
target_link_libraries(GEngine_static PRIVATE stduuid nlohmann_json::nlohmann_json)
65+
endif()
5866

5967
target_compile_definitions(GEngine PRIVATE GENGINE_BUILD)
6068
target_compile_definitions(GEngine_static PRIVATE GENGINE_BUILD)
@@ -74,6 +82,9 @@ file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/GEngineConfig.cmake"
7482
"include(CMakeFindDependencyMacro)\n"
7583
"find_dependency(raylib CONFIG REQUIRED)\n"
7684
"find_dependency(glfw3 CONFIG REQUIRED)\n"
85+
"find_dependency(portaudio REQUIRED)\n"
86+
"find_dependency(Opus REQUIRED)\n"
87+
"find_dependency(BZip2 REQUIRED)\n"
7788
"include(\"\${CMAKE_CURRENT_LIST_DIR}/GEngineTargets.cmake\")\n"
7889
)
7990

cmake/automate-vcpkg.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
cmake_minimum_required (VERSION 3.12)
22

3+
include(cmake/define-compilers.cmake)
4+
35
if(WIN32)
46
set(VCPKG_FALLBACK_ROOT ${CMAKE_CURRENT_BINARY_DIR}/vcpkg CACHE STRING "vcpkg configuration directory to use if vcpkg was not installed on the system before")
57
else()

examples/POC_3D/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/build/*
2+
!/build/.gitkeep
3+

examples/POC_3D/CMakeLists.txt

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
cmake_minimum_required(VERSION 3.10)
2+
3+
project(R-Type)
4+
5+
set(CMAKE_CXX_STANDARD 20)
6+
set(CMAKE_CXX_STANDARD_REQUIRED YES)
7+
set(CMAKE_CXX_EXTENSIONS NO)
8+
set(CMAKE_DEBUG_POSTFIX d)
9+
10+
11+
# set(VCPKG_SHOULD_NOT_UPDATE 1)
12+
include(../../cmake/automate-vcpkg.cmake)
13+
vcpkg_bootstrap()
14+
vcpkg_install_packages(raylib stduuid nlohmann-json)
15+
16+
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
17+
if (MSVC)
18+
add_compile_options(/D_ITERATOR_DEBUG_LEVEL=0)
19+
endif()
20+
# The static permits to enter the functions, avoid settings the path to a .dll etc...
21+
find_library(GEngine_LIB NAMES GEngined PATHS ../../build/Debug ../../build)
22+
# find_library(GEngine_LIB NAMES GEngined PATHS ../../build/Debug ../../build)
23+
else()
24+
find_library(GEngine_LIB NAMES GEngined PATHS ../../build/Release ../../build)
25+
endif()
26+
27+
file(GLOB_RECURSE SOURCES source/*.cpp)
28+
file(GLOB_RECURSE HEADERS include/*.h)
29+
30+
find_package(raylib CONFIG REQUIRED)
31+
find_package(glfw3 CONFIG REQUIRED)
32+
33+
include_directories(include)
34+
include_directories(../../include)
35+
36+
add_executable(poc3d_client ${SOURCES} ${HEADERS})
37+
add_executable(poc3d_server ${SOURCES} ${HEADERS})
38+
39+
if(WIN32)
40+
target_link_libraries(poc3d_client PRIVATE ${GEngine_LIB} raylib wsock32 ws2_32)
41+
target_link_libraries(poc3d_server PRIVATE ${GEngine_LIB} raylib wsock32 ws2_32)
42+
else()
43+
target_link_libraries(poc3d_client PRIVATE ${GEngine_LIB} raylib glfw)
44+
target_link_libraries(poc3d_server PRIVATE ${GEngine_LIB} raylib glfw)
45+
endif()
46+
47+
set_target_properties(poc3d_client PROPERTIES
48+
CXX_STANDARD 20
49+
CXX_STANDARD_REQUIRED YES
50+
CXX_EXTENSIONS NO
51+
DEBUG_POSTFIX ${CMAKE_DEBUG_POSTFIX}
52+
)
53+
set_target_properties(poc3d_server PROPERTIES
54+
CXX_STANDARD 20
55+
CXX_STANDARD_REQUIRED YES
56+
CXX_EXTENSIONS NO
57+
DEBUG_POSTFIX ${CMAKE_DEBUG_POSTFIX}
58+
)
59+
60+
install(TARGETS poc3d_client poc3d_server
61+
RUNTIME DESTINATION bin
62+
)
63+
64+
target_compile_definitions(poc3d_server PRIVATE GEngine_Server)
65+
target_compile_definitions(poc3d_client PRIVATE GEngine_Client)

examples/POC_3D/assets/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.trash
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"playerdeath": { "frames": [0, 1, 2, 3, 4, 5], "looping": false },
3+
"shoot": { "frames": [0, 1], "looping": false },
4+
"charging": { "frames": [0, 1, 2, 3, 4, 5, 6, 7], "looping": true },
5+
"beam": { "frames": [0, 1], "looping": true }
6+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"enemy": { "frames": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12] }
3+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"spaceship": { "frames": [0, 1, 2, 3, 4], "idleFrameIdx": 2, "looping": false }
3+
}

0 commit comments

Comments
 (0)