Skip to content

Commit

Permalink
Revert "Overhaul"
Browse files Browse the repository at this point in the history
This reverts commit 11814dc.
  • Loading branch information
LeandroSQ committed Feb 20, 2024
1 parent 11814dc commit 9e1a4bf
Show file tree
Hide file tree
Showing 53 changed files with 666 additions and 2,026 deletions.
2 changes: 0 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"configurations": [
{
"name": "Debug (lldb)",
"preLaunchTask": "CMake: build",
"type": "cppdbg",
"request": "launch",
"program": "${command:cmake.launchTargetPath}",
Expand All @@ -19,6 +18,5 @@
"console": "externalTerminal",
"MIMode": "lldb"
},

]
}
6 changes: 1 addition & 5 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,6 @@
"__availability": "cpp"
},
"cSpell.words": [
"Cooldown",
"cpptrace",
"emscripten",
"Emscripten",
"EMSDK",
Expand All @@ -95,9 +93,7 @@
"SMPTE",
"substeps"
],
"cmake.configureOnOpen": true,
"cmake.buildBeforeRun": true,
"cmake.parseBuildDiagnostics": true,
"cmake.configureOnOpen": false,
"C_Cpp.intelliSenseEngine": "disabled",
"clangd.path": "/usr/bin/clangd",
"clangd.arguments": [
Expand Down
25 changes: 0 additions & 25 deletions .vscode/tasks.json

This file was deleted.

57 changes: 3 additions & 54 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,34 +59,14 @@ function(define_project_variables)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
endif()

if("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang")
add_compile_options(-fsanitize=address)
add_link_options(-fsanitize=address)
endif()

set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra")
set(CMAKE_C_STANDARD 11)

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g -O0")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g -O3")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3")
set(CMAKE_CXX_STANDARD 23)

# Set colors for ninja
if(CMAKE_GENERATOR STREQUAL "Ninja")
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fdiagnostics-color=always")
elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fcolor-diagnostics")
endif()

if("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fdiagnostics-color=always")
elseif("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fcolor-diagnostics")
endif()
endif()

# For clang use -std=c++23
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++23")

Expand Down Expand Up @@ -158,46 +138,15 @@ add_subdirectory(lib)
add_executable(${PROJECT_NAME} ${SOURCES})
define_target_properties(${PROJECT_NAME})

# region dSYM
if(APPLE)
add_custom_command(
TARGET ${PROJECT_NAME}
POST_BUILD
COMMAND dsymutil $<TARGET_FILE:${PROJECT_NAME}>
)
endif()
# endregion

# # region Run assets.sh after build
# add_custom_command(
# TARGET ${PROJECT_NAME}
# PRE_BUILD
# COMMAND sh ${CMAKE_SOURCE_DIR}/scripts/assets.sh
# WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
# )
# # endregion

# region Format
file(GLOB_RECURSE FORMAT_SOURCES "src/core/*.cpp" "src/core/*.hpp")
add_custom_target(${PROJECT_NAME}_format
COMMAND clang-format -i ${FORMAT_SOURCES}
COMMENT "Running clang-format"
DEPENDS ${FORMAT_SOURCES}
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
)
# endregion

# region Linter
file(GLOB_RECURSE LINT_SOURCES "src/core/*.cpp" "src/core/*.hpp")
add_custom_target(${PROJECT_NAME}_lint
COMMAND clang-tidy ${LINT_SOURCES}
COMMENT "Running clang-tidy"
DEPENDS ${LINT_SOURCES}
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
)
# endregion

# endregion# region Clean
)# endregion
# region Clean
add_custom_target(${PROJECT_NAME}_clean
COMMAND sh ${CMAKE_SOURCE_DIR}/scripts/clean.sh
COMMENT "Running clean.sh"
Expand Down
Binary file removed assets/audio/explosion.wav
Binary file not shown.
Binary file removed assets/audio/hit.wav
Binary file not shown.
Binary file removed assets/audio/original/explosion.rfx
Binary file not shown.
29 changes: 0 additions & 29 deletions assets/audio/original/hit.sfxr

This file was deleted.

29 changes: 0 additions & 29 deletions assets/audio/original/shoot.sfxr

This file was deleted.

29 changes: 0 additions & 29 deletions assets/audio/original/shoot2.sfxr

This file was deleted.

Binary file removed assets/audio/original/spawn.rfx
Binary file not shown.
Binary file removed assets/audio/shoot.wav
Binary file not shown.
Binary file removed assets/audio/spawn.wav
Binary file not shown.
Binary file removed assets/audio/thrust.wav
Binary file not shown.
Binary file removed assets/audio/thrust2.wav
Binary file not shown.
114 changes: 0 additions & 114 deletions assets/shaders/all.fs

This file was deleted.

35 changes: 0 additions & 35 deletions assets/shaders/background.fs

This file was deleted.

Loading

0 comments on commit 9e1a4bf

Please sign in to comment.