VC2008 / VC2010: Enabled precompiled header through Globals.h; the header included in every module in the project. Compilation optimization.
git-svn-id: http://mc-server.googlecode.com/svn/trunk@188 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
parent
f78eef29ee
commit
89afb970d8
@ -3,6 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 10.00
|
|||||||
# Visual C++ Express 2008
|
# Visual C++ Express 2008
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MCServer", "MCServer.vcproj", "{32012054-0C96-4C43-AB27-174FF8E72D66}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MCServer", "MCServer.vcproj", "{32012054-0C96-4C43-AB27-174FF8E72D66}"
|
||||||
ProjectSection(ProjectDependencies) = postProject
|
ProjectSection(ProjectDependencies) = postProject
|
||||||
|
{9A476537-42C0-4848-AB40-15CFE83D17A8} = {9A476537-42C0-4848-AB40-15CFE83D17A8}
|
||||||
{082E8185-7B3A-4945-8C82-9132341A329D} = {082E8185-7B3A-4945-8C82-9132341A329D}
|
{082E8185-7B3A-4945-8C82-9132341A329D} = {082E8185-7B3A-4945-8C82-9132341A329D}
|
||||||
{EEAB54AD-114C-4AB8-8482-0A52D502BD35} = {EEAB54AD-114C-4AB8-8482-0A52D502BD35}
|
{EEAB54AD-114C-4AB8-8482-0A52D502BD35} = {EEAB54AD-114C-4AB8-8482-0A52D502BD35}
|
||||||
{5AAA90B9-946D-4034-83F3-676B06A6E326} = {5AAA90B9-946D-4034-83F3-676B06A6E326}
|
{5AAA90B9-946D-4034-83F3-676B06A6E326} = {5AAA90B9-946D-4034-83F3-676B06A6E326}
|
||||||
@ -17,6 +18,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Lua", "Lua.vcproj", "{082E8
|
|||||||
EndProject
|
EndProject
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ToLua", "ToLua.vcproj", "{EEAB54AD-114C-4AB8-8482-0A52D502BD35}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ToLua", "ToLua.vcproj", "{EEAB54AD-114C-4AB8-8482-0A52D502BD35}"
|
||||||
EndProject
|
EndProject
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WebServer", "WebServer.vcproj", "{9A476537-42C0-4848-AB40-15CFE83D17A8}"
|
||||||
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Win32 = Debug|Win32
|
Debug|Win32 = Debug|Win32
|
||||||
@ -43,6 +46,10 @@ Global
|
|||||||
{EEAB54AD-114C-4AB8-8482-0A52D502BD35}.Debug|Win32.Build.0 = Debug|Win32
|
{EEAB54AD-114C-4AB8-8482-0A52D502BD35}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
{EEAB54AD-114C-4AB8-8482-0A52D502BD35}.Release|Win32.ActiveCfg = Release|Win32
|
{EEAB54AD-114C-4AB8-8482-0A52D502BD35}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
{EEAB54AD-114C-4AB8-8482-0A52D502BD35}.Release|Win32.Build.0 = Release|Win32
|
{EEAB54AD-114C-4AB8-8482-0A52D502BD35}.Release|Win32.Build.0 = Release|Win32
|
||||||
|
{9A476537-42C0-4848-AB40-15CFE83D17A8}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
|
{9A476537-42C0-4848-AB40-15CFE83D17A8}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
|
{9A476537-42C0-4848-AB40-15CFE83D17A8}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
|
{9A476537-42C0-4848-AB40-15CFE83D17A8}.Release|Win32.Build.0 = Release|Win32
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
|
@ -46,7 +46,8 @@
|
|||||||
MinimalRebuild="false"
|
MinimalRebuild="false"
|
||||||
BasicRuntimeChecks="3"
|
BasicRuntimeChecks="3"
|
||||||
RuntimeLibrary="3"
|
RuntimeLibrary="3"
|
||||||
UsePrecompiledHeader="0"
|
UsePrecompiledHeader="2"
|
||||||
|
PrecompiledHeaderThrough="Globals.h"
|
||||||
WarningLevel="3"
|
WarningLevel="3"
|
||||||
DebugInformationFormat="4"
|
DebugInformationFormat="4"
|
||||||
/>
|
/>
|
||||||
@ -115,7 +116,8 @@
|
|||||||
AdditionalIncludeDirectories="../zlib-1.2.5;../jsoncpp-src-0.5.0/include;../lua-5.1.4/src;../tolua++-1.0.93/include"
|
AdditionalIncludeDirectories="../zlib-1.2.5;../jsoncpp-src-0.5.0/include;../lua-5.1.4/src;../tolua++-1.0.93/include"
|
||||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;"
|
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;"
|
||||||
RuntimeLibrary="2"
|
RuntimeLibrary="2"
|
||||||
UsePrecompiledHeader="0"
|
UsePrecompiledHeader="2"
|
||||||
|
PrecompiledHeaderThrough="Globals.h"
|
||||||
WarningLevel="3"
|
WarningLevel="3"
|
||||||
DebugInformationFormat="3"
|
DebugInformationFormat="3"
|
||||||
/>
|
/>
|
||||||
@ -287,14 +289,6 @@
|
|||||||
RelativePath="..\source\cEntity.h"
|
RelativePath="..\source\cEntity.h"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
|
||||||
RelativePath="..\source\cEvent.cpp"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="..\source\cEvent.h"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
<File
|
||||||
RelativePath="..\source\cFileFormatUpdater.cpp"
|
RelativePath="..\source\cFileFormatUpdater.cpp"
|
||||||
>
|
>
|
||||||
@ -416,9 +410,18 @@
|
|||||||
FavorSizeOrSpeed="1"
|
FavorSizeOrSpeed="1"
|
||||||
OmitFramePointers="true"
|
OmitFramePointers="true"
|
||||||
BasicRuntimeChecks="0"
|
BasicRuntimeChecks="0"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
DebugInformationFormat="3"
|
DebugInformationFormat="3"
|
||||||
/>
|
/>
|
||||||
</FileConfiguration>
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Release|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="..\source\cNoise.h"
|
RelativePath="..\source\cNoise.h"
|
||||||
@ -544,14 +547,6 @@
|
|||||||
RelativePath="..\source\cSimulatorManager.h"
|
RelativePath="..\source\cSimulatorManager.h"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
|
||||||
RelativePath="..\source\cSleep.cpp"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="..\source\cSleep.h"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
<File
|
||||||
RelativePath="..\source\cSocket.cpp"
|
RelativePath="..\source\cSocket.cpp"
|
||||||
>
|
>
|
||||||
@ -660,6 +655,30 @@
|
|||||||
RelativePath="..\source\FileDefine.h"
|
RelativePath="..\source\FileDefine.h"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\source\Globals.cpp"
|
||||||
|
>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Debug|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
UsePrecompiledHeader="1"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Release|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
UsePrecompiledHeader="1"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\source\Globals.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="..\source\LuaFunctions.h"
|
RelativePath="..\source\LuaFunctions.h"
|
||||||
>
|
>
|
||||||
@ -1415,6 +1434,14 @@
|
|||||||
RelativePath="..\source\cCriticalSection.h"
|
RelativePath="..\source\cCriticalSection.h"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\source\cEvent.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\source\cEvent.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="..\source\cSemaphore.cpp"
|
RelativePath="..\source\cSemaphore.cpp"
|
||||||
>
|
>
|
||||||
@ -1423,6 +1450,14 @@
|
|||||||
RelativePath="..\source\cSemaphore.h"
|
RelativePath="..\source\cSemaphore.h"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\source\cSleep.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\source\cSleep.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
</Filter>
|
</Filter>
|
||||||
<Filter
|
<Filter
|
||||||
Name="Bindings"
|
Name="Bindings"
|
||||||
@ -1512,62 +1547,6 @@
|
|||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
</Filter>
|
</Filter>
|
||||||
<Filter
|
|
||||||
Name="WebServer"
|
|
||||||
>
|
|
||||||
<File
|
|
||||||
RelativePath="..\WebServer\base64.cpp"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="..\WebServer\base64.h"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="..\WebServer\cEvent.cpp"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="..\WebServer\cEvent.h"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="..\WebServer\Socket.cpp"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="..\WebServer\Socket.h"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="..\WebServer\StdHelpers.cpp"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="..\WebServer\StdHelpers.h"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="..\WebServer\Tracer.h"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="..\WebServer\UrlHelper.cpp"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="..\WebServer\UrlHelper.h"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="..\WebServer\WebServer.cpp"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="..\WebServer\WebServer.h"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
</Filter>
|
|
||||||
</Filter>
|
</Filter>
|
||||||
</Files>
|
</Files>
|
||||||
<Globals>
|
<Globals>
|
||||||
|
233
VC2008/WebServer.vcproj
Normal file
233
VC2008/WebServer.vcproj
Normal file
@ -0,0 +1,233 @@
|
|||||||
|
<?xml version="1.0" encoding="windows-1250"?>
|
||||||
|
<VisualStudioProject
|
||||||
|
ProjectType="Visual C++"
|
||||||
|
Version="9,00"
|
||||||
|
Name="WebServer"
|
||||||
|
ProjectGUID="{9A476537-42C0-4848-AB40-15CFE83D17A8}"
|
||||||
|
RootNamespace="WebServer"
|
||||||
|
Keyword="Win32Proj"
|
||||||
|
TargetFrameworkVersion="196613"
|
||||||
|
>
|
||||||
|
<Platforms>
|
||||||
|
<Platform
|
||||||
|
Name="Win32"
|
||||||
|
/>
|
||||||
|
</Platforms>
|
||||||
|
<ToolFiles>
|
||||||
|
</ToolFiles>
|
||||||
|
<Configurations>
|
||||||
|
<Configuration
|
||||||
|
Name="Debug|Win32"
|
||||||
|
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||||
|
IntermediateDirectory="$(ConfigurationName)\webserver"
|
||||||
|
ConfigurationType="4"
|
||||||
|
CharacterSet="1"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="0"
|
||||||
|
PreprocessorDefinitions="WIN32;_DEBUG;_LIB"
|
||||||
|
MinimalRebuild="true"
|
||||||
|
BasicRuntimeChecks="3"
|
||||||
|
RuntimeLibrary="3"
|
||||||
|
UsePrecompiledHeader="2"
|
||||||
|
PrecompiledHeaderThrough="Globals.h"
|
||||||
|
WarningLevel="3"
|
||||||
|
DebugInformationFormat="4"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLibrarianTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="Release|Win32"
|
||||||
|
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||||
|
IntermediateDirectory="$(ConfigurationName)\webserver"
|
||||||
|
ConfigurationType="4"
|
||||||
|
CharacterSet="1"
|
||||||
|
WholeProgramOptimization="1"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="2"
|
||||||
|
EnableIntrinsicFunctions="true"
|
||||||
|
PreprocessorDefinitions="WIN32;NDEBUG;_LIB"
|
||||||
|
RuntimeLibrary="2"
|
||||||
|
EnableFunctionLevelLinking="true"
|
||||||
|
UsePrecompiledHeader="2"
|
||||||
|
PrecompiledHeaderThrough="Globals.h"
|
||||||
|
WarningLevel="3"
|
||||||
|
DebugInformationFormat="3"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLibrarianTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
</Configurations>
|
||||||
|
<References>
|
||||||
|
</References>
|
||||||
|
<Files>
|
||||||
|
<Filter
|
||||||
|
Name="Source Files"
|
||||||
|
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||||
|
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||||
|
>
|
||||||
|
<File
|
||||||
|
RelativePath="..\WebServer\base64.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\WebServer\base64.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\WebServer\cEvents.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\WebServer\cEvents.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\WebServer\Globals.cpp"
|
||||||
|
>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Debug|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
UsePrecompiledHeader="1"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Release|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
UsePrecompiledHeader="1"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\WebServer\Globals.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\WebServer\Socket.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\WebServer\Socket.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\WebServer\StdHelpers.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\WebServer\StdHelpers.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\WebServer\Tracer.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\WebServer\UrlHelper.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\WebServer\UrlHelper.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\WebServer\WebServer.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\WebServer\WebServer.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
</Files>
|
||||||
|
<Globals>
|
||||||
|
</Globals>
|
||||||
|
</VisualStudioProject>
|
@ -109,6 +109,8 @@
|
|||||||
<WarningLevel>Level3</WarningLevel>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||||
|
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||||
|
<PrecompiledHeaderFile>Globals.h</PrecompiledHeaderFile>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<AdditionalOptions>/IGNORE:4078 %(AdditionalOptions)</AdditionalOptions>
|
<AdditionalOptions>/IGNORE:4078 %(AdditionalOptions)</AdditionalOptions>
|
||||||
@ -138,6 +140,8 @@
|
|||||||
<WarningLevel>Level3</WarningLevel>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||||
|
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||||
|
<PrecompiledHeaderFile>Globals.h</PrecompiledHeaderFile>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<AdditionalOptions>/IGNORE:4078 %(AdditionalOptions)</AdditionalOptions>
|
<AdditionalOptions>/IGNORE:4078 %(AdditionalOptions)</AdditionalOptions>
|
||||||
@ -230,8 +234,7 @@
|
|||||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||||
<EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>
|
<EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>
|
||||||
<FloatingPointModel>Fast</FloatingPointModel>
|
<FloatingPointModel>Fast</FloatingPointModel>
|
||||||
<PrecompiledHeader>
|
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||||
</PrecompiledHeader>
|
|
||||||
<BrowseInformation>
|
<BrowseInformation>
|
||||||
</BrowseInformation>
|
</BrowseInformation>
|
||||||
<WarningLevel>Level4</WarningLevel>
|
<WarningLevel>Level4</WarningLevel>
|
||||||
@ -239,6 +242,7 @@
|
|||||||
</DebugInformationFormat>
|
</DebugInformationFormat>
|
||||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||||
|
<PrecompiledHeaderFile>Globals.h</PrecompiledHeaderFile>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<AdditionalOptions>/IGNORE:4078 %(AdditionalOptions)</AdditionalOptions>
|
<AdditionalOptions>/IGNORE:4078 %(AdditionalOptions)</AdditionalOptions>
|
||||||
@ -339,6 +343,7 @@
|
|||||||
<FavorSizeOrSpeed Condition="'$(Configuration)|$(Platform)'=='Debug with optimized Noise|Win32'">Speed</FavorSizeOrSpeed>
|
<FavorSizeOrSpeed Condition="'$(Configuration)|$(Platform)'=='Debug with optimized Noise|Win32'">Speed</FavorSizeOrSpeed>
|
||||||
<OmitFramePointers Condition="'$(Configuration)|$(Platform)'=='Debug with optimized Noise|Win32'">true</OmitFramePointers>
|
<OmitFramePointers Condition="'$(Configuration)|$(Platform)'=='Debug with optimized Noise|Win32'">true</OmitFramePointers>
|
||||||
<BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug with optimized Noise|Win32'">Default</BasicRuntimeChecks>
|
<BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug with optimized Noise|Win32'">Default</BasicRuntimeChecks>
|
||||||
|
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug with optimized Noise|Win32'">NotUsing</PrecompiledHeader>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="..\source\cPassiveAggressiveMonster.cpp" />
|
<ClCompile Include="..\source\cPassiveAggressiveMonster.cpp" />
|
||||||
<ClCompile Include="..\source\cPassiveMonster.cpp" />
|
<ClCompile Include="..\source\cPassiveMonster.cpp" />
|
||||||
@ -381,6 +386,11 @@
|
|||||||
<ClCompile Include="..\source\cWorldGenerator_Test.cpp" />
|
<ClCompile Include="..\source\cWorldGenerator_Test.cpp" />
|
||||||
<ClCompile Include="..\source\cZombie.cpp" />
|
<ClCompile Include="..\source\cZombie.cpp" />
|
||||||
<ClCompile Include="..\source\cZombiepigman.cpp" />
|
<ClCompile Include="..\source\cZombiepigman.cpp" />
|
||||||
|
<ClCompile Include="..\source\Globals.cpp">
|
||||||
|
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug with optimized Noise|Win32'">Create</PrecompiledHeader>
|
||||||
|
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
|
||||||
|
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
|
||||||
|
</ClCompile>
|
||||||
<ClCompile Include="..\Source\ManualBindings.cpp" />
|
<ClCompile Include="..\Source\ManualBindings.cpp" />
|
||||||
<ClCompile Include="..\source\Matrix4f.cpp" />
|
<ClCompile Include="..\source\Matrix4f.cpp" />
|
||||||
<ClCompile Include="..\source\md5\md5.cpp" />
|
<ClCompile Include="..\source\md5\md5.cpp" />
|
||||||
@ -540,6 +550,7 @@
|
|||||||
<ClInclude Include="..\source\cZombiepigman.h" />
|
<ClInclude Include="..\source\cZombiepigman.h" />
|
||||||
<ClInclude Include="..\source\Endianness.h" />
|
<ClInclude Include="..\source\Endianness.h" />
|
||||||
<ClInclude Include="..\Source\FileDefine.h" />
|
<ClInclude Include="..\Source\FileDefine.h" />
|
||||||
|
<ClInclude Include="..\source\Globals.h" />
|
||||||
<ClInclude Include="..\Source\LuaFunctions.h" />
|
<ClInclude Include="..\Source\LuaFunctions.h" />
|
||||||
<ClInclude Include="..\Source\ManualBindings.h" />
|
<ClInclude Include="..\Source\ManualBindings.h" />
|
||||||
<ClInclude Include="..\source\Matrix4f.h" />
|
<ClInclude Include="..\source\Matrix4f.h" />
|
||||||
|
@ -907,6 +907,7 @@
|
|||||||
<ClCompile Include="..\source\cWebPlugin_Lua.cpp">
|
<ClCompile Include="..\source\cWebPlugin_Lua.cpp">
|
||||||
<Filter>cWebAdmin\cWebPlugin\cWebPlugin</Filter>
|
<Filter>cWebAdmin\cWebPlugin\cWebPlugin</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\source\Globals.cpp" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="..\source\cServer.h">
|
<ClInclude Include="..\source\cServer.h">
|
||||||
@ -1395,6 +1396,7 @@
|
|||||||
<ClInclude Include="..\source\cWebPlugin_Lua.h">
|
<ClInclude Include="..\source\cWebPlugin_Lua.h">
|
||||||
<Filter>cWebAdmin\cWebPlugin\cWebPlugin</Filter>
|
<Filter>cWebAdmin\cWebPlugin\cWebPlugin</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\source\Globals.h" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="..\source\AllToLua.pkg">
|
<None Include="..\source\AllToLua.pkg">
|
||||||
|
@ -76,6 +76,8 @@
|
|||||||
<WarningLevel>Level3</WarningLevel>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||||
|
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||||
|
<PrecompiledHeaderFile>Globals.h</PrecompiledHeaderFile>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
@ -103,6 +105,8 @@
|
|||||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||||
|
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||||
|
<PrecompiledHeaderFile>Globals.h</PrecompiledHeaderFile>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
@ -128,7 +132,11 @@
|
|||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="..\WebServer\base64.cpp" />
|
<ClCompile Include="..\WebServer\base64.cpp" />
|
||||||
<ClCompile Include="..\WebServer\cEvent.cpp" />
|
<ClCompile Include="..\WebServer\cEvents.cpp" />
|
||||||
|
<ClCompile Include="..\WebServer\Globals.cpp">
|
||||||
|
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
|
||||||
|
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
|
||||||
|
</ClCompile>
|
||||||
<ClCompile Include="..\WebServer\Socket.cpp" />
|
<ClCompile Include="..\WebServer\Socket.cpp" />
|
||||||
<ClCompile Include="..\WebServer\StdHelpers.cpp" />
|
<ClCompile Include="..\WebServer\StdHelpers.cpp" />
|
||||||
<ClCompile Include="..\WebServer\UrlHelper.cpp" />
|
<ClCompile Include="..\WebServer\UrlHelper.cpp" />
|
||||||
@ -136,7 +144,8 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="..\WebServer\base64.h" />
|
<ClInclude Include="..\WebServer\base64.h" />
|
||||||
<ClInclude Include="..\WebServer\cEvent.h" />
|
<ClInclude Include="..\WebServer\cEvents.h" />
|
||||||
|
<ClInclude Include="..\WebServer\Globals.h" />
|
||||||
<ClInclude Include="..\WebServer\Socket.h" />
|
<ClInclude Include="..\WebServer\Socket.h" />
|
||||||
<ClInclude Include="..\WebServer\StdHelpers.h" />
|
<ClInclude Include="..\WebServer\StdHelpers.h" />
|
||||||
<ClInclude Include="..\WebServer\Tracer.h" />
|
<ClInclude Include="..\WebServer\Tracer.h" />
|
||||||
|
@ -6,9 +6,8 @@
|
|||||||
<ClCompile Include="..\WebServer\StdHelpers.cpp" />
|
<ClCompile Include="..\WebServer\StdHelpers.cpp" />
|
||||||
<ClCompile Include="..\WebServer\UrlHelper.cpp" />
|
<ClCompile Include="..\WebServer\UrlHelper.cpp" />
|
||||||
<ClCompile Include="..\WebServer\WebServer.cpp" />
|
<ClCompile Include="..\WebServer\WebServer.cpp" />
|
||||||
<ClCompile Include="..\WebServer\cEvent.cpp">
|
<ClCompile Include="..\WebServer\cEvents.cpp" />
|
||||||
<Filter>Threading</Filter>
|
<ClCompile Include="..\WebServer\Globals.cpp" />
|
||||||
</ClCompile>
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="..\WebServer\base64.h" />
|
<ClInclude Include="..\WebServer\base64.h" />
|
||||||
@ -17,13 +16,7 @@
|
|||||||
<ClInclude Include="..\WebServer\UrlHelper.h" />
|
<ClInclude Include="..\WebServer\UrlHelper.h" />
|
||||||
<ClInclude Include="..\WebServer\WebServer.h" />
|
<ClInclude Include="..\WebServer\WebServer.h" />
|
||||||
<ClInclude Include="..\WebServer\StdHelpers.h" />
|
<ClInclude Include="..\WebServer\StdHelpers.h" />
|
||||||
<ClInclude Include="..\WebServer\cEvent.h">
|
<ClInclude Include="..\WebServer\Globals.h" />
|
||||||
<Filter>Threading</Filter>
|
<ClInclude Include="..\WebServer\cEvents.h" />
|
||||||
</ClInclude>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Filter Include="Threading">
|
|
||||||
<UniqueIdentifier>{5108ca96-8262-4e37-b891-cff8f714210e}</UniqueIdentifier>
|
|
||||||
</Filter>
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
10
WebServer/Globals.cpp
Normal file
10
WebServer/Globals.cpp
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
|
||||||
|
// Globals.cpp
|
||||||
|
|
||||||
|
// This file is used for precompiled header generation in MSVC environments
|
||||||
|
|
||||||
|
#include "Globals.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
78
WebServer/Globals.h
Normal file
78
WebServer/Globals.h
Normal file
@ -0,0 +1,78 @@
|
|||||||
|
|
||||||
|
// Globals.h
|
||||||
|
|
||||||
|
// This file gets included from every module in the project, so that global symbols may be introduced easily
|
||||||
|
// Also used for precompiled header generation in MSVC environments
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// OS-dependent stuff:
|
||||||
|
#ifdef _WIN32
|
||||||
|
#define WIN32_LEAN_AND_MEAN
|
||||||
|
#include <Windows.h>
|
||||||
|
#include <winsock.h>
|
||||||
|
#else
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/stat.h> // for mkdir
|
||||||
|
#include <sys/time.h>
|
||||||
|
#include <time.h>
|
||||||
|
#include <dirent.h>
|
||||||
|
#include <errno.h>
|
||||||
|
#include <iostream>
|
||||||
|
|
||||||
|
#include <cstdio>
|
||||||
|
#include <cstring>
|
||||||
|
#include <pthread.h>
|
||||||
|
#include <semaphore.h>
|
||||||
|
#include <errno.h>
|
||||||
|
#include <fcntl.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// CRT stuff:
|
||||||
|
#include <assert.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// STL stuff:
|
||||||
|
#include <vector>
|
||||||
|
#include <list>
|
||||||
|
#include <string>
|
||||||
|
#include <map>
|
||||||
|
#include <algorithm>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Common headers:
|
||||||
|
#include "../source/cCriticalSection.h"
|
||||||
|
#include "../source/cMCLogger.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Common definitions:
|
||||||
|
|
||||||
|
/// Evaluates to the number of elements in an array (compile-time!)
|
||||||
|
#define ARRAYCOUNT(X) (sizeof(X) / sizeof(*(X)))
|
||||||
|
|
||||||
|
// sprintf_s is the preferred call in MSVC ("secure"); make it *nix-compatible:
|
||||||
|
#ifndef _WIN32
|
||||||
|
#define sprintf_s(dst, size, format, ...) sprintf(dst, format, __VA_ARGS__ )
|
||||||
|
#define vsnprintf_s(buffer, buffer_size, maxcount, stringbuffer, ...) (vsnprintf(buffer, maxcount, stringbuffer, __VA_ARGS__))
|
||||||
|
#endif // _WIN32
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -29,7 +29,7 @@
|
|||||||
THIS IS NOT THE ORIGINAL SOURCE1!!1!!!~!!~`1ONE!!`1
|
THIS IS NOT THE ORIGINAL SOURCE1!!1!!!~!!~`1ONE!!`1
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../source/cMCLogger.h"
|
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||||
|
|
||||||
#include "Socket.h"
|
#include "Socket.h"
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
@ -38,11 +38,11 @@
|
|||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#else
|
#else
|
||||||
#define MSG_NOSIGNAL (0)
|
#define MSG_NOSIGNAL (0)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __MAC_NA
|
#ifdef __MAC_NA
|
||||||
#define MSG_NOSIGNAL (0)
|
#define MSG_NOSIGNAL (0)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
@ -29,8 +29,9 @@
|
|||||||
THIS IS NOT THE ORIGINAL SOURCE1!!1!!!~!!~`1ONE!!`1
|
THIS IS NOT THE ORIGINAL SOURCE1!!1!!!~!!~`1ONE!!`1
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||||
|
|
||||||
#include "StdHelpers.h"
|
#include "StdHelpers.h"
|
||||||
#include <algorithm>
|
|
||||||
#include <cctype>
|
#include <cctype>
|
||||||
|
|
||||||
std::string ReplaceInStr(const std::string& in, const std::string& search_for, const std::string& replace_with) {
|
std::string ReplaceInStr(const std::string& in, const std::string& search_for, const std::string& replace_with) {
|
||||||
|
@ -29,14 +29,12 @@
|
|||||||
THIS IS NOT THE ORIGINAL SOURCE1!!1!!!~!!~`1ONE!!`1
|
THIS IS NOT THE ORIGINAL SOURCE1!!1!!!~!!~`1ONE!!`1
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||||
|
|
||||||
#include "UrlHelper.h"
|
#include "UrlHelper.h"
|
||||||
#include "Tracer.h"
|
#include "Tracer.h"
|
||||||
#include "StdHelpers.h"
|
#include "StdHelpers.h"
|
||||||
|
|
||||||
#ifdef _WIN32
|
|
||||||
#include <windows.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
|
@ -31,24 +31,22 @@
|
|||||||
THIS IS NOT THE ORIGINAL SOURCE1!!1!!!~!!~`1ONE!!`1
|
THIS IS NOT THE ORIGINAL SOURCE1!!1!!!~!!~`1ONE!!`1
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||||
|
|
||||||
#include <ctime>
|
#include <ctime>
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#include <process.h>
|
#include <process.h>
|
||||||
#endif
|
#endif
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <string>
|
|
||||||
#include <map>
|
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
|
|
||||||
#include "WebServer.h"
|
#include "WebServer.h"
|
||||||
|
#include "cEvents.h"
|
||||||
#include "Socket.h"
|
#include "Socket.h"
|
||||||
#include "UrlHelper.h"
|
#include "UrlHelper.h"
|
||||||
#include "base64.h"
|
#include "base64.h"
|
||||||
|
|
||||||
#include "cEvent.h"
|
|
||||||
|
|
||||||
|
|
||||||
webserver::request_func webserver::request_func_=0;
|
webserver::request_func webserver::request_func_=0;
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
@ -178,7 +176,7 @@ void webserver::Stop()
|
|||||||
{
|
{
|
||||||
m_bStop = true;
|
m_bStop = true;
|
||||||
m_Socket->Close();
|
m_Socket->Close();
|
||||||
m_Event->Wait();
|
m_Events->Wait();
|
||||||
}
|
}
|
||||||
|
|
||||||
void webserver::Begin()
|
void webserver::Begin()
|
||||||
@ -209,18 +207,18 @@ void webserver::Begin()
|
|||||||
pthread_create( hHandle, NULL, Request, ptr_s);
|
pthread_create( hHandle, NULL, Request, ptr_s);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
m_Event->Set();
|
m_Events->Set();
|
||||||
}
|
}
|
||||||
|
|
||||||
webserver::webserver(unsigned int port_to_listen, request_func r) {
|
webserver::webserver(unsigned int port_to_listen, request_func r) {
|
||||||
m_Socket = new SocketServer(port_to_listen,1);
|
m_Socket = new SocketServer(port_to_listen,1);
|
||||||
|
|
||||||
request_func_ = r;
|
request_func_ = r;
|
||||||
m_Event = new cEvent();
|
m_Events = new cEvents();
|
||||||
}
|
}
|
||||||
|
|
||||||
webserver::~webserver()
|
webserver::~webserver()
|
||||||
{
|
{
|
||||||
delete m_Socket;
|
delete m_Socket;
|
||||||
delete m_Event;
|
delete m_Events;
|
||||||
}
|
}
|
||||||
|
@ -30,66 +30,64 @@
|
|||||||
THIS IS NOT THE ORIGINAL SOURCE1!!1!!!~!!~`1ONE!!`1
|
THIS IS NOT THE ORIGINAL SOURCE1!!1!!!~!!~`1ONE!!`1
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <string>
|
|
||||||
#include <map>
|
|
||||||
|
|
||||||
class cEvent;
|
class cEvents;
|
||||||
class Socket;
|
class Socket;
|
||||||
class SocketServer;
|
class SocketServer;
|
||||||
class webserver {
|
class webserver {
|
||||||
public:
|
public:
|
||||||
struct http_request {
|
struct http_request {
|
||||||
|
|
||||||
http_request()
|
http_request()
|
||||||
: s_( 0 )
|
: s_( 0 )
|
||||||
, authentication_given_(false)
|
, authentication_given_(false)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
Socket* s_;
|
Socket* s_;
|
||||||
std::string method_;
|
std::string method_;
|
||||||
std::string path_;
|
std::string path_;
|
||||||
std::map<std::string, std::string> params_;
|
std::map<std::string, std::string> params_;
|
||||||
|
|
||||||
std::string accept_;
|
std::string accept_;
|
||||||
std::string accept_language_;
|
std::string accept_language_;
|
||||||
std::string accept_encoding_;
|
std::string accept_encoding_;
|
||||||
std::string user_agent_;
|
std::string user_agent_;
|
||||||
|
|
||||||
/* status_: used to transmit server's error status, such as
|
/* status_: used to transmit server's error status, such as
|
||||||
o 202 OK
|
o 202 OK
|
||||||
o 404 Not Found
|
o 404 Not Found
|
||||||
and so on */
|
and so on */
|
||||||
std::string status_;
|
std::string status_;
|
||||||
|
|
||||||
/* auth_realm_: allows to set the basic realm for an authentication,
|
/* auth_realm_: allows to set the basic realm for an authentication,
|
||||||
no need to additionally set status_ if set */
|
no need to additionally set status_ if set */
|
||||||
std::string auth_realm_;
|
std::string auth_realm_;
|
||||||
|
|
||||||
std::string answer_;
|
std::string answer_;
|
||||||
|
|
||||||
/* authentication_given_ is true when the user has entered a username and password.
|
/* authentication_given_ is true when the user has entered a username and password.
|
||||||
These can then be read from username_ and password_ */
|
These can then be read from username_ and password_ */
|
||||||
bool authentication_given_;
|
bool authentication_given_;
|
||||||
std::string username_;
|
std::string username_;
|
||||||
std::string password_;
|
std::string password_;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef void (*request_func) (http_request*);
|
typedef void (*request_func) (http_request*);
|
||||||
webserver(unsigned int port_to_listen, request_func);
|
webserver(unsigned int port_to_listen, request_func);
|
||||||
~webserver();
|
~webserver();
|
||||||
|
|
||||||
void Begin();
|
void Begin();
|
||||||
void Stop();
|
void Stop();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool m_bStop;
|
bool m_bStop;
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
static unsigned __stdcall Request(void*);
|
static unsigned __stdcall Request(void*);
|
||||||
#else
|
#else
|
||||||
static void* Request(void*);
|
static void* Request(void*);
|
||||||
#endif
|
#endif
|
||||||
static request_func request_func_;
|
static request_func request_func_;
|
||||||
|
|
||||||
cEvent* m_Event;
|
cEvents * m_Events;
|
||||||
SocketServer* m_Socket;
|
SocketServer* m_Socket;
|
||||||
};
|
};
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
|
||||||
|
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||||
|
|
||||||
#include "base64.h"
|
#include "base64.h"
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
|
@ -1,16 +1,13 @@
|
|||||||
#include "cEvent.h"
|
|
||||||
#include "../source/cMCLogger.h"
|
|
||||||
|
|
||||||
#ifdef _WIN32
|
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||||
#include <Windows.h>
|
|
||||||
#else
|
|
||||||
#include <semaphore.h>
|
|
||||||
#include <errno.h>
|
|
||||||
#include <fcntl.h>
|
|
||||||
#include <stdio.h> // sprintf()
|
|
||||||
#endif
|
|
||||||
|
|
||||||
cEvent::cEvent( unsigned int a_NumEvents /* = 1 */ )
|
#include "cEvents.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
cEvents::cEvents( unsigned int a_NumEvents /* = 1 */ )
|
||||||
: m_NumEvents( a_NumEvents )
|
: m_NumEvents( a_NumEvents )
|
||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
, m_bNamed( false )
|
, m_bNamed( false )
|
||||||
@ -34,24 +31,28 @@ cEvent::cEvent( unsigned int a_NumEvents /* = 1 */ )
|
|||||||
|
|
||||||
if( sem_init( HandlePtr, 0, 0 ) )
|
if( sem_init( HandlePtr, 0, 0 ) )
|
||||||
{
|
{
|
||||||
LOG("WARNING cEvent: Could not create unnamed semaphore, fallback to named.");
|
LOG("WARNING cEvents: Could not create unnamed semaphore, fallback to named.");
|
||||||
m_bNamed = true;
|
m_bNamed = true;
|
||||||
delete HandlePtr; // named semaphores return their own address
|
delete HandlePtr; // named semaphores return their own address
|
||||||
|
|
||||||
char c_Str[32];
|
char c_Str[32];
|
||||||
sprintf( c_Str, "cEvent%p", &HandlePtr );
|
sprintf( c_Str, "cEvents%p", &HandlePtr );
|
||||||
HandlePtr = sem_open( c_Str, O_CREAT, 777, 0 );
|
HandlePtr = sem_open( c_Str, O_CREAT, 777, 0 );
|
||||||
if( HandlePtr == SEM_FAILED )
|
if( HandlePtr == SEM_FAILED )
|
||||||
LOG("ERROR: Could not create Event. (%i)", errno);
|
LOG("ERROR: Could not create Event. (%i)", errno);
|
||||||
else
|
else
|
||||||
if( sem_unlink( c_Str ) != 0 )
|
if( sem_unlink( c_Str ) != 0 )
|
||||||
LOG("ERROR: Could not unlink cEvent. (%i)", errno);
|
LOG("ERROR: Could not unlink cEvents. (%i)", errno);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
cEvent::~cEvent()
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
cEvents::~cEvents()
|
||||||
{
|
{
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
for( unsigned int i = 0; i < m_NumEvents; i++ )
|
for( unsigned int i = 0; i < m_NumEvents; i++ )
|
||||||
@ -66,12 +67,12 @@ cEvent::~cEvent()
|
|||||||
{
|
{
|
||||||
sem_t* & HandlePtr = ((sem_t**)m_Handle)[i];
|
sem_t* & HandlePtr = ((sem_t**)m_Handle)[i];
|
||||||
char c_Str[32];
|
char c_Str[32];
|
||||||
sprintf( c_Str, "cEvent%p", &HandlePtr );
|
sprintf( c_Str, "cEvents%p", &HandlePtr );
|
||||||
// LOG("Closing event: %s", c_Str );
|
// LOG("Closing event: %s", c_Str );
|
||||||
// LOG("Sem ptr: %p", HandlePtr );
|
// LOG("Sem ptr: %p", HandlePtr );
|
||||||
if( sem_close( HandlePtr ) != 0 )
|
if( sem_close( HandlePtr ) != 0 )
|
||||||
{
|
{
|
||||||
LOG("ERROR: Could not close cEvent. (%i)", errno);
|
LOG("ERROR: Could not close cEvents. (%i)", errno);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -84,7 +85,11 @@ cEvent::~cEvent()
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void cEvent::Wait()
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void cEvents::Wait()
|
||||||
{
|
{
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
WaitForMultipleObjects( m_NumEvents, (HANDLE*)m_Handle, true, INFINITE );
|
WaitForMultipleObjects( m_NumEvents, (HANDLE*)m_Handle, true, INFINITE );
|
||||||
@ -93,20 +98,28 @@ void cEvent::Wait()
|
|||||||
{
|
{
|
||||||
if( sem_wait( ((sem_t**)m_Handle)[i] ) != 0 )
|
if( sem_wait( ((sem_t**)m_Handle)[i] ) != 0 )
|
||||||
{
|
{
|
||||||
LOG("ERROR: Could not wait for cEvent. (%i)", errno);
|
LOG("ERROR: Could not wait for cEvents. (%i)", errno);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void cEvent::Set(unsigned int a_EventNum /* = 0 */)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void cEvents::Set(unsigned int a_EventNum /* = 0 */)
|
||||||
{
|
{
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
SetEvent( ((HANDLE*)m_Handle)[a_EventNum] );
|
SetEvent( ((HANDLE*)m_Handle)[a_EventNum] );
|
||||||
#else
|
#else
|
||||||
if( sem_post( ((sem_t**)m_Handle)[a_EventNum] ) != 0 )
|
if( sem_post( ((sem_t**)m_Handle)[a_EventNum] ) != 0 )
|
||||||
{
|
{
|
||||||
LOG("ERROR: Could not set cEvent. (%i)", errno);
|
LOG("ERROR: Could not set cEvents. (%i)", errno);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,18 +1,18 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
class cEvent
|
class cEvents
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
cEvent( unsigned int a_NumEvents = 1 );
|
cEvents( unsigned int a_NumEvents = 1 );
|
||||||
~cEvent();
|
~cEvents();
|
||||||
|
|
||||||
void Wait();
|
void Wait();
|
||||||
void Set(unsigned int a_EventNum = 0);
|
void Set(unsigned int a_EventNum = 0);
|
||||||
private:
|
private:
|
||||||
unsigned int m_NumEvents;
|
unsigned int m_NumEvents;
|
||||||
void* m_Handle; // HANDLE[] pointer
|
void* m_Handle; // HANDLE[] pointer
|
||||||
|
|
||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
bool m_bNamed;
|
bool m_bNamed;
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
@ -15,6 +15,8 @@
|
|||||||
!! MODIFIED BY FAKETRUTH !!
|
!! MODIFIED BY FAKETRUTH !!
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||||
|
|
||||||
// C++ Includes
|
// C++ Includes
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
@ -23,7 +25,6 @@
|
|||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
// C Includes
|
// C Includes
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
|
||||||
|
$#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||||
|
|
||||||
$#include "tolua_base.h"
|
$#include "tolua_base.h"
|
||||||
|
|
||||||
$cfile "cTorch.h"
|
$cfile "cTorch.h"
|
||||||
|
@ -3,6 +3,8 @@
|
|||||||
** Generated automatically by tolua++-1.0.92 on 01/27/12 00:53:11.
|
** Generated automatically by tolua++-1.0.92 on 01/27/12 00:53:11.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||||
|
|
||||||
#ifndef __cplusplus
|
#ifndef __cplusplus
|
||||||
#include "stdlib.h"
|
#include "stdlib.h"
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "MemoryLeak.h"
|
|
||||||
#include "BlockID.h"
|
#include "BlockID.h"
|
||||||
|
|
||||||
//tolua_begin
|
//tolua_begin
|
||||||
|
@ -1,11 +1,10 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <string>
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#include <WinSock.h>
|
#include <WinSock.h>
|
||||||
#else
|
#else
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Changes endianness
|
// Changes endianness
|
||||||
|
10
source/Globals.cpp
Normal file
10
source/Globals.cpp
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
|
||||||
|
// Globals.cpp
|
||||||
|
|
||||||
|
// This file is used for precompiled header generation in MSVC environments
|
||||||
|
|
||||||
|
#include "Globals.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
82
source/Globals.h
Normal file
82
source/Globals.h
Normal file
@ -0,0 +1,82 @@
|
|||||||
|
|
||||||
|
// Globals.h
|
||||||
|
|
||||||
|
// This file gets included from every module in the project, so that global symbols may be introduced easily
|
||||||
|
// Also used for precompiled header generation in MSVC environments
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// OS-dependent stuff:
|
||||||
|
#ifdef _WIN32
|
||||||
|
#define WIN32_LEAN_AND_MEAN
|
||||||
|
#include <Windows.h>
|
||||||
|
#include <winsock.h>
|
||||||
|
#else
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/stat.h> // for mkdir
|
||||||
|
#include <sys/time.h>
|
||||||
|
#include <time.h>
|
||||||
|
#include <dirent.h>
|
||||||
|
#include <errno.h>
|
||||||
|
#include <iostream>
|
||||||
|
|
||||||
|
#include <cstdio>
|
||||||
|
#include <cstring>
|
||||||
|
#include <pthread.h>
|
||||||
|
#include <semaphore.h>
|
||||||
|
#include <errno.h>
|
||||||
|
#include <fcntl.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// CRT stuff:
|
||||||
|
#include <assert.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// STL stuff:
|
||||||
|
#include <vector>
|
||||||
|
#include <list>
|
||||||
|
#include <string>
|
||||||
|
#include <map>
|
||||||
|
#include <algorithm>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Common headers:
|
||||||
|
#include "cSleep.h"
|
||||||
|
#include "cCriticalSection.h"
|
||||||
|
#include "cSemaphore.h"
|
||||||
|
#include "cEvent.h"
|
||||||
|
#include "cThread.h"
|
||||||
|
#include "cMCLogger.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Common definitions:
|
||||||
|
|
||||||
|
/// Evaluates to the number of elements in an array (compile-time!)
|
||||||
|
#define ARRAYCOUNT(X) (sizeof(X) / sizeof(*(X)))
|
||||||
|
|
||||||
|
// sprintf_s is the preferred call in MSVC ("secure"); make it *nix-compatible:
|
||||||
|
#ifndef _WIN32
|
||||||
|
#define sprintf_s(dst, size, format, ...) sprintf(dst, format, __VA_ARGS__ )
|
||||||
|
#define vsnprintf_s(buffer, buffer_size, maxcount, stringbuffer, ...) (vsnprintf(buffer, maxcount, stringbuffer, __VA_ARGS__))
|
||||||
|
#endif // _WIN32
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,37 +1,30 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifndef _WIN32
|
||||||
#define WIN32_LEAN_AND_MEAN
|
// Linux threads http://www.yolinux.com/TUTORIALS/LinuxTutorialPosixThreads.html
|
||||||
#include <Windows.h>
|
#include <netdb.h>
|
||||||
#include <WinSock.h>
|
#include <sys/socket.h>
|
||||||
// #define socklen_t int
|
#include <netinet/in.h>
|
||||||
// #ifdef SendMessage
|
#include <arpa/inet.h>
|
||||||
// #undef SendMessage
|
#include <unistd.h>
|
||||||
// #endif
|
|
||||||
#else
|
|
||||||
|
|
||||||
// Linux threads http://www.yolinux.com/TUTORIALS/LinuxTutorialPosixThreads.html
|
|
||||||
|
|
||||||
#include <netdb.h>
|
|
||||||
#include <sys/socket.h>
|
|
||||||
#include <netinet/in.h>
|
|
||||||
#include <arpa/inet.h>
|
|
||||||
#include <pthread.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
#define SOCKET int
|
|
||||||
typedef void *HANDLE;
|
|
||||||
#define CRITICAL_SECTION pthread_mutex_t
|
|
||||||
#define SD_BOTH (2)
|
|
||||||
#define closesocket(x) (shutdown(x, SD_BOTH), close(x))
|
|
||||||
#define SOCKET_ERROR SO_ERROR
|
|
||||||
#define EnterCriticalSection(x) pthread_mutex_lock(x)
|
|
||||||
#define LeaveCriticalSection(x) pthread_mutex_unlock(x)
|
|
||||||
#define InitializeCriticalSection(x) pthread_mutex_init(x, NULL)
|
|
||||||
#define DeleteCriticalSection(x) (x)
|
|
||||||
#define sprintf_s(x, y, ...) sprintf(x, __VA_ARGS__)
|
|
||||||
|
|
||||||
|
// TODO: We shouldn't need these! Use the OS support objects instead
|
||||||
|
#define SOCKET int
|
||||||
|
typedef void *HANDLE;
|
||||||
|
#define CRITICAL_SECTION pthread_mutex_t
|
||||||
|
#define SD_BOTH (2)
|
||||||
|
#define closesocket(x) (shutdown(x, SD_BOTH), close(x))
|
||||||
|
#define SOCKET_ERROR SO_ERROR
|
||||||
|
#define EnterCriticalSection(x) pthread_mutex_lock(x)
|
||||||
|
#define LeaveCriticalSection(x) pthread_mutex_unlock(x)
|
||||||
|
#define InitializeCriticalSection(x) pthread_mutex_init(x, NULL)
|
||||||
|
#define DeleteCriticalSection(x) (x)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
inline bool IsSocketError( int a_ReturnedValue )
|
inline bool IsSocketError( int a_ReturnedValue )
|
||||||
{
|
{
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
|
|
||||||
|
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||||
|
|
||||||
#include "ManualBindings.h"
|
#include "ManualBindings.h"
|
||||||
#include "tolua++.h"
|
#include "tolua++.h"
|
||||||
#include "cMCLogger.h"
|
|
||||||
|
|
||||||
#include "cRoot.h"
|
#include "cRoot.h"
|
||||||
#include "cWorld.h"
|
#include "cWorld.h"
|
||||||
|
@ -0,0 +1,4 @@
|
|||||||
|
|
||||||
|
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||||
|
|
||||||
|
// _X: empty file??
|
@ -1,10 +1,11 @@
|
|||||||
|
|
||||||
|
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||||
|
|
||||||
#include "SquirrelBindings.h"
|
#include "SquirrelBindings.h"
|
||||||
#if USE_SQUIRREL
|
#if USE_SQUIRREL
|
||||||
#pragma warning(disable:4100) // Getting A LOT of these warnings from SqPlus
|
#pragma warning(disable:4100) // Getting A LOT of these warnings from SqPlus
|
||||||
#pragma warning(disable:4127)
|
#pragma warning(disable:4127)
|
||||||
|
|
||||||
#include "cMCLogger.h"
|
|
||||||
|
|
||||||
#include <sqplus/sqplus.h>
|
#include <sqplus/sqplus.h>
|
||||||
#include <sqplus/SquirrelObject.h>
|
#include <sqplus/SquirrelObject.h>
|
||||||
#include <../squirrel/sqstate.h>
|
#include <../squirrel/sqstate.h>
|
||||||
@ -16,6 +17,10 @@
|
|||||||
#include "cRoot.h"
|
#include "cRoot.h"
|
||||||
#include "cPlayer.h"
|
#include "cPlayer.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
bool SquirrelBindings::IsBound = false;
|
bool SquirrelBindings::IsBound = false;
|
||||||
|
|
||||||
bool IsTopClosure( HSQUIRRELVM v )
|
bool IsTopClosure( HSQUIRRELVM v )
|
||||||
|
@ -1,6 +1,13 @@
|
|||||||
|
|
||||||
|
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||||
|
|
||||||
#include "Vector3d.h"
|
#include "Vector3d.h"
|
||||||
#include "Vector3f.h"
|
#include "Vector3f.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Vector3d::Vector3d(const Vector3f & v )
|
Vector3d::Vector3d(const Vector3f & v )
|
||||||
: x( v.x )
|
: x( v.x )
|
||||||
, y( v.y )
|
, y( v.y )
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
|
||||||
|
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||||
|
|
||||||
#include "Vector3f.h"
|
#include "Vector3f.h"
|
||||||
#include "Vector3d.h"
|
#include "Vector3d.h"
|
||||||
#include "Vector3i.h"
|
#include "Vector3i.h"
|
||||||
|
@ -1,6 +1,13 @@
|
|||||||
|
|
||||||
|
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||||
|
|
||||||
#include "Vector3i.h"
|
#include "Vector3i.h"
|
||||||
#include "Vector3d.h"
|
#include "Vector3d.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Vector3i::Vector3i( const Vector3d & v )
|
Vector3i::Vector3i( const Vector3d & v )
|
||||||
: x( (int)v.x )
|
: x( (int)v.x )
|
||||||
, y( (int)v.y )
|
, y( (int)v.y )
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
|
||||||
|
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||||
|
|
||||||
#include "cAggressiveMonster.h"
|
#include "cAggressiveMonster.h"
|
||||||
|
|
||||||
#include "Vector3f.h"
|
#include "Vector3f.h"
|
||||||
|
@ -1,13 +1,14 @@
|
|||||||
|
|
||||||
|
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||||
|
|
||||||
#include "cAuthenticator.h"
|
#include "cAuthenticator.h"
|
||||||
#include "cBlockingTCPLink.h"
|
#include "cBlockingTCPLink.h"
|
||||||
#include "cMCLogger.h"
|
|
||||||
|
|
||||||
#include "../iniFile/iniFile.h"
|
#include "../iniFile/iniFile.h"
|
||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <string>
|
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
extern void ReplaceString( std::string & a_HayStack, const std::string & a_Needle, const std::string & a_ReplaceWith );
|
extern void ReplaceString( std::string & a_HayStack, const std::string & a_Needle, const std::string & a_ReplaceWith );
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
|
||||||
|
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||||
|
|
||||||
#include "cBlockToPickup.h"
|
#include "cBlockToPickup.h"
|
||||||
#include "Defines.h"
|
#include "Defines.h"
|
||||||
#include "BlockID.h"
|
#include "BlockID.h"
|
||||||
|
@ -1,17 +1,17 @@
|
|||||||
|
|
||||||
|
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||||
|
|
||||||
#include "cBlockingTCPLink.h"
|
#include "cBlockingTCPLink.h"
|
||||||
#include "packets/cPacket.h"
|
#include "packets/cPacket.h"
|
||||||
#include "MCSocket.h"
|
#include "MCSocket.h"
|
||||||
#include <string>
|
|
||||||
|
|
||||||
#include "cMCLogger.h"
|
|
||||||
|
|
||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#define MSG_NOSIGNAL (0)
|
#define MSG_NOSIGNAL (0)
|
||||||
#endif
|
#endif
|
||||||
#ifdef __MACH__
|
#ifdef __MACH__
|
||||||
#define MSG_NOSIGNAL (0)
|
#define MSG_NOSIGNAL (0)
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "cSocket.h"
|
#include "cSocket.h"
|
||||||
#include <string>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class cEvent;
|
class cEvent;
|
||||||
class cBlockingTCPLink //tolua_export
|
class cBlockingTCPLink //tolua_export
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
|
||||||
|
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||||
|
|
||||||
#include "cCavespider.h"
|
#include "cCavespider.h"
|
||||||
|
|
||||||
cCavespider::cCavespider()
|
cCavespider::cCavespider()
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
|
||||||
|
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||||
|
|
||||||
#include "cChatColor.h"
|
#include "cChatColor.h"
|
||||||
|
|
||||||
const std::string cChatColor::Color = "\xa7"; // Old color was "\xc2\xa7" or in other words: "§"
|
const std::string cChatColor::Color = "\xa7"; // Old color was "\xc2\xa7" or in other words: "§"
|
||||||
|
@ -1,20 +1,27 @@
|
|||||||
|
|
||||||
|
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||||
|
|
||||||
#include "cChestEntity.h"
|
#include "cChestEntity.h"
|
||||||
#include "cItem.h"
|
#include "cItem.h"
|
||||||
#include <string>
|
|
||||||
#include "cClientHandle.h"
|
#include "cClientHandle.h"
|
||||||
#include "cMCLogger.h"
|
|
||||||
#include "cPlayer.h"
|
#include "cPlayer.h"
|
||||||
#include "cWindow.h"
|
#include "cWindow.h"
|
||||||
#include "cWorld.h"
|
#include "cWorld.h"
|
||||||
#include "cRoot.h"
|
#include "cRoot.h"
|
||||||
#include "cPickup.h"
|
#include "cPickup.h"
|
||||||
#include "cMCLogger.h"
|
|
||||||
#include "cChunk.h"
|
#include "cChunk.h"
|
||||||
|
#include <json/json.h>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class cWorld;
|
class cWorld;
|
||||||
class cRoot;
|
class cRoot;
|
||||||
|
|
||||||
#include <json/json.h>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
cChestEntity::cChestEntity(int a_X, int a_Y, int a_Z, cChunk* a_Chunk)
|
cChestEntity::cChestEntity(int a_X, int a_Y, int a_Z, cChunk* a_Chunk)
|
||||||
: cBlockEntity( E_BLOCK_CHEST, a_X, a_Y, a_Z, a_Chunk )
|
: cBlockEntity( E_BLOCK_CHEST, a_X, a_Y, a_Z, a_Chunk )
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
|
||||||
|
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||||
|
|
||||||
#include "cChicken.h"
|
#include "cChicken.h"
|
||||||
|
|
||||||
//TODO Drop egg every 5-10 minutes
|
//TODO Drop egg every 5-10 minutes
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
|
|
||||||
|
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||||
|
|
||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <stdio.h>
|
|
||||||
#include <sys/stat.h> // for mkdir
|
#include <sys/stat.h> // for mkdir
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#endif
|
#endif
|
||||||
@ -16,11 +17,9 @@
|
|||||||
#include "cServer.h"
|
#include "cServer.h"
|
||||||
#include "zlib.h"
|
#include "zlib.h"
|
||||||
#include "Defines.h"
|
#include "Defines.h"
|
||||||
#include <string> // memset
|
|
||||||
#include "cChestEntity.h"
|
#include "cChestEntity.h"
|
||||||
#include "cFurnaceEntity.h"
|
#include "cFurnaceEntity.h"
|
||||||
#include "cSignEntity.h"
|
#include "cSignEntity.h"
|
||||||
#include "cMCLogger.h"
|
|
||||||
#include "cTorch.h"
|
#include "cTorch.h"
|
||||||
#include "cLadder.h"
|
#include "cLadder.h"
|
||||||
#include "cPickup.h"
|
#include "cPickup.h"
|
||||||
@ -28,7 +27,6 @@
|
|||||||
#include "cItem.h"
|
#include "cItem.h"
|
||||||
#include "cNoise.h"
|
#include "cNoise.h"
|
||||||
#include "cRoot.h"
|
#include "cRoot.h"
|
||||||
#include "cCriticalSection.h"
|
|
||||||
#include "cWorldGenerator.h"
|
#include "cWorldGenerator.h"
|
||||||
#include "cBlockToPickup.h"
|
#include "cBlockToPickup.h"
|
||||||
#include "MersenneTwister.h"
|
#include "MersenneTwister.h"
|
||||||
@ -41,13 +39,9 @@
|
|||||||
|
|
||||||
#include <json/json.h>
|
#include <json/json.h>
|
||||||
|
|
||||||
#include <list>
|
|
||||||
#include <vector>
|
|
||||||
#include <map>
|
|
||||||
|
|
||||||
#ifndef _WIN32
|
|
||||||
#define sprintf_s(dst, size, format, ...) sprintf(dst, format, __VA_ARGS__ )
|
|
||||||
#endif
|
|
||||||
|
|
||||||
extern bool g_bWaterPhysics;
|
extern bool g_bWaterPhysics;
|
||||||
|
|
||||||
@ -57,6 +51,7 @@ typedef std::list< cFurnaceEntity* > FurnaceEntityList;
|
|||||||
typedef std::list< cClientHandle* > ClientHandleList;
|
typedef std::list< cClientHandle* > ClientHandleList;
|
||||||
typedef std::list< cBlockEntity* > BlockEntityList;
|
typedef std::list< cBlockEntity* > BlockEntityList;
|
||||||
typedef std::list< cEntity* > EntityList;
|
typedef std::list< cEntity* > EntityList;
|
||||||
|
|
||||||
struct cChunk::sChunkState
|
struct cChunk::sChunkState
|
||||||
{
|
{
|
||||||
sChunkState()
|
sChunkState()
|
||||||
|
@ -1,17 +1,13 @@
|
|||||||
#include "MemoryLeak.h"
|
|
||||||
|
#include "Globals.h"
|
||||||
|
|
||||||
#include "cChunkGenerator.h"
|
#include "cChunkGenerator.h"
|
||||||
#include "cChunkMap.h"
|
#include "cChunkMap.h"
|
||||||
#include "cChunk.h"
|
#include "cChunk.h"
|
||||||
#include "cWorld.h"
|
#include "cWorld.h"
|
||||||
|
|
||||||
#include "cThread.h"
|
|
||||||
#include "cCriticalSection.h"
|
|
||||||
#include "cSemaphore.h"
|
|
||||||
|
|
||||||
#include "cMCLogger.h"
|
#include "cMCLogger.h"
|
||||||
|
|
||||||
#include <list>
|
|
||||||
|
|
||||||
typedef std::pair<int, int> ChunkCoord;
|
typedef std::pair<int, int> ChunkCoord;
|
||||||
typedef std::list< ChunkCoord > ChunkCoordList;
|
typedef std::list< ChunkCoord > ChunkCoordList;
|
||||||
|
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
|
||||||
|
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||||
|
|
||||||
#if 0 // ignore all contents of this file
|
#if 0 // ignore all contents of this file
|
||||||
#include "cChunkLoader.h"
|
#include "cChunkLoader.h"
|
||||||
#include "cChunk.h"
|
#include "cChunk.h"
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
|
||||||
|
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||||
|
|
||||||
#include "cChunkMap.h"
|
#include "cChunkMap.h"
|
||||||
#include "cChunk.h"
|
#include "cChunk.h"
|
||||||
#include "cMCLogger.h"
|
#include "cMCLogger.h"
|
||||||
@ -7,12 +10,8 @@
|
|||||||
#include <math.h> // floorf
|
#include <math.h> // floorf
|
||||||
|
|
||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
#include <cstring> // memcpy
|
#include <cstring> // memcpy
|
||||||
#include <cstdlib> // abs
|
#include <cstdlib> // abs
|
||||||
#include <stdio.h> // sprintf and stuff
|
|
||||||
|
|
||||||
|
|
||||||
#define sprintf_s( dest, size, format, ... ) sprintf( dest, format, __VA_ARGS__ )
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "zlib.h"
|
#include "zlib.h"
|
||||||
@ -22,6 +21,10 @@
|
|||||||
|
|
||||||
#define LAYER_SIZE (32)
|
#define LAYER_SIZE (32)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
cChunkMap::cChunkMap( int a_Width, int a_Height, cWorld* a_World )
|
cChunkMap::cChunkMap( int a_Width, int a_Height, cWorld* a_World )
|
||||||
: m_Nodes( new cChunkNode[ a_Width * a_Height ] )
|
: m_Nodes( new cChunkNode[ a_Width * a_Height ] )
|
||||||
, m_Width( a_Width )
|
, m_Width( a_Width )
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
|
||||||
|
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||||
|
|
||||||
#include "cClientHandle.h"
|
#include "cClientHandle.h"
|
||||||
#include "cServer.h"
|
#include "cServer.h"
|
||||||
#include "cWorld.h"
|
#include "cWorld.h"
|
||||||
@ -8,7 +11,6 @@
|
|||||||
#include "cInventory.h"
|
#include "cInventory.h"
|
||||||
#include "cChestEntity.h"
|
#include "cChestEntity.h"
|
||||||
#include "cSignEntity.h"
|
#include "cSignEntity.h"
|
||||||
#include "cMCLogger.h"
|
|
||||||
#include "cWindow.h"
|
#include "cWindow.h"
|
||||||
#include "cCraftingWindow.h"
|
#include "cCraftingWindow.h"
|
||||||
#include "cItem.h"
|
#include "cItem.h"
|
||||||
@ -30,9 +32,6 @@
|
|||||||
#include "Vector3f.h"
|
#include "Vector3f.h"
|
||||||
#include "Vector3d.h"
|
#include "Vector3d.h"
|
||||||
|
|
||||||
#include "cCriticalSection.h"
|
|
||||||
#include "cSemaphore.h"
|
|
||||||
#include "cEvent.h"
|
|
||||||
#include "cSleep.h"
|
#include "cSleep.h"
|
||||||
#include "cRoot.h"
|
#include "cRoot.h"
|
||||||
|
|
||||||
@ -70,10 +69,6 @@
|
|||||||
#include "packets/cPacket_PlayerListItem.h"
|
#include "packets/cPacket_PlayerListItem.h"
|
||||||
|
|
||||||
|
|
||||||
#ifndef _WIN32
|
|
||||||
#define sprintf_s(dst, size, format, ...) sprintf(dst, format, __VA_ARGS__ )
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define AddPistonDir( x, y, z, dir, amount ) switch(dir) { case 0: (y)-=(amount); break; case 1: (y)+=(amount); break;\
|
#define AddPistonDir( x, y, z, dir, amount ) switch(dir) { case 0: (y)-=(amount); break; case 1: (y)+=(amount); break;\
|
||||||
case 2: (z)-=(amount); break; case 3: (z)+=(amount); break;\
|
case 2: (z)-=(amount); break; case 3: (z)+=(amount); break;\
|
||||||
case 4: (x)-=(amount); break; case 5: (x)+=(amount); break; }
|
case 4: (x)-=(amount); break; case 5: (x)+=(amount); break; }
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
|
||||||
|
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||||
|
|
||||||
#include "cCow.h"
|
#include "cCow.h"
|
||||||
|
|
||||||
//TODO: Milk Cow
|
//TODO: Milk Cow
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
|
|
||||||
|
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||||
|
|
||||||
#include "cCraftingWindow.h"
|
#include "cCraftingWindow.h"
|
||||||
#include "cItem.h"
|
#include "cItem.h"
|
||||||
#include "cMCLogger.h"
|
|
||||||
#include "cRecipeChecker.h"
|
#include "cRecipeChecker.h"
|
||||||
#include "cPlayer.h"
|
#include "cPlayer.h"
|
||||||
#include "cClientHandle.h"
|
#include "cClientHandle.h"
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
|
|
||||||
|
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||||
|
|
||||||
#include "cCreativeInventory.h"
|
#include "cCreativeInventory.h"
|
||||||
#include <string> //memset
|
|
||||||
#include "cPlayer.h"
|
#include "cPlayer.h"
|
||||||
#include "cClientHandle.h"
|
#include "cClientHandle.h"
|
||||||
#include "cMCLogger.h"
|
|
||||||
#include "cWindow.h"
|
#include "cWindow.h"
|
||||||
#include "cItem.h"
|
#include "cItem.h"
|
||||||
#include "cRecipeChecker.h"
|
#include "cRecipeChecker.h"
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
|
||||||
|
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||||
|
|
||||||
#include "cCreeper.h"
|
#include "cCreeper.h"
|
||||||
|
|
||||||
cCreeper::cCreeper()
|
cCreeper::cCreeper()
|
||||||
|
@ -1,12 +1,5 @@
|
|||||||
#include "cCriticalSection.h"
|
|
||||||
#include "cMCLogger.h"
|
|
||||||
#include <assert.h>
|
|
||||||
|
|
||||||
#ifdef _WIN32
|
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||||
#include <Windows.h>
|
|
||||||
#else
|
|
||||||
#include <pthread.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,10 +1,19 @@
|
|||||||
|
|
||||||
|
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||||
|
|
||||||
#include "cCuboid.h"
|
#include "cCuboid.h"
|
||||||
|
|
||||||
#include <algorithm> // swap
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void cCuboid::Sort()
|
void cCuboid::Sort()
|
||||||
{
|
{
|
||||||
if( p1.x > p2.x ) std::swap( p1.x, p2.x );
|
if( p1.x > p2.x ) std::swap( p1.x, p2.x );
|
||||||
if( p1.y > p2.y ) std::swap( p1.y, p2.y );
|
if( p1.y > p2.y ) std::swap( p1.y, p2.y );
|
||||||
if( p1.z > p2.z ) std::swap( p1.z, p2.z );
|
if( p1.z > p2.z ) std::swap( p1.z, p2.z );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
|
||||||
|
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||||
|
|
||||||
#include "cEnderman.h"
|
#include "cEnderman.h"
|
||||||
|
|
||||||
cEnderman::cEnderman()
|
cEnderman::cEnderman()
|
||||||
|
@ -1,7 +1,9 @@
|
|||||||
|
|
||||||
|
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||||
|
|
||||||
#include "cEntity.h"
|
#include "cEntity.h"
|
||||||
#include "cWorld.h"
|
#include "cWorld.h"
|
||||||
#include "cChunk.h"
|
#include "cChunk.h"
|
||||||
#include "cMCLogger.h"
|
|
||||||
#include "cServer.h"
|
#include "cServer.h"
|
||||||
#include "cRoot.h"
|
#include "cRoot.h"
|
||||||
#include "Vector3d.h"
|
#include "Vector3d.h"
|
||||||
|
@ -1,14 +1,9 @@
|
|||||||
#include "cEvent.h"
|
|
||||||
#include "cMCLogger.h"
|
|
||||||
|
|
||||||
#ifdef _WIN32
|
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||||
#include <Windows.h>
|
|
||||||
#else
|
|
||||||
#include <semaphore.h>
|
|
||||||
#include <errno.h>
|
|
||||||
#include <fcntl.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
cEvent::cEvent( unsigned int a_NumEvents /* = 1 */ )
|
cEvent::cEvent( unsigned int a_NumEvents /* = 1 */ )
|
||||||
: m_NumEvents( a_NumEvents )
|
: m_NumEvents( a_NumEvents )
|
||||||
|
@ -1,24 +1,10 @@
|
|||||||
|
|
||||||
|
#include "Globals.h"
|
||||||
|
|
||||||
#include "cFileFormatUpdater.h"
|
#include "cFileFormatUpdater.h"
|
||||||
#include "cMCLogger.h"
|
#include "cMCLogger.h"
|
||||||
#include "Vector3d.h"
|
#include "Vector3d.h"
|
||||||
#include "Vector3f.h"
|
#include "Vector3f.h"
|
||||||
#include <string>
|
|
||||||
#include <list>
|
|
||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
#ifdef _WIN32
|
|
||||||
#define WIN32_LEAN_AND_MEAN
|
|
||||||
#include <Windows.h>
|
|
||||||
#else
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <dirent.h>
|
|
||||||
#include <errno.h>
|
|
||||||
#include <vector>
|
|
||||||
#include <string>
|
|
||||||
#include <iostream>
|
|
||||||
|
|
||||||
#include <cstdio>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "cItem.h"
|
#include "cItem.h"
|
||||||
#include <json/json.h>
|
#include <json/json.h>
|
||||||
|
@ -1,9 +1,11 @@
|
|||||||
|
|
||||||
|
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||||
|
|
||||||
#include "cFireSimulator.h"
|
#include "cFireSimulator.h"
|
||||||
#include "cWorld.h"
|
#include "cWorld.h"
|
||||||
#include "Vector3i.h"
|
#include "Vector3i.h"
|
||||||
#include "BlockID.h"
|
#include "BlockID.h"
|
||||||
#include "Defines.h"
|
#include "Defines.h"
|
||||||
#include <vector>
|
|
||||||
|
|
||||||
cFireSimulator::cFireSimulator( cWorld* a_World )
|
cFireSimulator::cFireSimulator( cWorld* a_World )
|
||||||
: cSimulator(a_World)
|
: cSimulator(a_World)
|
||||||
|
@ -1,9 +1,11 @@
|
|||||||
|
|
||||||
|
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||||
|
|
||||||
#include "cFluidSimulator.h"
|
#include "cFluidSimulator.h"
|
||||||
#include "cWorld.h"
|
#include "cWorld.h"
|
||||||
#include "Vector3i.h"
|
#include "Vector3i.h"
|
||||||
#include "BlockID.h"
|
#include "BlockID.h"
|
||||||
#include "Defines.h"
|
#include "Defines.h"
|
||||||
#include <vector>
|
|
||||||
#include "cPickup.h"
|
#include "cPickup.h"
|
||||||
#include "cItem.h"
|
#include "cItem.h"
|
||||||
|
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
|
||||||
|
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||||
|
|
||||||
#include "cFurnaceEntity.h"
|
#include "cFurnaceEntity.h"
|
||||||
#include "BlockID.h"
|
#include "BlockID.h"
|
||||||
#include "cItem.h"
|
#include "cItem.h"
|
||||||
@ -13,8 +16,6 @@
|
|||||||
|
|
||||||
#include "packets/cPacket_InventoryProgressBar.h"
|
#include "packets/cPacket_InventoryProgressBar.h"
|
||||||
|
|
||||||
#include "cMCLogger.h"
|
|
||||||
|
|
||||||
#include <json/json.h>
|
#include <json/json.h>
|
||||||
|
|
||||||
cFurnaceEntity::cFurnaceEntity(int a_X, int a_Y, int a_Z, cChunk* a_Chunk)
|
cFurnaceEntity::cFurnaceEntity(int a_X, int a_Y, int a_Z, cChunk* a_Chunk)
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
|
|
||||||
|
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||||
|
|
||||||
#include "cFurnaceRecipe.h"
|
#include "cFurnaceRecipe.h"
|
||||||
#include "cItem.h"
|
#include "cItem.h"
|
||||||
#include "cMCLogger.h"
|
|
||||||
|
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
|
||||||
|
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||||
|
|
||||||
#include "cFurnaceWindow.h"
|
#include "cFurnaceWindow.h"
|
||||||
#include "cItem.h"
|
#include "cItem.h"
|
||||||
#include "cFurnaceEntity.h"
|
#include "cFurnaceEntity.h"
|
||||||
@ -5,7 +8,9 @@
|
|||||||
|
|
||||||
#include "packets/cPacket_WindowClick.h"
|
#include "packets/cPacket_WindowClick.h"
|
||||||
|
|
||||||
#include "cMCLogger.h"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
cFurnaceWindow::cFurnaceWindow( cFurnaceEntity* a_Owner )
|
cFurnaceWindow::cFurnaceWindow( cFurnaceEntity* a_Owner )
|
||||||
: cWindow( a_Owner, true )
|
: cWindow( a_Owner, true )
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
|
||||||
|
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||||
|
|
||||||
#include "cGenSettings.h"
|
#include "cGenSettings.h"
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
|
||||||
|
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||||
|
|
||||||
#include "cGhast.h"
|
#include "cGhast.h"
|
||||||
|
|
||||||
cGhast::cGhast()
|
cGhast::cGhast()
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
|
||||||
|
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||||
|
|
||||||
#include "cGroup.h"
|
#include "cGroup.h"
|
||||||
|
|
||||||
void cGroup::AddCommand( std::string a_Command )
|
void cGroup::AddCommand( std::string a_Command )
|
||||||
|
@ -1,8 +1,10 @@
|
|||||||
|
|
||||||
|
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||||
|
|
||||||
#include "cGroupManager.h"
|
#include "cGroupManager.h"
|
||||||
#include "cGroup.h"
|
#include "cGroup.h"
|
||||||
#include "../iniFile/iniFile.h"
|
#include "../iniFile/iniFile.h"
|
||||||
#include "cChatColor.h"
|
#include "cChatColor.h"
|
||||||
#include "cMCLogger.h"
|
|
||||||
#include "cRoot.h"
|
#include "cRoot.h"
|
||||||
|
|
||||||
extern std::vector< std::string > StringSplit( std::string str, std::string delim);
|
extern std::vector< std::string > StringSplit( std::string str, std::string delim);
|
||||||
|
@ -1,16 +1,17 @@
|
|||||||
|
|
||||||
|
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||||
|
|
||||||
#include "cHeartBeat.h"
|
#include "cHeartBeat.h"
|
||||||
#include "cMCLogger.h"
|
#include "cMCLogger.h"
|
||||||
#include "md5/md5.h"
|
#include "md5/md5.h"
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
#include "cRoot.h"
|
#include "cRoot.h"
|
||||||
#include "cServer.h"
|
#include "cServer.h"
|
||||||
#include "cSleep.h"
|
#include "cSleep.h"
|
||||||
|
|
||||||
#ifndef _WIN32
|
|
||||||
#define sprintf_s(dst, size, format, ...) sprintf(dst, format, __VA_ARGS__ )
|
|
||||||
#endif
|
|
||||||
|
|
||||||
cHeartBeat::cHeartBeat()
|
cHeartBeat::cHeartBeat()
|
||||||
{
|
{
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
|
|
||||||
|
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||||
|
|
||||||
#include "cInventory.h"
|
#include "cInventory.h"
|
||||||
#include <string> //memset
|
|
||||||
#include "cPlayer.h"
|
#include "cPlayer.h"
|
||||||
#include "cClientHandle.h"
|
#include "cClientHandle.h"
|
||||||
#include "cMCLogger.h"
|
|
||||||
#include "cWindow.h"
|
#include "cWindow.h"
|
||||||
#include "cItem.h"
|
#include "cItem.h"
|
||||||
#include "cRecipeChecker.h"
|
#include "cRecipeChecker.h"
|
||||||
@ -14,6 +15,10 @@
|
|||||||
#include "packets/cPacket_WholeInventory.h"
|
#include "packets/cPacket_WholeInventory.h"
|
||||||
#include "packets/cPacket_InventorySlot.h"
|
#include "packets/cPacket_InventorySlot.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
cInventory::~cInventory()
|
cInventory::~cInventory()
|
||||||
{
|
{
|
||||||
delete [] m_Slots;
|
delete [] m_Slots;
|
||||||
|
@ -1,6 +1,13 @@
|
|||||||
|
|
||||||
|
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||||
|
|
||||||
#include "cItem.h"
|
#include "cItem.h"
|
||||||
#include <json/json.h>
|
#include <json/json.h>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void cItem::GetJson( Json::Value & a_OutValue )
|
void cItem::GetJson( Json::Value & a_OutValue )
|
||||||
{
|
{
|
||||||
a_OutValue["ID"] = m_ItemID;
|
a_OutValue["ID"] = m_ItemID;
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
|
||||||
|
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||||
|
|
||||||
#include "cLavaSimulator.h"
|
#include "cLavaSimulator.h"
|
||||||
#include "Defines.h"
|
#include "Defines.h"
|
||||||
|
|
||||||
|
@ -1,19 +1,15 @@
|
|||||||
|
|
||||||
|
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||||
|
|
||||||
#include "cLog.h"
|
#include "cLog.h"
|
||||||
|
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <ctime>
|
#include <ctime>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
|
||||||
#ifdef _WIN32
|
|
||||||
#include <Windows.h>
|
|
||||||
#else
|
|
||||||
#include <sys/stat.h> // for mkdir
|
|
||||||
#include <sys/types.h>
|
|
||||||
|
|
||||||
#define sprintf_s(buffer, buffer_size, stringbuffer, ...) (sprintf(buffer, stringbuffer, __VA_ARGS__))
|
|
||||||
#define vsnprintf_s(buffer, buffer_size, maxcount, stringbuffer, ...) (vsnprintf(buffer, maxcount, stringbuffer, __VA_ARGS__))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <string>
|
|
||||||
|
|
||||||
cLog* cLog::s_Log = NULL;
|
cLog* cLog::s_Log = NULL;
|
||||||
|
|
||||||
|
@ -1,10 +1,16 @@
|
|||||||
|
|
||||||
|
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||||
|
|
||||||
#include "cLuaCommandBinder.h"
|
#include "cLuaCommandBinder.h"
|
||||||
#include "cMCLogger.h"
|
|
||||||
#include "cPlayer.h"
|
#include "cPlayer.h"
|
||||||
#include "cPlugin_Lua.h"
|
#include "cPlugin_Lua.h"
|
||||||
|
|
||||||
#include "tolua++.h"
|
#include "tolua++.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
extern std::vector<std::string> StringSplit(std::string str, std::string delim);
|
extern std::vector<std::string> StringSplit(std::string str, std::string delim);
|
||||||
extern bool report_errors(lua_State* lua, int status);
|
extern bool report_errors(lua_State* lua, int status);
|
||||||
|
|
||||||
|
@ -1,16 +1,13 @@
|
|||||||
#include "cMCLogger.h"
|
|
||||||
#include "cLog.h"
|
|
||||||
#include "cCriticalSection.h"
|
|
||||||
|
|
||||||
#include <stdio.h>
|
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||||
|
|
||||||
#include <cstdarg>
|
#include <cstdarg>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
#include "cLog.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef _WIN32
|
|
||||||
#define sprintf_s(buffer, buffer_size, stringbuffer, ...) (sprintf(buffer, stringbuffer, __VA_ARGS__))
|
|
||||||
#else
|
|
||||||
#include <Windows.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
cMCLogger* cMCLogger::s_MCLogger = 0;
|
cMCLogger* cMCLogger::s_MCLogger = 0;
|
||||||
|
|
||||||
|
@ -4,7 +4,6 @@
|
|||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
class cCriticalSection;
|
|
||||||
class cLog;
|
class cLog;
|
||||||
class cMCLogger //tolua_export
|
class cMCLogger //tolua_export
|
||||||
{ //tolua_export
|
{ //tolua_export
|
||||||
|
@ -1,14 +1,11 @@
|
|||||||
|
|
||||||
|
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||||
|
|
||||||
#include "cMakeDir.h"
|
#include "cMakeDir.h"
|
||||||
|
|
||||||
#ifndef _WIN32
|
|
||||||
//#include <cstring> // If something is missing, uncomment some of these!
|
|
||||||
//#include <cstdlib>
|
|
||||||
//#include <stdio.h>
|
|
||||||
#include <sys/stat.h> // for mkdir
|
|
||||||
//#include <sys/types.h>
|
|
||||||
#else
|
|
||||||
#include <Windows.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void cMakeDir::MakeDir( const char* a_Directory )
|
void cMakeDir::MakeDir( const char* a_Directory )
|
||||||
{
|
{
|
||||||
@ -21,4 +18,8 @@ void cMakeDir::MakeDir( const char* a_Directory )
|
|||||||
#else
|
#else
|
||||||
mkdir(a_Directory, S_IRWXU | S_IRWXG | S_IRWXO);
|
mkdir(a_Directory, S_IRWXU | S_IRWXG | S_IRWXO);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,9 +1,11 @@
|
|||||||
|
|
||||||
|
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||||
|
|
||||||
#include "cMonster.h"
|
#include "cMonster.h"
|
||||||
#include "cRoot.h"
|
#include "cRoot.h"
|
||||||
#include "cServer.h"
|
#include "cServer.h"
|
||||||
#include "cClientHandle.h"
|
#include "cClientHandle.h"
|
||||||
#include "cWorld.h"
|
#include "cWorld.h"
|
||||||
#include "cMCLogger.h"
|
|
||||||
#include "cChunk.h"
|
#include "cChunk.h"
|
||||||
#include "cPlayer.h"
|
#include "cPlayer.h"
|
||||||
#include "BlockID.h"
|
#include "BlockID.h"
|
||||||
@ -28,12 +30,12 @@
|
|||||||
#include "../iniFile/iniFile.h"
|
#include "../iniFile/iniFile.h"
|
||||||
|
|
||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
#include <cstdlib> // rand
|
#include <cstdlib> // rand
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <string.h>
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <string>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
cMonster::cMonster()
|
cMonster::cMonster()
|
||||||
|
@ -1,11 +1,16 @@
|
|||||||
|
|
||||||
|
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||||
|
|
||||||
#include "cMonsterConfig.h"
|
#include "cMonsterConfig.h"
|
||||||
#include "cMonster.h"
|
#include "cMonster.h"
|
||||||
#include "../iniFile/iniFile.h"
|
#include "../iniFile/iniFile.h"
|
||||||
#include <list>
|
|
||||||
#include <vector>
|
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
//#include "../source/cprintf.h"
|
//#include "../source/cprintf.h"
|
||||||
#include <string>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
extern std::vector<std::string> StringSplit(std::string str, std::string delim);
|
extern std::vector<std::string> StringSplit(std::string str, std::string delim);
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
|
||||||
|
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||||
|
|
||||||
#include "cNoise.h"
|
#include "cNoise.h"
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
@ -7,6 +10,10 @@
|
|||||||
|
|
||||||
#define FAST_FLOOR( x ) ( (x) < 0 ? ((int)x)-1 : ((int)x) )
|
#define FAST_FLOOR( x ) ( (x) < 0 ? ((int)x)-1 : ((int)x) )
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
cNoise::cNoise( unsigned int a_Seed )
|
cNoise::cNoise( unsigned int a_Seed )
|
||||||
: m_Seed( a_Seed )
|
: m_Seed( a_Seed )
|
||||||
{
|
{
|
||||||
|
@ -1,8 +1,14 @@
|
|||||||
|
|
||||||
|
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||||
|
|
||||||
#include "cPassiveAggressiveMonster.h"
|
#include "cPassiveAggressiveMonster.h"
|
||||||
|
|
||||||
#include "cPlayer.h"
|
#include "cPlayer.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
cPassiveAggressiveMonster::cPassiveAggressiveMonster()
|
cPassiveAggressiveMonster::cPassiveAggressiveMonster()
|
||||||
{
|
{
|
||||||
m_EMPersonality = PASSIVE;
|
m_EMPersonality = PASSIVE;
|
||||||
|
@ -1,7 +1,13 @@
|
|||||||
|
|
||||||
|
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||||
|
|
||||||
#include "cPassiveMonster.h"
|
#include "cPassiveMonster.h"
|
||||||
#include "MersenneTwister.h"
|
#include "MersenneTwister.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
cPassiveMonster::cPassiveMonster()
|
cPassiveMonster::cPassiveMonster()
|
||||||
{
|
{
|
||||||
m_EMPersonality = PASSIVE;
|
m_EMPersonality = PASSIVE;
|
||||||
|
@ -1,10 +1,12 @@
|
|||||||
|
|
||||||
|
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||||
|
|
||||||
#include "cPawn.h"
|
#include "cPawn.h"
|
||||||
#include "cRoot.h"
|
#include "cRoot.h"
|
||||||
#include "cServer.h"
|
#include "cServer.h"
|
||||||
#include "cWorld.h"
|
#include "cWorld.h"
|
||||||
#include "cPlayer.h"
|
#include "cPlayer.h"
|
||||||
#include "cChunk.h"
|
#include "cChunk.h"
|
||||||
#include "cMCLogger.h"
|
|
||||||
#include "cPluginManager.h"
|
#include "cPluginManager.h"
|
||||||
#include "Vector3d.h"
|
#include "Vector3d.h"
|
||||||
#include "BlockID.h"
|
#include "BlockID.h"
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
|
||||||
|
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||||
|
|
||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#endif
|
#endif
|
||||||
@ -12,7 +15,6 @@
|
|||||||
#include "cPluginManager.h"
|
#include "cPluginManager.h"
|
||||||
#include "cItem.h"
|
#include "cItem.h"
|
||||||
#include "cRoot.h"
|
#include "cRoot.h"
|
||||||
#include "cMCLogger.h"
|
|
||||||
#include "cTracer.h"
|
#include "cTracer.h"
|
||||||
#include "cChunk.h"
|
#include "cChunk.h"
|
||||||
|
|
||||||
@ -23,6 +25,10 @@
|
|||||||
#include "Vector3d.h"
|
#include "Vector3d.h"
|
||||||
#include "Vector3f.h"
|
#include "Vector3f.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
CLASS_DEFINITION( cPickup, cEntity )
|
CLASS_DEFINITION( cPickup, cEntity )
|
||||||
|
|
||||||
cPickup::~cPickup()
|
cPickup::~cPickup()
|
||||||
|
@ -1,7 +1,12 @@
|
|||||||
|
|
||||||
|
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||||
|
|
||||||
#include "cPig.h"
|
#include "cPig.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
cPig::cPig()
|
cPig::cPig()
|
||||||
{
|
{
|
||||||
m_MobType = 90;
|
m_MobType = 90;
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
|
||||||
|
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||||
|
|
||||||
#include "cPiston.h"
|
#include "cPiston.h"
|
||||||
#include "cRedstone.h"
|
#include "cRedstone.h"
|
||||||
#include "cChunk.h"
|
#include "cChunk.h"
|
||||||
@ -19,6 +22,10 @@ extern bool g_BlockPistonBreakable[];
|
|||||||
|
|
||||||
#define FAST_FLOOR( x ) ( (x) < 0 ? ((int)x)-1 : ((int)x) )
|
#define FAST_FLOOR( x ) ( (x) < 0 ? ((int)x)-1 : ((int)x) )
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
cPiston::cPiston( cWorld* a_World )
|
cPiston::cPiston( cWorld* a_World )
|
||||||
:m_World ( a_World )
|
:m_World ( a_World )
|
||||||
{
|
{
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
|
||||||
|
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||||
|
|
||||||
#include "cPlayer.h"
|
#include "cPlayer.h"
|
||||||
#include "cServer.h"
|
#include "cServer.h"
|
||||||
#include "cCreativeInventory.h"
|
#include "cCreativeInventory.h"
|
||||||
@ -7,7 +10,6 @@
|
|||||||
#include "cPickup.h"
|
#include "cPickup.h"
|
||||||
#include "cPluginManager.h"
|
#include "cPluginManager.h"
|
||||||
#include "cChunk.h"
|
#include "cChunk.h"
|
||||||
#include "cMCLogger.h"
|
|
||||||
#include "cWindow.h"
|
#include "cWindow.h"
|
||||||
#include "cBlockEntity.h"
|
#include "cBlockEntity.h"
|
||||||
#include "cGroupManager.h"
|
#include "cGroupManager.h"
|
||||||
@ -494,9 +496,6 @@ void cPlayer::SetIP( std::string a_IP )
|
|||||||
m_IP = a_IP;
|
m_IP = a_IP;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef SendMessage // Cause stupid windows.h defines SendMessage as SendMessageA
|
|
||||||
#undef SendMessage
|
|
||||||
#endif
|
|
||||||
void cPlayer::SendMessage( const char* a_Message )
|
void cPlayer::SendMessage( const char* a_Message )
|
||||||
{
|
{
|
||||||
m_ClientHandle->Send( cPacket_Chat( a_Message ) );
|
m_ClientHandle->Send( cPacket_Chat( a_Message ) );
|
||||||
|
@ -3,8 +3,10 @@
|
|||||||
#include "cPawn.h"
|
#include "cPawn.h"
|
||||||
#include "cSurvivalInventory.h"
|
#include "cSurvivalInventory.h"
|
||||||
#include "cCreativeInventory.h"
|
#include "cCreativeInventory.h"
|
||||||
#include <list>
|
|
||||||
#include <string> // TODO - use const char*
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class cGroup;
|
class cGroup;
|
||||||
class cWindow;
|
class cWindow;
|
||||||
|
@ -1,7 +1,11 @@
|
|||||||
#include "cPlugin.h"
|
|
||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
#include "cMCLogger.h"
|
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||||
|
|
||||||
|
#include "cPlugin.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
cPlugin::cPlugin()
|
cPlugin::cPlugin()
|
||||||
: m_Version( 0 )
|
: m_Version( 0 )
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
|
||||||
|
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||||
|
|
||||||
#include "cPluginManager.h"
|
#include "cPluginManager.h"
|
||||||
#include "cPlugin.h"
|
#include "cPlugin.h"
|
||||||
#include "cPlugin_Lua.h"
|
#include "cPlugin_Lua.h"
|
||||||
@ -8,7 +11,6 @@
|
|||||||
#include "cRoot.h"
|
#include "cRoot.h"
|
||||||
#include "cLuaCommandBinder.h"
|
#include "cLuaCommandBinder.h"
|
||||||
#include "../iniFile/iniFile.h"
|
#include "../iniFile/iniFile.h"
|
||||||
#include <string> //strcmp
|
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
|
||||||
#include "SquirrelBindings.h"
|
#include "SquirrelBindings.h"
|
||||||
@ -18,6 +20,10 @@
|
|||||||
#pragma warning(default:4100;default:4127;default:4510;default:4610;default:4244;default:4512)
|
#pragma warning(default:4100;default:4127;default:4510;default:4610;default:4244;default:4512)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
extern std::vector<std::string> StringSplit(std::string str, std::string delim);
|
extern std::vector<std::string> StringSplit(std::string str, std::string delim);
|
||||||
|
|
||||||
typedef std::list< cPlugin_Lua* > LuaPluginList;
|
typedef std::list< cPlugin_Lua* > LuaPluginList;
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
|
|
||||||
|
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||||
|
|
||||||
#define LUA_USE_POSIX
|
#define LUA_USE_POSIX
|
||||||
#include "cMCLogger.h"
|
|
||||||
#include <string>
|
|
||||||
#include "cPlugin_Lua.h"
|
#include "cPlugin_Lua.h"
|
||||||
#include "cPluginManager.h"
|
#include "cPluginManager.h"
|
||||||
#include "cRoot.h"
|
#include "cRoot.h"
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
|
||||||
|
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||||
|
|
||||||
#define LUA_USE_POSIX
|
#define LUA_USE_POSIX
|
||||||
#include "cPlugin_NewLua.h"
|
#include "cPlugin_NewLua.h"
|
||||||
#include "cMCLogger.h"
|
#include "cMCLogger.h"
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
|
|
||||||
|
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||||
|
|
||||||
#include "cRecipeChecker.h"
|
#include "cRecipeChecker.h"
|
||||||
|
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <vector>
|
|
||||||
#include <string>
|
|
||||||
#include <list>
|
|
||||||
|
|
||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
@ -12,9 +12,12 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "Defines.h"
|
#include "Defines.h"
|
||||||
#include "cMCLogger.h"
|
|
||||||
#include "cRoot.h"
|
#include "cRoot.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
typedef std::list< cRecipeChecker::Recipe* > RecipeList;
|
typedef std::list< cRecipeChecker::Recipe* > RecipeList;
|
||||||
struct cRecipeChecker::sRecipeCheckerState
|
struct cRecipeChecker::sRecipeCheckerState
|
||||||
{
|
{
|
||||||
|
@ -1,11 +1,16 @@
|
|||||||
|
|
||||||
|
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||||
|
|
||||||
#include "cRedstone.h"
|
#include "cRedstone.h"
|
||||||
#include "cPiston.h"
|
#include "cPiston.h"
|
||||||
#include "cRoot.h"
|
#include "cRoot.h"
|
||||||
#include "cWorld.h"
|
#include "cWorld.h"
|
||||||
#include "BlockID.h"
|
#include "BlockID.h"
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <vector>
|
|
||||||
#include <string>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
cRedstone::cRedstone( cWorld* a_World )
|
cRedstone::cRedstone( cWorld* a_World )
|
||||||
:m_World ( a_World )
|
:m_World ( a_World )
|
||||||
|
@ -1,6 +1,13 @@
|
|||||||
|
|
||||||
|
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||||
|
|
||||||
#include "cReferenceManager.h"
|
#include "cReferenceManager.h"
|
||||||
#include "cEntity.h"
|
#include "cEntity.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
cReferenceManager::cReferenceManager( ENUM_REFERENCE_MANAGER_TYPE a_Type )
|
cReferenceManager::cReferenceManager( ENUM_REFERENCE_MANAGER_TYPE a_Type )
|
||||||
: m_Type( a_Type )
|
: m_Type( a_Type )
|
||||||
{
|
{
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
|
|
||||||
|
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||||
|
|
||||||
#include "cRoot.h"
|
#include "cRoot.h"
|
||||||
#include "cMCLogger.h"
|
|
||||||
#include "cServer.h"
|
#include "cServer.h"
|
||||||
#include "cWorld.h"
|
#include "cWorld.h"
|
||||||
#include "cWebAdmin.h"
|
#include "cWebAdmin.h"
|
||||||
|
@ -1,9 +1,15 @@
|
|||||||
|
|
||||||
|
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||||
|
|
||||||
#include "cSandSimulator.h"
|
#include "cSandSimulator.h"
|
||||||
#include "cWorld.h"
|
#include "cWorld.h"
|
||||||
#include "Vector3i.h"
|
#include "Vector3i.h"
|
||||||
#include "BlockID.h"
|
#include "BlockID.h"
|
||||||
#include "Defines.h"
|
#include "Defines.h"
|
||||||
#include <vector>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
cSandSimulator::cSandSimulator( cWorld* a_World )
|
cSandSimulator::cSandSimulator( cWorld* a_World )
|
||||||
: cSimulator(a_World)
|
: cSimulator(a_World)
|
||||||
|
@ -1,14 +1,9 @@
|
|||||||
#include "cSemaphore.h"
|
|
||||||
#include "cMCLogger.h"
|
|
||||||
|
|
||||||
#ifdef _WIN32
|
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||||
#include <Windows.h>
|
|
||||||
#else
|
|
||||||
#include <semaphore.h>
|
|
||||||
#include <errno.h>
|
|
||||||
#include <fcntl.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
cSemaphore::cSemaphore( unsigned int a_MaxCount, unsigned int a_InitialCount /* = 0 */ )
|
cSemaphore::cSemaphore( unsigned int a_MaxCount, unsigned int a_InitialCount /* = 0 */ )
|
||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
|
|
||||||
// ReDucTor is an awesome guy who helped me a lot
|
// ReDucTor is an awesome guy who helped me a lot
|
||||||
|
|
||||||
|
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||||
|
|
||||||
#include "cServer.h"
|
#include "cServer.h"
|
||||||
#include "cClientHandle.h"
|
#include "cClientHandle.h"
|
||||||
#include "cMCLogger.h"
|
|
||||||
#include "cThread.h"
|
|
||||||
#include "cEvent.h"
|
|
||||||
#include "cSleep.h"
|
#include "cSleep.h"
|
||||||
#include "cTimer.h"
|
#include "cTimer.h"
|
||||||
#include "cMonster.h"
|
#include "cMonster.h"
|
||||||
@ -30,22 +30,18 @@
|
|||||||
|
|
||||||
#include "packets/cPacket_Chat.h"
|
#include "packets/cPacket_Chat.h"
|
||||||
|
|
||||||
#ifndef _WIN32
|
|
||||||
#define sprintf_s(dst, size, format, ...) sprintf(dst, format, __VA_ARGS__ )
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <string>
|
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#include "zlib.h"
|
#include "zlib.h"
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef SendMessage
|
|
||||||
#undef SendMessage
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
bool g_bWaterPhysics = false;
|
bool g_bWaterPhysics = false;
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
|
||||||
|
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||||
|
|
||||||
#include "cSheep.h"
|
#include "cSheep.h"
|
||||||
|
|
||||||
//Todo: Implement color
|
//Todo: Implement color
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
|
|
||||||
|
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||||
|
|
||||||
#include "cSignEntity.h"
|
#include "cSignEntity.h"
|
||||||
#include "cMCLogger.h"
|
|
||||||
|
|
||||||
#include "cPlayer.h"
|
#include "cPlayer.h"
|
||||||
#include "cClientHandle.h"
|
#include "cClientHandle.h"
|
||||||
@ -11,6 +13,10 @@
|
|||||||
|
|
||||||
#include <json/json.h>
|
#include <json/json.h>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
cSignEntity::cSignEntity(ENUM_BLOCK_ID a_BlockType, int a_X, int a_Y, int a_Z, cChunk* a_Chunk)
|
cSignEntity::cSignEntity(ENUM_BLOCK_ID a_BlockType, int a_X, int a_Y, int a_Z, cChunk* a_Chunk)
|
||||||
: cBlockEntity(a_BlockType, a_X, a_Y, a_Z, a_Chunk)
|
: cBlockEntity(a_BlockType, a_X, a_Y, a_Z, a_Chunk)
|
||||||
{
|
{
|
||||||
|
@ -1,5 +1,12 @@
|
|||||||
|
|
||||||
|
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||||
|
|
||||||
#include "cSilverfish.h"
|
#include "cSilverfish.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
cSilverfish::cSilverfish()
|
cSilverfish::cSilverfish()
|
||||||
{
|
{
|
||||||
m_MobType = 60;
|
m_MobType = 60;
|
||||||
|
@ -1,9 +1,15 @@
|
|||||||
|
|
||||||
|
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||||
|
|
||||||
#include "cSimulator.h"
|
#include "cSimulator.h"
|
||||||
#include "cWorld.h"
|
#include "cWorld.h"
|
||||||
#include "Vector3i.h"
|
#include "Vector3i.h"
|
||||||
#include "BlockID.h"
|
#include "BlockID.h"
|
||||||
#include "Defines.h"
|
#include "Defines.h"
|
||||||
#include <vector>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
cSimulator::cSimulator( cWorld* a_World )
|
cSimulator::cSimulator( cWorld* a_World )
|
||||||
: m_World(a_World)
|
: m_World(a_World)
|
||||||
|
@ -1,5 +1,11 @@
|
|||||||
|
|
||||||
|
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||||
|
|
||||||
#include "cSimulatorManager.h"
|
#include "cSimulatorManager.h"
|
||||||
#include <vector>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
cSimulatorManager::cSimulatorManager()
|
cSimulatorManager::cSimulatorManager()
|
||||||
{
|
{
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user