Skip to content

Commit 2b35faf

Browse files
committed
Добавьте файлы проекта.
1 parent e62bff4 commit 2b35faf

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+18113
-0
lines changed

MM Engine.sln

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 16
4+
VisualStudioVersion = 16.0.31019.35
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MM Engine", "MM Engine.vcxproj", "{927F9EC2-DB78-4BB0-9DE6-A6512ADF9F10}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|x64 = Debug|x64
11+
Debug|x86 = Debug|x86
12+
Release|x64 = Release|x64
13+
Release|x86 = Release|x86
14+
EndGlobalSection
15+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
16+
{927F9EC2-DB78-4BB0-9DE6-A6512ADF9F10}.Debug|x64.ActiveCfg = Debug|x64
17+
{927F9EC2-DB78-4BB0-9DE6-A6512ADF9F10}.Debug|x64.Build.0 = Debug|x64
18+
{927F9EC2-DB78-4BB0-9DE6-A6512ADF9F10}.Debug|x86.ActiveCfg = Debug|Win32
19+
{927F9EC2-DB78-4BB0-9DE6-A6512ADF9F10}.Debug|x86.Build.0 = Debug|Win32
20+
{927F9EC2-DB78-4BB0-9DE6-A6512ADF9F10}.Release|x64.ActiveCfg = Release|x64
21+
{927F9EC2-DB78-4BB0-9DE6-A6512ADF9F10}.Release|x64.Build.0 = Release|x64
22+
{927F9EC2-DB78-4BB0-9DE6-A6512ADF9F10}.Release|x86.ActiveCfg = Release|Win32
23+
{927F9EC2-DB78-4BB0-9DE6-A6512ADF9F10}.Release|x86.Build.0 = Release|Win32
24+
EndGlobalSection
25+
GlobalSection(SolutionProperties) = preSolution
26+
HideSolutionNode = FALSE
27+
EndGlobalSection
28+
GlobalSection(ExtensibilityGlobals) = postSolution
29+
SolutionGuid = {440D82F9-C960-4CAF-B2C2-32E23C9FFAB0}
30+
EndGlobalSection
31+
EndGlobal

MM Engine.vcxproj

+179
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,179 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<ItemGroup Label="ProjectConfigurations">
4+
<ProjectConfiguration Include="Debug|Win32">
5+
<Configuration>Debug</Configuration>
6+
<Platform>Win32</Platform>
7+
</ProjectConfiguration>
8+
<ProjectConfiguration Include="Release|Win32">
9+
<Configuration>Release</Configuration>
10+
<Platform>Win32</Platform>
11+
</ProjectConfiguration>
12+
<ProjectConfiguration Include="Debug|x64">
13+
<Configuration>Debug</Configuration>
14+
<Platform>x64</Platform>
15+
</ProjectConfiguration>
16+
<ProjectConfiguration Include="Release|x64">
17+
<Configuration>Release</Configuration>
18+
<Platform>x64</Platform>
19+
</ProjectConfiguration>
20+
</ItemGroup>
21+
<PropertyGroup Label="Globals">
22+
<VCProjectVersion>16.0</VCProjectVersion>
23+
<Keyword>Win32Proj</Keyword>
24+
<ProjectGuid>{927f9ec2-db78-4bb0-9de6-a6512adf9f10}</ProjectGuid>
25+
<RootNamespace>MMEngine</RootNamespace>
26+
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
27+
</PropertyGroup>
28+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
29+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
30+
<ConfigurationType>Application</ConfigurationType>
31+
<UseDebugLibraries>true</UseDebugLibraries>
32+
<PlatformToolset>v142</PlatformToolset>
33+
<CharacterSet>Unicode</CharacterSet>
34+
</PropertyGroup>
35+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
36+
<ConfigurationType>Application</ConfigurationType>
37+
<UseDebugLibraries>false</UseDebugLibraries>
38+
<PlatformToolset>v140</PlatformToolset>
39+
<WholeProgramOptimization>true</WholeProgramOptimization>
40+
<CharacterSet>MultiByte</CharacterSet>
41+
</PropertyGroup>
42+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
43+
<ConfigurationType>Application</ConfigurationType>
44+
<UseDebugLibraries>true</UseDebugLibraries>
45+
<PlatformToolset>v142</PlatformToolset>
46+
<CharacterSet>Unicode</CharacterSet>
47+
</PropertyGroup>
48+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
49+
<ConfigurationType>Application</ConfigurationType>
50+
<UseDebugLibraries>false</UseDebugLibraries>
51+
<PlatformToolset>v142</PlatformToolset>
52+
<WholeProgramOptimization>true</WholeProgramOptimization>
53+
<CharacterSet>Unicode</CharacterSet>
54+
</PropertyGroup>
55+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
56+
<ImportGroup Label="ExtensionSettings">
57+
<Import Project="$(VCTargetsPath)\BuildCustomizations\masm.props" />
58+
</ImportGroup>
59+
<ImportGroup Label="Shared">
60+
</ImportGroup>
61+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
62+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
63+
</ImportGroup>
64+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
65+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
66+
</ImportGroup>
67+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
68+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
69+
</ImportGroup>
70+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
71+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
72+
</ImportGroup>
73+
<PropertyGroup Label="UserMacros" />
74+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
75+
<LinkIncremental>true</LinkIncremental>
76+
</PropertyGroup>
77+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
78+
<LinkIncremental>false</LinkIncremental>
79+
<OutDir>$(SolutionDir)\Build\bin\$(Configuration)\$(Platform)\</OutDir>
80+
<IntDir>$(SolutionDir)\Build\obj\$(Configuration)\$(Platform)\</IntDir>
81+
</PropertyGroup>
82+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
83+
<LinkIncremental>true</LinkIncremental>
84+
</PropertyGroup>
85+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
86+
<LinkIncremental>false</LinkIncremental>
87+
</PropertyGroup>
88+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
89+
<ClCompile>
90+
<WarningLevel>Level3</WarningLevel>
91+
<SDLCheck>true</SDLCheck>
92+
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
93+
<ConformanceMode>true</ConformanceMode>
94+
</ClCompile>
95+
<Link>
96+
<SubSystem>Console</SubSystem>
97+
<GenerateDebugInformation>true</GenerateDebugInformation>
98+
</Link>
99+
</ItemDefinitionGroup>
100+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
101+
<ClCompile>
102+
<WarningLevel>Level3</WarningLevel>
103+
<FunctionLevelLinking>true</FunctionLevelLinking>
104+
<IntrinsicFunctions>true</IntrinsicFunctions>
105+
<SDLCheck>true</SDLCheck>
106+
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
107+
<ConformanceMode>true</ConformanceMode>
108+
<AdditionalIncludeDirectories>$(SolutionDir)\ThirdParty\RapidJSON\Include;$(SolutionDir)\ThirdParty\StormLib\Include</AdditionalIncludeDirectories>
109+
</ClCompile>
110+
<Link>
111+
<SubSystem>Windows</SubSystem>
112+
<EnableCOMDATFolding>true</EnableCOMDATFolding>
113+
<OptimizeReferences>true</OptimizeReferences>
114+
<GenerateDebugInformation>true</GenerateDebugInformation>
115+
<AdditionalLibraryDirectories>$(SolutionDir)\ThirdParty\StormLib\Build\bin\Release\Win32</AdditionalLibraryDirectories>
116+
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
117+
</Link>
118+
</ItemDefinitionGroup>
119+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
120+
<ClCompile>
121+
<WarningLevel>Level3</WarningLevel>
122+
<SDLCheck>true</SDLCheck>
123+
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
124+
<ConformanceMode>true</ConformanceMode>
125+
</ClCompile>
126+
<Link>
127+
<SubSystem>Console</SubSystem>
128+
<GenerateDebugInformation>true</GenerateDebugInformation>
129+
</Link>
130+
</ItemDefinitionGroup>
131+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
132+
<ClCompile>
133+
<WarningLevel>Level3</WarningLevel>
134+
<FunctionLevelLinking>true</FunctionLevelLinking>
135+
<IntrinsicFunctions>true</IntrinsicFunctions>
136+
<SDLCheck>true</SDLCheck>
137+
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
138+
<ConformanceMode>true</ConformanceMode>
139+
</ClCompile>
140+
<Link>
141+
<SubSystem>Console</SubSystem>
142+
<EnableCOMDATFolding>true</EnableCOMDATFolding>
143+
<OptimizeReferences>true</OptimizeReferences>
144+
<GenerateDebugInformation>true</GenerateDebugInformation>
145+
</Link>
146+
</ItemDefinitionGroup>
147+
<ItemGroup>
148+
<ClCompile Include="OpenSource\CCmdLine.cpp" />
149+
<ClCompile Include="OpenSource\CEngine.cpp" />
150+
<ClCompile Include="OpenSource\CMpqManager.cpp" />
151+
<ClCompile Include="OpenSource\MM Engine.cpp" />
152+
</ItemGroup>
153+
<ItemGroup>
154+
<ClInclude Include="OpenSource\CCmdLine.h" />
155+
<ClInclude Include="OpenSource\CEngine.h" />
156+
<ClInclude Include="OpenSource\CMpqManager.h" />
157+
<ClInclude Include="OpenSource\Functions.hpp" />
158+
<ClInclude Include="OpenSource\Memory.hpp" />
159+
<ClInclude Include="OpenSource\Variables.h" />
160+
</ItemGroup>
161+
<ItemGroup>
162+
<Image Include="OpenSource\MM Engine Bitmap.bmp" />
163+
<Image Include="OpenSource\MM Engine.ico" />
164+
</ItemGroup>
165+
<ItemGroup>
166+
<ResourceCompile Include="OpenSource\MM Engine.rc" />
167+
</ItemGroup>
168+
<ItemGroup>
169+
<None Include="OpenSource\MM Engine Cursor.cur" />
170+
<MASM Include="OpenSource\Race System.asm">
171+
<FileType>Document</FileType>
172+
</MASM>
173+
<None Include="README.md" />
174+
</ItemGroup>
175+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
176+
<ImportGroup Label="ExtensionTargets">
177+
<Import Project="$(VCTargetsPath)\BuildCustomizations\masm.targets" />
178+
</ImportGroup>
179+
</Project>

