Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 2 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
27d409a89cb1607321404e0ebfe8bc0a63c337a3
c80a961e5f0239a38b788ce86853bb79ed4e8651
3 changes: 3 additions & 0 deletions .github/scripts/add-eol.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

sed -e '$a\' "$@"
34 changes: 33 additions & 1 deletion .github/workflows/clang-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,42 @@ jobs:

- name: Run clang-format
run: |
.github/scripts/run-clang-format.py -r Source Data/Base.rte/Shaders \
.github/scripts/run-clang-format.py \
-i \
-r Source Data/Base.rte/Shaders \
--exclude Source/System/Base64 \
--exclude Source/System/BitMask \
--exclude Source/System/glad \
--exclude Source/System/MicroPather \
--exclude Source/System/Semver200 \
--exclude Source/System/StackWalker
- name: Add missing newlines
run: |
.github/scripts/run-clang-format.py \
-i --clang-format-executable .github/scripts/add-eol.sh \
-r Source Data/Base.rte/Shaders \
--exclude Source/System/Base64 \
--exclude Source/System/BitMask \
--exclude Source/System/glad \
--exclude Source/System/MicroPather \
--exclude Source/System/Semver200 \
--exclude Source/System/StackWalker
- name: Report changes
run: |
# Store the changes in a patch file first
git diff > clang-format-changes.patch
# if any changes were made, fail the build
if ! git diff --quiet ; then
echo "::error::Code misformatted. Run clang-format or apply the patch (printed below and attached to job summary) to fix."
# Print the changes to the console
cat clang-format-changes.patch
exit 1
fi
- name: Upload artifacts
uses: actions/upload-artifact@v4
# Only upload the patch file if the build failed, meaning that the code was not properly formatted
if: failure()
with:
name: clang-format-changes.patch
path: |
clang-format-changes.patch
2 changes: 1 addition & 1 deletion Source/Managers/NetworkClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -842,7 +842,7 @@ namespace RTE {
set_clip_rect(targetBitmap, targetBox.GetCorner().m_X, targetBox.GetCorner().m_Y, targetBox.GetCorner().m_X + targetBox.GetWidth() - 1, targetBox.GetCorner().m_Y + targetBox.GetHeight() - 1);

// Choose the correct blitting function based on transparency setting
void (*pfBlit)(BITMAP* source, BITMAP* dest, int source_x, int source_y, int dest_x, int dest_y, int width, int height) = m_BackgroundLayers[frame][i].DrawTrans ? &masked_blit : &blit;
void (*pfBlit)(BITMAP * source, BITMAP * dest, int source_x, int source_y, int dest_x, int dest_y, int width, int height) = m_BackgroundLayers[frame][i].DrawTrans ? &masked_blit : &blit;

// See if this SceneLayer is wider AND higher than the target bitmap; then use simple wrapping logic - otherwise need to tile
if (m_BackgroundBitmaps[i]->w >= targetBitmap->w && m_BackgroundBitmaps[i]->h >= targetBitmap->h) {
Expand Down