Jump to content

XCC Mixer, now with improved TD shp encoding.


Blade

Recommended Posts

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

Olaf's code is quite amazing. I like how he has shit for every file format you could possibly encounter.  :D 

 

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?  :D  I like those! I'm assuming Olaf left those out because of people like me?  :S  And your shit wasn't compiling without?!  :dry:

 

 

Link to comment
Share on other sites

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

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 :P

 

That's why I prefer 100% strongly typed C#.

Link to comment
Share on other sites

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

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...