Rename new_type attribute and code improvements#73
Open
N4gtan wants to merge 33 commits intoLameguy64:masterfrom
Open
Rename new_type attribute and code improvements#73N4gtan wants to merge 33 commits intoLameguy64:masterfrom
new_type attribute and code improvements#73N4gtan wants to merge 33 commits intoLameguy64:masterfrom
Conversation
Files and subdirectories now automatically inherit the base path from their parent entry. This allows omitting the `source` attribute, as paths will be resolved relative to the current directory context.
Since IsoReader is utilized in practically all program functions, it made more sense to handle it globally rather than passing it as a parameter everywhere.
…ctions - Convert signatures to `void` to reflect "fire-and-forget" logic. - Remove defensive checks for `srcfiles` already validated by `Stat()` upstream.
The previous implementation added unnecessary complexity by handling relative offsets and multiple seek origins (SET/END/CUR) individually. Normalizing all seek requests to an absolute position reduces code duplication and eliminates fragile relative arithmetic.
The `new_type` attribute was vague. Research confirmed that some late PS1 games (~2003) were built using the Sony CD/DVD-ROM Generator engine logic. `cdvd_style` accurately describes this behavior.
Rewrite the DA file normalization loop to correctly identify and reuse existing tracks, preventing conflicts between `trackid` and `source` attributes.
Dropped support for prehistoric 32-bit compilers; they wouldn't even be capable of compiling C++20 in the first place.
Since the project is strictly C++, the C support was redundant and unused.
- Rename 'entry' and 'parent' to 'm_entry' and 'm_parent'. - Remove redundant 'name' member; use m_entry->id instead. - Move WriteDescriptor to be a member function of DirTreeClass. - Update WriteDirectoryRecords to rely on internal state. - Adjust main.cpp to match the updated class constructor and methods.
- Merge GenPathTableSub into GeneratePathTable. - Remove the unused recursive 'sub' pointer from PathEntryClass. - Move implementation next to GenTableData to improve code locality and debugging flow.
As discussed in Lameguy64#75, this warning just adds noise.
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.
This PR introduces several code improvements and a necessary terminology update:
Refactored Logic: Unified the sector reading logic in
ReadBytesand simplifiedvirtual_wav_seekto reduce complexity and code duplication. Also removed redundant validation checks and redundant return values in writer functions.Global IsoReader: Moved
IsoReaderto the global scope. Since this instance is utilized in practically every function of the program, making it global simplifies the code structure and will make implementing future changes much easier.Attribute Rename (
new_type->cdvd_style): The previous attribute namenew_typewas too vague. I've renamed it tocdvd_styleto accurately reflect that this setting handles the logic specific to the Sony CD/DVD Generator engine.This PR depends on: