-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Added a .wsa file reader #17984
Added a .wsa file reader #17984
Conversation
This appears to be a tweaked version of the D2 mod's wsa parser. Do you have @evgeniysergeev's permission to replace the copyright statement with OpenRA's standard header? |
He is already listed at https://github.com/OpenRA/OpenRA/blob/bleed/AUTHORS#L62 I also rewrote a lot with information I found on the net. This includes https://github.com/ultraq/redhorizon/blob/master/redhorizon-classic/source/nz/net/ultraq/redhorizon/classic/filetypes/wsa/WsaFile.groovy and http://nyerguds.arsaneus-design.com/project_stuff/2018/EngieFileConverter/release/ and http://www.shikadi.net/moddingwiki/Westwood_WSA_Format and http://xhp.xwis.net/documents/ccfiles4.txt |
Is it possible to put it in common or something, because d2 mod will depend on cnc dll, right now it is not depend on it. |
I think you don't want this for Dune 2. Sadly there is no version field. You will need to keep, but better rename your D2WsaReader. You may want to use parts of my code especially the IsWsa checks as yours was only guessing for large file sizes and maybe using the actual offsets to read the data. It was a requirement to get the cnc variant working. You only need to remove some fields:
You probably also need to keep the FrameOffsets can be set to 0 exception which I ripped out. |
Is there any advantage to treating these as paletted sprites? We could parse them straight to RBGA and then treat them similarly to vqa. |
#17984 (comment) is unaddressed. |
I agree. While this is something in between sprites and movies, it should be handled like we do .vqa movies. That depends on #12775 now which is a rather large refactor I am currently experimenting on. |
Rebased and rewrote this using my new |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can verify that the implementation here is in line with the cited sources, as well as being in line with the current VqaLoader/Reader implementation.
Opened all available WSA files for TD and RA in the asset browser and didn't see any obvious issues.
Only thing I admittedly didn't look into is the palette reading segment, but the colors look OK ingame.
Of course my comments on WsaReader
also apply to WsaLoader
since they share a bunch of code.
Closes #6781.