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:
2025-11-29 20:17:20 +09:00
parent 5d3cd64a25
commit dd97ddec92
11602 changed files with 1446576 additions and 0 deletions

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel level="asInvoker" uiAccess="false"></requestedExecutionLevel>
</requestedPrivileges>
</security>
</trustInfo>
</assembly>

View File

@@ -0,0 +1,10 @@
<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
<assembly xmlns='urn:schemas-microsoft-com:asm.v1' manifestVersion='1.0'>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel level='asInvoker' uiAccess='false' />
</requestedPrivileges>
</security>
</trustInfo>
</assembly>

View File

@@ -0,0 +1,2 @@
#v4.0:v100
Debug|Win32|E:\myProj\GodsOfWar\CryptoSource\|

View File

@@ -0,0 +1,32 @@
Build started 13.09.2011 21:36:57.
1>Project "E:\myProj\GodsOfWar\CryptoSource\GCMDSLoader\GCMDSLoader.vcxproj" on node 3 (build target(s)).
1>InitializeBuildStatus:
Creating "Debug\GCMDSLoader.unsuccessfulbuild" because "AlwaysCreate" was specified.
ClCompile:
All outputs are up-to-date.
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\CL.exe /c /ZI /nologo /W3 /WX- /Od /Oy- /D WIN32 /D _DEBUG /D _CONSOLE /D WIN32 /D _DEBUG /D _LIB /D _WINDOWS /D _USE_32BIT_TIME_T /D _MBCS /Gm /EHsc /RTC1 /MDd /GS- /fp:precise /Zc:wchar_t /Zc:forScope /Fo"Debug\\" /Fd"Debug\vc100.pdb" /Gd /TP /wd4996 /wd4819 /wd4482 /analyze- /errorReport:prompt GCMDSLoader.cpp SimpleParser.cpp stdafx.cpp
stdafx.cpp
SimpleParser.cpp
GCMDSLoader.cpp
Generating Code...
ManifestResourceCompile:
All outputs are up-to-date.
Link:
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\link.exe /ERRORREPORT:PROMPT /OUT:"E:\myProj\GodsOfWar\CryptoSource\Debug\GCMDSLoader.exe" /INCREMENTAL /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /NODEFAULTLIB:LIBCMT /NODEFAULTLIB:LIBCMTD /MANIFEST /ManifestFile:"Debug\GCMDSLoader.exe.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DEBUG /PDB:"E:\myProj\GodsOfWar\CryptoSource\Debug\GCMDSLoader.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT:NO /IMPLIB:"E:\myProj\GodsOfWar\CryptoSource\Debug\GCMDSLoader.lib" /MACHINE:X86 Debug\GCMDSLoader.exe.embed.manifest.res
Debug\GCMDSLoader.obj
Debug\SimpleParser.obj
Debug\stdafx.obj
Manifest:
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\mt.exe /nologo /verbose /out:"Debug\GCMDSLoader.exe.embed.manifest" /manifest Debug\GCMDSLoader.exe.intermediate.manifest
All outputs are up-to-date.
LinkEmbedManifest:
All outputs are up-to-date.
GCMDSLoader.vcxproj -> E:\myProj\GodsOfWar\CryptoSource\Debug\GCMDSLoader.exe
FinalizeBuildStatus:
Deleting file "Debug\GCMDSLoader.unsuccessfulbuild".
Touching "Debug\GCMDSLoader.lastbuildstate".
1>Done Building Project "E:\myProj\GodsOfWar\CryptoSource\GCMDSLoader\GCMDSLoader.vcxproj" (build target(s)).
Build succeeded.
Time Elapsed 00:00:04.78

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1 @@
<EFBFBD><EFBFBD>

View File

@@ -0,0 +1 @@
<EFBFBD><EFBFBD>

View File

@@ -0,0 +1 @@
<EFBFBD><EFBFBD>

View File

@@ -0,0 +1 @@
<EFBFBD><EFBFBD>

View File

@@ -0,0 +1 @@
<EFBFBD><EFBFBD>

View File

@@ -0,0 +1 @@
<EFBFBD><EFBFBD>

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,195 @@
// GCMDSLoader.cpp : <20>ܼ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α׷<CEB1><D7B7><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>մϴ<D5B4>.
//
#include "stdafx.h"
#include "SimpleParser.h"
int _tmain(int argc, _TCHAR* argv[])
{
// FileLoader
CSimpleParser parser;
if( false == parser.OpenFile( "aaa.gcmds" ) )
{
return false;
}
/*
// Client Source..
if( 0 != stricmp( "SKELETON_KEY_DATA", parser.GetNextToken() ) )
{
return false; // invalid header
}
while( (szToken = parser.GetNextToken()) != NULL )
{
if( 0 == stricmp( "skeletoncount", szToken ) )
{
szToken = parser.GetNextToken();
m_lSkeletonCount = aton( szToken );
}
else if( 0 == stricmp( "skeleton", szToken ) )
{
m_pSkeletonHierarchy = new long[m_lSkeletonCount];
m_pAniHolderIndex = new long[m_lSkeletonCount];
m_pIndexInSubpart = new long[m_lSkeletonCount];
m_pszSkeletonName = new char*[m_lSkeletonCount];
szToken = parser.GetNextToken();
while( 0 != stricmp( szToken, ";" ) )
{
i = aton(szToken);
if( i >= m_lSkeletonCount )
{
// skip remainder of 4 tokens
for( j = 0; j < 4; ++j )
{
parser.GetNextToken();
}
szToken = parser.GetNextToken();
continue;
}
m_pSkeletonHierarchy[i] = aton( parser.GetNextToken() );
m_pAniHolderIndex[i] = aton( parser.GetNextToken() );
m_pIndexInSubpart[i] = aton( parser.GetNextToken() );
szToken = parser.GetNextToken();
m_pszSkeletonName[i] = new char[strlen(szToken)+1];
strcpy( m_pszSkeletonName[i], szToken );
szToken = parser.GetNextToken();
}
}
else if( 0 == stricmp( "aniholdercount", szToken ) )
{
szToken = parser.GetNextToken();
m_lAniHolderCount = aton( szToken );
}
else if( 0 == stricmp( "TMInverse", szToken ) )
{
m_pLocalizerMatrix = new matrix[m_lSkeletonCount];
szToken = parser.GetNextToken();
while( 0 != stricmp( szToken, ";" ) )
{
i = aton(parser.GetNextToken()); // skip "matrix" token
if( i >= m_lSkeletonCount )
{
// skip remainder of 12 tokens
for( j = 0; j < 12; ++j )
{
parser.GetNextToken();
}
szToken = parser.GetNextToken();
continue;
}
m_pLocalizerMatrix[i]._11 = atof( parser.GetNextToken() );
m_pLocalizerMatrix[i]._12 = atof( parser.GetNextToken() );
m_pLocalizerMatrix[i]._13 = atof( parser.GetNextToken() );
m_pLocalizerMatrix[i]._14 = 0.0f;
m_pLocalizerMatrix[i]._21 = atof( parser.GetNextToken() );
m_pLocalizerMatrix[i]._22 = atof( parser.GetNextToken() );
m_pLocalizerMatrix[i]._23 = atof( parser.GetNextToken() );
m_pLocalizerMatrix[i]._24 = 0.0f;
m_pLocalizerMatrix[i]._31 = atof( parser.GetNextToken() );
m_pLocalizerMatrix[i]._32 = atof( parser.GetNextToken() );
m_pLocalizerMatrix[i]._33 = atof( parser.GetNextToken() );
m_pLocalizerMatrix[i]._34 = 0.0f;
m_pLocalizerMatrix[i]._41 = atof( parser.GetNextToken() );
m_pLocalizerMatrix[i]._42 = atof( parser.GetNextToken() );
m_pLocalizerMatrix[i]._43 = atof( parser.GetNextToken() );
m_pLocalizerMatrix[i]._44 = 1.0f;
szToken = parser.GetNextToken();
}
}
else if( 0 == stricmp( "BoundingVolume", szToken ) )
{
Z3D_BOUNDINGVOLUME_INFO bvi;
vector3 vPos;
quaternion qRot;
vector3 vSize;
vector3 vTmp;
szToken = parser.GetNextToken();
while( 0 != stricmp( szToken, ";" ) )
{
if( 0 == stricmp( "OBB", szToken ) ||
0 == stricmp( "CYLINDER", szToken ) ||
0 == stricmp( "SPHERE", szToken ) )
{
if( 0 == stricmp( "OBB", szToken ) )
{
bvi.eBVType = Z3D_BOUNDINGVOLUME_INFO::Z3DBV_OBB;
}
else if ( 0 == stricmp( "CYLINDER", szToken ) )
{
bvi.eBVType = Z3D_BOUNDINGVOLUME_INFO::Z3DBV_CYLINDER;
}
else if ( 0 == stricmp( "SPHERE", szToken ) )
{
bvi.eBVType = Z3D_BOUNDINGVOLUME_INFO::Z3DBV_SPHERE;
}
bvi.lSkelIndex = aton( parser.GetNextToken() );
szToken = parser.GetNextToken();
while( 0 != stricmp( szToken, ";" ) )
{
if( 0 == stricmp( "pos", szToken ) )
{
vPos.x = atof( parser.GetNextToken() );
vPos.y = atof( parser.GetNextToken() );
vPos.z = atof( parser.GetNextToken() );
}
else if( 0 == stricmp( "rot", szToken ) )
{
qRot.x = atof( parser.GetNextToken() );
qRot.y = atof( parser.GetNextToken() );
qRot.z = atof( parser.GetNextToken() );
qRot.w = atof( parser.GetNextToken() );
}
else if( 0 == stricmp( "size", szToken ) )
{
vSize.x = atof( parser.GetNextToken() );
vSize.y = atof( parser.GetNextToken() );
vSize.z = atof( parser.GetNextToken() );
}
szToken = parser.GetNextToken();
}
// calc
if( Z3D_BOUNDINGVOLUME_INFO::Z3DBV_OBB == bvi.eBVType )
{
z3d::VectorRotate( vTmp, vector3(0,0.5f*vSize.y,0), qRot );
bvi.vOrigin = vPos + vTmp;
bvi.vExtent = 0.5f*vSize;
bvi.qRot = qRot;
}
else if( Z3D_BOUNDINGVOLUME_INFO::Z3DBV_CYLINDER == bvi.eBVType )
{
}
else if( Z3D_BOUNDINGVOLUME_INFO::Z3DBV_SPHERE == bvi.eBVType )
{
}
m_vecBoundingVolumeInfo.push_back( bvi );
szToken = parser.GetNextToken();
}
}
}
}
*/
parser.Close();
return 0;
}

View File

@@ -0,0 +1,20 @@

Microsoft Visual Studio Solution File, Format Version 9.00
# Visual Studio 2005
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GCMDSLoader", "GCMDSLoader.vcproj", "{6C7487B6-AA43-4987-BD66-311CCB58FDAF}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{6C7487B6-AA43-4987-BD66-311CCB58FDAF}.Debug|Win32.ActiveCfg = Debug|Win32
{6C7487B6-AA43-4987-BD66-311CCB58FDAF}.Debug|Win32.Build.0 = Debug|Win32
{6C7487B6-AA43-4987-BD66-311CCB58FDAF}.Release|Win32.ActiveCfg = Release|Win32
{6C7487B6-AA43-4987-BD66-311CCB58FDAF}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

Binary file not shown.

View File

@@ -0,0 +1,221 @@
<?xml version="1.0" encoding="ks_c_5601-1987"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8.00"
Name="GCMDSLoader"
ProjectGUID="{6C7487B6-AA43-4987-BD66-311CCB58FDAF}"
RootNamespace="GCMDSLoader"
Keyword="Win32Proj"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="1"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="4"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
LinkIncremental="2"
GenerateDebugInformation="true"
SubSystem="1"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="1"
CharacterSet="1"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
RuntimeLibrary="2"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
LinkIncremental="1"
GenerateDebugInformation="true"
SubSystem="1"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="<22>ҽ<EFBFBD> <20><><EFBFBD><EFBFBD>"
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File
RelativePath=".\GCMDSLoader.cpp"
>
</File>
<File
RelativePath=".\SimpleParser.cpp"
>
</File>
<File
RelativePath=".\stdafx.cpp"
>
</File>
</Filter>
<Filter
Name="<22><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
<File
RelativePath=".\misc.h"
>
</File>
<File
RelativePath=".\SimpleParser.h"
>
</File>
<File
RelativePath=".\stdafx.h"
>
</File>
</Filter>
<Filter
Name="<22><><EFBFBD>ҽ<EFBFBD> <20><><EFBFBD><EFBFBD>"
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
>
</Filter>
<File
RelativePath=".\ReadMe.txt"
>
</File>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@@ -0,0 +1,104 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{6C7487B6-AA43-4987-BD66-311CCB58FDAF}</ProjectGuid>
<RootNamespace>GCMDSLoader</RootNamespace>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="GCMDSLoader.cpp" />
<ClCompile Include="SimpleParser.cpp" />
<ClCompile Include="stdafx.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="misc.h" />
<ClInclude Include="SimpleParser.h" />
<ClInclude Include="stdafx.h" />
</ItemGroup>
<ItemGroup>
<None Include="ReadMe.txt" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="소스 파일">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="헤더 파일">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="리소스 파일">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="GCMDSLoader.cpp">
<Filter>소스 파일</Filter>
</ClCompile>
<ClCompile Include="SimpleParser.cpp">
<Filter>소스 파일</Filter>
</ClCompile>
<ClCompile Include="stdafx.cpp">
<Filter>소스 파일</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="misc.h">
<Filter>헤더 파일</Filter>
</ClInclude>
<ClInclude Include="SimpleParser.h">
<Filter>헤더 파일</Filter>
</ClInclude>
<ClInclude Include="stdafx.h">
<Filter>헤더 파일</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="ReadMe.txt" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
</Project>

View File

@@ -0,0 +1,32 @@
========================================================================
<20>ܼ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α׷<CEB1> : GCMDSLoader <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <20><><EFBFBD><EFBFBD>
========================================================================
<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>α׷<CEB1> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E7BFA1> <20><> GCMDSLoader <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α׷<CEB1><D7B7><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>.
<EFBFBD><EFBFBD> <20><><EFBFBD>Ͽ<EFBFBD><CFBF><EFBFBD> GCMDSLoader <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α׷<CEB1><D7B7><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> <20><> <20><><EFBFBD>Ͽ<EFBFBD> <20><><EFBFBD><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ԵǾ<D4B5> <20>ֽ<EFBFBD><D6BD>ϴ<EFBFBD>.
GCMDSLoader.vcproj
<20><><EFBFBD><EFBFBD> <20><><EFBFBD>α׷<CEB1> <20><><EFBFBD><EFBFBD><EFBFBD><20><><EFBFBD><EFBFBD><EFBFBD>Ͽ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> VC++ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE> <20><20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
<20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Visual C++ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α׷<CEB1> <20><><EFBFBD><EFBFBD><EFBFBD><20><><EFBFBD><EFBFBD><EFBFBD>Ͽ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
<20>÷<EFBFBD><C3B7><EFBFBD>, <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <20><><EFBFBD>ɿ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ԵǾ<D4B5> <20>ֽ<EFBFBD><D6BD>ϴ<EFBFBD>.
GCMDSLoader.cpp
<20><20><><EFBFBD><EFBFBD> <20><><EFBFBD>α׷<CEB1> <20>ҽ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
/////////////////////////////////////////////////////////////////////////////
<EFBFBD><EFBFBD>Ÿ ǥ<><C7A5> <20><><EFBFBD><EFBFBD>:
StdAfx.h, StdAfx.cpp
<20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20≯<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD> <20><><EFBFBD><EFBFBD>(PCH) <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> GCMDSLoader.pch<63><68>
<20≯<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD> <20><><EFBFBD><EFBFBD>(PCT) <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> StdAfx.obj<62><6A> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>˴ϴ<CBB4>.
/////////////////////////////////////////////////////////////////////////////
<EFBFBD><EFBFBD>Ÿ <20><><EFBFBD><EFBFBD>:
<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>α׷<CEB1> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E7BFA1> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> "TODO:" <20>ּ<EFBFBD><D6BC><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ڰ<EFBFBD> <20>߰<EFBFBD><DFB0>ϰų<CFB0> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ؾ<EFBFBD> <20>ϴ<EFBFBD>
<EFBFBD>ҽ<EFBFBD> <20>ڵ<EFBFBD> <20>κ<EFBFBD><CEBA><EFBFBD> <20><>Ÿ<EFBFBD><C5B8><EFBFBD>ϴ<EFBFBD>.
/////////////////////////////////////////////////////////////////////////////

View File

@@ -0,0 +1,534 @@
// SimpleParser.cpp: implementation of the CSimpleParser class.
//
//////////////////////////////////////////////////////////////////////
#include "SimpleParser.h"
//////////////////////////////////////////////////////////////////////////
// CSimpleFileBuffer
//////////////////////////////////////////////////////////////////////////
CSimpleFileBuffer::CSimpleFileBuffer()
{
m_pFileContentBuffer = NULL;
m_lFileContentBufferLength = 0;
m_lFileContentBufferIndex = 0;
}
CSimpleFileBuffer::~CSimpleFileBuffer()
{
SAFE_DELETEA( m_pFileContentBuffer );
}
bool CSimpleFileBuffer::Open( const char* szFileName )
{
Close();
FILE* pFile = fopen(szFileName, "rb");
if( NULL == pFile )
{
return false;
}
fseek( pFile, 0, SEEK_END );
long lFileSize = ftell( pFile );
if( 0 == lFileSize )
{
fclose( pFile );
return false;
}
fseek( pFile, 0, SEEK_SET );
m_pFileContentBuffer = new unsigned char[lFileSize];
fread( m_pFileContentBuffer, lFileSize, 1, pFile );
fclose( pFile );
m_lFileContentBufferLength = lFileSize;
m_lFileContentBufferIndex = 0;
strncpy( m_szFileName, szFileName, 300 );
m_szFileName[299] = '\0';
return true;
}
void CSimpleFileBuffer::Close()
{
SAFE_DELETEA( m_pFileContentBuffer );
m_lFileContentBufferLength = 0;
m_lFileContentBufferIndex = 0;
m_szFileName[0] = '\0';
}
int CSimpleFileBuffer::GetChar()
{
if( m_lFileContentBufferIndex >= m_lFileContentBufferLength )
{
return EOF;
}
return m_pFileContentBuffer[m_lFileContentBufferIndex++];
}
bool CSimpleFileBuffer::CheckEOF()
{
if( m_lFileContentBufferIndex >= m_lFileContentBufferLength )
{
return true;
}
return false;
}
void CSimpleFileBuffer::Seek( long idx, int nOrigin )
{
long lIdx;
if( SEEK_SET == nOrigin )
{
lIdx = idx;
}
else if( SEEK_CUR == nOrigin )
{
lIdx = m_lFileContentBufferIndex+idx;
}
else if( SEEK_END == nOrigin )
{
lIdx = m_lFileContentBufferLength-1 + idx;
}
m_lFileContentBufferIndex = max( 0, min( m_lFileContentBufferLength, lIdx ) );
}
//////////////////////////////////////////////////////////////////////////
// CSimpleParser
//////////////////////////////////////////////////////////////////////////
CSimpleParser::CSimpleParser()
{
m_szFileName = NULL;
m_szMaskString = NULL;
m_lMaskLen = 0;
m_lPointerInMask = 0;
m_pFile = NULL;
//m_lTokenCount = 0;
m_lLineCount = 0;
m_lTokenInLine = 0;
// ------------------------------------------------- //
// REFACTORING : by Vincent 2005. 10. 26
// m_vec_szTokens.reserve( 10 );
// ------------------------------------------------- //
m_vec_szTmpLine.reserve( 1000 );
}
CSimpleParser::~CSimpleParser()
{
/*
if( m_pFile )
{
fclose( m_pFile );
m_pFile = NULL;
}
SAFE_DELETEA( m_szFileName );
SAFE_DELETEA( m_szMaskString );
for( int i = 0; i < m_vec_szTokens.size(); i++ )
{
SAFE_DELETEA( m_vec_szTokens[i] );
}
m_vec_szTokens.clear();
m_vec_szTmpLine.clear();
*/
Reset();
}
bool CSimpleParser::Reset()
{
/*
if( m_pFile )
{
fclose( m_pFile );
m_pFile = NULL;
}
*/
SAFE_DELETE( m_pFile );
SAFE_DELETEA( m_szFileName );
SAFE_DELETEA( m_szMaskString );
m_lMaskLen = 0;
m_lPointerInMask = 0;
//m_lTokenCount = 0;
// ------------------------------------------------- //
// REFACTORING : by Vincent 2005. 10. 26
// for( size_t i = 0; i < m_vec_szTokens.size(); i++ )
// {
// SAFE_DELETEA( m_vec_szTokens[i] );
// }
// m_vec_szTokens.clear();
m_iTokenNum = 0 ;
// ------------------------------------------------- //
m_vec_szTmpLine.clear();
m_lLineCount = 0;
m_lTokenInLine = 0;
return true;
}
bool CSimpleParser::OpenFile( const char* szFileName, const char* szMaskString )
{
_ASSERT( szFileName );
/*
FILE* fp;
if( szMaskString )
{
// decrypting mode
if( (fp = fopen(szFileName, "rb")) == NULL )
{
return false; // file open error
}
}
else
{
// normal mode
if( (fp = fopen(szFileName, "rt")) == NULL )
{
return false; // file open error
}
}
*/
Reset();
m_pFile = new CSimpleFileBuffer;
if( false == m_pFile->Open( szFileName ) )
{
SAFE_DELETE( m_pFile );
return false;
}
// m_pFile = fp;
m_szFileName = new char[strlen(szFileName) + 1];
strcpy( m_szFileName, szFileName );
if( szMaskString )
{
m_lMaskLen = strlen(szMaskString);
m_szMaskString = new char[m_lMaskLen+1];
strcpy( m_szMaskString, szMaskString );
m_lPointerInMask = 0;
int iLen = strlen(m_szMaskString);
for(int k = 0; k < iLen; ++k)
{
m_szMaskString[k] = m_szMaskString[k]^0xc8;
}
}
return true;
}
inline static bool IsWhiteSpace( char c )
{
if( '\n' == c ) return true;
if( '\t' == c ) return true;
if( ' ' == c ) return true;
return false;
}
// white space<63><65><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><>ü<EFBFBD><C3BC> <20>ϳ<EFBFBD><CFB3><EFBFBD> <20><>ū<EFBFBD>и<EFBFBD><D0B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>Ǵ<EFBFBD> <20><><EFBFBD>ڸ<EFBFBD> operator<6F><72><EFBFBD><EFBFBD> <20>Ѵ<EFBFBD>.
// (<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-_-;;)
inline static bool IsOperator( char c )
{
if( '(' == c ) return true;
if( ')' == c ) return true;
if( '{' == c ) return true;
if( '}' == c ) return true;
if( '[' == c ) return true;
if( ']' == c ) return true;
if( '<' == c ) return true;
if( '>' == c ) return true;
// +- <20><>ȣ <20><><EFBFBD><EFBFBD>...-_-; <20><>ȣ<EFBFBD><C8A3> <20><><EFBFBD><EFBFBD> <20><> <20>ִ<EFBFBD>.
/*if( '+' == c ) return true;
if( '-' == c ) return true;*/
if( '*' == c ) return true;
if( '/' == c ) return true;
if( ',' == c ) return true;
// '.' <20><><EFBFBD><EFBFBD>. <20>Ҽ<EFBFBD><D2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>δ<EFBFBD>-_-;; <20>̷<EFBFBD>..
//if( '.' == c ) return true;
if( ':' == c ) return true;
if( ';' == c ) return true;
if( '`' == c ) return true;
if( '\'' == c ) return true;
if( '=' == c ) return true;
if( '|' == c ) return true;
return false;
}
int CSimpleParser::GetChrFromFile()
{
// edith GCMDS <20><><EFBFBD><EFBFBD>.
// <20>Էµ<D4B7> MASK <20><><EFBFBD><EFBFBD> <20>̿<EFBFBD><CCBF><EFBFBD> <20><>ȣȭ<C8A3><C8AD> <20><><EFBFBD><EFBFBD>
// <20>ٽ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>κ<EFBFBD><CEBA>̴<EFBFBD>.
int c;
if( NULL == m_pFile )
{
return EOF;
}
if( m_szMaskString )
{
// c = fgetc(m_pFile);
c = m_pFile->GetChar();
if( EOF == c )
{
return EOF;
}
c ^= m_szMaskString[m_lPointerInMask];
if( 0xD == c ) // LF/CR combo ó<><C3B3>
{
// <20><><EFBFBD><EFBFBD>ŷ<EFBFBD><C5B7> <20><><EFBFBD><EFBFBD> ij<><C4B3><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
// int c2 = m_szMaskString[(m_lPointerInMask+1)%m_lMaskLen] ^ fgetc(m_pFile);
int c2 = m_szMaskString[(m_lPointerInMask+1)%m_lMaskLen] ^ m_pFile->GetChar();
if( 0xA == c2 )
{
m_lPointerInMask = (m_lPointerInMask + 2) % m_lMaskLen;
return '\n';
}
else
{
// fseek( m_pFile, -1, SEEK_CUR );
m_pFile->Seek( -1, SEEK_CUR );
}
}
m_lPointerInMask = (m_lPointerInMask + 1) % m_lMaskLen;
return c;
}
// else <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ʿ<EFBFBD><CABF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(decrypting <20>ƴϸ<C6B4> normal<61>̴ϱ<CCB4>)
// normal reading
// return fgetc(m_pFile);
return m_pFile->GetChar();
}
int CSimpleParser::ReadLine()
{
int i;
// ------------------------------------------------- //
// REFACTORING : by Vincent 2005. 10. 26
// clear previously read tokens
// for( i = 0; i < m_vec_szTokens.size(); i++ )
// {
// SAFE_DELETEA( m_vec_szTokens[i] );
// }
// m_vec_szTokens.clear();
for ( i = 0; i < MAX_TOKEN_NUM; ++i )
{
m_szTokens[ i ][ 0 ] = '\0' ;
}
m_iTokenNum = 0 ;
// ------------------------------------------------- //
// check if stream opened
if( NULL == m_pFile )
{
return EOF;
}
int c;
while( (c = GetChrFromFile()) != EOF )
{
if( '\n' == c )
{
// m_vec_szTmpLine.push_back('\0');
break;
}
m_vec_szTmpLine.push_back( (char)c );
}
m_lLineCount++;
m_lTokenInLine = 0;
// if( feof(m_pFile) )
// {
// fclose(m_pFile);
// m_pFile = NULL;
// }
if( m_pFile->CheckEOF() )
{
SAFE_DELETE( m_pFile );
}
std::vector<char> vec_szTmpToken;
vec_szTmpToken.reserve( 100 ); // allocate appropriate space for 1 token
for( i = 0; i < (int)m_vec_szTmpLine.size(); i++ )
{
if( IsWhiteSpace( m_vec_szTmpLine[i] ) )
{
continue;
}
if( '/' == m_vec_szTmpLine[i] ) // 'comment' check
{
if( (i+1) < (int)m_vec_szTmpLine.size() && '/' == m_vec_szTmpLine[i+1] )
{
break; // skip parsing remainder of the line
}
}
if( IsOperator(m_vec_szTmpLine[i]) )
{
vec_szTmpToken.push_back( m_vec_szTmpLine[i] );
vec_szTmpToken.push_back('\0');
}
else
{
switch( m_vec_szTmpLine[i] )
{
case '\"': // beginning of a string
{
for( i++ ; i < (int)m_vec_szTmpLine.size(); i++ )
{
if( '\"' == m_vec_szTmpLine[i] ) // end of a string
{
break;
}
vec_szTmpToken.push_back( m_vec_szTmpLine[i] );
}
vec_szTmpToken.push_back('\0');
break;
}
default: // otherwise parse normal token
{
for( ; i < (int)m_vec_szTmpLine.size(); i++ )
{
if( IsWhiteSpace(m_vec_szTmpLine[i]) )
{
break;
}
else if( IsOperator(m_vec_szTmpLine[i]) )
{
i--; // one char backward
break;
}
vec_szTmpToken.push_back( m_vec_szTmpLine[i] );
}
vec_szTmpToken.push_back('\0');
break;
}
}
}
// ------------------------------------------------- //
// REFACTORING : by Vincent 2005. 10. 26
// copy parsed token
// char* szTmp = new char[vec_szTmpToken.size()];
// strcpy( szTmp, &(vec_szTmpToken[0]) );
// vec_szTmpToken.clear();
// m_vec_szTokens.push_back(szTmp);
strcpy( &(m_szTokens[ m_iTokenNum++ ][ 0 ]), &(vec_szTmpToken[0]) ) ;
vec_szTmpToken.clear();
// ------------------------------------------------- //
}
m_vec_szTmpLine.clear();
// ------------------------------------------------- //
// REFACTORING : by Vincent 2005. 10. 26
// return m_vec_szTokens.size();
return m_iTokenNum ;
// ------------------------------------------------- //
}
char* CSimpleParser::GetToken( int n )
{
// ------------------------------------------------- //
// REFACTORING : by Vincent 2005. 10. 26
// static char cDummyEmptyToken = '0';
//
// if( static_cast<size_t>(n+1) > m_vec_szTokens.size() )
// {
// //return NULL;
// return &cDummyEmptyToken;
// }
//
// return m_vec_szTokens[n];
static char cDummyEmptyToken = '0' ;
if ( n + 1 > m_iTokenNum )
{
return &cDummyEmptyToken ;
}
return &(m_szTokens[ n ][ 0 ]) ;
// ------------------------------------------------- //
}
int CSimpleParser::GetTokenNum()
{
// ------------------------------------------------- //
// REFACTORING : by Vincent 2005. 10. 26
// return m_vec_szTokens.size();
return m_iTokenNum ;
// ------------------------------------------------- //
}
int CSimpleParser::GetLineNum()
{
return m_lLineCount;
}
char* CSimpleParser::GetFileName()
{
return m_szFileName;
}
char* CSimpleParser::GetNextToken()
{
if( m_lTokenInLine >= GetTokenNum() )
{
do
{
if( EOF == ReadLine() )
{
return NULL;
}
} while( 0 == GetTokenNum() );
}
return GetToken( m_lTokenInLine++ );
}

