TWS: Add tws and untws tools #25
Conversation
|
if (TypeMan.getFileType(name) == Aurora::kFileTypeNone) | ||
path = TypeMan.addFileType(name, type); | ||
else | ||
path = name; |
DrMcCoy
Sep 30, 2018
Member
This breaks the unherf tool, because Sonic HERF files contain files with multiple extensions. Namely files compressed with the "small"-algorithm.
Like, for example, itm_ace_timmy_0.ncgr.small is now shown/extracted as itm_ace_timmy_0.ncgr, which is wrong.
This breaks the unherf tool, because Sonic HERF files contain files with multiple extensions. Namely files compressed with the "small"-algorithm.
Like, for example, itm_ace_timmy_0.ncgr.small is now shown/extracted as itm_ace_timmy_0.ncgr, which is wrong.
Nostritius
Oct 2, 2018
Author
Contributor
Are .small files the only occasion where this happens? Becauseif so i would simply add a condition like
if (TypeMan.getFileType(name) == Aurora::kFileTypeNone || type == Aurora::kFileTypeSMALL)
Are .small files the only occasion where this happens? Becauseif so i would simply add a condition like
if (TypeMan.getFileType(name) == Aurora::kFileTypeNone || type == Aurora::kFileTypeSMALL)
DrMcCoy
Oct 2, 2018
Member
Yeah, I don't want such a hacky solution :P
Yeah, I don't want such a hacky solution :P
Nostritius
Oct 2, 2018
Author
Contributor
Does this mean, i should do this, or not?
Does this mean, i should do this, or not?
DrMcCoy
Oct 2, 2018
Member
No, you should not
No, you should not
DrMcCoy
Oct 7, 2018
Member
Wait, why is that necessary to begin with?
File archives shouldn't carry an extension in their filenames.
I.e. the real, actual issue is that the TheWitcherSaveFile
Archive class should strip extensions from the filenames, like we're doing with ZIP files, certain ERFs, NDS, HERFs, OBB, ... (see https://github.com/xoreos/xoreos/blob/master/src/aurora/zipfile.cpp#L61, https://github.com/xoreos/xoreos/blob/master/src/aurora/erffile.cpp#L600, https://github.com/xoreos/xoreos/blob/master/src/aurora/herffile.cpp#L133, https://github.com/xoreos/xoreos/blob/master/src/aurora/ndsrom.cpp#L92, https://github.com/xoreos/xoreos/blob/master/src/aurora/obbfile.cpp#L97)
Wait, why is that necessary to begin with?
File archives shouldn't carry an extension in their filenames.
I.e. the real, actual issue is that the TheWitcherSaveFile
Archive class should strip extensions from the filenames, like we're doing with ZIP files, certain ERFs, NDS, HERFs, OBB, ... (see https://github.com/xoreos/xoreos/blob/master/src/aurora/zipfile.cpp#L61, https://github.com/xoreos/xoreos/blob/master/src/aurora/erffile.cpp#L600, https://github.com/xoreos/xoreos/blob/master/src/aurora/herffile.cpp#L133, https://github.com/xoreos/xoreos/blob/master/src/aurora/ndsrom.cpp#L92, https://github.com/xoreos/xoreos/blob/master/src/aurora/obbfile.cpp#L97)
DrMcCoy
Oct 7, 2018
Member
And yes, I probably should have caught that earlier, sorry
And yes, I probably should have caught that earlier, sorry
0dc15fd
to
1e102a4
I have now rewritten the file ending block in a (hopefully) more elegant way. I also fixed the other issues. |
1e102a4
to
a75f3a2
I have now switched the writing and reading to not directly use file types in the file names. I also fixed some other issues and modified the unit tests accordingly. |
a75f3a2
to
a43e781
a43e781
to
7d8cc3c
Merged as ed047ed...367563e, thanks! :) |
This PR adds wo TheWitcherSave related tools, for packing and unpacking TheWitcherSave files.