Skip to content
Merged
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
33 changes: 33 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
It is strongly recommended to disclose your vendor and model (e.g. `GitHub Copilot on GPT 5.6 Sol`)
in your commit messages and PR description.

Please read @CONTRIBUTING.md in addition to the rules below.

# RE/Decompile Rules

- The contributions must be based on publicly available sources.

# Code Style Rules

- Do not include any assembly or disassembly as code or comment
- Do not use inline assembly for matching. Any PR with a substantial amount of
inline assembly will be automatically rejected. Even for a small amount, it is
preferred to keep the function as non-matching when it's trivially provable
that it is equivalent to the original (e.g. register renaming, reordering).
- The only exception is `asm("")` which can serve as a barrier for optimization.
- Do not use `goto` for matching unless it is **absolutely** necessary and plausible
that the original source code contained `goto`.

# PR Rules

- English only
- Do not publish a PR without human review. If the human doesn't know what
they are doing, do not create a PR.
- Do not commit one-off scripts.
- Do not include any assembly or disassembly as code, comment, commit message or PR description
- Make the PRs small and focused, which helps review:
- One thing per PR
- If the change spans across a lot of components, batch them into smaller PRs
- Squash your branch into one commit.
- Include an explanation or source for member names or why functions must exist,
if it isn't straightforward from the binary or their usages.
59 changes: 59 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Contribution Guidelines

## Development

To build and run checks, please install:
- [task](https://taskfile.dev) for running commands.
- CMake (check the version requirement in CMakeLists.txt) and Ninja.

Please run `task clone-deps configure` before running the other
commands.

Workflows:
- Run `task configure` to configure the CMake projects.
- Run `task build` to build and run tests.
- Run `task check` to check formatting and clang-tidy issues. `task fix` formats the files.
- Run `task pr` to run the same checks that the PR runs.
It's a good idea to always run this one before you open or update a PR.

If there are errors after merging upstream updates, run `task clean clone-deps`
to clean CMake cache and update your local dependencies. If the error
persists, please ask for help in Discord.

## Repo Structure

- `/lib/*`: One CMake subdirectory for each library target that gets statically linked into the game.
- `/test`: Test projects.

## Module Structure

Each SDK module is its own CMake subdirectory at `/lib/` and has its own `include` and `src`
directories. For example for the module `atk`:

```
lib/atk/
├── include/nn/
│ ├── atk/
│ └── atk.h
├── src/atk/
│ └── atk_Something.cpp
└── CMakeLists.txt
```

The public header structure in `lib/*/include/nn` should follow the [same rules as nnSdk headers](https://github.com/open-ead/nnsdk/blob/main/CONTRIBUTING.md).

If there needs to be a new module, you can copy one of the existing modules
and rename the CMake target in `lib/*/CMakeLists.txt`. Then, add the new module
in the following places:
- `/CMakeLists.txt`: Add a `add_subdirectory` near the end of the file.
- `/Taskfile.yml`: Add it to the `MODULES` list near the top of the file.
- `/test/header_check/CMakeLists.txt`: Add it to the `HEADER_CHECK_TARGETS` list.

## PR Rules

Please use English for PRs and squash your branch into one commit.
Keep PRs reasonably sized to get them reviewed faster. If there are multiple
things in the same PR, consider splitting them into multiple PRs.

If it isn't straightforward from the usage or binary why something must be added,
please include an explanation or source.
14 changes: 3 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,10 @@ This repository includes:
Do not ask for or PR any copyrighted material to this repo. You will be ignored.
Usage of the materials here outside of matching decompilation is not supported.

# Credits
## Credits
- [Shadow](https://github.com/shadowninja108/) - For [Skyline](https://github.com/shadowninja108/Skyline), which was the primary inspiration and use case for this repo.
- [Shibbo](https://github.com/shibbo) - For [OdysseyReversed](https://github.com/shibbo/OdysseyReversed/), which most of these headers came from.

# Development
For running commands please install [task](https://taskfile.dev), CMake, Ninja and Clang/LLVM.

The Clang/LLVM toolchain is only used for formatting and running `clang-tidy`.
The version should match the [image used in the PR](https://github.com/open-ead/containers/blob/main/ubuntu-builder/Dockerfile)

Before you begin, run `task clone-deps` to clone dependencies.

Run `task pr` to run the same checks that the PR runs. Run `task fix` to fix the clang-format issues.

## Development

Please see [CONTRIBUTING.md](./CONTRIBUTING.md)
Loading