View File

@@ -0,0 +1,103 @@
// SimpleParser.h: interface for the CSimpleParser class.
//
//////////////////////////////////////////////////////////////////////
// 2000. 1. 4 : CSimpleParser <20>ϴ<EFBFBD> <20>ϼ<EFBFBD>
// 2000. 1. 8 : comment ( '// blah blah...' ) <20><><EFBFBD><EFBFBD>
// 2000. 1.11 : <20><>ȣ<EFBFBD><C8A3> <20><><EFBFBD><EFBFBD> <20><>ū<EFBFBD>и<EFBFBD> <20><><EFBFBD><EFBFBD>( '()' '{}' '[]' '<>' )
// 2000. 1.11 : 1<><31><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ڿ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><>ū<EFBFBD>и<EFBFBD> <20><><EFBFBD><EFBFBD>( '+' '-' ... <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-_-; )
// edith GCMDS <20><><EFBFBD><EFBFBD>ũ <20><>Ʈ<EFBFBD><C6AE>
#define SIMPLE_PARSER_MASK_STRING "<22>ƹ<EFBFBD><C6B9>ų<EFBFBD>"
#if !defined(AFX_SIMPLEPARSER_H__FAFA5CC1_E1BC_11D4_AD2B_0000E8EB4C69__INCLUDED_)
#define AFX_SIMPLEPARSER_H__FAFA5CC1_E1BC_11D4_AD2B_0000E8EB4C69__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include <stdio.h>
#include "misc.h"
#include <vector>
class CSimpleFileBuffer
{
public:
CSimpleFileBuffer();
~CSimpleFileBuffer();
bool Open( const char* szFileName );
void Close();
int GetChar();
bool CheckEOF();
void Seek( long idx, int nOrigin );
protected:
unsigned char* m_pFileContentBuffer;
long m_lFileContentBufferLength;
long m_lFileContentBufferIndex;
char m_szFileName[300];
};
class CSimpleParser
{
public:
enum EConstants
{
MAX_TOKEN_NUM = 16,
MAX_TOKEN_LENGTH = 128
} ;
CSimpleParser();
virtual ~CSimpleParser();
bool Reset();
bool OpenFile( const char* szFileName, const char* szMaskString = SIMPLE_PARSER_MASK_STRING );
int ReadLine(); // returns # of tokens read
char* GetToken( int n );
int GetTokenNum();
int GetLineNum();
char* GetFileName();
void Close()
{
Reset();
}
char* GetNextToken(); // line<6E><65> <20><><EFBFBD><EFBFBD><EFBFBD>ϰ<EFBFBD> token <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
int GetChrFromFile(); // decrypting read <20><> <20><><EFBFBD><EFBFBD> fgetc<74><63> <20><>ü<EFBFBD>ϴ<EFBFBD> <20>Լ<EFBFBD>
protected:
char* m_szMaskString;
long m_lMaskLen;
long m_lPointerInMask;
char* m_szFileName;
// FILE* m_pFile;
CSimpleFileBuffer* m_pFile;
//long m_lTokenCount;
long m_lLineCount;
long m_lTokenInLine; // used for GetNextToken()
// ------------------------------------------------- //
// REFACTORING : by Vincent 2005. 10. 26
// std::vector<char*> m_vec_szTokens;
char m_szTokens[ MAX_TOKEN_NUM ][ MAX_TOKEN_LENGTH ] ;
int m_iTokenNum ;
// ------------------------------------------------- //
std::vector<char> m_vec_szTmpLine;
};
#endif // !defined(AFX_SIMPLEPARSER_H__FAFA5CC1_E1BC_11D4_AD2B_0000E8EB4C69__INCLUDED_)

