summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorAnghelo Carvajal <angheloalf95@gmail.com>2021-10-01 22:19:47 -0300
committerGitHub <noreply@github.com>2021-10-01 21:19:47 -0400
commit6b06266eb8d35a7865aa1f942ecbe393e7cde740 (patch)
tree6b23ec1617f1ae76f49079ccc9c93c7f4d06eff3 /docs
parent26b00a2431a70ff190a2b22ee1faf77afa75a034 (diff)
Add `--static` flag (#193)
* remove static from every extracted asset * fix makefile * Move a bunch of code to Declaration * make static enablalble * fix texture static * clean up * minor fixes * Format * add small docs * fix * add table * add note in the readme * typo * maybe_unused * Add warning to ZSymbol * format * fix
Diffstat (limited to 'docs')
-rw-r--r--docs/zapd_extraction_xml_reference.md17
1 files changed, 15 insertions, 2 deletions
diff --git a/docs/zapd_extraction_xml_reference.md b/docs/zapd_extraction_xml_reference.md
index d07ef98..03fb4f1 100644
--- a/docs/zapd_extraction_xml_reference.md
+++ b/docs/zapd_extraction_xml_reference.md
@@ -69,6 +69,20 @@ For most resources inside a `<File>` tag **you should also set an `Offset` attri
It's worth noting that every tag expects a `Name="gNameOfTheAsset"`. This is will be the name of the extracted variable in the output C code. Every asset must be prefixed with `g` and the suffix should represent the type of the variable.
+Every tag can accept a `Static` attribute to specify if the asset should be marked as `static` or not.
+There are 3 valid values (defaults to `Global`):
+
+- `Global`: Mark static if the flag `--static` was used.
+- `On`: Override the global config and **always mark** as `static`.
+- `Off`: Override the global config and **don't mark** as `static`.
+
+This table summarizes if the asset will be marked `static` (✅) or not (❌)
+| `Static=""` attribute in XML | Without `--static` flag | With `--static` flag |
+| ---------------------------- | ----------------------- | -------------------- |
+| `On` | ✅ | ✅ |
+| `Global` (default) | ❌ | ✅ |
+| `Off` | ❌ | ❌ |
+
-------------------------
### File
@@ -402,6 +416,7 @@ extern u8 gJsjutanShadowTex[2048];
- `Type`: The type of the declared variable. If missing, it will default to `void*`.
- `TypeSize`: The size in bytes of the type. If missing, it will default to `4` (the size of a word and a pointer). Integer or hex value.
- `Count`: Optional. If it is present, the variable will be declared as an array instead of a plain variable. The value of this attribute specifies the length of the array. If `Count` is present but it has no value (`Count=""`), then the length of the array will not be specified either in the declared variable. Integer or hex value.
+ - `Static`: This attribute can't be enabled on a Symbol node. A warning will be showed in this case.
-------------------------
@@ -570,8 +585,6 @@ Currently, only [`Scalar`](#scalar), [`Vector`](#vector) and [`Vtx`](#vtx) suppo
-------------------------
--------------------------
-
### Path
- Example: