- 
                Notifications
    
You must be signed in to change notification settings  - Fork 647
 
Assets system: reconcile xml versions using implicit and relative offsets #2614
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
base: main
Are you sure you want to change the base?
Assets system: reconcile xml versions using implicit and relative offsets #2614
Conversation
| 
           Working on this some more since it seems more popular than the other (Anghelo and cadmic seemed to prefer it)  | 
    
| 
           Im on board with this idea.  | 
    
| 
           I would much prefer keeping explicit offsets as much as possible since they're very useful for hacking the game (and there's no downside for decomp to do so), But that's just my opinion  | 
    
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
alright!
| 
           I pushed more xmls being reconciled Also added   | 
    
| <Version Pattern="ntsc-.*|gc-jp.*|gc-us.*|ique-cn"> | ||
| <Animation Name="gSheikPlayingHarpAnim" Offset="0xDB8"/> | ||
| <Animation Name="gSheikShowingTriforceOnHandAnim" Offset="0x1C58"/> | ||
| <Animation Name="gSheikShowingTriforceOnHandIdleAnim" Offset="0x1F64"/> | ||
| <Animation Name="gSheikPlayingHarp2Anim" Offset="0x2D38"/> | ||
| <Animation Name="gSheikPlayingHarp3Anim" Offset="0x3CE8"/> | ||
| <Animation Name="gSheikPlayingHarp4Anim" Offset="0x4F90"/> | ||
| </Version> | ||
| <Version Pattern="pal-.*|gc-eu.*"> | ||
| <Animation Name="gSheikPlayingHarpAnim" Offset="0xB6C"/> | ||
| <Animation Name="gSheikShowingTriforceOnHandAnim" Offset="0x1A08"/> | ||
| <Animation Name="gSheikShowingTriforceOnHandIdleAnim" Offset="0x1D14"/> | ||
| <Animation Name="gSheikPlayingHarp2Anim" Offset="0x289C"/> | ||
| <Animation Name="gSheikPlayingHarp3Anim" Offset="0x35C8"/> | ||
| <Animation Name="gSheikPlayingHarp4Anim" Offset="0x4570"/> | ||
| </Version> | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these animations are different sizes so they can't use relative offsets anyway, so they're duplicated here. #2613 could be used instead in this spot?
This is a suggestion allowing to merge assets xmls for different versions into one
With this,
<Version>nodes making them version-specificoffsets can be omitted: a resource will start where the previous one ends
offsets can be relative: for example
Offset=".+0x10"will make a resource start 0x10 bytes after the end of the previous oneThis is not incompatible with #2613 but I guess we'd want to do it one way or the other, not both?
Advantages:
Disadvantages:
need to specify all resources, and even padding, for things to line up. For example in gkeep we'd need to add resources for animations FrameData and JointIndicesno longer the case with relative offsets (Offset=".+0x10")