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

Refactoring and reorganizing code. #5

Merged
merged 20 commits into from
Nov 4, 2023
Merged

Conversation

HikikoMarmy
Copy link
Contributor

Added abstract readers to make it easier to deal with each game separately (Currently only supports Zero 2)
Cleaned up file directory list and file name list for Zero 2.

Exports now respect whole file size and trims instead of reading chunks of PS2_SECTOR_SIZE (2048). This was causing buffer overruns and some garbage in file buffers.

CMP_Decode now decodes the stream as files are read and saved, rather than reopening the file later.
CMP_Decode now decodes with 4 byte pointers instead of 8, which was causing heap corruption in some cases.

Reworked some of the file name lists
Reworked CMP_Decode to decode at extraction time
Reworked CMP_Decode to fix heap corruption + buffer overrun
General Cleanup
@wagrenier wagrenier self-requested a review October 29, 2023 14:12
@wagrenier wagrenier added the enhancement New feature or request label Oct 29, 2023
Copy link
Collaborator

@wagrenier wagrenier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left some comments, thank you for taking part in this project and I sincerely appreciate the time you have taken to do this PR. The comments are mostly just styling and formatting, nothing too dramatic :)

Extractor/Zero2/Zero2Extractor.cpp Outdated Show resolved Hide resolved
Extractor/extractor.cpp Outdated Show resolved Hide resolved
Extractor/extractor.cpp Outdated Show resolved Hide resolved
Extractor/extractor.cpp Outdated Show resolved Hide resolved
Extractor/IsoHandler.h Outdated Show resolved Hide resolved
Extractor/Zero2/Zero2Extractor.cpp Outdated Show resolved Hide resolved
Extractor/Zero2/Zero2Extractor.cpp Outdated Show resolved Hide resolved
Extractor/Zero2/Zero2Extractor.h Outdated Show resolved Hide resolved
Extractor/Zero2/Zero2_DirectoryTable.hpp Outdated Show resolved Hide resolved
Extractor/Zero2/Zero2_DirectoryTable.hpp Outdated Show resolved Hide resolved
…er quirks. (I have tested it extensively, and cross referenced it with Zero 3)

Added utility namespace for game functions and custom functions
Removed some empty files that were no longer in use.
Addressed some of the comments and requests.
…er quirks.

(I have tested it extensively, and cross referenced it with Zero 3)

Added a utility namespace for required game functions and custom functions.

Removed some empty files that were no longer in use.

Addressed some formatting issues.
Extractor/Zero2/Zero2Extractor.h Outdated Show resolved Hide resolved
Extractor/Zero3/Zero3Extractor.h Outdated Show resolved Hide resolved
Extractor/Zero3/Zero3_DirectoryTable.hpp Outdated Show resolved Hide resolved
Extractor/Zero2/Zero2Extractor.cpp Outdated Show resolved Hide resolved
Extractor/Zero2/Zero2Extractor.cpp Outdated Show resolved Hide resolved
Extractor/Zero1/Zero1Extractor.h Outdated Show resolved Hide resolved
Extractor/Zero2/Zero2Extractor.cpp Outdated Show resolved Hide resolved
Extractor/extractor.cpp Outdated Show resolved Hide resolved
VisualStudio.gitignore Outdated Show resolved Hide resolved
.gitignore Outdated Show resolved Hide resolved
…e and game code.

Reworked game address tables because one common struct doesn't work across all 3 games.
Added functions from Zero2 for dealing with file checks (Exists, Compressed, Sector, etc).
Cleaned up some PR requests.
…e and game code.

Reworked game address tables because one common struct doesn't work across all 3 games.
Added functions from Zero2 for dealing with file checks (Exists, Compressed, Sector, etc).
Cleaned up some PR requests.
Copy link
Collaborator

@wagrenier wagrenier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing work there! Thanks for being quick on adapting to the coding style :)

Copy link
Collaborator

@wagrenier wagrenier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Congrats on your first merge!

@wagrenier wagrenier merged commit a17c61c into Mikompilation:main Nov 4, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants