Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge dev branch #1271

Merged
merged 23 commits into from
Aug 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
ffea0a7
Started rework of timed object ticking system (trying to change the d…
cbnolok Jun 14, 2024
d98a2d2
Merge branch 'dev' of https://github.com/cbnolok/Source-X into HEAD
cbnolok Jun 17, 2024
eeb2f27
Commented out debug code for new CWorldTicker containers management.
cbnolok Jun 18, 2024
f0eb033
Moved CWorldSearch class into its own cpp/h files.
cbnolok Jun 18, 2024
14258cf
Optimized CWorldSearch. Since it's used very, very often, instead of …
cbnolok Jun 20, 2024
32c2e03
More speed optimizations.
cbnolok Jun 20, 2024
b9dcbb3
Improved how triggers are interrogated, reducing CPU load.
cbnolok Jun 20, 2024
f707127
- Improvement: optimized various C++ core subsystems, resulting in a …
cbnolok Jun 21, 2024
c414145
Fixed: LASTUSED, LASTDISCONNECTED, TIMESTAMP being interpreted as a n…
cbnolok Jun 25, 2024
6e7ea8f
Updated gh workflow names and badges in README.
Jun 25, 2024
147dda9
Updated README.md
Jun 26, 2024
b55c3d9
Fix CMakeDetectArch for x86
Jun 26, 2024
32c3a0e
Add reference on @NpcRestock (#1254)
Jhobean Jun 26, 2024
c9665c2
Blocked spelleffect on ridden chars if the spell has field or area fl…
DavideRei Jul 20, 2024
cdbff70
Add .clang.format, update .editorconfig and .gitattributes
Jul 2, 2024
5844627
Update .gitignore
Jul 20, 2024
e550fe5
Added error message when trying to set a stat to an invalid value.
Jul 20, 2024
c1f8e44
Several stability fixes
Jul 29, 2024
1b9e7cd
Renamed ADDTOCALLSTACK_INTENSIVE to ADDTOCALLSTACK_DEBUG
Jul 30, 2024
7c815bf
Made debugger utility functions available also in non-debug builds
Jul 30, 2024
1defff8
Fixed RemoveFromView and moongate teleport regressions.
cbnolok Aug 2, 2024
35dafdb
Fixed script parsing regression with empty strings, fixed undefined b…
Aug 4, 2024
4edddf1
Merge branch 'master' into dev
cbnolok Aug 6, 2024
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
122 changes: 122 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
BasedOnStyle: LLVM
Language: Cpp
Standard: c++20
TabWidth: 4
IndentWidth: 4
UseTab: Never
ColumnLimit: 160

#LineEndingStyle: LF
#MaxEmptyLinesToKeep: 3

##-- Alignment
AlignAfterOpenBracket: AlwaysBreak
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
#AlignEscapedNewlinesLeft: false
AlignTrailingComments: true

DerivePointerAlignment: false
PointerAlignment: Right

##-- Single line statements
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: None
AllowShortIfStatementsOnASingleLine: Never
AllowShortLambdasOnASingleLine: Inline
AllowShortLoopsOnASingleLine: false

##-- Braces
BreakBeforeBraces: Custom #Allman
BraceWrapping:
AfterCaseLabel: true
AfterClass: false
AfterControlStatement: Always
AfterEnum: true
AfterFunction: true
AfterNamespace: true
AfterStruct: true
AfterUnion: true
BeforeCatch: true
BeforeElse: true
BeforeLambdaBody: true
IndentBraces: false
SplitEmptyFunction: false
SplitEmptyRecord: false
SplitEmptyNamespace: false
Cpp11BracedListStyle: false

##-- Line breaks
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: true
AlwaysBreakTemplateDeclarations: true
BreakAfterJavaFieldAnnotations: false
BreakBeforeBinaryOperators: None
BreakConstructorInitializers: AfterColon
#BreakInheritanceList: AfterColon
BreakBeforeTernaryOperators: false
BreakConstructorInitializersBeforeComma: true
BreakStringLiterals: false

##-- Indentation
IndentCaseBlocks: false
IndentCaseLabels: true
IndentGotoLabels: true
IndentPPDirectives: AfterHash
LambdaBodyIndentation: Signature
NamespaceIndentation: Inner

##-- Spaces in/between statements/etc
SpaceAfterCStyleCast: false
SpaceAfterTemplateKeyword: false
#SpaceAroundPointerQualifiers: Left
SpaceBeforeAssignmentOperators: true
SpaceBeforeCpp11BracedList: true
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
SpaceInEmptyParentheses: false
SpacesInAngles: false
SpacesInCStyleCastParentheses: false
SpacesInContainerLiterals: false
SpacesInParentheses: false
SpacesInSquareBrackets: false

##-- Misc
AllowAllParametersOfDeclarationOnNextLine: true
AccessModifierOffset: -4
BinPackArguments: false
BinPackParameters: false
BreakAfterAttributes: Always
ExperimentalAutoDetectBinPacking: false
ConstructorInitializerAllOnOneLineOrOnePerLine: false
DisableFormat: false
InsertNewlineAtEOF: true
KeepEmptyLinesAtTheStartOfBlocks: false
ReflowComments: false
SeparateDefinitionBlocks: Always

#-- Include order
#IncludeIsMainRegex: '$?'
#IncludeBlocks: Regroup
IncludeCategories:
#TODO: main include!
# Headers in "" with .h extension.
- Regex: '"([A-Za-z0-9\/-_])+\.h"'
Priority: 1
# Headers in "" with .hpp extension.
- Regex: '"([A-Za-z0-9\/-_])+\.hpp"'
Priority: 2

# Headers in <> with .h extension.
- Regex: '<([A-Za-z0-9\/-_])+\.h>'
Priority: 10
# Headers in <> with .hpp extension.
- Regex: '<([A-Za-z0-9\/-_])+\.hpp>'
Priority: 20
# Headers in <> without extension.
- Regex: '<([A-Za-z0-9\/-_])+>'
Priority: 30
SortIncludes: false #CaseSensitive
16 changes: 16 additions & 0 deletions .cmake-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# https://cmake-format.readthedocs.io/en/latest/
#https://github.com/bouncmpe/cpp-project-template/blob/main/.cmake-format
format:
line_width: 80
tab_size: 2
max_subgroups_hwrap: 2
max_pargs_hwrap: 6
max_rows_cmdline: 2
dangle_parens: true
dangle_align: 'prefix'
min_prefix_chars: 8
max_prefix_chars: 8
max_lines_hwrap: 2
command_case: 'lower'
markup:
enable_markup: false
99 changes: 59 additions & 40 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,56 +4,75 @@ root = true
# Unix-style newlines with a newline ending every file
[*]
charset = utf-8
end_of_line = lf
trim_trailing_whitespace = true
insert_final_newline = true

# Tab indentation (no size specified)
# Optional: git will commit as lf, this will only affect local files
end_of_line = lf

[*.md]
trim_trailing_whitespace = false

[Makefile]
indent_style = tab

[*.{py,yml,sh,cmake}]
indent_style = space
indent_size = 2

[*.{py,yml,sh,cmake}.in]
indent_style = space
indent_size = 2

[CMakeLists.txt]
indent_style = space
indent_size = 2

[*.{c,h,cpp,cxx,hpp}]
charset = utf-8
indent_size = 4
indent_style = space
trim_trailing_whitespace = true
insert_final_newline = true
end_of_line = lf
cpp_new_line_before_open_brace_namespace = new_line
cpp_indent_preserve_comments = true
cpp_indent_namespace_contents = false
cpp_indent_case_labels = true
cpp_indent_case_contents = false
cpp_indent_case_contents_when_block = false
cpp_allow_comment_after_lbrace = true
cpp_simple_block_style = do_not_change
cpp_space_before_function_open_parenthesis = remove
cpp_space_within_parameter_list_parentheses = false
cpp_space_between_empty_parameter_list_parentheses = false
cpp_space_after_keywords_in_control_flow_statements = true
cpp_space_within_control_flow_statement_parentheses = false
cpp_space_before_lambda_open_parenthesis = false
cpp_space_within_cast_parentheses = false
cpp_space_after_cast_close_parenthesis = false
cpp_space_within_expression_parentheses = false
cpp_space_before_initializer_list_open_brace = false
cpp_space_within_initializer_list_braces = true
cpp_space_before_open_square_bracket = false
cpp_space_within_square_brackets = false
cpp_space_before_empty_square_brackets = false
cpp_space_between_empty_square_brackets = false
cpp_space_group_square_brackets = true
cpp_space_within_lambda_brackets = false
cpp_space_between_empty_lambda_brackets = false
cpp_space_before_comma = false
cpp_space_after_comma = true
cpp_space_remove_around_member_operators = false
cpp_space_before_inheritance_colon = true
cpp_space_before_constructor_colon = true
cpp_space_remove_before_semicolon = true
cpp_space_after_semicolon = false
cpp_space_remove_around_unary_operator = false
cpp_space_around_binary_operator = ignore
cpp_space_around_assignment_operator = insert
cpp_space_pointer_reference_alignment = ignore
cpp_space_around_ternary_operator = insert

# Already handled by .cmake-format
#cpp_new_line_before_open_brace_namespace = new_line
#cpp_indent_preserve_comments = true
#cpp_indent_namespace_contents = false
#cpp_indent_case_labels = true
#cpp_indent_case_contents = false
#cpp_indent_case_contents_when_block = false
#cpp_allow_comment_after_lbrace = true
#cpp_simple_block_style = do_not_change
#cpp_space_before_function_open_parenthesis = remove
#cpp_space_within_parameter_list_parentheses = false
#cpp_space_between_empty_parameter_list_parentheses = false
#cpp_space_after_keywords_in_control_flow_statements = true
#cpp_space_within_control_flow_statement_parentheses = false
#cpp_space_before_lambda_open_parenthesis = false
#cpp_space_within_cast_parentheses = false
#cpp_space_after_cast_close_parenthesis = false
#cpp_space_within_expression_parentheses = false
#cpp_space_before_initializer_list_open_brace = false
#cpp_space_within_initializer_list_braces = true
#cpp_space_before_open_square_bracket = false
#cpp_space_within_square_brackets = false
#cpp_space_before_empty_square_brackets = false
#cpp_space_between_empty_square_brackets = false
#cpp_space_group_square_brackets = true
#cpp_space_within_lambda_brackets = false
#cpp_space_between_empty_lambda_brackets = false
#cpp_space_before_comma = false
#cpp_space_after_comma = true
#cpp_space_remove_around_member_operators = false
#cpp_space_before_inheritance_colon = true
#cpp_space_before_constructor_colon = true
#cpp_space_remove_before_semicolon = true
#cpp_space_after_semicolon = false
#cpp_space_remove_around_unary_operator = false
#cpp_space_around_binary_operator = ignore
#cpp_space_around_assignment_operator = insert
#cpp_space_pointer_reference_alignment = ignore
#cpp_space_around_ternary_operator = insert

18 changes: 11 additions & 7 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,20 @@

# Set the default behavior for all files.
* text=auto

# Normalize and convert to native line endings on checkout.
*.c text
*.cpp text
*.h text
*.hpp text

# Ignore all differences in line endings.
* -crlf

# Normalize and convert to native line endings on checkout.
*.c text eol=lf
*.cpp text eol=lf
*.h text eol=lf
*.hpp text eol=lf
*.txt text eol=lf

# Convert to LF line endings on checkout.
#* text eol=lf

# CMake template files
*.h.in linguist-language=C++
#*.cpp.in linguist-language=C++
#*.c.in linguist-language=C
Loading