The project uses Doxygen to generate a browsable reference from comments in the source files. Writing clear Doxygen comments for matched functions and data structures makes the codebase easier to understand for everyone who comes after you. This page covers every comment style used in the project.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/pmret/papermario/llms.txt
Use this file to discover all available pages before exploring further.
Documenting functions
Place a/// description comment directly above the function declaration or definition. Use @param to document non-obvious parameters and @return for non-obvious return values. You don’t need to document things that are self-explanatory from the name alone.
- Any comments inside the function body should use the ordinary
//or/* */styles, not///. - List all
@paramentries before@return, in the same order the parameters appear in the function signature. - Do not add empty
@paramentries for parameters whose names are self-explanatory. - Only add
@returnwhen the return value isn’t obvious from the function name.
Documenting EVT API functions
Functions that are called from EVT scripts use the@evtapi tag instead of a plain description. Document their parameters as they are passed to EVT_CALL, and do not use @return.
include/script_api/common.h for real examples.
Documenting variables
Add a/// comment above a variable when its name doesn’t make its purpose completely clear, or when a set of #define values or an enum should be used with it.
@see (see below).
Documenting files
File-level documentation goes near the top of the file, below the#include directives. Use @file followed by the file name, then a brief description of what the file covers:
Documenting struct fields
Struct fields can be documented with a/// comment above the field, just like variables. If you prefer brevity, you can also use an end-of-line comment:
Documenting bugs
Document a known bug on the line directly above where the buggy behaviour begins:Linking related information
Use@see to link to related symbols — other functions, types, or variables that a reader should be aware of. In function comments, @see goes before the first @param:
Markdown and LaTeX support
Doxygen renders Markdown inside doc comments, so you can use bold, italics, lists, and code spans freely:\f$...\f$ for inline rendering and \f[...\f] for a centred block:
Generating docs locally
To build the Doxygen HTML manual, install Doxygen and run it from the repository root:docs/html/ directory. Open docs/html/index.html in a browser to browse the generated reference.
Doxygen must be installed separately. On Debian/Ubuntu:
sudo apt install doxygen. On macOS with Homebrew: brew install doxygen.