Restructure repository to include all source folders
Move git root from Client/ to src/ to track all source code: - Client: Game client source (moved to Client/Client/) - Server: Game server source - GameTools: Development tools - CryptoSource: Encryption utilities - database: Database scripts - Script: Game scripts - rylCoder_16.02.2008_src: Legacy coder tools - GMFont, Game: Additional resources 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
245
CryptoSource/ScriptEngine-MCF File/ScriptTest/TestCode.gsf
Normal file
245
CryptoSource/ScriptEngine-MCF File/ScriptTest/TestCode.gsf
Normal file
@@ -0,0 +1,245 @@
|
||||
void Print( int );
|
||||
void Print( float );
|
||||
void Print( string );
|
||||
void Print( bool );
|
||||
|
||||
|
||||
|
||||
|
||||
int getDouble( int n )
|
||||
{
|
||||
return n*n;
|
||||
}
|
||||
|
||||
float getDouble( float f )
|
||||
{
|
||||
return f*f;
|
||||
}
|
||||
|
||||
float TestFloat( float f1, float f2 )
|
||||
{
|
||||
return f1 * f2;
|
||||
}
|
||||
|
||||
float TestFloat( float f1, float f2, float f3 )
|
||||
{
|
||||
return f1 * f2 * f3;
|
||||
}
|
||||
|
||||
float TestFloat( float f1, float f2, float f3, float f4 )
|
||||
{
|
||||
return f1 * f2 * f3 * f4;
|
||||
}
|
||||
|
||||
void TestArith()
|
||||
{
|
||||
|
||||
Print( "--------<2D><><EFBFBD><EFBFBD> <20><>Ģ<EFBFBD><C4A2><EFBFBD><EFBFBD> <20><EFBFBD>Ʈ---------" );
|
||||
|
||||
int iint1 = 0X0ecd;//54434;
|
||||
int iint2 = 1840;
|
||||
|
||||
Print( iint1 );
|
||||
|
||||
int iint3 = iint1 + iint2;
|
||||
Print( iint3 );
|
||||
Print( iint1 - iint2 );
|
||||
iint3 = iint1 * iint2;
|
||||
Print( iint3 );
|
||||
iint3 = iint1 / iint2;
|
||||
Print( iint3 );
|
||||
iint3 = iint1 % iint2;
|
||||
Print( iint3 );
|
||||
|
||||
Print( iint3++ );
|
||||
Print( iint3-- );
|
||||
Print( ++iint3 );
|
||||
Print( --iint3 );
|
||||
|
||||
Print( iint3 += iint1 );
|
||||
Print( iint1 - iint3 );
|
||||
Print( iint3 -= iint1 );
|
||||
Print( iint3 *= iint2 );
|
||||
Print( iint3 /= iint2 );
|
||||
Print( iint3 %= iint1 );
|
||||
}
|
||||
|
||||
void ScriptMain()
|
||||
{
|
||||
float f1 = 0.43521;
|
||||
float f2 = 98.3145;
|
||||
int i1 = 4352;
|
||||
int i2 = 986214;
|
||||
bool b1 = true;
|
||||
bool b2 = false;
|
||||
string str1 = "str1<72><31><EFBFBD><EFBFBD><EFBFBD><EFBFBD>~";
|
||||
string str2 = "str2<72><32><EFBFBD>շ<EFBFBD>~~";
|
||||
|
||||
Print( "--------string <20><EFBFBD>Ʈ--------" );
|
||||
string str3;
|
||||
Print( str3 = str1 );
|
||||
|
||||
str3 = i1;
|
||||
Print( str3 );
|
||||
|
||||
Print( str3 = f1 );
|
||||
|
||||
str3 = b1;
|
||||
Print( str3 );
|
||||
|
||||
str3 = "ũũũ ";
|
||||
|
||||
str3 += str2;
|
||||
Print( str3 );
|
||||
|
||||
str3 += i2;
|
||||
Print( str3 );
|
||||
|
||||
str3 += f2;
|
||||
Print( str3 );
|
||||
|
||||
str3 += b2;
|
||||
Print( str3 );
|
||||
|
||||
Print( str1 + str2 );
|
||||
Print( str1 + i1 );
|
||||
Print( str1 + f1 );
|
||||
Print( str1 + b1 );
|
||||
Print( str2 + str1 );
|
||||
Print( i2 + str2 );
|
||||
Print( f2 + str2 );
|
||||
Print( b2 + str2 );
|
||||
|
||||
str3 = str1 == str2;
|
||||
Print( str3 );
|
||||
str3 = str1 == "str1<72><31><EFBFBD><EFBFBD><EFBFBD><EFBFBD>~";
|
||||
Print( str3 );
|
||||
str3 = str1 != str2;
|
||||
Print( str3 );
|
||||
|
||||
|
||||
Print( "-------Init Declaration <20><EFBFBD>Ʈ-------" );
|
||||
|
||||
string sstr1 = str1;
|
||||
Print( sstr1 );
|
||||
string sstr2 = i1;
|
||||
Print( sstr2 );
|
||||
string sstr3 = f1;
|
||||
Print( sstr3 );
|
||||
string sstr4 = b1;
|
||||
Print( sstr4 );
|
||||
string sstr5 = str1 + str2;
|
||||
Print( sstr5 );
|
||||
string sstr6 = str1 + i2;
|
||||
Print( sstr6 );
|
||||
string sstr7 = str1 + f2;
|
||||
Print( sstr7 );
|
||||
string sstr8 = str1 + b2;
|
||||
Print( sstr8 );
|
||||
|
||||
string sstr9 = i1 + str2;
|
||||
Print( sstr9 );
|
||||
string sstr10 = f1 + str2;
|
||||
Print( sstr10 );
|
||||
string sstr11 = b1 + str2;
|
||||
Print( sstr11 );
|
||||
|
||||
string sstr12 = str1 == "str1<72><31><EFBFBD><EFBFBD><EFBFBD><EFBFBD>~";
|
||||
Print( sstr12 );
|
||||
string sstr13 = str1 != str2;
|
||||
Print( sstr13 );
|
||||
string sstr14 = str2 == "ũũũ";
|
||||
Print( sstr14 );
|
||||
|
||||
Print( "-------Float <20><>Ģ<EFBFBD><C4A2><EFBFBD><EFBFBD> <20><EFBFBD>Ʈ--------" );
|
||||
Print( f1 + f2 );
|
||||
Print( f1 - f2 );
|
||||
Print( f1 * f2 );
|
||||
Print( f1 / f2 );
|
||||
Print( ++f1 );
|
||||
Print( --f1 );
|
||||
Print( f1++ );
|
||||
Print( f1-- );
|
||||
Print( f1 );
|
||||
Print( f1 += f2 );
|
||||
Print( f1 -= f2 );
|
||||
Print( f1 *= f2 );
|
||||
Print( f1 /= f2 );
|
||||
|
||||
Print( "-------------<2D>迭 <20><EFBFBD>Ʈ------------" );
|
||||
|
||||
int arrInt[] = { 2145, 124765, 7568, 7824, 23562351 };
|
||||
float arrFloat[] = { 0.325, 85.235, 82.3523, 325.1216 };
|
||||
bool arrBool[] = { true, false, true, str1!=str2 };
|
||||
|
||||
int i = 0;
|
||||
|
||||
for( i = 0; i < 5; i++ )
|
||||
Print( arrInt[i] );
|
||||
|
||||
i = 0;
|
||||
while( i < 4 )
|
||||
{
|
||||
if( i == 2 )
|
||||
{
|
||||
i++;
|
||||
continue;
|
||||
}
|
||||
Print( arrFloat[i++] );
|
||||
}
|
||||
|
||||
for( i = 0;; i++ )
|
||||
{
|
||||
if( i >= 4 )
|
||||
break;
|
||||
string strTemp;
|
||||
strTemp = arrBool[i];
|
||||
Print( strTemp );
|
||||
}
|
||||
|
||||
|
||||
string arrStr[] = { "str1<72><EFBFBD>", "str2ũũ", "str3<72>ֱ۷<D6B1>?"
|
||||
, "str4<72><34><EFBFBD><EFBFBD><EFBFBD><EFBFBD>", 425346, 4125.5636, true, str1 };
|
||||
|
||||
|
||||
for( i = 0; i < 8; i++ )
|
||||
Print( arrStr[i] );
|
||||
|
||||
|
||||
if( arrInt[0] != 2145 )
|
||||
{
|
||||
Print( "<22>ٺ<EFBFBD>" );
|
||||
}
|
||||
else
|
||||
{
|
||||
TestArith();
|
||||
}
|
||||
|
||||
|
||||
switch( arrInt[1] )
|
||||
{
|
||||
case 2145 :
|
||||
Print( "2145<34><35><EFBFBD><EFBFBD>~" );
|
||||
break;
|
||||
case 124765 :
|
||||
Print( "124765<36><35><EFBFBD><EFBFBD>~" );
|
||||
case 7568 :
|
||||
Print( "7568<36><38><EFBFBD><EFBFBD><EFBFBD><EFBFBD>~" );
|
||||
break;
|
||||
case 7824 :
|
||||
Print( "7824<32><34><EFBFBD><EFBFBD>~" );
|
||||
break;
|
||||
case 23562351 :
|
||||
Print( "23562351<35><31><EFBFBD><EFBFBD><EFBFBD><EFBFBD>~" );
|
||||
break;
|
||||
default :
|
||||
Print( "default<6C><74><EFBFBD><EFBFBD>~" );
|
||||
}
|
||||
|
||||
Print( getDouble( 10 ) );
|
||||
Print( getDouble( 4.4 ) );
|
||||
Print( true );
|
||||
Print( false );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user