View File

@@ -0,0 +1,280 @@
#if !defined(__MISC_H__)
#define __MISC_H__
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#pragma warning( disable : 4786 )
#pragma warning( disable : 4005 )
//#define _ASSERT(p) ((void)(p))
#include <windows.h>
#include <d3d8.h>
#include <math.h>
#ifdef _DEBUG
#define _ASSERT(p) ((void)(p))
#define _ASSERTE(p) ((void)(p))
#endif
#ifndef _DEBUG
#define _ASSERT(p) ((void)(p))
#define _ASSERTE(p) ((void)(p))
#endif
#define FLOAT_EPSILON 1.0e-5f
#define FLOAT_PHI 3.1415926535f
#define FLOAT_DEG_1 (FLOAT_PHI / 180.0f)
#define FLOAT_DEG(d) ((d)*FLOAT_DEG_1)
// Miscellaneous functions & macros
#ifndef SAFE_DELETE
#define SAFE_DELETE(p) { if(p) { delete (p); (p)=NULL; } }
#endif
#ifndef SAFE_DELETEA
#define SAFE_DELETEA(p) { if(p) { delete [](p); (p)=NULL; } }
#endif
#ifndef SAFE_RELEASE
#define SAFE_RELEASE(p) { if(p) { (p)->Release(); (p)=NULL; } }
#endif
template< class _T >
struct ptr_greater
{
bool operator()( const _T p1, const _T p2) const
{
return (*p1) < (*p2);
}
};
struct szi_less
{
bool operator () ( const char* sz1, const char* sz2 ) const
{
return (stricmp( sz1, sz2 ) < 0);
}
};
struct VECTOR4D
{
float x, y, z, w;
};
struct VECTOR3D
{
float x, y, z;
};
struct VECTOR2D
{
float x, y;
};
inline BOOL IsEquallF( float f1, float f2 )
{
float f;
f = f1 - f2;
if( f < 0 ) f = -f;
// Returns true if two float number is equall(differs small enough)
return f < FLOAT_EPSILON;
}
inline BOOL IsEquallStr( const char* str1, const char* str2 )
{
int i = 0;
while( str1[i] && str2[i] )
{
if( str1[i] != str2[i] ) return FALSE;
i++;
}
return TRUE;
}
inline bool CompareHeader( const char* szHeaderToken, const char* szString )
{
size_t n = strlen( szHeaderToken );
if( strnicmp( szHeaderToken, szString, n ) == 0 )
{
return true;
}
else
{
return false;
}
}
inline bool CheckProbability( long l_prob_numerator, long l_prob_denominator )
{
return (rand() % l_prob_denominator) < l_prob_numerator;
}
/* Disabled Swap functions because of STL swap function templates.
inline void Swap( long &l1, long &l2 )
{
l1 ^= l2 ^= l1 ^= l2;
}
inline void Swap( float &f1, float &f2 )
{
float f;
f = f1;
f1 = f2;
f2 = f1;
}
inline void Swap( int &i1, int &i2 )
{
i1 ^= i2 ^= i1 ^= i2;
}
inline void Swap( WORD &w1, WORD &w2 )
{
w1 ^= w2 ^= w1 ^= w2;
}
*/
inline void WRONG_WAY(const char* sz)
{
//_ASSERT(!sz);
}
struct D3DVERTEX
{
D3DVERTEX() {}
D3DVERTEX( float _x, float _y, float _z, float _nx, float _ny, float _nz, float _tu, float _tv)
{
x = _x;
y = _y;
z = _z;
nx = _nx;
ny = _ny;
nz = _nz;
tu = _tu;
tv = _tv;
}
float x, y, z;
float nx, ny, nz;
float tu, tv;
};
#define D3DFVF_VERTEX (D3DFVF_XYZ | D3DFVF_NORMAL | D3DFVF_TEX1)
// simple LVERTEX, just for line colored drawing
struct D3DSLVERTEX
{
D3DSLVERTEX() {}
D3DSLVERTEX( float _x, float _y, float _z, D3DCOLOR _c)
{
x = _x;
y = _y;
z = _z;
c = _c;
}
float x, y, z;
D3DCOLOR c;
};
#define D3DFVF_SLVERTEX (D3DFVF_XYZ | D3DFVF_DIFFUSE )
// LVERTEX, as you can figure out...
struct D3DLVERTEX
{
D3DLVERTEX() {}
D3DLVERTEX( float _x, float _y, float _z, D3DCOLOR _c, float _u, float _v )
{
x = _x;
y = _y;
z = _z;
c = _c;
u = _u;
v = _v;
}
float x, y, z;
D3DCOLOR c;
float u, v;
};
#define D3DFVF_LVERTEX (D3DFVF_XYZ | D3DFVF_DIFFUSE | D3DFVF_TEX1 )
/*typedef float FLOAT2[2];
typedef float FLOAT3[3];
typedef float FLOAT4[4];
typedef BYTE BYTE2[2];
typedef BYTE BYTE3[3];
typedef BYTE BYTE4[4];
typedef char CHR2[2];
typedef char CHR3[3];
typedef char CHR4[4];
typedef int INT2[2];
typedef int INT3[3];
typedef int INT4[4];*/
struct INT3
{
union
{
int _0, _1, _2;
int a[3];
};
};
/*template<class _T>
struct A2
{
union
{
_T _0, _1;
_T a[2];
};
};*/
inline long GetSizeByBank( long lActualSize, long lBankSize )
{
float fFactor = float(lActualSize) / lBankSize;
fFactor = ceilf( fFactor );
return long(lBankSize * fFactor);
}
// define 'aton()' func. similar to 'atoi()' but recognizes hexadecimal number
#define aton(a) ( (int)strtol( (a), NULL, 0 ) )
#define range_rand(base, range) (((float)rand()/RAND_MAX)*(range) + (base))
#endif // !defined(__MISC_H__)

