libs/xxinterface/src/xxinterface.cxx
////////////////////////////////////////////////////////////////////////////////
//
// Stuff to do with scrambling and unscrambling the strings
//
////////////////////////////////////////////////////////////////////////////////
Stuff to do with scrambling and unscrambling the strings
Stuff to do with scrambling and unscrambling the strings
static void unscramble(char *l)
{
	bool done = (l[0] == 0);
	if (!done) { l[0] ^= 0xb4; done = (l[1] == 0); }
	if (!done) { l[1] ^= 0x98; done = (l[2] == 0); }
	if (!done) { l[2] ^= 0xa2; done = (l[3] == 0); }
	if (!done) { l[3] ^= 0x66; done = (l[4] == 0); }
	for (int i = 4; !done; done = (l[++i] == 0)) {
		 l[i] ^= 0xc8;
	}
}
static void unscramble ( char * l ) { bool done = ( l [ 0 ] == 0 ) ; if ( ! done ) { l [ 0 ] ^= 0xb4 ; done = ( l [ 1 ] == 0 ) ; } if ( ! done ) { l [ 1 ] ^= 0x98 ; done = ( l [ 2 ] == 0 ) ; } if ( ! done ) { l [ 2 ] ^= 0xa2 ; done = ( l [ 3 ] == 0 ) ; } if ( ! done ) { l [ 3 ] ^= 0x66 ; done = ( l [ 4 ] == 0 ) ; } for ( int i = 4 ; ! done ; done = ( l [ ++ i ] == 0 ) ) { l [ i ] ^= 0xc8 ; } }
Stuff to do with scrambling and unscrambling the strings
Stuff to do with scrambling and unscrambling the strings