-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit ef67221
Showing
20 changed files
with
49,938 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
Language: Cpp | ||
AccessModifierOffset: -4 | ||
AlignAfterOpenBracket: DontAlign | ||
AllowShortCaseLabelsOnASingleLine: true | ||
AllowShortIfStatementsOnASingleLine: true | ||
AlwaysBreakTemplateDeclarations: Yes | ||
BraceWrapping: | ||
AfterFunction: true | ||
BreakBeforeBraces: Custom | ||
ColumnLimit: 0 | ||
IncludeBlocks: Regroup | ||
IncludeCategories: | ||
- Regex: '^<.*\.h>' | ||
Priority: 2 | ||
- Regex: '^<.*' | ||
Priority: 3 | ||
- Regex: '.*' | ||
Priority: 1 | ||
IndentCaseLabels: true | ||
IndentWidth: 4 | ||
KeepEmptyLinesAtTheStartOfBlocks: false | ||
MaxEmptyLinesToKeep: 2 | ||
NamespaceIndentation: All | ||
PointerAlignment: Left | ||
SpaceAfterCStyleCast: true | ||
SpacesBeforeTrailingComments: 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
indent_style = space | ||
indent_size = 4 | ||
tab_width = 8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
*.cpp text | ||
*.h text | ||
*.txt text | ||
*.md text | ||
.* text | ||
*.png filter=lfs diff=lfs merge=lfs -text |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
name: Build and Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v[0-9]+.*' | ||
|
||
permissions: | ||
packages: read | ||
contents: write | ||
|
||
jobs: | ||
create_release: | ||
name: Create Release | ||
runs-on: ubuntu-latest | ||
|
||
outputs: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
|
||
steps: | ||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: Release ${{ github.ref }} | ||
draft: false | ||
prerelease: false | ||
|
||
release_assets: | ||
name: Release Assets | ||
needs: create_release | ||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest] | ||
build_type: [Release] | ||
cpp_compiler: [g++-13, cl] | ||
include: | ||
- os: windows-latest | ||
cpp_compiler: cl | ||
- os: ubuntu-latest | ||
cpp_compiler: g++-13 | ||
exclude: | ||
- os: windows-latest | ||
cpp_compiler: g++-13 | ||
- os: ubuntu-latest | ||
cpp_compiler: cl | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set Reusable Strings | ||
id: strings | ||
shell: bash | ||
run: | | ||
echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT" | ||
- name: Install GCC | ||
if: ${{ matrix.os == 'ubuntu-latest' }} | ||
shell: bash | ||
run: | | ||
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test | ||
sudo apt-get update | ||
sudo apt-get -y install g++-13 | ||
- name: Configure CMake | ||
run: > | ||
cmake -B ${{ steps.strings.outputs.build-output-dir }} | ||
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} | ||
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} | ||
-S ${{ github.workspace }} | ||
- name: Build | ||
run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }} | ||
|
||
- name: Upload Ubuntu Assets | ||
if: ${{ matrix.os == 'ubuntu-latest' }} | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ needs.create_release.outputs.upload_url }} | ||
asset_name: vtdoom | ||
asset_path: ${{ steps.strings.outputs.build-output-dir }}/vtdoom | ||
asset_content_type: application/octet-stream | ||
|
||
- name: Upload Windows Assets | ||
if: ${{ matrix.os == 'windows-latest' }} | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ needs.create_release.outputs.upload_url }} | ||
asset_name: vtdoom.exe | ||
asset_path: ${{ steps.strings.outputs.build-output-dir }}/Release/vtdoom.exe | ||
asset_content_type: application/octet-stream |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.vs/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
cmake_minimum_required(VERSION 3.15) | ||
project(vtdoom) | ||
|
||
set( | ||
MAIN_FILES | ||
"src/main.cpp" | ||
"src/PureDOOM.c" | ||
"src/input.cpp" | ||
"src/os.cpp" | ||
"src/renderer.cpp" | ||
) | ||
|
||
set( | ||
DOC_FILES | ||
"README.md" | ||
"LICENSE.txt" | ||
) | ||
|
||
if(WIN32) | ||
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded") | ||
endif() | ||
|
||
add_executable(vtdoom ${MAIN_FILES}) | ||
|
||
if(UNIX) | ||
target_link_libraries(vtdoom -lpthread) | ||
endif() | ||
|
||
set_target_properties(vtdoom PROPERTIES CXX_STANDARD 20 CXX_STANDARD_REQUIRED On) | ||
source_group("Doc Files" FILES ${DOC_FILES}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"configurations": [ | ||
{ | ||
"name": "x64-Debug", | ||
"generator": "Ninja", | ||
"configurationType": "Debug", | ||
"inheritEnvironments": [ "msvc_x64_x64" ], | ||
"buildRoot": "${projectDir}\\build\\${name}", | ||
"installRoot": "${projectDir}\\build\\install\\${name}", | ||
"cmakeCommandArgs": "", | ||
"buildCommandArgs": "", | ||
"ctestCommandArgs": "" | ||
}, | ||
{ | ||
"name": "x64-Release", | ||
"generator": "Ninja", | ||
"configurationType": "RelWithDebInfo", | ||
"inheritEnvironments": [ "msvc_x64_x64" ], | ||
"buildRoot": "${projectDir}\\build\\${name}", | ||
"installRoot": "${projectDir}\\build\\install\\${name}", | ||
"cmakeCommandArgs": "", | ||
"buildCommandArgs": "", | ||
"ctestCommandArgs": "" | ||
} | ||
] | ||
} |
Oops, something went wrong.