View File

@@ -0,0 +1,8 @@
// stdafx.cpp : ǥ<><C7A5> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>ϸ<EFBFBD> <20><><EFBFBD><EFBFBD> <20>ִ<EFBFBD> <20>ҽ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
// GCMDSLoader.pch<63><68> <20≯<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>˴ϴ<CBB4>.
// stdafx.obj<62><6A><EFBFBD><EFBFBD> <20≯<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>Ե˴ϴ<CBB4>.
#include "stdafx.h"
// TODO: <20>ʿ<EFBFBD><CABF><EFBFBD> <20>߰<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
// <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ƴ<EFBFBD> STDAFX.H<><48><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>մϴ<D5B4>.

View File

@@ -0,0 +1,17 @@
// stdafx.h : <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ʴ<EFBFBD>
// ǥ<><C7A5> <20>ý<EFBFBD><C3BD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
// <20><><EFBFBD><EFBFBD> <20>ִ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
//
#pragma once
#ifndef _WIN32_WINNT // Windows XP <20>̻󿡼<CCBB><F3BFA1BC><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20>ֽ<EFBFBD><D6BD>ϴ<EFBFBD>.
#define _WIN32_WINNT 0x0501 // <20>ٸ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Windows<77><73> <20>µ<EFBFBD><C2B5><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ֽʽÿ<CABD>.
#endif
#include <stdio.h>
#include <tchar.h>
// TODO: <20><><EFBFBD>α׷<CEB1><D7B7><EFBFBD> <20>ʿ<EFBFBD><CABF><EFBFBD> <20>߰<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><E2BFA1> <20><><EFBFBD><EFBFBD><EFBFBD>մϴ<D5B4>.