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

Cannot handle file attributes #11

Open
Frotty opened this issue Apr 28, 2017 · 6 comments
Open

Cannot handle file attributes #11

Frotty opened this issue Apr 28, 2017 · 6 comments
Assignees

Comments

@Frotty
Copy link
Member

Frotty commented Apr 28, 2017

E.g. load, then close war3.mpq
The attributes file and section are gone and wc3 will not load.

@Frotty
Copy link
Member Author

Frotty commented May 4, 2017

leaving out attributes completely doesn't produce an error. So this is default for now.

@DrSuperGood
Copy link
Contributor

DrSuperGood commented May 7, 2017

As part of my changes to remove archive file duplication on load I have added support for opening a MPQ archive in read only mode. This prevents the archive file from being modified at all on closure. Useful for opening the Warcraft III main data MPQ archive files (eg war3.mpq) as one generally does not want to modify them and often cannot modify them without administrator permission.

I will see to adding a modification check so that archives opened for writing will only be modified if at least 1 change is made to them. This will prevent existing code that operates in a read only style from modifying archive files.

I will look into better attribute file handling later on. Until then this issue probably should stay open.

@Frotty
Copy link
Member Author

Frotty commented May 7, 2017

I commented out the current attributes generation. It is pretty much working, but the crc32 for some wav files differed from the ladik one. Hence me mentioning that wav export might not be 100% working yet.

@DrSuperGood
Copy link
Contributor

DrSuperGood commented May 7, 2017

I commented out the current attributes generation. It is pretty much working, but the crc32 for some wav files differed from the ladik one. Hence me mentioning that wav export might not be 100% working yet.

Might be a good idea to add a test case for this, as well as other compression formats.

@Frotty
Copy link
Member Author

Frotty commented May 7, 2017

Ideally yes

@DrSuperGood
Copy link
Contributor

Wav files might be compressed by multiple compression schemes. The first sector cannot be compressed with ADPCM as it contains the wav header and so has to be compressed by something else (if at all).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants