-
Notifications
You must be signed in to change notification settings - Fork 9
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 aa01bc0
Showing
12 changed files
with
220 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,68 @@ | ||
--- | ||
AccessModifierOffset: -4 | ||
AlignAfterOpenBracket: Align | ||
AlignConsecutiveMacros: true | ||
AlignEscapedNewlines: Left | ||
AlignOperands: true | ||
AlignTrailingComments: true | ||
AllowAllArgumentsOnNextLine: false | ||
AllowAllConstructorInitializersOnNextLine: false | ||
AllowAllParametersOfDeclarationOnNextLine: false | ||
AllowShortBlocksOnASingleLine: false | ||
AllowShortCaseLabelsOnASingleLine: false | ||
AllowShortFunctionsOnASingleLine: InlineOnly | ||
AllowShortIfStatementsOnASingleLine: Never | ||
AllowShortLambdasOnASingleLine: Empty | ||
AllowShortLoopsOnASingleLine: false | ||
AlwaysBreakAfterReturnType: None | ||
AlwaysBreakBeforeMultilineStrings: false | ||
AlwaysBreakTemplateDeclarations: Yes | ||
BinPackArguments: true | ||
BinPackParameters: true | ||
BreakBeforeBinaryOperators: None | ||
BreakBeforeBraces: Allman | ||
BreakBeforeTernaryOperators: false | ||
BreakConstructorInitializers: AfterColon | ||
BreakInheritanceList: AfterComma | ||
ColumnLimit: 0 | ||
CompactNamespaces: false | ||
ContinuationIndentWidth: 4 | ||
ConstructorInitializerAllOnOneLineOrOnePerLine: false | ||
Cpp11BracedListStyle: true | ||
DeriveLineEnding: false | ||
DerivePointerAlignment: false | ||
DisableFormat: false | ||
IncludeBlocks: Regroup | ||
IndentCaseLabels: true | ||
IndentPPDirectives: None | ||
IndentWidth: 4 | ||
IndentWrappedFunctionNames: false | ||
KeepEmptyLinesAtTheStartOfBlocks: false | ||
Language: Cpp | ||
MaxEmptyLinesToKeep: 1 | ||
NamespaceIndentation: All | ||
PenaltyReturnTypeOnItsOwnLine: 1000000 | ||
PointerAlignment: Right | ||
ReflowComments: true | ||
SortIncludes: true | ||
SortUsingDeclarations: true | ||
SpaceAfterCStyleCast: false | ||
SpaceAfterLogicalNot: false | ||
SpaceAfterTemplateKeyword: true | ||
SpaceBeforeAssignmentOperators: true | ||
SpaceBeforeCpp11BracedList: true | ||
SpaceBeforeCtorInitializerColon: true | ||
SpaceBeforeInheritanceColon: true | ||
SpaceBeforeParens: ControlStatementsExceptForEachMacros | ||
SpaceBeforeRangeBasedForLoopColon: true | ||
SpaceInEmptyParentheses: false | ||
SpacesInAngles: false | ||
SpacesInCStyleCastParentheses: false | ||
SpacesInContainerLiterals: false | ||
SpacesInParentheses: true | ||
SpacesInSquareBrackets: false | ||
Standard: c++20 | ||
TabWidth: 4 | ||
UseTab: Always | ||
UseCRLF: false | ||
|
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,15 @@ | ||
|
||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
indent_size = 4 | ||
indent_style = tab | ||
tab_width = 4 | ||
insert_final_newline = true | ||
|
||
[*.{json,jsonc,json5}] | ||
indent_style = spaces | ||
indent_size = 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,35 @@ | ||
* text=auto eol=lf | ||
# Binaries | ||
*.exe -text | ||
*.dll -text | ||
*.a -text | ||
*.so* -text | ||
*.pdb -text | ||
# Images | ||
*.vtf -text | ||
*.jpg -text | ||
*.tga -text | ||
*.dds -text | ||
*.png -text | ||
*.jpeg -text | ||
*.psd -text | ||
*.bmp -text | ||
# Models | ||
*.vtx -text | ||
*.mdl -text | ||
*.phy -text | ||
*.vvd -text | ||
*.fbx -text | ||
# Fonts | ||
*.ttf -text | ||
*.otf -text | ||
# Sounds | ||
*.wav -text | ||
*.ogg -text | ||
*.mp3 -text | ||
*.flac -text | ||
# Media | ||
*.mp4 -text | ||
*.webm -text | ||
*.avi -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,23 @@ | ||
build | ||
.vscode | ||
.idea | ||
.ccls-cache | ||
*.kdev4 | ||
.kdev4/ | ||
|
||
# CMake with Visual Studio | ||
.vs/ | ||
CMakeFiles/ | ||
[Dd]ebug*/ | ||
[Rr]elease*/ | ||
*.dir/ | ||
*_autogen/ | ||
*.vcxproj* | ||
cmake_install.cmake | ||
CMakeCache.txt | ||
*.sln | ||
|
||
# CMake with CLion | ||
cmake-build-*/ | ||
|
||
|
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,3 @@ | ||
[submodule "external/vtflib"] | ||
path = external/vtflib | ||
url = https://github.com/JJL772/VTFLib |
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,40 @@ | ||
cmake_minimum_required(VERSION 3.15) | ||
|
||
project(vtex2 CXX) | ||
|
||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON) | ||
|
||
# Project settings | ||
|
||
# Set to enable Qt for this project | ||
set(USING_QT OFF) | ||
|
||
# Global flags, mainly for UNIX. Use $ORIGIN rpath & -fPIC | ||
set(CMAKE_POSITION_INDEPENDENT_CODE ON) | ||
set(CMAKE_BUILD_RPATH_USE_ORIGIN ON) | ||
|
||
# Sources | ||
set(CLI_SRC | ||
src/cli/main.cpp) | ||
|
||
add_executable(vtex2 ${CLI_SRC}) | ||
|
||
# Qt support | ||
if (USING_QT) | ||
include(cmake_scripts/Qt.cmake) | ||
find_package(Qt5 REQUIRED COMPONENTS Widgets Core Gui) | ||
target_link_libraries(${PROJECTNAME} PRIVATE Qt5::Widgets Qt5::Core Qt5::Gui) | ||
target_include_directories(${PROJECTNAME} PRIVATE ${QT_INCLUDE} ${QT_INCLUDE}/QtWidgets ${QT_INCLUDE}/QtGui ${QT_INCLUDE}/QtCore) | ||
endif() | ||
|
||
|
||
# Set up the debugger so it can run the program without copying a million dlls | ||
if(WIN32) | ||
set_target_properties(vtex2 PROPERTIES VS_DEBUGGER_ENVIRONMENT "PATH=%PATH%;${QT_BASEDIR}/bin;") | ||
endif() | ||
|
||
# Build vtflib as static lib | ||
set(VTFLIB_STATIC ON) | ||
add_subdirectory(external/vtflib) | ||
|
||
target_link_libraries(vtex2 vtflib) |
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,25 @@ | ||
# Qt base script | ||
|
||
if(UNIX) | ||
set(QT_INCLUDE "/usr/include/x86_64-linux-gnu/qt5") | ||
endif() | ||
|
||
if(WIN32) | ||
# On Windows, the install dir must be specified, as it's not standardized | ||
if(DEFINED QT_BASEDIR) | ||
# Add it to the prefix path so find_package can find it | ||
list(APPEND CMAKE_PREFIX_PATH ${QT_BASEDIR}) | ||
set(QT_INCLUDE ${QT_BASEDIR}/include) | ||
# CMake has an odd policy that links a special link lib for Qt on newer versions of CMake. Enable it so we don't get spammed, and I get to write less | ||
cmake_policy(SET CMP0020 NEW) | ||
else() | ||
message(FATAL_ERROR "--!@ Please define your QT install dir with -DQT_BASEDIR=C:/your/qt5/here") | ||
endif() | ||
endif() | ||
|
||
message("Using ${QT_INCLUDE} as our Qt include dir") | ||
|
||
set(CMAKE_AUTOMOC ON) | ||
set(CMAKE_AUTOUIC ON) | ||
set(CMAKE_AUTORCC ON) | ||
|
Submodule stb
added at
af1a5b
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,5 @@ | ||
<!DOCTYPE RCC><RCC version="1.0"> | ||
<qresource prefix="resource"> | ||
<file>chaos.png</file> | ||
</qresource> | ||
</RCC> |
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,4 @@ | ||
|
||
int main(int argc, char** argv) { | ||
return 0; | ||
} |