Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ZAPD silently allows Blob without Offset #171

Closed
Dragorn421 opened this issue Aug 26, 2021 · 5 comments
Closed

ZAPD silently allows Blob without Offset #171

Dragorn421 opened this issue Aug 26, 2021 · 5 comments

Comments

@Dragorn421
Copy link
Contributor

This may also be true for other things than Blob, didn't test it

https://github.com/zeldaret/oot/blob/master/assets/xml/objects/gameplay_field_keep.xml#L58
<Blob Name="gFieldUnaccounted_00CB30" Size="0x800"/>

I would expect this to fail on extraction, or at least warn about it (missing Offset attribute), but ZAPD says nothing.

The Name does end up being used (changing it also changes the extracted .c), so ZAPD must be doing some nice magic to still find the right offset for the data.

Good job ZAPD but I guess this could be messed up by moving nodes around in the xml?
I tried moving the Blob without Offset up in the file and then it got silently ignored

@AngheloAlf
Copy link
Contributor

This has been a "feature" since day one (or at least since I joined). I'm not a huge fan tho

@Dragorn421
Copy link
Contributor Author

So what offset does it default to? This behavior may make sense if the xml was meant to have the data in the same order as the file, but that's not the case in many xmls.

@AngheloAlf
Copy link
Contributor

It gets the offset of the last element plus its size.
In your example, it takes the offset of the dlist gFieldDL_00CA70 (0xCA70) and then it adds the size of that dlist (0xC0).

@Dragorn421
Copy link
Contributor Author

the last element as in,
the element which has the greatest offset yet,
or the last-read element

@AngheloAlf
Copy link
Contributor

The last element read. The one just behind it.

Dragorn421 added a commit to Dragorn421/Z64Utils that referenced this issue Aug 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants