Blade Posted June 24, 2015 Share Posted June 24, 2015 As some of you may or may not know, support for the TD shp format used by TD, RA and SS generally sucks in all tools that implement it. Shp files support 2 different kinds of compression for each of their frames, LCW (more widely but incorrectly known as format80) and XORDelta (format40). Most tools take advantage of the fact that the game will quite happily use shp files that just use LCW to avoid implementing an XORDelta encoder leading to shp files that are much larger than they need to be. Worse still is that the LCW encoders are generally don't achieve the same compression as the WW algorithm did. XCC suffers from this and worse the OpenRA utilities don't even implement the full LCW compression scheme leading to the worst case "compression" on all frames (generally around 2x as large as the original pixel data). To remedy this situation I've written ShapeSet, this implements LCW the same as the WW algorithm and implements XORDelta which is slightly better than the WW original. It is command line only and currently only operates on a sequence of PCX files as might be generated by XCC, but if used with the -k switch it will do full LCW+XORDelta compression resulting in shp files at least as small if not smaller than the original WW encoded ones. Basically this is the tool you would want to use to generate your final shp files you ship to users. But wait, there is more. Since very few programs implement a working XORDelta encoder, there are few tools that can create wsa files. Since the format is similar to shp I've also thrown in WSASet, a program to create wsa files that are again slightly smaller than the WW encoded equivalents. Test away and let me know of any issues that crop up. I'm taking about bugs that break the encoders or that stop the generated files working correctly, not the fact that it won't do your palette conversions for you or doesn't take your favorite image format. shapeset.zip Link to comment Share on other sites More sharing options...
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!Register a new account
Already have an account? Sign in here.Sign In Now