Skip to content

Commit

Permalink
Merge pull request #3 from Jayveer/bugfix/qaralign
Browse files Browse the repository at this point in the history
Bugfix/qaralign
  • Loading branch information
Jayveer authored Feb 3, 2021
2 parents fca8a73 + af4c25a commit 3b8a181
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,18 @@ Adding an output path at the end will extract the files to a specified folder of
```
Chrysalis.exe "path\to\cache.dar" "path\to\output"
```
It's also possible to extract from dar and qar archives. The Platform option is unnecessary here.
It's also possible to extract from dar and qar archives. The Platform option is unnecessary for Dar.

```
Chrysalis.exe "path\to\cache.qar" "path\to\output"
```
Extracting from Qar.

```
Chrysalis.exe -ps3 "path\to\cache.qar" "path\to\output"
```
If extracting from the ps3 game it is required to use the option for Qar files, as it uses a different alignment value.

## License
[MIT](LICENSE.md)
This project falls under the MIT license.
2 changes: 1 addition & 1 deletion main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

int main(int argc, char** argv) {
CLI cli = CLI(argc, argv);
cli.run("Chrysalis", "1.2");
cli.run("Chrysalis", "1.3");
}
4 changes: 3 additions & 1 deletion mgs/qar/qar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ void Qar::open() {
txpFiles[i].resize(size);
qarDat.read((char*)&txpFiles[i][0], size);

int align = getAlignment(qarDat.tellg(), 0x80);
int sector = PLATFORM == PS3 ? 0x1000 : 0x80;

int align = getAlignment(qarDat.tellg(), sector);
qarDat.seekg(align, qarDat.cur);
}

Expand Down
1 change: 1 addition & 0 deletions mgs/qar/qar.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#include <string>

#include "../common/fileutil.h"
#include "../common/game/game.h"

struct QarDataInfo {
uint32_t fileInfo;
Expand Down

0 comments on commit 3b8a181

Please sign in to comment.