Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
e391f6d
lsl: move lslVariantm, lslMath and r3dMath to new MathLib
q4a Jun 13, 2021
ec50208
add clang-format
q4a Jun 14, 2021
7edc7ed
math: replace D3DXVECTOR2 with glm::vec2 in LexStd, MathLib and Rock3…
q4a Jun 14, 2021
33add83
ci: fix build with cmake+glm
q4a Jun 14, 2021
e520c32
math: replace D3DXVECTOR2 with glm::vec2 in Rock3dEngine part2 and Ne…
q4a Jun 14, 2021
9604648
math: auto replace D3DXVECTOR2 with glm::vec2 in Rock3dGame
q4a Jun 14, 2021
c3304cc
math: fix build Rock3dGame with glm::vec2
q4a Jun 15, 2021
a553156
math: restore all projects builds, D3DXVECTOR2 replaced with glm::vec…
q4a Jun 15, 2021
d1bcd4f
ci: save builded artifact
q4a Jun 15, 2021
95a25b5
math: replace D3DXQUATERNION with glm::quat in LexStd and MathLib
q4a Jun 20, 2021
c840cf4
clang-format: UseTab AlignWithSpaces
q4a Jun 20, 2021
b9442d6
math: replace D3DXQUATERNION with glm::quat in NetLib
q4a Jun 20, 2021
5f6a728
math: auto replace D3DXQUATERNION with glm::quat in Rock3dEngine
q4a Jun 20, 2021
c090e38
math: fix Matrix4GlmToDx, fix incorrect spaces and tabs
q4a Jun 20, 2021
fefd3a7
math: fix build Rock3dEngine with glm::quat
q4a Jun 20, 2021
fce2800
math: auto replace D3DXQUATERNION with glm::quat in Rock3dGame
q4a Jun 20, 2021
ee82ce5
math: fix build Rock3dGame with glm::quat
q4a Jun 21, 2021
00c1f0e
math: restore all projects builds, D3DXQUATERNION replaced with glm::…
q4a Jun 21, 2021
2901e7c
math: multiplication test
q4a Jun 22, 2021
838e554
math: fix items rotation in main menu
q4a Jun 26, 2021
809ae4d
math: fix car rotation, replace glm::mix with glm::slerp
q4a Jun 26, 2021
74a7469
trim spaces in the end of source code files
q4a Jun 26, 2021
e7bf27d
replace spaces with tabs
q4a Jun 26, 2021
a49c66c
remove duplicate empty lines
q4a Jun 26, 2021
86c1299
math: auto replace D3DXMATRIX with glm::mat4 in MathLib
q4a Jun 26, 2021
c285180
math: fix build MathLib with glm::mat4
q4a Jun 26, 2021
22cea56
math: auto replace D3DXMATRIX with glm::mat4 in NetLib and Rock3dEngine
q4a Jun 26, 2021
9b0f55a
math: remove EulerAngles.* (necessary functions created in lslMath.in…
q4a Jun 30, 2021
3635628
math: auto replace D3DXMATRIX with glm::mat4 in NetLib and Rock3dGame
q4a Jun 30, 2021
f3345cd
math: fix build NetLib and Rock3dGame with glm::mat4
q4a Jul 3, 2021
39395b8
math: fix order for glm::mat4 in Variant::AssignData
q4a Aug 4, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
143 changes: 143 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
BasedOnStyle: Microsoft

# To apply code style please run:
# find ./src -iname *.h -o -iname *.cpp | xargs clang-format -i

# To dump Microsoft style options run:
# clang-format -style=microsoft -dump-config > .clang-format
# ---
# Language: Cpp
# AccessModifierOffset: -2
# AlignAfterOpenBracket: Align
# AlignConsecutiveMacros: false
# AlignConsecutiveAssignments: false
# AlignConsecutiveDeclarations: false
# AlignEscapedNewlines: Right
# AlignOperands: true
# AlignTrailingComments: true
# AllowAllArgumentsOnNextLine: true
# AllowAllConstructorInitializersOnNextLine: true
# AllowAllParametersOfDeclarationOnNextLine: true
# AllowShortBlocksOnASingleLine: Never
# AllowShortCaseLabelsOnASingleLine: false
# AllowShortFunctionsOnASingleLine: None
# AllowShortLambdasOnASingleLine: All
# AllowShortIfStatementsOnASingleLine: Never
# AllowShortLoopsOnASingleLine: false
# AlwaysBreakAfterDefinitionReturnType: None
# AlwaysBreakAfterReturnType: None
# AlwaysBreakBeforeMultilineStrings: false
# AlwaysBreakTemplateDeclarations: MultiLine
# BinPackArguments: true
# BinPackParameters: true
# BraceWrapping:
# AfterCaseLabel: false
# AfterClass: true
# AfterControlStatement: true
# AfterEnum: true
# AfterFunction: true
# AfterNamespace: true
# AfterObjCDeclaration: true
# AfterStruct: true
# AfterUnion: false
# AfterExternBlock: true
# BeforeCatch: true
# BeforeElse: true
# IndentBraces: false
# SplitEmptyFunction: true
# SplitEmptyRecord: true
# SplitEmptyNamespace: true
# BreakBeforeBinaryOperators: None
# BreakBeforeBraces: Custom
# BreakBeforeInheritanceComma: false
# BreakInheritanceList: BeforeColon
# BreakBeforeTernaryOperators: true
# BreakConstructorInitializersBeforeComma: false
# BreakConstructorInitializers: BeforeColon
# BreakAfterJavaFieldAnnotations: false
# BreakStringLiterals: true
# ColumnLimit: 120
# CommentPragmas: '^ IWYU pragma:'
# CompactNamespaces: false
# ConstructorInitializerAllOnOneLineOrOnePerLine: false
# ConstructorInitializerIndentWidth: 4
# ContinuationIndentWidth: 4
# Cpp11BracedListStyle: true
# DeriveLineEnding: true
# DerivePointerAlignment: false
# DisableFormat: false
# ExperimentalAutoDetectBinPacking: false
# FixNamespaceComments: true
# ForEachMacros:
# - foreach
# - Q_FOREACH
# - BOOST_FOREACH
# IncludeBlocks: Preserve
# IncludeCategories:
# - Regex: '^"(llvm|llvm-c|clang|clang-c)/'
# Priority: 2
# SortPriority: 0
# - Regex: '^(<|"(gtest|gmock|isl|json)/)'
# Priority: 3
# SortPriority: 0
# - Regex: '.*'
# Priority: 1
# SortPriority: 0
# IncludeIsMainRegex: '(Test)?$'
# IncludeIsMainSourceRegex: ''
# IndentCaseLabels: false
# IndentGotoLabels: true
# IndentPPDirectives: None
# IndentWidth: 4
# IndentWrappedFunctionNames: false
# JavaScriptQuotes: Leave
# JavaScriptWrapImports: true
# KeepEmptyLinesAtTheStartOfBlocks: true
# MacroBlockBegin: ''
# MacroBlockEnd: ''
# MaxEmptyLinesToKeep: 1
# NamespaceIndentation: None
# ObjCBinPackProtocolList: Auto
# ObjCBlockIndentWidth: 2
# ObjCSpaceAfterProperty: false
# ObjCSpaceBeforeProtocolList: true
# PenaltyBreakAssignment: 2
# PenaltyBreakBeforeFirstCallParameter: 19
# PenaltyBreakComment: 300
# PenaltyBreakFirstLessLess: 120
# PenaltyBreakString: 1000
# PenaltyBreakTemplateDeclaration: 10
# PenaltyExcessCharacter: 1000000
# PenaltyReturnTypeOnItsOwnLine: 1000
# PointerAlignment: Right
# ReflowComments: true
# SortIncludes: true
# SortUsingDeclarations: true
# SpaceAfterCStyleCast: false
# SpaceAfterLogicalNot: false
# SpaceAfterTemplateKeyword: true
# SpaceBeforeAssignmentOperators: true
# SpaceBeforeCpp11BracedList: false
# SpaceBeforeCtorInitializerColon: true
# SpaceBeforeInheritanceColon: true
# SpaceBeforeParens: ControlStatements
# SpaceBeforeRangeBasedForLoopColon: true
# SpaceInEmptyBlock: false
# SpaceInEmptyParentheses: false
# SpacesBeforeTrailingComments: 1
# SpacesInAngles: false
# SpacesInConditionalStatement: false
# SpacesInContainerLiterals: true
# SpacesInCStyleCastParentheses: false
# SpacesInParentheses: false
# SpacesInSquareBrackets: false
# SpaceBeforeSquareBrackets: false
# Standard: Latest
# StatementMacros:
# - Q_UNUSED
# - QT_REQUIRE_VERSION
# TabWidth: 4
# UseCRLF: false
UseTab: AlignWithSpaces
# ...

7 changes: 6 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Install Windows libs
shell: cmd
run: |
curl -LJO https://github.com/q4a/rrr3d/releases/download/1.3.1-dev2/extern.7z
curl -LJO https://github.com/q4a/rrr3d/releases/download/1.3.1-dev3/extern.7z
7z x extern.7z
dir
- uses: ilammy/msvc-dev-cmd@v1
Expand All @@ -30,3 +30,8 @@ jobs:
useVcpkgToolchainFile: false
buildDirectory: '${{ github.workspace }}/build'
configurationRegexFilter: '${{ matrix.configuration }}'
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: rrr3d.${{ matrix.configuration }}
path: bin
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@ project(rrr3d VERSION ${RRR3D_VERSION} LANGUAGES CXX)

include(${PROJECT_SOURCE_DIR}/cmake/utils.cmake)

set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_SOURCE_DIR}/bin")

add_subdirectory(src)
1 change: 1 addition & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ if (MSVC)
endif()

add_subdirectory(LexStd)
add_subdirectory(MathLib)
add_subdirectory(NetLib)
add_subdirectory(Rock3dEngine)
add_subdirectory(Rock3dGame)
Expand Down
2 changes: 0 additions & 2 deletions src/LexStd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ add_definitions(-DNOMINMAX) # Use std::max()/std::min()

list(APPEND PROJECT_DIRS
"header"
"header/d3d"
"source"
)
add_dir("${PROJECT_DIRS}" "${PROJECT_NAME}")
Expand All @@ -18,7 +17,6 @@ add_library(${PROJECT_NAME} STATIC
target_include_directories(${PROJECT_NAME} PRIVATE
header
${CMAKE_SOURCE_DIR}/extern/tinyxml/include
${CMAKE_SOURCE_DIR}/extern/directx/include
)

target_link_libraries(${PROJECT_NAME})
80 changes: 0 additions & 80 deletions src/LexStd/header/EulerAngles.h

This file was deleted.

16 changes: 8 additions & 8 deletions src/LexStd/header/lslAutoRef.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,22 +38,22 @@ class BaseAutoRef
for (_RefList::iterator iter = _nextRefList.begin(); iter != _nextRefList.end(); ++iter)
{
(*iter)->_prevRef = 0;
if (_prevRef)
if (_prevRef)
{
(*iter)->_prevRef = _prevRef;
(*iter)->_prevRef = _prevRef;
}
else if (iter != _nextRefList.begin())
else if (iter != _nextRefList.begin())
{
(*iter)->_prevRef = *_nextRefList.begin();
}

if ((*iter)->_prevRef)
if ((*iter)->_prevRef)
(*iter)->_prevRef->_nextRefList.push_back(*iter);
}
_nextRefList.clear();

if (_prevRef)
_prevRef->_nextRefList.remove(this);
_prevRef->_nextRefList.remove(this);
}

return false;
Expand All @@ -66,7 +66,7 @@ template<class _Ref> class AutoRef: public BaseAutoRef
{
template<class _Ref> friend class AutoRef;
private:
typedef AutoRef<_Ref> _MyClass;
typedef AutoRef<_Ref> _MyClass;
typedef BaseAutoRef _MyBase;
typedef std::list<_MyClass*> _RefList;
private:
Expand All @@ -83,7 +83,7 @@ template<class _Ref> class AutoRef: public BaseAutoRef
void FreeRef()
{
bool isFree = _MyBase::FreeRef(_owner);

//�������� �� ��������������� �������� ������
LSL_ASSERT(!(isFree && _ref && _ref->GetRefCnt() > 1));

Expand Down Expand Up @@ -187,7 +187,7 @@ template<class _Ref> class AutoRef: public BaseAutoRef
bool operator!=(const _Ref* value) const
{
return _ref != value;
}
}
};

}
Expand Down
Loading