Documentation tags - YAL-GameMaker-Tools/GmlCppExtFuncs GitHub Wiki
These are written in C++ code as
// @dllg:param args
If you have specified a custom --function-tag, you should use it instead of dllg
.
Syntax
// @dllg:docName <type name> <documentation name>
Description
Changes how a type will be labeled in the documentation comments.
For example, by default the tool will use the source type for typedefs, but you may want to add a custom label if the data type represents a specific ID.
Currently this is only handy for GMEdit since the default IDE doesn't do this kind of type checking yet.
Example
// @dllg:docName SteamInventoryResult_t steam_inventory_result
Syntax
// @dllg:cond
// @dllg:cond <condition>
Description
Changes the preprocessor condition for subsequent generated functions. Condition can be empty to reset condition.
Handy if your project has multiple configurations and not all of them need every tagged function exported.
Example
// @dllg:cond STEAMWORKS>135
dllg int64_t steam_inventory_get_item_price(int def) {
...
}
// @dllg:cond
Syntax
// @dllg:defValue <snippet>
Description
Changes the default return value (read: if the native extension failed to load or the function is otherwise missing) for the next tagged function.
GameMaker has this thing where functions from native extensions that failed to load will return 0 or "" respectively.
If this seems like an inconvenience (e.g. you are returning a 0-based ID), you can opt out and return what you'd like - this will be accomplished by splitting the function into two - first doing the actual call and returning the number of bytes (so that if it's 0, the default value is returned) and then getting the actual value.
The snippet will be inserted as-is into generated GML code.
Example
// @dllg:defValue -1
dllg int get_status_code() { ... }