Added support for version 9 ark headers. #12

Merged
PikminGuts92 merged 2 commits from master into master 2017-09-12 08:19:37 -05:00
PikminGuts92 commented 2017-09-11 19:41:27 -05:00 (Migrated from github.com)

In response to submitted issue #11
I also added in a check for ark version 8, which I know hasn't been observed yet. But we might get lucky.

In response to submitted issue #11 I also added in a check for ark version 8, which I know hasn't been observed yet. But we might get lucky.
maxton (Migrated from github.com) requested changes 2017-09-12 00:36:41 -05:00
maxton (Migrated from github.com) left a comment

Thanks for the PR. I don't have any version 9 arks to look at, but I trust you've tested this. Two nits and I'll merge 👍

Thanks for the PR. I don't have any version 9 arks to look at, but I trust you've tested this. Two nits and I'll merge 👍
@ -344,9 +346,9 @@ namespace GameArchives.Ark
}
maxton (Migrated from github.com) commented 2017-09-12 00:31:33 -05:00

Since this loop is almost the same as the one above, except for skipping the checksum, can you just move the readHash check to within the loop? I'd like to try to minimize duplicate code.

Since this loop is almost the same as the one above, except for skipping the checksum, can you just move the `readHash` check to within the loop? I'd like to try to minimize duplicate code.
maxton (Migrated from github.com) commented 2017-09-12 00:33:32 -05:00

It would be a bit less wasteful to just do header.Position += 4 or header.Seek(4, SeekOrigin.Current) with a comment explaining that there's a checksum we're ignoring.

It would be a bit less wasteful to just do `header.Position += 4` or `header.Seek(4, SeekOrigin.Current)` with a comment explaining that there's a checksum we're ignoring.
maxton commented 2017-09-12 00:39:08 -05:00 (Migrated from github.com)

Oh, and if you could also update the readme to mention the PS3 version of Amplitude and the new version number under the supported formats, that would be great.

Oh, and if you could also update the readme to mention the PS3 version of Amplitude and the new version number under the supported formats, that would be great.
PikminGuts92 (Migrated from github.com) reviewed 2017-09-12 03:44:23 -05:00
@ -344,9 +346,9 @@ namespace GameArchives.Ark
}
PikminGuts92 (Migrated from github.com) commented 2017-09-12 03:44:23 -05:00

I did it this way so there'd only be one comparison instead of x comparisons (equal to file count). But I guess that's over optimization for our purpose.

I did it this way so there'd only be one comparison instead of x comparisons (equal to file count). But I guess that's over optimization for our purpose.
PikminGuts92 (Migrated from github.com) reviewed 2017-09-12 03:49:20 -05:00
@ -344,9 +346,9 @@ namespace GameArchives.Ark
}
PikminGuts92 (Migrated from github.com) commented 2017-09-12 03:49:20 -05:00

No excuse for this one. I'll fix it immediately.

No excuse for this one. I'll fix it immediately.
maxton (Migrated from github.com) approved these changes 2017-09-12 08:18:56 -05:00
maxton commented 2017-09-12 08:19:40 -05:00 (Migrated from github.com)

Thanks!

Thanks!
Sign in to join this conversation.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-maxton/GameArchives!12
No description provided.