From 4f7b8393ec8a3abd59649c2ba669e951fb61f3d2 Mon Sep 17 00:00:00 2001 From: EllipticEllipsis <73679967+EllipticEllipsis@users.noreply.github.com> Date: Wed, 20 Oct 2021 22:55:55 +0100 Subject: Plug some large leaks, deprecate `Segment="128"` (#204) * Fix freeing an uninitialised camData * exporter leaks * vtx leak fix * Fix ZSkeleton OOB reading * Improve segment assignment checking and add a default Also prevents non-segmented files not being freed * Plug leak in MakeDlist * More segment improvements: deprecate 128 * add externalfile to extraction reference * whoops * format * Document new Segment behaviour * Use deprecation ifdef Co-authored-by: angie --- docs/zapd_extraction_xml_reference.md | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/zapd_extraction_xml_reference.md b/docs/zapd_extraction_xml_reference.md index 818d9f1..06b95bb 100644 --- a/docs/zapd_extraction_xml_reference.md +++ b/docs/zapd_extraction_xml_reference.md @@ -98,7 +98,7 @@ This table summarizes if the asset will be marked `static` (✅) or not (❌) - `Name`: Required. The name of the file in `baserom/` which will be extracted. - `OutName`: Optional. The output name of the generated C source file. Defaults to the value passed to `Name`. - - `Segment`: Required. This is the segment number of the current file. Expects a decimal number, usually 6 if it is an object, or 128 for overlays (It's kinda a whacky hack to get around of the `0x80` addresses). + - `Segment`: Optional. This is the segment number of the current file. Expects a decimal number between 0 and 15 inclusive, usually 6 if it is an object. If not specified, the file will use VRAM instead of segmented addresses. - `BaseAddress`: Optional. RAM address of the file. Expects a hex number (with `0x` prefix). Default value: `0`. - `RangeStart`: Optional. File offset where the extraction will begin. Hex. Default value: `0x000000000`. - `RangeEnd`: Optional. File offset where the extraction will end. Hex. Default value: `0xFFFFFFFF`. @@ -106,6 +106,27 @@ This table summarizes if the asset will be marked `static` (✅) or not (❌) ------------------------- +### ExternalFile + +Allows ZAPD to map segmented addresses to variables declared in other files by using its XML. + +It is useful for objects that use variables from `gameplay_keep`, `gameplay_dangeon_keep`, `gameplay_field_keep`, etc. + +This tag can be used in the global `config.xml` file. + +- Example of this tag: + +```xml + +``` + +- Attributes: + + - `XmlPath`: Required. The path of the XML, relative to the value set by `ExternalXMLFolder` in the configuration file. + - `OutPath`: Required. The path were the header for the corresponding external file is. It is used to `#include` it in the generated `.c` file. + +------------------------- + ### Texture Textures are extracted as `.png` files. -- cgit v1.2.3