Blade Posted June 15, 2016 Share Posted June 15, 2016 Fearing for neither my life or sanity I have dived into the code of XCC mixer and wrested from it the ability to compress TD shp files properly in the same manner that shapeset does. Replace your normally installed XCC mixer with the http://www.mediafire.com/download/sazobj97sl06wh9/XCC_Mixer.zip. Bonus ability is that it can also now read the ra mouse shp correctly. Source can be found at https://github.com/OmniBlade/xcc in the encoding branch. Link to comment Share on other sites More sharing options...
SiRaLeX Posted June 15, 2016 Share Posted June 15, 2016 Olaf's code is quite amazing. I like how he has shit for every file format you could possibly encounter. But what about: // Check flags with 0xFE mask to ensure only checking for compression type bit. // Bit 1 signifies stereo audio case 1: return (m_header.flags & 0xFE) == 0; case 0x63: return (m_header.flags & 0xFE) == 2; } Why not: // Check flags with 0xFE mask to ensure only checking for compression type bit. // Bit 1 signifies stereo audio case 1: return !(m_header.flags & 2); case 0x63: return m_header.flags & 2; } And since he already has a function for that: // Check flags with 0xFE mask to ensure only checking for compression type bit. // Bit 1 signifies stereo audio case 1: return get_cb_sample() == 1; case 0x63: return get_cb_sample() == 2; } Assuming you don't know the meaning of the remaining 6 bits and you're only checking for the 2nd. Also, where did you get ra2_names.h and ra2_names.cpp? I like those! I'm assuming Olaf left those out because of people like me? And your shit wasn't compiling without?! Link to comment Share on other sites More sharing options...
Allen262 Posted June 16, 2016 Share Posted June 16, 2016 Got it. Link to comment Share on other sites More sharing options...
Blade Posted June 16, 2016 Author Share Posted June 16, 2016 There were a bunch of files missing from Olaf's XCC source, whether the omissions were deliberate or just an oversight I won't speculate on. Tomson tracked most of them down from other projects Olaf worked on such as his bit torrent tracker. Refactoring to remove the requirement for them was more effort than I was willing to put in just to compile the project. Link to comment Share on other sites More sharing options...
Nyerguds Posted June 17, 2016 Share Posted June 17, 2016 Why not: // Check flags with 0xFE mask to ensure only checking for compression type bit. // Bit 1 signifies stereo audio case 1: return !(m_header.flags & 2); case 0x63: return m_header.flags & 2; } Ew, treating ints as booleans. Horribly opaque old-C practice That's why I prefer 100% strongly typed C#. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now