Skip to content

Commit f2c2c65

Browse files
committed
Using marble
1 parent e3cdd9c commit f2c2c65

Some content is hidden

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

74 files changed

+457
-14038
lines changed

.editorconfig

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
2+
3+
root = true
4+
5+
[*]
6+
end_of_line = lf
7+
insert_final_newline = true
8+
trim_trailing_whitespace = true
9+
10+
[{CMakeLists.txt,*.cmake}]
11+
indent_size = 2
12+
indent_style = space

.gitmodules

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,3 @@
1-
[submodule "glfw"]
2-
path = glfw
3-
url = https://github.com/glfw/glfw
4-
[submodule "glm"]
5-
path = glm
6-
url = https://github.com/g-truc/glm
7-
[submodule "assimp"]
8-
path = assimp
9-
url = https://github.com/assimp/assimp
10-
[submodule "ODE"]
11-
path = ODE
12-
url = https://github.com/thomasmarsh/ODE
1+
[submodule "marble"]
2+
path = marble
3+
url = https://github.com/sgf4/marble

CMakeLists.txt

Lines changed: 42 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,59 @@
1+
# Copyright (C) 2023 sgf4
2+
#
3+
# This file is part of lostcpp.
4+
#
5+
# lostcpp is free software: you can redistribute it and/or modify
6+
# it under the terms of the GNU General Public License as published by
7+
# the Free Software Foundation, either version 3 of the License, or
8+
# (at your option) any later version.
9+
#
10+
# lostcpp is distributed in the hope that it will be useful,
11+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
# GNU General Public License for more details.
14+
#
15+
# You should have received a copy of the GNU General Public License
16+
# along with lostcpp. If not, see <http://www.gnu.org/licenses/>.
17+
118
cmake_minimum_required(VERSION 3.14)
219

320
project(lostcpp VERSION 0.1)
421
option(USE_PCH "Use precompiled headers (StdAfx.hpp)" ON)
522

623
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
24+
set(CMAKE_CXX_STANDARD 20)
25+
set(CMAKE_CXX_STANDARD_REQUIRED true)
26+
27+
set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fsanitize=address")
28+
set (CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} -fsanitize=address")
29+
30+
set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}")
31+
if (WIN32)
32+
set (CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_LINKER_FLAGS_RELEASE} -s -static")
33+
endif()
34+
35+
36+
message("Embedding files...")
737

8-
set(EMBED_FILES TRUE CACHE BOOL "Embedded files")
38+
find_package(Python3 REQUIRED)
939

40+
set(EMBED_SCRIPT "${CMAKE_CURRENT_SOURCE_DIR}/tools/embed.py")
41+
file(GLOB_RECURSE EMBED_FILES res/*)
1042

11-
include(cmake/embed.cmake)
12-
include(cmake/libraries.cmake)
13-
include(cmake/flags.cmake)
43+
execute_process(
44+
COMMAND ${Python3_EXECUTABLE} ${EMBED_SCRIPT} ${EMBED_FILES}
45+
)
1446

47+
add_subdirectory(marble)
1548
include_directories(src)
1649

1750
file(GLOB_RECURSE LOSTCPP_SOURCES src/*.cpp src/*.hpp)
1851

19-
add_executable(${CMAKE_PROJECT_NAME} ${LOSTCPP_SOURCES})
20-
target_link_libraries(${CMAKE_PROJECT_NAME} ${LOSTCPP_LIBRARIES})
52+
add_executable(lostcpp ${LOSTCPP_SOURCES})
53+
target_link_libraries(lostcpp PUBLIC marble)
2154

2255
if (USE_PCH)
23-
target_precompile_headers(${CMAKE_PROJECT_NAME} PUBLIC
24-
src/StdAfx.hpp
25-
)
56+
target_precompile_headers(lostcpp PUBLIC
57+
src/stdafx.hpp
58+
)
2659
endif()

ODE

Lines changed: 0 additions & 1 deletion
This file was deleted.

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22

33
# Lostcpp
44

5-
Lostcpp is a simple 3D game using OpenGL 3.3 Core. Here we don't want using or creating any game engine, because we don't really want any kind of abstractions.
6-
We use an ECS to manage and ease all the creation of Entities and its Components.
5+
Lostcpp is a simple 3D game using Marble engine.
76

87
## Preview & Status
98

assimp

Lines changed: 0 additions & 1 deletion
This file was deleted.

glfw

Lines changed: 0 additions & 1 deletion
This file was deleted.

glm

Lines changed: 0 additions & 1 deletion
This file was deleted.

marble

Submodule marble added at af15d45
File renamed without changes.

0 commit comments

Comments
 (0)