MM Engine.vcxproj.filters

+75
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<ItemGroup>
4+
<Filter Include="Исходные файлы">
5+
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
6+
<Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
7+
</Filter>
8+
<Filter Include="Файлы заголовков">
9+
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
10+
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
11+
</Filter>
12+
<Filter Include="Файлы ресурсов">
13+
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
14+
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
15+
</Filter>
16+
</ItemGroup>
17+
<ItemGroup>
18+
<ClCompile Include="OpenSource\MM Engine.cpp">
19+
<Filter>Исходные файлы</Filter>
20+
</ClCompile>
21+
<ClCompile Include="OpenSource\CCmdLine.cpp">
22+
<Filter>Исходные файлы</Filter>
23+
</ClCompile>
24+
<ClCompile Include="OpenSource\CMpqManager.cpp">
25+
<Filter>Исходные файлы</Filter>
26+
</ClCompile>
27+
<ClCompile Include="OpenSource\CEngine.cpp">
28+
<Filter>Исходные файлы</Filter>
29+
</ClCompile>
30+
</ItemGroup>
31+
<ItemGroup>
32+
<ClInclude Include="OpenSource\Variables.h">
33+
<Filter>Файлы заголовков</Filter>
34+
</ClInclude>
35+
<ClInclude Include="OpenSource\CCmdLine.h">
36+
<Filter>Файлы заголовков</Filter>
37+
</ClInclude>
38+
<ClInclude Include="OpenSource\CMpqManager.h">
39+
<Filter>Файлы заголовков</Filter>
40+
</ClInclude>
41+
<ClInclude Include="OpenSource\Memory.hpp">
42+
<Filter>Файлы заголовков</Filter>
43+
</ClInclude>
44+
<ClInclude Include="OpenSource\Functions.hpp">
45+
<Filter>Файлы заголовков</Filter>
46+
</ClInclude>
47+
<ClInclude Include="OpenSource\CEngine.h">
48+
<Filter>Файлы заголовков</Filter>
49+
</ClInclude>
50+
</ItemGroup>
51+
<ItemGroup>
52+
<Image Include="OpenSource\MM Engine.ico">
53+
<Filter>Файлы ресурсов</Filter>
54+
</Image>
55+
<Image Include="OpenSource\MM Engine Bitmap.bmp">
56+
<Filter>Файлы ресурсов</Filter>
57+
</Image>
58+
</ItemGroup>
59+
<ItemGroup>
60+
<ResourceCompile Include="OpenSource\MM Engine.rc">
61+
<Filter>Файлы ресурсов</Filter>
62+
</ResourceCompile>
63+
</ItemGroup>
64+
<ItemGroup>
65+
<None Include="OpenSource\MM Engine Cursor.cur">
66+
<Filter>Файлы ресурсов</Filter>
67+
</None>
68+
<None Include="README.md" />
69+
</ItemGroup>
70+
<ItemGroup>
71+
<MASM Include="OpenSource\Race System.asm">
72+
<Filter>Исходные файлы</Filter>
73+
</MASM>
74+
</ItemGroup>
75+
</Project>

