# Source structure

Since many source files are automatically generated from ghidra, the file names correspond to the function names inside ghidra, one source file per function.
For each required function in the program the file will be either in gh_auto or gh_fix

## gh_auto

Contains the unchanged automatically decompiled ghidra source files.

## gh_fix

Contains decompiled source functions, manually fixed up. Move files here from gh_auto to prevent them from being overwritten.

## gh_stub

Contains the stubs for the functions that are not decompiled yet. Allows early testing of parts of the game code, as long as the stub functions are never called.

## gh_ref

Whenever a function is moved to gh_fix, it can still be decompiled, but instead of overwriting the file, the decompiled source is moved here for reference.
Files in this folder are not used for compilation.

## r3

This folder contains custom written sources that are mean to patch the game up, simplify some of the decompiled code or add new functionality.
