#include "Includes.h"
template <int XORSTART, int BUFLEN, int XREFKILLER>
class XorStr
{
private:
XorStr();
public:
char s[BUFLEN];
XorStr(const char * xs);
~XorStr()
{
for ( int i = 0; i < BUFLEN; i++ ) s[i]=0;
}
};
template <int XORSTART, int BUFLEN, int XREFKILLER>
XorStr<XORSTART,BUFLEN,XREFKILLER>::XorStr(const char * xs)
{
int xvalue = XORSTART;
int i = 0;
for ( ; i < ( BUFLEN - 1 ); i++ )
{
s[ i ] = xs[ i - XREFKILLER ] ^ xvalue;
xvalue += 1;
xvalue %= 256;
}
s[BUFLEN - 1] = 0;
}
#define STRING_VISUAL/*-[ Visual ]-*/XorStr<0x1D,13,0x5B99B88B>("\x30\x45\x3F\x76\x48\x51\x56\x45\x49\x06\x7A\x05"+0x5B99B88B).s
pMenu->AddItem(STRING_VISUAL, &Variables.Visual);
#pragma once
template <int XORSTART, int BUFLEN, int XREFKILLER>
class XorStr
{
private:
XorStr( );
public:
char s[BUFLEN];
XorStr( const char* xs );
~XorStr( )
{
for( int i = 0; i < BUFLEN; ++i )
s[i] = 0;
} // clear string from stack
operator char*( )
{
return s;
}
operator const char*( )
{
return s;
}
};
template <int XORSTART, int BUFLEN, int XREFKILLER>
__declspec( noinline ) XorStr<XORSTART, BUFLEN, XREFKILLER>::XorStr( const char* xs )
{
int xvalue = XORSTART;
for( int i = 0; i < BUFLEN - 1; ++i )
{
s[i] = xs[i - XREFKILLER] ^ xvalue;
xvalue += 1;
xvalue %= 256;
}
s[BUFLEN - 1] = 0;
}
/*Test String*/XorStr<0x51,12,0x7695E86E>("\x05\x37\x20\x20\x75\x05\x23\x2A\x30\x34\x3C"+0x7695E86E).s

pMenu->AddItem(/*"NX Chams"*/GROUP_ESP, &Variables.Chams, opt_OFFON, 2);
void D3DMenu::AddItem(char *txt, int *var, char **opt, int maxval, int typ)
{
if (noitems>=(maxitems-3)) return;
MENU[noitems]->typ=typ;
MENU[noitems]->txt=txt;
MENU[noitems]->opt=opt;
MENU[noitems]->var=var;
MENU[noitems]->maxval=maxval;
noitems++;
totheight=(noitems*height)+titleheight;
}