OpenSource/CCmdLine.cpp

+84
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
#include "CCmdLine.h"
2+
3+
CCmdLine::CCmdLine(LPCSTR lpCmdLine)
4+
{
5+
UINT i_key = 0;
6+
UINT i_value = 0;
7+
8+
UINT cmdlinelenght = strlen(lpCmdLine);
9+
10+
for (UINT i = 0; i < cmdlinelenght; i++)
11+
if (lpCmdLine[i] == '-' && lpCmdLine[i + 1] != ' ' && (i == 0 || lpCmdLine[i - 1] == ' '))
12+
{
13+
LPSTR key = NULL;
14+
LPSTR value = NULL;
15+
16+
i_key = i + 1;
17+
i_value = 0;
18+
19+
for (; i <= cmdlinelenght; i++)
20+
if (i == cmdlinelenght)
21+
key = _strdup(&lpCmdLine[i_key]);
22+
else if (lpCmdLine[i] == ' ')
23+
{
24+
UINT lenght = i - i_key + 1;
25+
key = (LPSTR)malloc(lenght);
26+
ZeroMemory(key, lenght);
27+
strncpy_s(key, lenght, &lpCmdLine[i_key], lenght - 1);
28+
29+
break;
30+
}
31+
32+
for (; i < cmdlinelenght && (cmdlinelenght > i + 2 ? !(lpCmdLine[i] == ' ' && lpCmdLine[i + 1] == '-' && lpCmdLine[i + 2] != ' ') : false); i++)
33+
if (lpCmdLine[i] != ' ')
34+
{
35+
i_value = i;
36+
37+
break;
38+
}
39+
40+
for (const auto& item : m_CmdLine)
41+
if (!_strcmpi(key, item.first))
42+
{
43+
delete[] m_CmdLine[item.first];
44+
delete[] key;
45+
key = (LPSTR)item.first;
46+
47+
break;
48+
}
49+
50+
if (!i_value)
51+
{
52+
m_CmdLine[key] = NULL;
53+
54+
continue;
55+
}
56+
57+
for (; i <= cmdlinelenght; i++)
58+
if (i == cmdlinelenght)
59+
value = _strdup(&lpCmdLine[i_value]);
60+
else if (lpCmdLine[i] == ' ')
61+
{
62+
UINT lenght = i - i_value + 1;
63+
value = (LPSTR)malloc(lenght);
64+
ZeroMemory(value, lenght);
65+
strncpy_s(value, lenght, &lpCmdLine[i_value], lenght - 1);
66+
67+
break;
68+
}
69+
70+
m_CmdLine[key] = value;
71+
}
72+
}
73+
74+
CCmdLine::~CCmdLine()
75+
{ }
76+
77+
LPCSTR CCmdLine::GetValue(LPCSTR lpKey)
78+
{
79+
for (const auto& item : m_CmdLine)
80+
if (!_strcmpi(lpKey, item.first))
81+
return item.second;
82+
83+
return "";
84+
}

OpenSource/CCmdLine.h

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#pragma once
2+
3+
#include <Windows.h>
4+
#include <map>
5+
6+
class CCmdLine {
7+
private:
8+
std::map<LPCSTR, LPCSTR> m_CmdLine;
9+
public:
10+
CCmdLine(LPCSTR lpCmdLine);
11+
~CCmdLine();
12+
13+
LPCSTR GetValue(LPCSTR lpKey);
14+
};

0 commit comments

Comments
 (0)