DVD file overlay support#216
Merged
Merged
Conversation
Fixes #163 Basically allows games to "overlay" a set of file paths over the DVD. These are provided as a flat list of absolute paths, and when an overlayed file is read, the game gets the ability to provide its own read/seek callbacks. The current implementation rebuilds the FST. This means EntryNums will not be consistent with the original disc, but it does avoid rewriting a significant chunk of the existing DVD code that relies on the FST.
Game now assigns entrynums for added files, and original disc entrynums are preserved.
Dusklight was using integer indexes for the userdata of overlay files. This meant file 0 was a null void*, and that meant the DVD code didn't treat it as an overlaid file. Add an extra bool to avoid getting confused like this.
Since I kinda would like to eventually allow mods to be loaded without game restart (where practical)
PJB3005
commented
May 30, 2026
| target_include_directories(aurora_dvd PUBLIC include) | ||
| target_link_libraries(aurora_dvd PUBLIC nod::nod ${AURORA_SDL3_TARGET}) | ||
| target_link_libraries(aurora_dvd PRIVATE fmt::fmt) | ||
| target_link_libraries(aurora_dvd PUBLIC nod::nod fmt::fmt ${AURORA_SDL3_TARGET}) |
Collaborator
Author
There was a problem hiding this comment.
Why make this dependency public?
Owner
There was a problem hiding this comment.
It fixes an import issue with system fmt headers
Comment on lines
+276
to
+280
| if (currentDir >= 0 && static_cast<size_t>(currentDir) < s_fstEntries.size() && s_fstEntries[currentDir].isDir) { | ||
| s_currentDir = currentDir; | ||
| s_currentPath = currentPath; | ||
| return true; | ||
| } |
Collaborator
Author
There was a problem hiding this comment.
I guess it's unlikely to be a big deal but maybe log a warning if this fails? As that would indicate that the cwd got "corrupted"
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Previous PR: #190
Fixes #163