Skip to content

Commit

Permalink
update from dtk-template - clangd :) (#66)
Browse files Browse the repository at this point in the history
* update from dtk-template and start work towards using clangd

* include <a> -> "a"

* Update build.yml

* remove/add non-trivial class in union warning
  • Loading branch information
elijah-thomas774 authored Oct 16, 2024
1 parent 4543ec1 commit 26af4db
Show file tree
Hide file tree
Showing 2,230 changed files with 18,299 additions and 8,171 deletions.
1 change: 1 addition & 0 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ InsertBraces: True
KeepEmptyLinesAtTheStartOfBlocks: False
MaxEmptyLinesToKeep: 1
Language: Cpp
Standard: C++03
PointerAlignment: Right
SortIncludes: CaseSensitive
SpaceAfterCStyleCast: False
Expand Down
4 changes: 4 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[flake8]
# E203: whitespace before ':'
# E501: line too long
extend-ignore = E203,E501
9 changes: 7 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,22 @@ on:

jobs:
build:
# This is a *private* build container.
# See docs/github_actions.md for more information.
container: ghcr.io/zeldaret/ss-build:main

runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# Add game versions here
version: [SOUE01]

steps:
# Checkout the repository (shallow clone)
# Checkout the repository
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive

# Set Git config
Expand All @@ -40,10 +42,13 @@ jobs:
# Upload progress if we're on the main branch
- name: Upload progress
# If you're using a different branch, change this to match
if: github.ref == 'refs/heads/main'
continue-on-error: true
env:
# Replace with your project slug
PROGRESS_SLUG: ss
# Set the API key in your repository secrets
PROGRESS_API_KEY: ${{ secrets.PROGRESS_API_KEY }}
run: |
python tools/upload_progress.py -b https://progress.decomp.club/ \
Expand Down
39 changes: 26 additions & 13 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,22 +1,35 @@
# IDE folders
.idea/
.vs/

# Caches
__pycache__
.vscode/c_cpp_properties.json
.mypy_cache
.cache/

# game files
# Original files
orig/*/*
!orig/SOUE01/README.md
!orig/*/.gitkeep
*.dol
*.rel
*.elf
*.o
*.map
*.MAP

# ninja stuff
build
# Build files
build/
.ninja_*
build.ninja
.ninja_deps
.ninja_log

# tools
tools/dtk
tools/mwcc_compiler/*
!tools/mwcc_compiler/.gitkeep
/tools/objdiff.exe
# decompctx output
ctx.*
*.ctx

# Generated configs
objdiff.json
ctx.c
compile_commands.json

# Miscellaneous
/*.txt
*.exe
12 changes: 12 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"recommendations": [
"llvm-vs-code-extensions.vscode-clangd",
"ms-python.black-formatter",
"ms-python.flake8",
],
"unwantedRecommendations": [
"ms-vscode.cmake-tools",
"ms-vscode.cpptools-extension-pack",
"ms-vscode.cpptools",
]
}
28 changes: 8 additions & 20 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"[c]": {
"files.encoding": "utf8",
"editor.defaultFormatter": "xaver.clang-format"
"editor.defaultFormatter": "llvm-vs-code-extensions.vscode-clangd"
},
"[cpp]": {
"files.encoding": "utf8",
Expand All @@ -10,26 +10,14 @@
// "[python]": {
// "editor.defaultFormatter": "ms-python.black-formatter"
// },
// "editor.tabSize": 2,
"files.autoSave": "onFocusChange",
"files.insertFinalNewline": true,
"files.trimFinalNewlines": true,
"search.useIgnoreFiles": false,
"search.exclude": {
"build/*/config.json": true,
"build/**/*.MAP": true,
"build.ninja": true,
".ninja_*": true,
"objdiff.json": true
},
"files.associations": {
"*.inc": "cpp",
"xutility": "cpp",
"type_traits": "cpp",
"xtr1common": "cpp",
"limits": "cpp",
"utility": "cpp",
"initializer_list": "cpp",
"new": "cpp",
"cstdlib": "cpp",
"xmemory": "cpp"
}
"*.inc": "c",
".clangd": "yaml"
},
// Disable C/C++ IntelliSense, use clangd instead
"C_Cpp.intelliSenseEngine": "disabled",
}
16 changes: 16 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
// Use Ctrl+Shift+B to run build tasks.
// Or "Run Build Task" in the Command Palette.
"version": "2.0.0",
"tasks": [
{
"label": "ninja",
"type": "shell",
"command": "ninja",
"group": {
"kind": "build",
"isDefault": true
}
},
]
}
4 changes: 2 additions & 2 deletions config/SOUE01/splits.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1947,11 +1947,11 @@ egg/util/eggException.cpp:
.data start:0x8056F420 end:0x8056F438
.sbss start:0x80576900 end:0x80576920

Runtime.PPCEABI.H/global_destructor_chain.c:
PowerPC_EABI_Support/Runtime/Src/global_destructor_chain.c:
.text start:0x804C65C0 end:0x804C6620
.sbss start:0x80576930 end:0x80576938

Runtime.PPCEABI.H/__init_cpp_exceptions.cpp:
PowerPC_EABI_Support/Runtime/Src/__init_cpp_exceptions.cpp:
.text start:0x804C71A8 end:0x804C7218
.ctors start:0x804DB640 end:0x804DB644 rename:.ctors$10
.dtors start:0x804DB9E0 end:0x804DB9E4 rename:.dtors$10
Expand Down
Loading

0 comments on commit 26af4db

Please sign in to comment.