Showing 464 changed files with 67,086 additions and 122,412 deletions.
46 changes: 46 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Reference: https://clang.llvm.org/docs/ClangFormatStyleOptions.html
# /c/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/Llvm/bin
# https://clang-format-configurator.site/
# default values:
# https://github.com/llvm/llvm-project/blob/main/clang/lib/Format/Format.cpp
---
Language: Cpp
BasedOnStyle: Microsoft

# BreakBeforeBraces: Allman
BreakBeforeBraces: Custom
BraceWrapping:
AfterCaseLabel: true
AfterUnion: true
BeforeWhile: true
# BreakBeforeBinaryOperators: All

ColumnLimit: 130
PointerAlignment: Left
UseTab: Always
BreakConstructorInitializers: BeforeComma

InsertNewlineAtEOF: true
IncludeBlocks: Regroup

IncludeCategories:
- Regex: '^"(box2d\/)'
Priority: 2
- Regex: '^<.*'
Priority: 3
- Regex: '^".*'
Priority: 1

IndentExternBlock: NoIndent
IndentCaseLabels: true
#IndentPPDirectives: None
IndentAccessModifiers: false
AccessModifierOffset: -4

# AlignArrayOfStructures: Left
# AlignAfterOpenBracket: BlockIndent

SpacesInParens: Custom
SpacesInParensOptions:
Other: true

10 changes: 10 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
* text=auto

*.c text
*.cpp text
*.h text
*.md text
*.txt text
*.sh text eol=lf

*.ttf binary
6 changes: 2 additions & 4 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# These are supported funding model platforms

github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
github: [erincatto]
patreon: Box2D
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
Expand All @@ -10,5 +10,3 @@ liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']

github: [erincatto]
2 changes: 1 addition & 1 deletion .github/issue_template.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Make sure these boxes are checked before submitting your issue - thank you!

- [ ] Ask for help on [discord](https://discord.gg/NKYgCBP) and/or [reddit](https://www.reddit.com/r/box2d)
- [ ] Ask for help on [discord](https://discord.gg/NKYgCBP)
- [ ] Consider providing a dump file using b2World::Dump
1 change: 0 additions & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
Pull requests for core Box2D code are generally not accepted. Please consider filing an issue instead.

However, pull requests for build system improvements are often accepted.
117 changes: 117 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
name: CI Build

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

env:
BUILD_TYPE: Debug

jobs:
build-ubuntu-gcc:
name: ubuntu-gcc
runs-on: ubuntu-latest
timeout-minutes: 4
steps:
- uses: actions/checkout@v4

- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBOX2D_SAMPLES=OFF -DBUILD_SHARED_LIBS=OFF

- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}

- name: Test
working-directory: ${{github.workspace}}/build
run: ./bin/test

build-ubuntu-clang:
name: ubuntu-clang
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_CXX_COMPILER=clang++-14 -DCMAKE_C_COMPILER=clang -DBOX2D_SAMPLES=OFF -DBUILD_SHARED_LIBS=OFF

- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}

- name: Test
working-directory: ${{github.workspace}}/build
run: ./bin/test

build-macos:
name: macos
runs-on: macos-latest

steps:
- uses: actions/checkout@v4

- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBOX2D_SAMPLES=OFF -DBOX2D_SANITIZE=ON -DBUILD_SHARED_LIBS=OFF
# run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBOX2D_SAMPLES=OFF -DBUILD_SHARED_LIBS=OFF

- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}

- name: Test
working-directory: ${{github.workspace}}/build
run: ./bin/test

build-windows:
name: windows
runs-on: windows-latest
steps:

- uses: actions/checkout@v4

- name: Setup MSVC dev command prompt
uses: TheMrMilchmann/setup-msvc-dev@v3
with:
arch: x64

- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBOX2D_SAMPLES=OFF -DBOX2D_SANITIZE=ON -DBUILD_SHARED_LIBS=OFF
# run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBOX2D_SAMPLES=OFF -DBUILD_SHARED_LIBS=OFF

- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}

- name: Test
working-directory: ${{github.workspace}}/build
run: ./bin/${{env.BUILD_TYPE}}/test

samples-windows:
name: samples-windows
runs-on: windows-latest
steps:

- uses: actions/checkout@v4

- name: Setup MSVC dev command prompt
uses: TheMrMilchmann/setup-msvc-dev@v3
with:
arch: x64

- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=Release -DBOX2D_SAMPLES=ON -DBUILD_SHARED_LIBS=OFF -DBOX2D_UNIT_TESTS=OFF

- name: Build
run: cmake --build ${{github.workspace}}/build --config Release

samples-macos:
name: samples-macos
runs-on: macos-latest

steps:
- uses: actions/checkout@v4

- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=Release -DBOX2D_SAMPLES=ON -DBUILD_SHARED_LIBS=OFF -DBOX2D_UNIT_TESTS=OFF

- name: Build
run: cmake --build ${{github.workspace}}/build --config Release
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ build/
imgui.ini
settings.ini
.vscode/
CMakeSettings.json
out/
.vs/
.cap
.DS_Store
CMakeUserPresets.json
.cache/
32 changes: 0 additions & 32 deletions .travis.yml

This file was deleted.

60 changes: 0 additions & 60 deletions CHANGELOG.md

This file was deleted.

Loading