We will be glad to answer any questions
for people who wish to contribute.
All pull requests and issues are welcome.
Be sure that all of your submitted code
follows the guidelines that are listed below.
When running build.py
, it is REQUIRED that the output is 1:1
.
After the code matches, be sure to run scripts/check.py
to check the function that you want to mark.
If it matches, it will automatically be marked as decompiled.
If you have any questions or concerns,
please join our Discord server.
-
A Disassembler / IDA Pro / Ghidra
You can also use a decompiler, it can make some things easier
-
CodeWarrior
We specifically use version
3.0a3
-
Python
Version
3.7+
-
C / C++
However C++ is recommended
-
PowerPC Assembly
-
PowerPC ➝ C / C++ reverse engineering instructions
Decompilers such as Hex-Rays (included in IDA Pro) are
useful as they can make the decompilation easier to write.
-
Lines should not exceed
100
characters,
these can be split into multiple lines. -
Use
NULL
instead of0
when assigning / comparing a pointer.Only use
0
when assigning or comparing a value.
-
Use
forward-declared
types when possible -
At the top of every header place:
#pragma once
-
For system library includes use:
#include <...>
-
For game header includes use:
#include "..."
These includes must be relative to the
include
folder.
-
Names for known symbols should match exactly,
even including typos in the symbol. -
Member variables must be prefixed with
m
. -
Arguments for functions must be prefixed with:
-
p
for pointers -
r
for passed-by-reference
-
-
Static variables with:
-
No known symbol must be prefixed with
s
-
Global scope must be prefixed with
g
-
-
Functions with no symbols must use camelCase.
Such as inlined functions.
-
When referencing a class member, do not use
this ->
, unless it is required for compilation. -
Functions for classes must be put in the following order:
-
Constructor
-
Destructor
-
Operators
-
Virtual Functions
-
Member Functions
If the virtual functions are not in the order that
they are in the vtable, then the rule above can be
ignored as these functions must be placed in order. -
If your code does NOT match, use the
NONMATCHING
macro, and explain in a
comment why it does not match.
If the function arguments in the symbol use int
,
do NOT use s32
, you have to use int
, as they
do not mangle to the same symbol.