Update
This commit is contained in:
+2
-2
@@ -26,7 +26,7 @@
|
|||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
|
||||||
// Macros
|
// Macros
|
||||||
#define DLL_FUNCTION(type) extern "C" type __stdcall
|
#define DLL_FUNCTION(type) extern "C" __declspec(dllexport) type __stdcall
|
||||||
|
|
||||||
// BlitzUtility Includes
|
// BlitzUtility Includes
|
||||||
#include "Container/List.h"
|
#include "Container/List.h"
|
||||||
@@ -34,7 +34,7 @@
|
|||||||
#include "Database/SQLite/SQLite.h"
|
#include "Database/SQLite/SQLite.h"
|
||||||
#include "Time/HighResolutionClock.h"
|
#include "Time/HighResolutionClock.h"
|
||||||
#include "Type/Double.h"
|
#include "Type/Double.h"
|
||||||
#include "Type/LongLong.h"
|
#include "Type/Long.h"
|
||||||
#include "Utility/DisplayEnumerator.h"
|
#include "Utility/DisplayEnumerator.h"
|
||||||
#include "Utility/IndexerV1.h"
|
#include "Utility/IndexerV1.h"
|
||||||
#include "Utility/IndexerV2.h"
|
#include "Utility/IndexerV2.h"
|
||||||
|
|||||||
+35
-33
@@ -42,12 +42,11 @@
|
|||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
<OutDir>$(SolutionDir)#Build\$(ProjectName)\$(Configuration)\</OutDir>
|
<OutDir>$(SolutionDir)#Build\$(ProjectName)\$(Configuration)\</OutDir>
|
||||||
<IntDir>$(SolutionDir)#Intermediate\$(ProjectName)\$(Configuration)\</IntDir>
|
<IntDir>$(SolutionDir)#Intermediate\$(ProjectName)\$(Configuration)\</IntDir>
|
||||||
<LinkIncremental>true</LinkIncremental>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
<OutDir>$(SolutionDir)#Build\$(ProjectName)\$(Configuration)\</OutDir>
|
<OutDir>$(SolutionDir)#Build\$(ProjectName)\$(Configuration)\</OutDir>
|
||||||
<IntDir>$(SolutionDir)#Intermediate\$(ProjectName)\$(Configuration)\</IntDir>
|
<IntDir>$(SolutionDir)#Intermediate\$(ProjectName)\$(Configuration)\</IntDir>
|
||||||
<LinkIncremental>false</LinkIncremental>
|
<LinkIncremental>true</LinkIncremental>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
@@ -78,22 +77,28 @@
|
|||||||
<FloatingPointExceptions>true</FloatingPointExceptions>
|
<FloatingPointExceptions>true</FloatingPointExceptions>
|
||||||
<UseUnicodeForAssemblerListing>true</UseUnicodeForAssemblerListing>
|
<UseUnicodeForAssemblerListing>true</UseUnicodeForAssemblerListing>
|
||||||
<PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<ControlFlowGuard>false</ControlFlowGuard>
|
||||||
|
<EnforceTypeConversionRules>true</EnforceTypeConversionRules>
|
||||||
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>Debug</GenerateDebugInformation>
|
||||||
<Version>1.0</Version>
|
|
||||||
<LinkStatus>
|
<LinkStatus>
|
||||||
</LinkStatus>
|
</LinkStatus>
|
||||||
<CreateHotPatchableImage>Enabled</CreateHotPatchableImage>
|
<CreateHotPatchableImage>Enabled</CreateHotPatchableImage>
|
||||||
<EnableCOMDATFolding>false</EnableCOMDATFolding>
|
<EnableCOMDATFolding>false</EnableCOMDATFolding>
|
||||||
<FixedBaseAddress>false</FixedBaseAddress>
|
<FixedBaseAddress>false</FixedBaseAddress>
|
||||||
|
<LargeAddressAware>false</LargeAddressAware>
|
||||||
|
<OptimizeReferences>false</OptimizeReferences>
|
||||||
|
<LinkTimeCodeGeneration>
|
||||||
|
</LinkTimeCodeGeneration>
|
||||||
|
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
|
||||||
|
<FullProgramDatabaseFile>true</FullProgramDatabaseFile>
|
||||||
</Link>
|
</Link>
|
||||||
<CustomBuildStep>
|
<CustomBuildStep>
|
||||||
<Message>Copying Resources</Message>
|
<Message>Copying Resources</Message>
|
||||||
</CustomBuildStep>
|
</CustomBuildStep>
|
||||||
<ProjectReference>
|
<ProjectReference />
|
||||||
<LinkLibraryDependencies>false</LinkLibraryDependencies>
|
|
||||||
</ProjectReference>
|
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
@@ -109,7 +114,7 @@
|
|||||||
</ForcedIncludeFiles>
|
</ForcedIncludeFiles>
|
||||||
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
|
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
|
||||||
<OpenMPSupport>false</OpenMPSupport>
|
<OpenMPSupport>false</OpenMPSupport>
|
||||||
<RuntimeTypeInfo>false</RuntimeTypeInfo>
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
<CreateHotpatchableImage>false</CreateHotpatchableImage>
|
<CreateHotpatchableImage>false</CreateHotpatchableImage>
|
||||||
<MinimalRebuild>false</MinimalRebuild>
|
<MinimalRebuild>false</MinimalRebuild>
|
||||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
@@ -125,24 +130,27 @@
|
|||||||
<UseUnicodeForAssemblerListing>true</UseUnicodeForAssemblerListing>
|
<UseUnicodeForAssemblerListing>true</UseUnicodeForAssemblerListing>
|
||||||
<PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<DebugInformationFormat>None</DebugInformationFormat>
|
<DebugInformationFormat>None</DebugInformationFormat>
|
||||||
|
<ControlFlowGuard>false</ControlFlowGuard>
|
||||||
|
<EnforceTypeConversionRules>true</EnforceTypeConversionRules>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
<GenerateDebugInformation>No</GenerateDebugInformation>
|
||||||
<EnableCOMDATFolding>false</EnableCOMDATFolding>
|
<EnableCOMDATFolding>false</EnableCOMDATFolding>
|
||||||
<OptimizeReferences>
|
<OptimizeReferences>false</OptimizeReferences>
|
||||||
</OptimizeReferences>
|
|
||||||
<Version>1.0</Version>
|
|
||||||
<LinkStatus>
|
<LinkStatus>
|
||||||
</LinkStatus>
|
</LinkStatus>
|
||||||
<CreateHotPatchableImage>Enabled</CreateHotPatchableImage>
|
<CreateHotPatchableImage>Enabled</CreateHotPatchableImage>
|
||||||
<FixedBaseAddress>false</FixedBaseAddress>
|
<FixedBaseAddress>false</FixedBaseAddress>
|
||||||
|
<LargeAddressAware>false</LargeAddressAware>
|
||||||
|
<LinkTimeCodeGeneration>
|
||||||
|
</LinkTimeCodeGeneration>
|
||||||
|
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
|
||||||
|
<FullProgramDatabaseFile>false</FullProgramDatabaseFile>
|
||||||
</Link>
|
</Link>
|
||||||
<CustomBuildStep>
|
<CustomBuildStep>
|
||||||
<Message>Copying Resources</Message>
|
<Message>Copying Resources</Message>
|
||||||
</CustomBuildStep>
|
</CustomBuildStep>
|
||||||
<ProjectReference>
|
<ProjectReference />
|
||||||
<LinkLibraryDependencies>false</LinkLibraryDependencies>
|
|
||||||
</ProjectReference>
|
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="Container\List.h" />
|
<ClInclude Include="Container\List.h" />
|
||||||
@@ -155,7 +163,7 @@
|
|||||||
<ClInclude Include="Time\Time.h" />
|
<ClInclude Include="Time\Time.h" />
|
||||||
<ClInclude Include="Utility\MassOp.h" />
|
<ClInclude Include="Utility\MassOp.h" />
|
||||||
<ClInclude Include="Type\Double.h" />
|
<ClInclude Include="Type\Double.h" />
|
||||||
<ClInclude Include="Type\LongLong.h" />
|
<ClInclude Include="Type\Long.h" />
|
||||||
<ClInclude Include="Utility\IndexerV1.h" />
|
<ClInclude Include="Utility\IndexerV1.h" />
|
||||||
<ClInclude Include="Utility\DisplayEnumerator.h" />
|
<ClInclude Include="Utility\DisplayEnumerator.h" />
|
||||||
<ClInclude Include="Utility\IndexerV2.h" />
|
<ClInclude Include="Utility\IndexerV2.h" />
|
||||||
@@ -170,7 +178,7 @@
|
|||||||
<ClCompile Include="Time\SystemClock.cpp" />
|
<ClCompile Include="Time\SystemClock.cpp" />
|
||||||
<ClCompile Include="Time\Time.cpp" />
|
<ClCompile Include="Time\Time.cpp" />
|
||||||
<ClCompile Include="Type\Double.cpp" />
|
<ClCompile Include="Type\Double.cpp" />
|
||||||
<ClCompile Include="Type\LongLong.cpp" />
|
<ClCompile Include="Type\Long.cpp" />
|
||||||
<ClCompile Include="Utility\IndexerV1.cpp" />
|
<ClCompile Include="Utility\IndexerV1.cpp" />
|
||||||
<ClCompile Include="BlitzUtility.cpp" />
|
<ClCompile Include="BlitzUtility.cpp" />
|
||||||
<ClCompile Include="Utility\DisplayEnumerator.cpp" />
|
<ClCompile Include="Utility\DisplayEnumerator.cpp" />
|
||||||
@@ -179,23 +187,17 @@
|
|||||||
<ClCompile Include="Utility\WindowMessageHandler.cpp" />
|
<ClCompile Include="Utility\WindowMessageHandler.cpp" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="LICENSE">
|
<None Include="Resources\BlitzUtility.bb" />
|
||||||
<Link>BlitzUtility.LICENSE</Link>
|
<None Include="Resources\BlitzUtility.decls" />
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<None Include="Resources\BlitzUtility.LICENSE" />
|
||||||
</None>
|
<None Include="Resources\BlitzUtility.LICENSE.lesser" />
|
||||||
<None Include="LICENSE.lesser">
|
|
||||||
<Link>BlitzUtility.LICENSE.lesser</Link>
|
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
||||||
</None>
|
|
||||||
<None Include="BlitzUtility.bb">
|
|
||||||
<Link>BlitzUtility.bb</Link>
|
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
||||||
</None>
|
|
||||||
<None Include="BlitzUtility.decls">
|
|
||||||
<Link>BlitzUtility.decls</Link>
|
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
||||||
</None>
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<Target Name="CopyResources" AfterTargets="Build">
|
||||||
|
<ItemGroup>
|
||||||
|
<Resources Include="$(ProjectDir)\Resources\**\*.*" />
|
||||||
|
</ItemGroup>
|
||||||
|
<Copy SourceFiles="@(Resources)" DestinationFiles="@(Resources->'$(TargetDir)%(RecursiveDir)\%(Filename)%(Extension)')" SkipUnchangedFiles="True" UseHardlinksIfPossible="True" />
|
||||||
|
</Target>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
<ImportGroup Label="ExtensionTargets">
|
<ImportGroup Label="ExtensionTargets">
|
||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
|
|||||||
@@ -8,10 +8,6 @@
|
|||||||
<Filter Include="Source Files\Utility">
|
<Filter Include="Source Files\Utility">
|
||||||
<UniqueIdentifier>{48292af9-63a5-40ae-a447-ad7cecfddd8a}</UniqueIdentifier>
|
<UniqueIdentifier>{48292af9-63a5-40ae-a447-ad7cecfddd8a}</UniqueIdentifier>
|
||||||
</Filter>
|
</Filter>
|
||||||
<Filter Include="Blitz Files">
|
|
||||||
<UniqueIdentifier>{e8e48b8c-14c2-40b5-b48d-d9b55fe6852d}</UniqueIdentifier>
|
|
||||||
<Extensions>bb;decls;ipf</Extensions>
|
|
||||||
</Filter>
|
|
||||||
<Filter Include="Source Files\Container">
|
<Filter Include="Source Files\Container">
|
||||||
<UniqueIdentifier>{ff6bcb4d-9140-40a9-80dd-3698b63bd1c1}</UniqueIdentifier>
|
<UniqueIdentifier>{ff6bcb4d-9140-40a9-80dd-3698b63bd1c1}</UniqueIdentifier>
|
||||||
</Filter>
|
</Filter>
|
||||||
@@ -27,6 +23,31 @@
|
|||||||
<Filter Include="Source Files\Time">
|
<Filter Include="Source Files\Time">
|
||||||
<UniqueIdentifier>{5a129704-2426-422d-8a40-c869f58d94cb}</UniqueIdentifier>
|
<UniqueIdentifier>{5a129704-2426-422d-8a40-c869f58d94cb}</UniqueIdentifier>
|
||||||
</Filter>
|
</Filter>
|
||||||
|
<Filter Include="Header Files">
|
||||||
|
<UniqueIdentifier>{67ecd4f9-8888-4144-a4cc-0102188b329a}</UniqueIdentifier>
|
||||||
|
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Header Files\Container">
|
||||||
|
<UniqueIdentifier>{61ad793e-f1b8-47c7-97b0-135344745ff4}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Header Files\Database">
|
||||||
|
<UniqueIdentifier>{fe289617-3503-42ab-bee1-85b54cae2f3c}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Header Files\Database\SQLite">
|
||||||
|
<UniqueIdentifier>{229e6434-139d-476e-91d4-1ff4e46906ef}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Header Files\Time">
|
||||||
|
<UniqueIdentifier>{e54a8406-e6ab-4f0b-89a4-5a2385d61d8d}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Header Files\Type">
|
||||||
|
<UniqueIdentifier>{83cba243-3e88-472d-a5b8-d0339ff1d72e}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Header Files\Utility">
|
||||||
|
<UniqueIdentifier>{35a5e71b-a977-4fa1-8428-25a0bade6db2}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Resource Files">
|
||||||
|
<UniqueIdentifier>{13f1a82e-2123-4652-a573-2dd8235ae033}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="Utility\WindowMessageHandler.cpp">
|
<ClCompile Include="Utility\WindowMessageHandler.cpp">
|
||||||
@@ -41,9 +62,6 @@
|
|||||||
<ClCompile Include="Type\Double.cpp">
|
<ClCompile Include="Type\Double.cpp">
|
||||||
<Filter>Source Files\Type</Filter>
|
<Filter>Source Files\Type</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="Type\LongLong.cpp">
|
|
||||||
<Filter>Source Files\Type</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="Utility\MassOp.cpp">
|
<ClCompile Include="Utility\MassOp.cpp">
|
||||||
<Filter>Source Files\Utility</Filter>
|
<Filter>Source Files\Utility</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
@@ -74,62 +92,69 @@
|
|||||||
<ClCompile Include="Time\Time.cpp">
|
<ClCompile Include="Time\Time.cpp">
|
||||||
<Filter>Source Files\Time</Filter>
|
<Filter>Source Files\Time</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="Type\Long.cpp">
|
||||||
|
<Filter>Source Files\Type</Filter>
|
||||||
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="Utility\WindowMessageHandler.h">
|
<ClInclude Include="BlitzUtility.h">
|
||||||
<Filter>Source Files\Utility</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="Utility\IndexerV1.h">
|
|
||||||
<Filter>Source Files\Utility</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="Utility\IndexerV2.h">
|
|
||||||
<Filter>Source Files\Utility</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="Type\Double.h">
|
|
||||||
<Filter>Source Files\Type</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="Type\LongLong.h">
|
|
||||||
<Filter>Source Files\Type</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="Utility\MassOp.h">
|
|
||||||
<Filter>Source Files\Utility</Filter>
|
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="Container\List.h">
|
<ClInclude Include="Container\List.h">
|
||||||
<Filter>Source Files\Container</Filter>
|
<Filter>Header Files\Container</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="Container\TypeList.h">
|
<ClInclude Include="Container\TypeList.h">
|
||||||
<Filter>Source Files\Container</Filter>
|
<Filter>Header Files\Container</Filter>
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="Utility\DisplayEnumerator.h">
|
|
||||||
<Filter>Source Files\Utility</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="BlitzUtility.h">
|
|
||||||
<Filter>Source Files</Filter>
|
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="Database\SQLite\SQLite.h">
|
<ClInclude Include="Database\SQLite\SQLite.h">
|
||||||
<Filter>Source Files\Database\SQLite</Filter>
|
<Filter>Header Files\Database\SQLite</Filter>
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="Time\HighResolutionClock.h">
|
|
||||||
<Filter>Source Files\Time</Filter>
|
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="Database\SQLite\sqlite3.h">
|
<ClInclude Include="Database\SQLite\sqlite3.h">
|
||||||
<Filter>Source Files\Database\SQLite</Filter>
|
<Filter>Header Files\Database\SQLite</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="Time\HighResolutionClock.h">
|
||||||
|
<Filter>Header Files\Time</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="Time\SystemClock.h">
|
<ClInclude Include="Time\SystemClock.h">
|
||||||
<Filter>Source Files\Time</Filter>
|
<Filter>Header Files\Time</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="Time\Time.h">
|
<ClInclude Include="Time\Time.h">
|
||||||
<Filter>Source Files\Time</Filter>
|
<Filter>Header Files\Time</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="Type\Double.h">
|
||||||
|
<Filter>Header Files\Type</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="Utility\DisplayEnumerator.h">
|
||||||
|
<Filter>Header Files\Utility</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="Utility\IndexerV1.h">
|
||||||
|
<Filter>Header Files\Utility</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="Utility\IndexerV2.h">
|
||||||
|
<Filter>Header Files\Utility</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="Utility\MassOp.h">
|
||||||
|
<Filter>Header Files\Utility</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="Utility\WindowMessageHandler.h">
|
||||||
|
<Filter>Header Files\Utility</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="Type\Long.h">
|
||||||
|
<Filter>Header Files\Type</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="BlitzUtility.bb">
|
<None Include="Resources\BlitzUtility.bb">
|
||||||
<Filter>Blitz Files</Filter>
|
<Filter>Resource Files</Filter>
|
||||||
</None>
|
</None>
|
||||||
<None Include="BlitzUtility.decls">
|
<None Include="Resources\BlitzUtility.decls">
|
||||||
<Filter>Blitz Files</Filter>
|
<Filter>Resource Files</Filter>
|
||||||
|
</None>
|
||||||
|
<None Include="Resources\BlitzUtility.LICENSE">
|
||||||
|
<Filter>Resource Files</Filter>
|
||||||
|
</None>
|
||||||
|
<None Include="Resources\BlitzUtility.LICENSE.lesser">
|
||||||
|
<Filter>Resource Files</Filter>
|
||||||
</None>
|
</None>
|
||||||
<None Include="LICENSE" />
|
|
||||||
<None Include="LICENSE.lesser" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
@@ -163,73 +163,67 @@ BU_HighResolutionClock_DurationLL%(pHighResolutionClock%, pOther%)
|
|||||||
BU_HighResolutionClock_DurationF#(pHighResolutionClock%, pOther%)
|
BU_HighResolutionClock_DurationF#(pHighResolutionClock%, pOther%)
|
||||||
BU_HighResolutionClock_DurationD%(pHighResolutionClock%, pOther%)
|
BU_HighResolutionClock_DurationD%(pHighResolutionClock%, pOther%)
|
||||||
|
|
||||||
; Types -----------------------------------------------------------------------
|
; Types - Long ----------------------------------------------------------------
|
||||||
; -- LongLong
|
BU_Long_New%() :"_BU_Long_New@0"
|
||||||
BU_LongLong_Create%()
|
BU_Long_Copy%(pThis%) :"_BU_Long_Copy@4"
|
||||||
BU_LongLong_Destroy(LongLong%)
|
BU_Long_Destroy(pThis%) :"_BU_Long_Destroy@4"
|
||||||
BU_LongLong_Copy%(LongLong%)
|
BU_Long_ToString$(pThis%) :"_BU_Long_ToString@4"
|
||||||
BU_LongLong_TempCreate%()
|
BU_Long_FromString%(cString$) :"_BU_Long_FromString@4"
|
||||||
BU_LongLong_TempCopy%(LongLong%)
|
BU_Long_FromI%(iRight%) :"_BU_Long_FromI@4"
|
||||||
BU_LongLong_SetTemp(LongLong%)
|
BU_Long_FromII%(iLeft%, iRight%) :"_BU_Long_FromII@8"
|
||||||
BU_LongLong_UnsetTemp(LongLong%)
|
BU_Long_ToI%(pThis%, iShift%) :"_BU_Long_ToI@8"
|
||||||
BU_LongLong_TempCleanup()
|
BU_Long_ToIH%(pThis%) :"_BU_Long_ToIH@4"
|
||||||
BU_LongLong_Set(LongLong%, LongLongOther%)
|
BU_Long_ToIL%(pThis%) :"_BU_Long_ToIL@4"
|
||||||
BU_LongLong_SetV(LongLong%, LongHigh%, LongLow%)
|
BU_Long_FromF%(Float#) :"_BU_Long_FromF@4"
|
||||||
BU_LongLong_Add(LongLong%, LongLongOther%)
|
BU_Long_ToF#(pThis%) :"_BU_Long_ToF@4"
|
||||||
BU_LongLong_AddV(LongLong%, LongHigh%, LongLow%)
|
BU_Long_FromD(pDouble%) :"_BU_Long_FromD@4"
|
||||||
BU_LongLong_Sub(LongLong%, LongLongOther%)
|
BU_Long_ToD(pThis%) :"_BU_Long_ToD@4"
|
||||||
BU_LongLong_SubV(LongLong%, LongHigh%, LongLow%)
|
BU_Long_Compare%(pThis%, pRight%) :"_BU_Long_Compare@8"
|
||||||
BU_LongLong_Mul(LongLong%, LongLongOther%)
|
BU_Long_Set%(pThis%, pOther%) :"_BU_Long_Set@8"
|
||||||
BU_LongLong_MulV(LongLong%, LongHigh%, LongLow%)
|
BU_Long_Add%(pThis%, pOther%) :"_BU_Long_Add@8"
|
||||||
BU_LongLong_Div(LongLong%, LongLongOther%)
|
BU_Long_Sub%(pThis%, pOther%) :"_BU_Long_Sub@8"
|
||||||
BU_LongLong_DivV(LongLong%, LongHigh%, LongLow%)
|
BU_Long_Div%(pThis%, pOther%) :"_BU_Long_Div@8"
|
||||||
BU_LongLong_Modulo(LongLong%, pOther%)
|
BU_Long_Mul%(pThis%, pOther%) :"_BU_Long_Mul@8"
|
||||||
BU_LongLong_ModuloV(LongLong%, left%, right%)
|
BU_Long_Mod%(pThis%, pOther%) :"_BU_Long_Mod@8"
|
||||||
BU_LongLong_ShiftLeft(LongLong%, bits%)
|
BU_Long_SetI%(pThis%, iRight%) :"_BU_Long_SetI@8"
|
||||||
BU_LongLong_ShiftRight(LongLong%, bits%)
|
BU_Long_AddI%(pThis%, iRight%) :"_BU_Long_AddI@8"
|
||||||
BU_LongLong_Compare%(LongLong%, LongLongOther%)
|
BU_Long_SubI%(pThis%, iRight%) :"_BU_Long_SubI@8"
|
||||||
BU_LongLong_CompareV%(LongLong%, LongHigh%, LongLow%)
|
BU_Long_DivI%(pThis%, iRight%) :"_BU_Long_DivI@8"
|
||||||
BU_LongLong_ToString$(LongLong%)
|
BU_Long_MulI%(pThis%, iRight%) :"_BU_Long_MulI@8"
|
||||||
BU_LongLong_FromString%(String$)
|
BU_Long_ModI%(pThis%, iRight%) :"_BU_Long_ModI@8"
|
||||||
BU_LongLong_ToLong%(LongLong%, Modulus%)
|
BU_Long_SetII%(pThis%, iLeft%, iRight%) :"_BU_Long_SetII@12"
|
||||||
BU_LongLong_FromLong%(LongHigh%, LongLow%)
|
BU_Long_AddII%(pThis%, iLeft%, iRight%) :"_BU_Long_AddII@12"
|
||||||
BU_LongLong_ToLongHigh%(LongLong%)
|
BU_Long_SubII%(pThis%, iLeft%, iRight%) :"_BU_Long_SubII@12"
|
||||||
BU_LongLong_ToLongLow%(LongLong%)
|
BU_Long_DivII%(pThis%, iLeft%, iRight%) :"_BU_Long_DivII@12"
|
||||||
BU_LongLong_ToFloat#(LongLong%)
|
BU_Long_MulII%(pThis%, iLeft%, iRight%) :"_BU_Long_MulII@12"
|
||||||
BU_LongLong_FromFloat%(Float#)
|
BU_Long_ModII%(pThis%, iLeft%, iRight%) :"_BU_Long_ModII@12"
|
||||||
BU_LongLong_ToDouble%(LongLong%)
|
BU_Long_Shift%(pThis%, iRight%) :"_BU_Long_Shift@8"
|
||||||
BU_LongLong_FromDouble%(double%)
|
|
||||||
BU_LongLong_Serialize$(LongLong%)
|
; Double ------------------------------------------------------------------------
|
||||||
BU_LongLong_Deserialize%(String$)
|
BU_Double_New%() :"_BU_Double_New@0"
|
||||||
; -- Double
|
BU_Double_Copy%(pThis%) :"_BU_Double_Copy@4"
|
||||||
BU_Double_Create%()
|
BU_Double_Destroy(pThis%) :"_BU_Double_Destroy@4"
|
||||||
BU_Double_Destroy(Double%)
|
BU_Double_ToString$(pThis%) :"_BU_Double_ToString@4"
|
||||||
BU_Double_Copy%(Double%)
|
BU_Double_FromString%(cString$) :"_BU_Double_FromString@4"
|
||||||
BU_Double_TempCreate%()
|
BU_Double_FromF%(Float#) :"_BU_Double_FromF@4"
|
||||||
BU_Double_TempCopy%(Double%)
|
BU_Double_ToF#(pThis%) :"_BU_Double_ToF@4"
|
||||||
BU_Double_SetTemp(Double%)
|
BU_Double_FromI%(iRight%) :"_BU_Double_FromI@4"
|
||||||
BU_Double_UnsetTemp(Double%)
|
BU_Double_ToI%(pThis%) :"_BU_Double_ToI@8"
|
||||||
BU_Double_TempCleanup()
|
BU_Double_FromL(pDouble%) :"_BU_Double_FromL@4"
|
||||||
BU_Double_Set(Double%, DoubleOther%)
|
BU_Double_ToL(pThis%) :"_BU_Double_ToL@4"
|
||||||
BU_Double_SetF(Double%, Float#)
|
BU_Double_Compare%(pThis%, pOther%) :"_BU_Double_Compare@8"
|
||||||
BU_Double_Add(Double%, DoubleOther%)
|
BU_Double_Set%(pThis%, pOther%) :"_BU_Double_Set@8"
|
||||||
BU_Double_AddF(Double%, Float#)
|
BU_Double_Add%(pThis%, pOther%) :"_BU_Double_Add@8"
|
||||||
BU_Double_Sub(Double%, DoubleOther%)
|
BU_Double_Sub%(pThis%, pOther%) :"_BU_Double_Sub@8"
|
||||||
BU_Double_SubF(Double%, Float#)
|
BU_Double_Div%(pThis%, pOther%) :"_BU_Double_Div@8"
|
||||||
BU_Double_Mul(Double%, DoubleOther%)
|
BU_Double_Mul%(pThis%, pOther%) :"_BU_Double_Mul@8"
|
||||||
BU_Double_MulF(Double%, Float#)
|
BU_Double_Mod%(pThis%, pOther%) :"_BU_Double_Mod@8"
|
||||||
BU_Double_Div(Double%, DoubleOther%)
|
BU_Double_SetF%(pThis%, fOther%) :"_BU_Double_SetF@8"
|
||||||
BU_Double_DivF(Double%, Float#)
|
BU_Double_AddF%(pThis%, fOther%) :"_BU_Double_AddF@8"
|
||||||
BU_Double_Compare%(Double%, DoubleOther%)
|
BU_Double_SubF%(pThis%, fOther%) :"_BU_Double_SubF@8"
|
||||||
BU_Double_CompareF%(Double%, Float#)
|
BU_Double_DivF%(pThis%, fOther%) :"_BU_Double_DivF@8"
|
||||||
BU_Double_ToString$(Double%)
|
BU_Double_MulF%(pThis%, fOther%) :"_BU_Double_MulF@8"
|
||||||
BU_Double_FromString%(String$)
|
BU_Double_ModF%(pThis%, fOther%) :"_BU_Double_ModF@8"
|
||||||
BU_Double_ToFloat#(Double%)
|
|
||||||
BU_Double_FromFloat%(Float#)
|
|
||||||
BU_Double_ToLongLong%(Double%)
|
|
||||||
BU_Double_FromLongLong%(LongLong%)
|
|
||||||
BU_Double_Serialize$(Double%)
|
|
||||||
BU_Double_Deserialize%(String$)
|
|
||||||
|
|
||||||
; Utility ---------------------------------------------------------------------
|
; Utility ---------------------------------------------------------------------
|
||||||
; -- Display Enumerator
|
; -- Display Enumerator
|
||||||
+82
-148
@@ -14,175 +14,109 @@
|
|||||||
// You should have received a copy of the GNU Lesser General Public License
|
// You should have received a copy of the GNU Lesser General Public License
|
||||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
#include "Double.h"
|
#include "Long.h"
|
||||||
#include <list>
|
|
||||||
|
|
||||||
// Templates
|
DLL_FUNCTION(double_t*) BU_Double_New() {
|
||||||
template< typename T >
|
|
||||||
std::string int_to_hex(T i) {
|
|
||||||
std::stringstream stream;
|
|
||||||
stream
|
|
||||||
<< std::setfill('0')
|
|
||||||
<< std::setw(sizeof(T) * 2)
|
|
||||||
<< std::hex
|
|
||||||
<< i;
|
|
||||||
return stream.str();
|
|
||||||
}
|
|
||||||
|
|
||||||
template< typename T >
|
|
||||||
T hex_to_int(std::string t) {
|
|
||||||
T x;
|
|
||||||
std::stringstream stream;
|
|
||||||
stream
|
|
||||||
<< std::hex
|
|
||||||
<< t;
|
|
||||||
stream
|
|
||||||
>> x;
|
|
||||||
return x;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
std::list<double_t*> BU_DoubleTemporary;
|
|
||||||
|
|
||||||
DLL_FUNCTION(double_t*) BU_Double_Create() {
|
|
||||||
return new double_t;
|
return new double_t;
|
||||||
}
|
}
|
||||||
|
DLL_FUNCTION(double_t*) BU_Double_Copy(double_t* pOther) {
|
||||||
DLL_FUNCTION(void) BU_Double_Destroy(double_t* pthis) {
|
return new double_t(*pOther);
|
||||||
delete pthis;
|
}
|
||||||
|
DLL_FUNCTION(void) BU_Double_Destroy(double_t* pThis) {
|
||||||
|
delete pThis;
|
||||||
}
|
}
|
||||||
|
|
||||||
DLL_FUNCTION(double_t*) BU_Double_Copy(double_t* other) {
|
char* BU_Double_Buffer = new char[32];
|
||||||
double_t* pthis = new double_t;
|
DLL_FUNCTION(const char*) BU_Double_ToString(double_t* pThis) {
|
||||||
*pthis = *other;
|
std::stringstream myStream;
|
||||||
return pthis;
|
myStream << (*pThis);
|
||||||
|
|
||||||
|
const char* myBuffer = myStream.str().c_str();
|
||||||
|
strcpy_s(BU_Double_Buffer, 32, myBuffer);
|
||||||
|
return BU_Double_Buffer;
|
||||||
|
}
|
||||||
|
DLL_FUNCTION(double_t*) BU_Double_FromString(const char* pString) {
|
||||||
|
double_t* pThis = new double_t;
|
||||||
|
std::stringstream myStream = std::stringstream(pString);
|
||||||
|
myStream >> *pThis;
|
||||||
|
return pThis;
|
||||||
}
|
}
|
||||||
|
|
||||||
DLL_FUNCTION(double_t*) BU_Double_TempCreate() {
|
DLL_FUNCTION(double_t*) BU_Double_FromF(float_t fOther) {
|
||||||
double_t* val = new double_t;
|
return new double_t(fOther);
|
||||||
BU_DoubleTemporary.push_back(val);
|
}
|
||||||
return val;
|
DLL_FUNCTION(float_t) BU_Double_ToF(double_t* pThis) {
|
||||||
|
return (float_t)*pThis;
|
||||||
}
|
}
|
||||||
|
|
||||||
DLL_FUNCTION(double_t*) BU_Double_TempCopy(double_t* other) {
|
DLL_FUNCTION(double_t*) BU_Double_FromI(int32_t iOther) {
|
||||||
double_t* val = new double_t(*other);
|
return new double_t(iOther);
|
||||||
BU_DoubleTemporary.push_back(val);
|
}
|
||||||
return val;
|
DLL_FUNCTION(int32_t) BU_Double_ToI(double_t* pThis) {
|
||||||
|
return (int32_t)*pThis;
|
||||||
}
|
}
|
||||||
|
|
||||||
DLL_FUNCTION(void) BU_Double_SetTemp(double_t* pthis) {
|
DLL_FUNCTION(double_t*) BU_Double_FromL(int64_t* pOther) {
|
||||||
BU_DoubleTemporary.push_back(pthis);
|
return new double_t((double_t)*pOther);
|
||||||
|
}
|
||||||
|
DLL_FUNCTION(int64_t*) BU_Double_ToL(double_t* pThis) {
|
||||||
|
return new int64_t((int64_t)*pThis);
|
||||||
}
|
}
|
||||||
|
|
||||||
DLL_FUNCTION(void) BU_Double_UnsetTemp(double_t* pthis) {
|
DLL_FUNCTION(int32_t) BU_Double_Compare(double_t* pThis, double_t* pOther) {
|
||||||
BU_DoubleTemporary.remove(pthis);
|
return /* It can either be Equal (0) or Smaller or Greater. Easy to check. */
|
||||||
|
/* Greater */
|
||||||
|
(*pThis > *pOther ? 1 : 0) +
|
||||||
|
/* Smaller */
|
||||||
|
(*pThis < *pOther ? -1 : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
DLL_FUNCTION(void) BU_Double_TempCleanup() {
|
DLL_FUNCTION(double_t*) BU_Double_Set(double_t* pThis, double_t* pOther) {
|
||||||
auto iterEnd = BU_DoubleTemporary.end();
|
*pThis = *pOther;
|
||||||
for (auto iter = BU_DoubleTemporary.begin(); iter != iterEnd; ++iter) {
|
return pThis;
|
||||||
delete *iter;
|
|
||||||
}
|
}
|
||||||
BU_DoubleTemporary.clear();
|
DLL_FUNCTION(double_t*) BU_Double_Add(double_t* pThis, double_t* pOther) {
|
||||||
|
*pThis += *pOther;
|
||||||
|
return pThis;
|
||||||
|
}
|
||||||
|
DLL_FUNCTION(double_t*) BU_Double_Sub(double_t* pThis, double_t* pOther) {
|
||||||
|
*pThis -= *pOther;
|
||||||
|
return pThis;
|
||||||
|
}
|
||||||
|
DLL_FUNCTION(double_t*) BU_Double_Div(double_t* pThis, double_t* pOther) {
|
||||||
|
*pThis /= *pOther;
|
||||||
|
return pThis;
|
||||||
|
}
|
||||||
|
DLL_FUNCTION(double_t*) BU_Double_Mul(double_t* pThis, double_t* pOther) {
|
||||||
|
*pThis *= *pOther;
|
||||||
|
return pThis;
|
||||||
|
}
|
||||||
|
DLL_FUNCTION(double_t*) BU_Double_Mod(double_t* pThis, double_t* pOther) {
|
||||||
|
*pThis = fmod(*pThis, *pOther);
|
||||||
|
return pThis;
|
||||||
}
|
}
|
||||||
|
|
||||||
DLL_FUNCTION(void) BU_Double_Set(double_t* pthis, double_t* other) {
|
DLL_FUNCTION(double_t*) BU_Double_SetF(double_t* pThis, float_t fOther) {
|
||||||
*pthis = *other;
|
*pThis = fOther;
|
||||||
|
return pThis;
|
||||||
}
|
}
|
||||||
|
DLL_FUNCTION(double_t*) BU_Double_AddF(double_t* pThis, float_t fOther) {
|
||||||
DLL_FUNCTION(void) BU_Double_SetF(double_t* pthis, float_t other) {
|
*pThis += fOther;
|
||||||
*pthis = other;
|
return pThis;
|
||||||
}
|
}
|
||||||
|
DLL_FUNCTION(double_t*) BU_Double_SubF(double_t* pThis, float_t fOther) {
|
||||||
DLL_FUNCTION(void) BU_Double_Add(double_t* pthis, double_t* other) {
|
*pThis -= fOther;
|
||||||
*pthis += *other;
|
return pThis;
|
||||||
}
|
}
|
||||||
|
DLL_FUNCTION(double_t*) BU_Double_DivF(double_t* pThis, float_t fOther) {
|
||||||
DLL_FUNCTION(void) BU_Double_AddF(double_t* pthis, float_t other) {
|
*pThis /= fOther;
|
||||||
*pthis += other;
|
return pThis;
|
||||||
}
|
}
|
||||||
|
DLL_FUNCTION(double_t*) BU_Double_MulF(double_t* pThis, float_t fOther) {
|
||||||
DLL_FUNCTION(void) BU_Double_Sub(double_t* pthis, double_t* other) {
|
*pThis *= fOther;
|
||||||
*pthis -= *other;
|
return pThis;
|
||||||
}
|
}
|
||||||
|
DLL_FUNCTION(double_t*) BU_Double_ModF(double_t* pThis, float_t fOther) {
|
||||||
DLL_FUNCTION(void) BU_Double_SubF(double_t* pthis, float_t other) {
|
*pThis = fmod(*pThis, fOther);
|
||||||
*pthis -= other;
|
return pThis;
|
||||||
}
|
|
||||||
|
|
||||||
DLL_FUNCTION(void) BU_Double_Mul(double_t* pthis, double_t* other) {
|
|
||||||
*pthis *= *other;
|
|
||||||
}
|
|
||||||
|
|
||||||
DLL_FUNCTION(void) BU_Double_MulF(double_t* pthis, float_t other) {
|
|
||||||
*pthis *= other;
|
|
||||||
}
|
|
||||||
|
|
||||||
DLL_FUNCTION(void) BU_Double_Div(double_t* pthis, double_t* other) {
|
|
||||||
*pthis /= *other;
|
|
||||||
}
|
|
||||||
|
|
||||||
DLL_FUNCTION(void) BU_Double_DivF(double_t* pthis, float_t other) {
|
|
||||||
*pthis /= other;
|
|
||||||
}
|
|
||||||
|
|
||||||
DLL_FUNCTION(uint32_t) BU_Double_Compare(double_t* pthis, double_t* other) {
|
|
||||||
return (*pthis == *other ? 1 : 0) + (*pthis < *other ? 2 : 0) + (*pthis > *other ? 4 : 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
DLL_FUNCTION(uint32_t) BU_Double_CompareF(double_t* pthis, float_t other) {
|
|
||||||
return ((float_t)*pthis == other ? 1 : 0) + ((float_t)*pthis < other ? 2 : 0) + ((float_t)*pthis > other ? 4 : 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
DLL_FUNCTION(const char*) BU_Double_ToString(double_t* pthis) {
|
|
||||||
std::stringstream stream;
|
|
||||||
stream << *pthis;
|
|
||||||
return stream.str().c_str();
|
|
||||||
}
|
|
||||||
|
|
||||||
DLL_FUNCTION(double_t*) BU_Double_FromString(const char* text) {
|
|
||||||
std::stringstream stream = std::stringstream(text);
|
|
||||||
double_t* doublePtr = new double_t;
|
|
||||||
stream >> *doublePtr;
|
|
||||||
return doublePtr;
|
|
||||||
}
|
|
||||||
|
|
||||||
DLL_FUNCTION(float_t) BU_Double_ToFloat(double_t* pthis) {
|
|
||||||
return (float_t)*pthis;
|
|
||||||
}
|
|
||||||
|
|
||||||
DLL_FUNCTION(double_t*) BU_Double_FromFloat(float_t other) {
|
|
||||||
double_t* val = new double_t;
|
|
||||||
*val = (double_t)other;
|
|
||||||
return val;
|
|
||||||
}
|
|
||||||
|
|
||||||
DLL_FUNCTION(int64_t*) BU_Double_ToLongLong(double_t* pthis) {
|
|
||||||
int64_t* val = new int64_t;
|
|
||||||
*val = (int64_t)*pthis;
|
|
||||||
return val;
|
|
||||||
}
|
|
||||||
|
|
||||||
DLL_FUNCTION(double_t*) BU_Double_FromLongLong(int64_t* other) {
|
|
||||||
double_t* val = new double_t;
|
|
||||||
*val = (double_t)*other;
|
|
||||||
return val;
|
|
||||||
}
|
|
||||||
|
|
||||||
DLL_FUNCTION(const char*) BU_Double_Serialize(double_t* pthis) {
|
|
||||||
union {
|
|
||||||
double_t real;
|
|
||||||
int64_t integer;
|
|
||||||
} myval;
|
|
||||||
myval.real = *pthis;
|
|
||||||
return int_to_hex<int64_t>(myval.integer).c_str();
|
|
||||||
}
|
|
||||||
|
|
||||||
DLL_FUNCTION(double_t*) BU_Double_Deserialize(const char* text) {
|
|
||||||
union {
|
|
||||||
double_t real;
|
|
||||||
int64_t integer;
|
|
||||||
} myval;
|
|
||||||
myval.integer = hex_to_int<int64_t>(std::string(text));
|
|
||||||
return BU_Double_Copy(&myval.real);
|
|
||||||
}
|
}
|
||||||
+27
-73
@@ -16,82 +16,36 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
#include "BlitzUtility.h"
|
#include "BlitzUtility.h"
|
||||||
#include "LongLong.h"
|
#include <sstream>
|
||||||
#include <iomanip>
|
|
||||||
|
|
||||||
#pragma region Constructor & Destructor
|
DLL_FUNCTION(double_t*) BU_Double_New();
|
||||||
DLL_FUNCTION(double_t*) BU_Double_Create();
|
DLL_FUNCTION(double_t*) BU_Double_Copy(double_t* pRight);
|
||||||
DLL_FUNCTION(void) BU_Double_Destroy(double_t* pthis);
|
DLL_FUNCTION(void) BU_Double_Destroy(double_t* pThis);
|
||||||
DLL_FUNCTION(double_t*) BU_Double_Copy(double_t* other);
|
|
||||||
#pragma comment(linker, "/EXPORT:BU_Double_Create=_BU_Double_Create@0")
|
|
||||||
#pragma comment(linker, "/EXPORT:BU_Double_Destroy=_BU_Double_Destroy@4")
|
|
||||||
#pragma comment(linker, "/EXPORT:BU_Double_Copy=_BU_Double_Copy@4")
|
|
||||||
#pragma endregion Constructor & Destructor
|
|
||||||
|
|
||||||
#pragma region Temporary Objects
|
DLL_FUNCTION(const char*) BU_Double_ToString(double_t* pThis);
|
||||||
DLL_FUNCTION(double_t*) BU_Double_TempCreate();
|
DLL_FUNCTION(double_t*) BU_Double_FromString(const char* pString);
|
||||||
DLL_FUNCTION(double_t*) BU_Double_TempCopy(double_t* other);
|
|
||||||
DLL_FUNCTION(void) BU_Double_SetTemp(double_t* pthis);
|
|
||||||
DLL_FUNCTION(void) BU_Double_UnsetTemp(double_t* pthis);
|
|
||||||
DLL_FUNCTION(void) BU_Double_TempCleanup();
|
|
||||||
#pragma comment(linker, "/EXPORT:BU_Double_TempCreate=_BU_Double_TempCreate@0")
|
|
||||||
#pragma comment(linker, "/EXPORT:BU_Double_TempCopy=_BU_Double_TempCopy@4")
|
|
||||||
#pragma comment(linker, "/EXPORT:BU_Double_SetTemp=_BU_Double_SetTemp@4")
|
|
||||||
#pragma comment(linker, "/EXPORT:BU_Double_UnsetTemp=_BU_Double_UnsetTemp@4")
|
|
||||||
#pragma comment(linker, "/EXPORT:BU_Double_TempCleanup=_BU_Double_TempCleanup@0")
|
|
||||||
#pragma endregion Temporary Objects
|
|
||||||
|
|
||||||
#pragma region Math
|
DLL_FUNCTION(double_t*) BU_Double_FromF(float_t fOther);
|
||||||
DLL_FUNCTION(void) BU_Double_Set(double_t* pthis, double_t* other);
|
DLL_FUNCTION(float_t) BU_Double_ToF(double_t* pThis);
|
||||||
DLL_FUNCTION(void) BU_Double_SetF(double_t* pthis, float_t other);
|
|
||||||
#pragma comment(linker, "/EXPORT:BU_Double_Set=_BU_Double_Set@8")
|
|
||||||
#pragma comment(linker, "/EXPORT:BU_Double_SetF=_BU_Double_SetF@8")
|
|
||||||
DLL_FUNCTION(void) BU_Double_Add(double_t* pthis, double_t* other);
|
|
||||||
DLL_FUNCTION(void) BU_Double_AddF(double_t* pthis, float_t other);
|
|
||||||
#pragma comment(linker, "/EXPORT:BU_Double_Add=_BU_Double_Add@8")
|
|
||||||
#pragma comment(linker, "/EXPORT:BU_Double_AddF=_BU_Double_AddF@8")
|
|
||||||
DLL_FUNCTION(void) BU_Double_Sub(double_t* pthis, double_t* other);
|
|
||||||
DLL_FUNCTION(void) BU_Double_SubF(double_t* pthis, float_t other);
|
|
||||||
#pragma comment(linker, "/EXPORT:BU_Double_Sub=_BU_Double_Sub@8")
|
|
||||||
#pragma comment(linker, "/EXPORT:BU_Double_SubF=_BU_Double_SubF@8")
|
|
||||||
DLL_FUNCTION(void) BU_Double_Mul(double_t* pthis, double_t* other);
|
|
||||||
DLL_FUNCTION(void) BU_Double_MulF(double_t* pthis, float_t other);
|
|
||||||
#pragma comment(linker, "/EXPORT:BU_Double_Mul=_BU_Double_Mul@8")
|
|
||||||
#pragma comment(linker, "/EXPORT:BU_Double_MulF=_BU_Double_MulF@8")
|
|
||||||
DLL_FUNCTION(void) BU_Double_Div(double_t* pthis, double_t* other);
|
|
||||||
DLL_FUNCTION(void) BU_Double_DivF(double_t* pthis, float_t other);
|
|
||||||
#pragma comment(linker, "/EXPORT:BU_Double_Div=_BU_Double_Div@8")
|
|
||||||
#pragma comment(linker, "/EXPORT:BU_Double_DivF=_BU_Double_DivF@8")
|
|
||||||
#pragma endregion Math
|
|
||||||
|
|
||||||
#pragma region Comparision
|
DLL_FUNCTION(double_t*) BU_Double_FromI(int32_t iOther);
|
||||||
DLL_FUNCTION(uint32_t) BU_Double_Compare(double_t* pthis, double_t* other);
|
DLL_FUNCTION(int32_t) BU_Double_ToI(double_t* pThis);
|
||||||
DLL_FUNCTION(uint32_t) BU_Double_CompareF(double_t* pthis, float_t other);
|
|
||||||
#pragma comment(linker, "/EXPORT:BU_Double_Compare=_BU_Double_Compare@8")
|
|
||||||
#pragma comment(linker, "/EXPORT:BU_Double_CompareF=_BU_Double_CompareF@8")
|
|
||||||
#pragma endregion Comparision
|
|
||||||
|
|
||||||
#pragma region Conversion
|
DLL_FUNCTION(double_t*) BU_Double_FromL(int64_t* pOther);
|
||||||
// String conversion
|
DLL_FUNCTION(int64_t*) BU_Double_ToL(double_t* pThis);
|
||||||
DLL_FUNCTION(const char*) BU_Double_ToString(double_t* pthis);
|
|
||||||
DLL_FUNCTION(double_t*) BU_Double_FromString(const char* text);
|
|
||||||
#pragma comment(linker, "/EXPORT:BU_Double_ToString=_BU_Double_ToString@4")
|
|
||||||
#pragma comment(linker, "/EXPORT:BU_Double_FromString=_BU_Double_FromString@4")
|
|
||||||
// 32-Bit Floating Point
|
|
||||||
DLL_FUNCTION(float_t) BU_Double_ToFloat(double_t* pthis);
|
|
||||||
DLL_FUNCTION(double_t*) BU_Double_FromFloat(float_t other);
|
|
||||||
#pragma comment(linker, "/EXPORT:BU_Double_ToFloat=_BU_Double_ToFloat@4")
|
|
||||||
#pragma comment(linker, "/EXPORT:BU_Double_FromFloat=_BU_Double_FromFloat@4")
|
|
||||||
// 64-Bit Integer
|
|
||||||
DLL_FUNCTION(int64_t*) BU_Double_ToLongLong(double_t* pthis);
|
|
||||||
DLL_FUNCTION(double_t*) BU_Double_FromLongLong(int64_t* other);
|
|
||||||
#pragma comment(linker, "/EXPORT:BU_Double_ToLongLong=_BU_Double_ToLongLong@4")
|
|
||||||
#pragma comment(linker, "/EXPORT:BU_Double_FromLongLong=_BU_Double_FromLongLong@4")
|
|
||||||
#pragma endregion Conversion
|
|
||||||
|
|
||||||
#pragma region Serialization
|
DLL_FUNCTION(int32_t) BU_Double_Compare(double_t* pThis, double_t* pOther);
|
||||||
DLL_FUNCTION(const char*) BU_Double_Serialize(double_t* pthis);
|
|
||||||
DLL_FUNCTION(double_t*) BU_Double_Deserialize(const char* text);
|
DLL_FUNCTION(double_t*) BU_Double_Set(double_t* pThis, double_t* pOther);
|
||||||
#pragma comment(linker, "/EXPORT:BU_Double_Serialize=_BU_Double_Serialize@4")
|
DLL_FUNCTION(double_t*) BU_Double_Add(double_t* pThis, double_t* pOther);
|
||||||
#pragma comment(linker, "/EXPORT:BU_Double_Deserialize=_BU_Double_Deserialize@4")
|
DLL_FUNCTION(double_t*) BU_Double_Sub(double_t* pThis, double_t* pOther);
|
||||||
#pragma endregion Serialization
|
DLL_FUNCTION(double_t*) BU_Double_Div(double_t* pThis, double_t* pOther);
|
||||||
|
DLL_FUNCTION(double_t*) BU_Double_Mul(double_t* pThis, double_t* pOther);
|
||||||
|
DLL_FUNCTION(double_t*) BU_Double_Mod(double_t* pThis, double_t* pOther);
|
||||||
|
|
||||||
|
DLL_FUNCTION(double_t*) BU_Double_SetF(double_t* pThis, float_t fOther);
|
||||||
|
DLL_FUNCTION(double_t*) BU_Double_AddF(double_t* pThis, float_t fOther);
|
||||||
|
DLL_FUNCTION(double_t*) BU_Double_SubF(double_t* pThis, float_t fOther);
|
||||||
|
DLL_FUNCTION(double_t*) BU_Double_DivF(double_t* pThis, float_t fOther);
|
||||||
|
DLL_FUNCTION(double_t*) BU_Double_MulF(double_t* pThis, float_t fOther);
|
||||||
|
DLL_FUNCTION(double_t*) BU_Double_ModF(double_t* pThis, float_t fOther);
|
||||||
|
|||||||
+167
@@ -0,0 +1,167 @@
|
|||||||
|
// Blitz - Steam wrapper for Blitz.
|
||||||
|
// Copyright (C) 2015 Xaymar (Michael Fabian Dirks)
|
||||||
|
//
|
||||||
|
// This program is free software: you can redistribute it and/or modify
|
||||||
|
// it under the terms of the GNU Lesser General Public License as
|
||||||
|
// published by the Free Software Foundation, either version 3 of the
|
||||||
|
// License, or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// This program is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public License
|
||||||
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
#include "Long.h"
|
||||||
|
|
||||||
|
DLL_FUNCTION(int64_t*) BU_Long_New() {
|
||||||
|
return new int64_t;
|
||||||
|
}
|
||||||
|
DLL_FUNCTION(int64_t*) BU_Long_Copy(int64_t* pOther) {
|
||||||
|
return new int64_t(*pOther);
|
||||||
|
}
|
||||||
|
DLL_FUNCTION(void) BU_Long_Destroy(int64_t* pThis) {
|
||||||
|
delete pThis;
|
||||||
|
}
|
||||||
|
|
||||||
|
char* BU_Long_Buffer = new char[32];
|
||||||
|
DLL_FUNCTION(const char*) BU_Long_ToString(int64_t* pThis) {
|
||||||
|
std::stringstream myStream;
|
||||||
|
myStream << (*pThis);
|
||||||
|
|
||||||
|
const char* myBuffer = myStream.str().c_str();
|
||||||
|
strcpy_s(BU_Long_Buffer, 32, myBuffer);
|
||||||
|
return BU_Long_Buffer;
|
||||||
|
}
|
||||||
|
DLL_FUNCTION(int64_t*) BU_Long_FromString(const char* pString) {
|
||||||
|
int64_t* pThis = new int64_t;
|
||||||
|
std::stringstream myStream = std::stringstream(pString);
|
||||||
|
myStream >> *pThis;
|
||||||
|
return pThis;
|
||||||
|
}
|
||||||
|
|
||||||
|
DLL_FUNCTION(int64_t*) BU_Long_FromI(int32_t iRight) {
|
||||||
|
return new int64_t(iRight);
|
||||||
|
}
|
||||||
|
DLL_FUNCTION(int64_t*) BU_Long_FromII(int32_t iLeft, int32_t iRight) {
|
||||||
|
return new int64_t(((int64_t)(iLeft) << 32) + iRight);
|
||||||
|
}
|
||||||
|
DLL_FUNCTION(int32_t) BU_Long_ToI(int64_t* pThis, int32_t iShift) {
|
||||||
|
if (iShift >= 0)
|
||||||
|
return (int32_t)(*pThis >> iShift);
|
||||||
|
else
|
||||||
|
return (int32_t)(*pThis << -iShift);
|
||||||
|
}
|
||||||
|
DLL_FUNCTION(int32_t) BU_Long_ToIH(int64_t* pThis) {
|
||||||
|
return (int32_t)(*pThis >> 32);
|
||||||
|
}
|
||||||
|
DLL_FUNCTION(int32_t) BU_Long_ToIL(int64_t* pThis) {
|
||||||
|
return (int32_t)*pThis;
|
||||||
|
}
|
||||||
|
|
||||||
|
DLL_FUNCTION(int64_t*) BU_Long_FromF(float_t fOther) {
|
||||||
|
return new int64_t((int64_t)fOther);
|
||||||
|
}
|
||||||
|
DLL_FUNCTION(float_t) BU_Long_ToF(int64_t* pThis) {
|
||||||
|
return (float_t)*pThis;
|
||||||
|
}
|
||||||
|
|
||||||
|
DLL_FUNCTION(int64_t*) BU_Long_FromD(double_t* pOther) {
|
||||||
|
return new int64_t((int64_t)*pOther);
|
||||||
|
}
|
||||||
|
DLL_FUNCTION(double_t*) BU_Long_ToD(int64_t* pThis) {
|
||||||
|
return new double_t((double_t)*pThis);
|
||||||
|
}
|
||||||
|
|
||||||
|
DLL_FUNCTION(int32_t) BU_Long_Compare(int64_t* pThis, int64_t* pOther) {
|
||||||
|
return /* It can either be Equal (0) or Smaller or Greater. Easy to check. */
|
||||||
|
/* Greater */
|
||||||
|
(*pThis > *pOther ? 1 : 0) +
|
||||||
|
/* Smaller */
|
||||||
|
(*pThis < *pOther ? -1 : 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
DLL_FUNCTION(int64_t*) BU_Long_Set(int64_t* pThis, int64_t* pOther) {
|
||||||
|
*pThis = *pOther;
|
||||||
|
return pThis;
|
||||||
|
}
|
||||||
|
DLL_FUNCTION(int64_t*) BU_Long_Add(int64_t* pThis, int64_t* pOther) {
|
||||||
|
*pThis += *pOther;
|
||||||
|
return pThis;
|
||||||
|
}
|
||||||
|
DLL_FUNCTION(int64_t*) BU_Long_Sub(int64_t* pThis, int64_t* pOther) {
|
||||||
|
*pThis -= *pOther;
|
||||||
|
return pThis;
|
||||||
|
}
|
||||||
|
DLL_FUNCTION(int64_t*) BU_Long_Div(int64_t* pThis, int64_t* pOther) {
|
||||||
|
*pThis /= *pOther;
|
||||||
|
return pThis;
|
||||||
|
}
|
||||||
|
DLL_FUNCTION(int64_t*) BU_Long_Mul(int64_t* pThis, int64_t* pOther) {
|
||||||
|
*pThis *= *pOther;
|
||||||
|
return pThis;
|
||||||
|
}
|
||||||
|
DLL_FUNCTION(int64_t*) BU_Long_Mod(int64_t* pThis, int64_t* pOther) {
|
||||||
|
*pThis %= *pOther;
|
||||||
|
return pThis;
|
||||||
|
}
|
||||||
|
|
||||||
|
DLL_FUNCTION(int64_t*) BU_Long_SetI(int64_t* pThis, int32_t iRight) {
|
||||||
|
*pThis = iRight;
|
||||||
|
return pThis;
|
||||||
|
}
|
||||||
|
DLL_FUNCTION(int64_t*) BU_Long_AddI(int64_t* pThis, int32_t iRight) {
|
||||||
|
*pThis += iRight;
|
||||||
|
return pThis;
|
||||||
|
}
|
||||||
|
DLL_FUNCTION(int64_t*) BU_Long_SubI(int64_t* pThis, int32_t iRight) {
|
||||||
|
*pThis -= iRight;
|
||||||
|
return pThis;
|
||||||
|
}
|
||||||
|
DLL_FUNCTION(int64_t*) BU_Long_DivI(int64_t* pThis, int32_t iRight) {
|
||||||
|
*pThis /= iRight;
|
||||||
|
return pThis;
|
||||||
|
}
|
||||||
|
DLL_FUNCTION(int64_t*) BU_Long_MulI(int64_t* pThis, int32_t iRight) {
|
||||||
|
*pThis *= iRight;
|
||||||
|
return pThis;
|
||||||
|
}
|
||||||
|
DLL_FUNCTION(int64_t*) BU_Long_ModI(int64_t* pThis, int32_t iRight) {
|
||||||
|
*pThis %= iRight;
|
||||||
|
return pThis;
|
||||||
|
}
|
||||||
|
|
||||||
|
DLL_FUNCTION(int64_t*) BU_Long_SetII(int64_t* pThis, int32_t iLeft, int32_t iRight) {
|
||||||
|
*pThis = (((int64_t)iLeft << 32) + iRight);
|
||||||
|
return pThis;
|
||||||
|
}
|
||||||
|
DLL_FUNCTION(int64_t*) BU_Long_AddII(int64_t* pThis, int32_t iLeft, int32_t iRight) {
|
||||||
|
*pThis += (((int64_t)iLeft << 32) + iRight);
|
||||||
|
return pThis;
|
||||||
|
}
|
||||||
|
DLL_FUNCTION(int64_t*) BU_Long_SubII(int64_t* pThis, int32_t iLeft, int32_t iRight) {
|
||||||
|
*pThis -= (((int64_t)iLeft << 32) + iRight);
|
||||||
|
return pThis;
|
||||||
|
}
|
||||||
|
DLL_FUNCTION(int64_t*) BU_Long_DivII(int64_t* pThis, int32_t iLeft, int32_t iRight) {
|
||||||
|
*pThis /= (((int64_t)iLeft << 32) + iRight);
|
||||||
|
return pThis;
|
||||||
|
}
|
||||||
|
DLL_FUNCTION(int64_t*) BU_Long_MulII(int64_t* pThis, int32_t iLeft, int32_t iRight) {
|
||||||
|
*pThis *= (((int64_t)iLeft << 32) + iRight);
|
||||||
|
return pThis;
|
||||||
|
}
|
||||||
|
DLL_FUNCTION(int64_t*) BU_Long_ModII(int64_t* pThis, int32_t iLeft, int32_t iRight) {
|
||||||
|
*pThis %= (((int64_t)iLeft << 32) + iRight);
|
||||||
|
return pThis;
|
||||||
|
}
|
||||||
|
|
||||||
|
DLL_FUNCTION(int64_t*) BU_Long_Shift(int64_t* pThis, int32_t iRight) {
|
||||||
|
if (iRight >= 0)
|
||||||
|
*pThis >>= iRight;
|
||||||
|
else
|
||||||
|
*pThis <<= -iRight;
|
||||||
|
return pThis;
|
||||||
|
}
|
||||||
+63
@@ -0,0 +1,63 @@
|
|||||||
|
// Blitz - Steam wrapper for Blitz.
|
||||||
|
// Copyright (C) 2015 Xaymar (Michael Fabian Dirks)
|
||||||
|
//
|
||||||
|
// This program is free software: you can redistribute it and/or modify
|
||||||
|
// it under the terms of the GNU Lesser General Public License as
|
||||||
|
// published by the Free Software Foundation, either version 3 of the
|
||||||
|
// License, or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// This program is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public License
|
||||||
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
#include "BlitzUtility.h"
|
||||||
|
#include <sstream>
|
||||||
|
|
||||||
|
DLL_FUNCTION(int64_t*) BU_Long_New();
|
||||||
|
DLL_FUNCTION(int64_t*) BU_Long_Copy(int64_t* pRight);
|
||||||
|
DLL_FUNCTION(void) BU_Long_Destroy(int64_t* pThis);
|
||||||
|
|
||||||
|
DLL_FUNCTION(const char*) BU_Long_ToString(int64_t* pThis);
|
||||||
|
DLL_FUNCTION(int64_t*) BU_Long_FromString(const char* pString);
|
||||||
|
|
||||||
|
DLL_FUNCTION(int64_t*) BU_Long_FromI(int32_t iRight);
|
||||||
|
DLL_FUNCTION(int64_t*) BU_Long_FromII(int32_t iLeft, int32_t iRight);
|
||||||
|
DLL_FUNCTION(int32_t) BU_Long_ToI(int64_t* pThis, int32_t iShift);
|
||||||
|
DLL_FUNCTION(int32_t) BU_Long_ToIH(int64_t* pThis);
|
||||||
|
DLL_FUNCTION(int32_t) BU_Long_ToIL(int64_t* pThis);
|
||||||
|
|
||||||
|
DLL_FUNCTION(int64_t*) BU_Long_FromF(float_t fOther);
|
||||||
|
DLL_FUNCTION(float_t) BU_Long_ToF(int64_t* pThis);
|
||||||
|
|
||||||
|
DLL_FUNCTION(int64_t*) BU_Long_FromD(double_t* pOther);
|
||||||
|
DLL_FUNCTION(double_t*) BU_Long_ToD(int64_t* pThis);
|
||||||
|
|
||||||
|
DLL_FUNCTION(int32_t) BU_Long_Compare(int64_t* pThis, int64_t* pOther);
|
||||||
|
|
||||||
|
DLL_FUNCTION(int64_t*) BU_Long_Set(int64_t* pThis, int64_t* pOther);
|
||||||
|
DLL_FUNCTION(int64_t*) BU_Long_Add(int64_t* pThis, int64_t* pOther);
|
||||||
|
DLL_FUNCTION(int64_t*) BU_Long_Sub(int64_t* pThis, int64_t* pOther);
|
||||||
|
DLL_FUNCTION(int64_t*) BU_Long_Div(int64_t* pThis, int64_t* pOther);
|
||||||
|
DLL_FUNCTION(int64_t*) BU_Long_Mul(int64_t* pThis, int64_t* pOther);
|
||||||
|
DLL_FUNCTION(int64_t*) BU_Long_Mod(int64_t* pThis, int64_t* pOther);
|
||||||
|
|
||||||
|
DLL_FUNCTION(int64_t*) BU_Long_SetI(int64_t* pThis, int32_t iRight);
|
||||||
|
DLL_FUNCTION(int64_t*) BU_Long_AddI(int64_t* pThis, int32_t iRight);
|
||||||
|
DLL_FUNCTION(int64_t*) BU_Long_SubI(int64_t* pThis, int32_t iRight);
|
||||||
|
DLL_FUNCTION(int64_t*) BU_Long_DivI(int64_t* pThis, int32_t iRight);
|
||||||
|
DLL_FUNCTION(int64_t*) BU_Long_MulI(int64_t* pThis, int32_t iRight);
|
||||||
|
DLL_FUNCTION(int64_t*) BU_Long_ModI(int64_t* pThis, int32_t iRight);
|
||||||
|
|
||||||
|
DLL_FUNCTION(int64_t*) BU_Long_SetII(int64_t* pThis, int32_t iLeft, int32_t iRight);
|
||||||
|
DLL_FUNCTION(int64_t*) BU_Long_AddII(int64_t* pThis, int32_t iLeft, int32_t iRight);
|
||||||
|
DLL_FUNCTION(int64_t*) BU_Long_SubII(int64_t* pThis, int32_t iLeft, int32_t iRight);
|
||||||
|
DLL_FUNCTION(int64_t*) BU_Long_DivII(int64_t* pThis, int32_t iLeft, int32_t iRight);
|
||||||
|
DLL_FUNCTION(int64_t*) BU_Long_MulII(int64_t* pThis, int32_t iLeft, int32_t iRight);
|
||||||
|
DLL_FUNCTION(int64_t*) BU_Long_ModII(int64_t* pThis, int32_t iLeft, int32_t iRight);
|
||||||
|
|
||||||
|
DLL_FUNCTION(int64_t*) BU_Long_Shift(int64_t* pThis, int32_t iShift);
|
||||||
@@ -1,256 +0,0 @@
|
|||||||
// Blitz - Steam wrapper for Blitz.
|
|
||||||
// Copyright (C) 2015 Xaymar (Michael Fabian Dirks)
|
|
||||||
//
|
|
||||||
// This program is free software: you can redistribute it and/or modify
|
|
||||||
// it under the terms of the GNU Lesser General Public License as
|
|
||||||
// published by the Free Software Foundation, either version 3 of the
|
|
||||||
// License, or (at your option) any later version.
|
|
||||||
//
|
|
||||||
// This program is distributed in the hope that it will be useful,
|
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
// GNU General Public License for more details.
|
|
||||||
//
|
|
||||||
// You should have received a copy of the GNU Lesser General Public License
|
|
||||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
#pragma once
|
|
||||||
#include "LongLong.h"
|
|
||||||
#include <list>
|
|
||||||
|
|
||||||
// Templates
|
|
||||||
template< typename T >
|
|
||||||
std::string int_to_hex(T i) {
|
|
||||||
std::stringstream stream;
|
|
||||||
stream
|
|
||||||
<< std::setfill('0')
|
|
||||||
<< std::setw(sizeof(T) * 2)
|
|
||||||
<< std::hex
|
|
||||||
<< i;
|
|
||||||
return stream.str();
|
|
||||||
}
|
|
||||||
|
|
||||||
template< typename T >
|
|
||||||
T hex_to_int(std::string t) {
|
|
||||||
T x;
|
|
||||||
std::stringstream stream;
|
|
||||||
stream
|
|
||||||
<< std::hex
|
|
||||||
<< t;
|
|
||||||
stream
|
|
||||||
>> x;
|
|
||||||
return x;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
std::list<int64_t*> blitzLLTemporary;
|
|
||||||
|
|
||||||
DLL_FUNCTION(int64_t*) BU_LongLong_Create() {
|
|
||||||
#pragma comment(linker, "/EXPORT:BU_LongLong_Create=_BU_LongLong_Create@0")
|
|
||||||
return new int64_t;
|
|
||||||
}
|
|
||||||
|
|
||||||
DLL_FUNCTION(void) BU_LongLong_Destroy(int64_t* pthis) {
|
|
||||||
#pragma comment(linker, "/EXPORT:BU_LongLong_Destroy=_BU_LongLong_Destroy@4")
|
|
||||||
delete pthis;
|
|
||||||
}
|
|
||||||
|
|
||||||
DLL_FUNCTION(int64_t*) BU_LongLong_Copy(int64_t* other) {
|
|
||||||
#pragma comment(linker, "/EXPORT:BU_LongLong_Copy=_BU_LongLong_Copy@4")
|
|
||||||
return new int64_t(*other);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
DLL_FUNCTION(int64_t*) BU_LongLong_TempCreate() {
|
|
||||||
#pragma comment(linker, "/EXPORT:BU_LongLong_TempCreate=_BU_LongLong_TempCreate@0")
|
|
||||||
int64_t* val = new int64_t;
|
|
||||||
blitzLLTemporary.push_back(val);
|
|
||||||
return val;
|
|
||||||
}
|
|
||||||
|
|
||||||
DLL_FUNCTION(int64_t*) BU_LongLong_TempCopy(int64_t* other) {
|
|
||||||
#pragma comment(linker, "/EXPORT:BU_LongLong_TempCopy=_BU_LongLong_TempCopy@4")
|
|
||||||
int64_t* val = new int64_t(*other);
|
|
||||||
blitzLLTemporary.push_back(val);
|
|
||||||
return val;
|
|
||||||
}
|
|
||||||
|
|
||||||
DLL_FUNCTION(void) BU_LongLong_SetTemp(int64_t* pthis) {
|
|
||||||
#pragma comment(linker, "/EXPORT:BU_LongLong_SetTemp=_BU_LongLong_SetTemp@4")
|
|
||||||
blitzLLTemporary.push_back(pthis);
|
|
||||||
}
|
|
||||||
|
|
||||||
DLL_FUNCTION(void) BU_LongLong_UnsetTemp(int64_t* pthis) {
|
|
||||||
#pragma comment(linker, "/EXPORT:BU_LongLong_UnsetTemp=_BU_LongLong_UnsetTemp@4")
|
|
||||||
blitzLLTemporary.remove(pthis);
|
|
||||||
}
|
|
||||||
|
|
||||||
DLL_FUNCTION(void) BU_LongLong_TempCleanup() {
|
|
||||||
#pragma comment(linker, "/EXPORT:BU_LongLong_TempCleanup=_BU_LongLong_TempCleanup@0")
|
|
||||||
auto iterEnd = blitzLLTemporary.end();
|
|
||||||
for (auto iter = blitzLLTemporary.begin(); iter != iterEnd; ++iter) {
|
|
||||||
delete *iter;
|
|
||||||
}
|
|
||||||
blitzLLTemporary.clear();
|
|
||||||
}
|
|
||||||
|
|
||||||
DLL_FUNCTION(void) BU_LongLong_Set(int64_t* pthis, int64_t* other) {
|
|
||||||
#pragma comment(linker, "/EXPORT:BU_LongLong_Set=_BU_LongLong_Set@8")
|
|
||||||
*pthis = *other;
|
|
||||||
}
|
|
||||||
|
|
||||||
DLL_FUNCTION(void) BU_LongLong_SetV(int64_t* pthis, int32_t left, int32_t right) {
|
|
||||||
#pragma comment(linker, "/EXPORT:BU_LongLong_SetV=_BU_LongLong_SetV@12")
|
|
||||||
*pthis = ((int64_t)left << 32) + right;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
DLL_FUNCTION(void) BU_LongLong_Add(int64_t* pthis, int64_t* other) {
|
|
||||||
#pragma comment(linker, "/EXPORT:BU_LongLong_Add=_BU_LongLong_Add@8")
|
|
||||||
*pthis += *other;
|
|
||||||
}
|
|
||||||
|
|
||||||
DLL_FUNCTION(void) BU_LongLong_AddV(int64_t* pthis, int32_t left, int32_t right) {
|
|
||||||
#pragma comment(linker, "/EXPORT:BU_LongLong_AddV=_BU_LongLong_AddV@12")
|
|
||||||
*pthis += ((int64_t)left << 32) + right;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
DLL_FUNCTION(void) BU_LongLong_Sub(int64_t* pthis, int64_t* other) {
|
|
||||||
#pragma comment(linker, "/EXPORT:BU_LongLong_Sub=_BU_LongLong_Sub@8")
|
|
||||||
*pthis -= *other;
|
|
||||||
}
|
|
||||||
|
|
||||||
DLL_FUNCTION(void) BU_LongLong_SubV(int64_t* pthis, int32_t left, int32_t right) {
|
|
||||||
#pragma comment(linker, "/EXPORT:BU_LongLong_SubV=_BU_LongLong_SubV@12")
|
|
||||||
*pthis -= ((int64_t)left << 32) + right;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
DLL_FUNCTION(void) BU_LongLong_Mul(int64_t* pthis, int64_t* other) {
|
|
||||||
#pragma comment(linker, "/EXPORT:BU_LongLong_Mul=_BU_LongLong_Mul@8")
|
|
||||||
*pthis *= *other;
|
|
||||||
}
|
|
||||||
|
|
||||||
DLL_FUNCTION(void) BU_LongLong_MulV(int64_t* pthis, int32_t left, int32_t right) {
|
|
||||||
#pragma comment(linker, "/EXPORT:BU_LongLong_MulV=_BU_LongLong_MulV@12")
|
|
||||||
*pthis *= ((int64_t)left << 32) + right;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
DLL_FUNCTION(void) BU_LongLong_Div(int64_t* pthis, int64_t* other) {
|
|
||||||
#pragma comment(linker, "/EXPORT:BU_LongLong_Div=_BU_LongLong_Div@8")
|
|
||||||
*pthis /= *other;
|
|
||||||
}
|
|
||||||
|
|
||||||
DLL_FUNCTION(void) BU_LongLong_DivV(int64_t* pthis, int32_t left, int32_t right) {
|
|
||||||
#pragma comment(linker, "/EXPORT:BU_LongLong_DivV=_BU_LongLong_DivV@12")
|
|
||||||
*pthis /= ((int64_t)left << 32) + right;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
DLL_FUNCTION(void) BU_LongLong_Modulo(int64_t* pThis, int64_t* pOther) {
|
|
||||||
#pragma comment(linker, "/EXPORT:BU_LongLong_Modulo=_BU_LongLong_Modulo@8")
|
|
||||||
*pThis %= *pOther;
|
|
||||||
}
|
|
||||||
|
|
||||||
DLL_FUNCTION(void) BU_LongLong_ModuloV(int64_t* pThis, int32_t left, int32_t right) {
|
|
||||||
#pragma comment(linker, "/EXPORT:BU_LongLong_ModuloV=_BU_LongLong_ModuloV@12")
|
|
||||||
*pThis %= (((uint64_t)left << 32) + (uint64_t)right);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
DLL_FUNCTION(void) BU_LongLong_ShiftLeft(int64_t* pThis, int32_t left) {
|
|
||||||
#pragma comment(linker, "/EXPORT:BU_LongLong_ShiftLeft=_BU_LongLong_ShiftLeft@8")
|
|
||||||
*pThis <<= left;
|
|
||||||
}
|
|
||||||
|
|
||||||
DLL_FUNCTION(void) BU_LongLong_ShiftRight(int64_t* pThis, int32_t right) {
|
|
||||||
#pragma comment(linker, "/EXPORT:BU_LongLong_ShiftRight=_BU_LongLong_ShiftRight@8")
|
|
||||||
*pThis >>= right;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
DLL_FUNCTION(int32_t) BU_LongLong_Compare(int64_t* pthis, int64_t* other) {
|
|
||||||
#pragma comment(linker, "/EXPORT:BU_LongLong_Compare=_BU_LongLong_Compare@8")
|
|
||||||
return (*pthis == *other ? 1 : 0) + (*pthis < *other ? 2 : 0) + (*pthis > *other ? 4 : 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
DLL_FUNCTION(int32_t) BU_LongLong_CompareV(int64_t* pthis, int32_t left, int32_t right) {
|
|
||||||
#pragma comment(linker, "/EXPORT:BU_LongLong_CompareV=_BU_LongLong_CompareV@12")
|
|
||||||
int64_t other = ((int64_t)left << 32) + right;
|
|
||||||
return (*pthis == other ? 1 : 0) + (*pthis < other ? 2 : 0) + (*pthis > other ? 4 : 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
DLL_FUNCTION(const char*) BU_LongLong_ToString(int64_t* pthis) {
|
|
||||||
#pragma comment(linker, "/EXPORT:BU_LongLong_ToString=_BU_LongLong_ToString@4")
|
|
||||||
std::stringstream stream;
|
|
||||||
stream << (*pthis);
|
|
||||||
return stream.str().c_str();
|
|
||||||
}
|
|
||||||
|
|
||||||
DLL_FUNCTION(int64_t*) BU_LongLong_FromString(const char* text) {
|
|
||||||
#pragma comment(linker, "/EXPORT:BU_LongLong_FromString=_BU_LongLong_FromString@4")
|
|
||||||
std::stringstream stream = std::stringstream(text);
|
|
||||||
int64_t* val = new int64_t;
|
|
||||||
stream >> (*val);
|
|
||||||
return val;
|
|
||||||
}
|
|
||||||
|
|
||||||
DLL_FUNCTION(int32_t) BU_LongLong_ToLong(int64_t* pthis, int32_t _modulus) {
|
|
||||||
#pragma comment(linker, "/EXPORT:BU_LongLong_ToLong=_BU_LongLong_ToLong@8")
|
|
||||||
return *pthis % _modulus;
|
|
||||||
}
|
|
||||||
|
|
||||||
DLL_FUNCTION(int64_t*) BU_LongLong_FromLong(int32_t left, int32_t right) {
|
|
||||||
#pragma comment(linker, "/EXPORT:BU_LongLong_FromLong=_BU_LongLong_FromLong@8")
|
|
||||||
int64_t* val = new int64_t;
|
|
||||||
*val = ((int64_t)left << 32) + right;
|
|
||||||
return val;
|
|
||||||
}
|
|
||||||
|
|
||||||
DLL_FUNCTION(int32_t) BU_LongLong_ToLongHigh(int64_t* pthis) {
|
|
||||||
#pragma comment(linker, "/EXPORT:BU_LongLong_ToLongHigh=_BU_LongLong_ToLongHigh@4")
|
|
||||||
return (int32_t)((*pthis) >> 32);
|
|
||||||
}
|
|
||||||
|
|
||||||
DLL_FUNCTION(int32_t) BU_LongLong_ToLongLow(int64_t* pthis) {
|
|
||||||
#pragma comment(linker, "/EXPORT:BU_LongLong_ToLongLow=_BU_LongLong_ToLongLow@4")
|
|
||||||
return (int32_t)((*pthis) && 0xFFFFFFFF);
|
|
||||||
}
|
|
||||||
|
|
||||||
DLL_FUNCTION(float_t) BU_LongLong_ToFloat(int64_t* pthis) {
|
|
||||||
#pragma comment(linker, "/EXPORT:BU_LongLong_ToFloat=_BU_LongLong_ToFloat@4")
|
|
||||||
return (float)*pthis;
|
|
||||||
}
|
|
||||||
|
|
||||||
DLL_FUNCTION(int64_t*) BU_LongLong_FromFloat(float_t other) {
|
|
||||||
#pragma comment(linker, "/EXPORT:BU_LongLong_FromFloat=_BU_LongLong_FromFloat@4")
|
|
||||||
int64_t val = (int64_t)other;
|
|
||||||
return BU_LongLong_Copy(&val);
|
|
||||||
}
|
|
||||||
|
|
||||||
DLL_FUNCTION(double_t*) BU_LongLong_ToDouble(int64_t* pthis) {
|
|
||||||
#pragma comment(linker, "/EXPORT:BU_LongLong_ToDouble=_BU_LongLong_ToDouble@4")
|
|
||||||
double_t* val = new double_t;
|
|
||||||
*val = (double_t)*pthis;
|
|
||||||
return val;
|
|
||||||
}
|
|
||||||
|
|
||||||
DLL_FUNCTION(int64_t*) BU_LongLong_FromDouble(double_t* other) {
|
|
||||||
#pragma comment(linker, "/EXPORT:BU_LongLong_FromDouble=_BU_LongLong_FromDouble@4")
|
|
||||||
int64_t* val = new int64_t;
|
|
||||||
*val = (int64_t)*other;
|
|
||||||
return val;
|
|
||||||
}
|
|
||||||
|
|
||||||
DLL_FUNCTION(const char*) BU_LongLong_Serialize(int64_t* pthis) {
|
|
||||||
#pragma comment(linker, "/EXPORT:BU_LongLong_Serialize=_BU_LongLong_Serialize@4")
|
|
||||||
return int_to_hex<int64_t>(*pthis).c_str();
|
|
||||||
}
|
|
||||||
|
|
||||||
DLL_FUNCTION(int64_t*) BU_LongLong_Deserialize(const char* text) {
|
|
||||||
#pragma comment(linker, "/EXPORT:BU_LongLong_Deserialize=_BU_LongLong_Deserialize@4")
|
|
||||||
int64_t val = hex_to_int<int64_t>(std::string(text));
|
|
||||||
return new int64_t(val);
|
|
||||||
}
|
|
||||||
@@ -1,87 +0,0 @@
|
|||||||
// Blitz - Steam wrapper for Blitz.
|
|
||||||
// Copyright (C) 2015 Xaymar (Michael Fabian Dirks)
|
|
||||||
//
|
|
||||||
// This program is free software: you can redistribute it and/or modify
|
|
||||||
// it under the terms of the GNU Lesser General Public License as
|
|
||||||
// published by the Free Software Foundation, either version 3 of the
|
|
||||||
// License, or (at your option) any later version.
|
|
||||||
//
|
|
||||||
// This program is distributed in the hope that it will be useful,
|
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
// GNU General Public License for more details.
|
|
||||||
//
|
|
||||||
// You should have received a copy of the GNU Lesser General Public License
|
|
||||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
#pragma once
|
|
||||||
#include "BlitzUtility.h"
|
|
||||||
#include "Double.h"
|
|
||||||
#include <string>
|
|
||||||
#include <sstream>
|
|
||||||
#include <iomanip>
|
|
||||||
|
|
||||||
#pragma region Constructor & Destructor
|
|
||||||
DLL_FUNCTION(int64_t*) BU_LongLong_Create();
|
|
||||||
DLL_FUNCTION(void) BU_LongLong_Destroy(int64_t* pthis);
|
|
||||||
DLL_FUNCTION(int64_t*) BU_LongLong_Copy(int64_t* other);
|
|
||||||
#pragma endregion Constructor & Destructor
|
|
||||||
|
|
||||||
#pragma region Temporary Objects
|
|
||||||
DLL_FUNCTION(int64_t*) BU_LongLong_TempCreate();
|
|
||||||
DLL_FUNCTION(int64_t*) BU_LongLong_TempCopy(int64_t* other);
|
|
||||||
DLL_FUNCTION(void) BU_LongLong_SetTemp(int64_t* pthis);
|
|
||||||
DLL_FUNCTION(void) BU_LongLong_UnsetTemp(int64_t* pthis);
|
|
||||||
DLL_FUNCTION(void) BU_LongLong_TempCleanup();
|
|
||||||
#pragma endregion Temporary Objects
|
|
||||||
|
|
||||||
#pragma region Math
|
|
||||||
DLL_FUNCTION(void) BU_LongLong_Set(int64_t* pthis, int64_t* other);
|
|
||||||
DLL_FUNCTION(void) BU_LongLong_SetV(int64_t* pthis, int32_t left, int32_t right);
|
|
||||||
|
|
||||||
DLL_FUNCTION(void) BU_LongLong_Add(int64_t* pthis, int64_t* other);
|
|
||||||
DLL_FUNCTION(void) BU_LongLong_AddV(int64_t* pthis, int32_t left, int32_t right);
|
|
||||||
|
|
||||||
DLL_FUNCTION(void) BU_LongLong_Sub(int64_t* pthis, int64_t* other);
|
|
||||||
DLL_FUNCTION(void) BU_LongLong_SubV(int64_t* pthis, int32_t left, int32_t right);
|
|
||||||
|
|
||||||
DLL_FUNCTION(void) BU_LongLong_Mul(int64_t* pthis, int64_t* other);
|
|
||||||
DLL_FUNCTION(void) BU_LongLong_MulV(int64_t* pthis, int32_t left, int32_t right);
|
|
||||||
|
|
||||||
DLL_FUNCTION(void) BU_LongLong_Div(int64_t* pthis, int64_t* other);
|
|
||||||
DLL_FUNCTION(void) BU_LongLong_DivV(int64_t* pthis, int32_t left, int32_t right);
|
|
||||||
#pragma endregion Math
|
|
||||||
|
|
||||||
#pragma region Advanced Math
|
|
||||||
DLL_FUNCTION(void) BU_LongLong_Modulo(int64_t* pThis, int64_t* pOther);
|
|
||||||
DLL_FUNCTION(void) BU_LongLong_ModuloV(int64_t* pThis, int32_t left, int32_t right);
|
|
||||||
|
|
||||||
DLL_FUNCTION(void) BU_LongLong_ShiftLeft(int64_t* pThis, int32_t left);
|
|
||||||
DLL_FUNCTION(void) BU_LongLong_ShiftRight(int64_t* pThis, int32_t right);
|
|
||||||
#pragma endregion Advanced Math
|
|
||||||
|
|
||||||
#pragma region Comparison
|
|
||||||
DLL_FUNCTION(int32_t) BU_LongLong_Compare(int64_t* pthis, int64_t* other);
|
|
||||||
DLL_FUNCTION(int32_t) BU_LongLong_CompareV(int64_t* pthis, int32_t left, int32_t right);
|
|
||||||
#pragma endregion Comparison
|
|
||||||
|
|
||||||
#pragma region Conversion
|
|
||||||
DLL_FUNCTION(const char*) BU_LongLong_ToString(int64_t* pthis);
|
|
||||||
DLL_FUNCTION(int64_t*) BU_LongLong_FromString(const char* text);
|
|
||||||
|
|
||||||
DLL_FUNCTION(int32_t) BU_LongLong_ToLong(int64_t* pthis, int32_t _modulus);
|
|
||||||
DLL_FUNCTION(int64_t*) BU_LongLong_FromLong(int32_t left, int32_t right);
|
|
||||||
DLL_FUNCTION(int32_t) BU_LongLong_ToLongHigh(int64_t* pthis);
|
|
||||||
DLL_FUNCTION(int32_t) BU_LongLong_ToLongLow(int64_t* pthis);
|
|
||||||
|
|
||||||
DLL_FUNCTION(float_t) BU_LongLong_ToFloat(int64_t* pthis);
|
|
||||||
DLL_FUNCTION(int64_t*) BU_LongLong_FromFloat(float_t other);
|
|
||||||
|
|
||||||
DLL_FUNCTION(double_t*) BU_LongLong_ToDouble(int64_t* pthis);
|
|
||||||
DLL_FUNCTION(int64_t*) BU_LongLong_FromDouble(double_t* pthis);
|
|
||||||
#pragma endregion Conversion
|
|
||||||
|
|
||||||
#pragma region Serialization
|
|
||||||
DLL_FUNCTION(const char*) BU_LongLong_Serialize(int64_t* pthis);
|
|
||||||
DLL_FUNCTION(int64_t*) BU_LongLong_Deserialize(const char* text);
|
|
||||||
#pragma endregion Serialization
|
|
||||||
+11
-29
@@ -117,7 +117,7 @@ DLL_FUNCTION(void) BU_MassOp_Run(MassOp* massop) {
|
|||||||
case Double:
|
case Double:
|
||||||
switch (instr->code) {
|
switch (instr->code) {
|
||||||
case Create:
|
case Create:
|
||||||
instr->result = (uint32_t) BU_Double_Create();
|
instr->result = (uint32_t) BU_Double_New();
|
||||||
break;
|
break;
|
||||||
case Destroy:
|
case Destroy:
|
||||||
BU_Double_Destroy((double_t*)instr->leftOperand);
|
BU_Double_Destroy((double_t*)instr->leftOperand);
|
||||||
@@ -125,15 +125,6 @@ DLL_FUNCTION(void) BU_MassOp_Run(MassOp* massop) {
|
|||||||
case Copy:
|
case Copy:
|
||||||
instr->result = (uint32_t) BU_Double_Copy((double_t*)instr->leftOperand);
|
instr->result = (uint32_t) BU_Double_Copy((double_t*)instr->leftOperand);
|
||||||
break;
|
break;
|
||||||
case TempCreate:
|
|
||||||
instr->result = (uint32_t) BU_Double_TempCreate();
|
|
||||||
break;
|
|
||||||
case TempCopy:
|
|
||||||
instr->result = (uint32_t) BU_Double_TempCopy((double_t*)instr->leftOperand);
|
|
||||||
break;
|
|
||||||
case TempCleanup:
|
|
||||||
BU_Double_TempCleanup();
|
|
||||||
break;
|
|
||||||
case Set:
|
case Set:
|
||||||
BU_Double_Set((double_t*)instr->leftOperand, (double_t*)instr->rightOperand);
|
BU_Double_Set((double_t*)instr->leftOperand, (double_t*)instr->rightOperand);
|
||||||
break;
|
break;
|
||||||
@@ -154,43 +145,34 @@ DLL_FUNCTION(void) BU_MassOp_Run(MassOp* massop) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case LongLong:
|
case Long:
|
||||||
switch (instr->code) {
|
switch (instr->code) {
|
||||||
case Create:
|
case Create:
|
||||||
instr->result = (uint32_t) BU_LongLong_Create();
|
instr->result = (uint32_t) BU_Long_New();
|
||||||
break;
|
break;
|
||||||
case Destroy:
|
case Destroy:
|
||||||
BU_LongLong_Destroy((int64_t*)instr->leftOperand);
|
BU_Long_Destroy((int64_t*)instr->leftOperand);
|
||||||
break;
|
break;
|
||||||
case Copy:
|
case Copy:
|
||||||
instr->result = (uint32_t) BU_LongLong_Copy((int64_t*)instr->leftOperand);
|
instr->result = (uint32_t) BU_Long_Copy((int64_t*)instr->leftOperand);
|
||||||
break;
|
|
||||||
case TempCreate:
|
|
||||||
instr->result = (uint32_t) BU_LongLong_TempCreate();
|
|
||||||
break;
|
|
||||||
case TempCopy:
|
|
||||||
instr->result = (uint32_t) BU_LongLong_TempCopy((int64_t*)instr->leftOperand);
|
|
||||||
break;
|
|
||||||
case TempCleanup:
|
|
||||||
BU_LongLong_TempCleanup();
|
|
||||||
break;
|
break;
|
||||||
case Set:
|
case Set:
|
||||||
BU_LongLong_Set((int64_t*)instr->leftOperand, (int64_t*)instr->rightOperand);
|
BU_Long_Set((int64_t*)instr->leftOperand, (int64_t*)instr->rightOperand);
|
||||||
break;
|
break;
|
||||||
case Add:
|
case Add:
|
||||||
BU_LongLong_Add((int64_t*)instr->leftOperand, (int64_t*)instr->rightOperand);
|
BU_Long_Add((int64_t*)instr->leftOperand, (int64_t*)instr->rightOperand);
|
||||||
break;
|
break;
|
||||||
case Sub:
|
case Sub:
|
||||||
BU_LongLong_Sub((int64_t*)instr->leftOperand, (int64_t*)instr->rightOperand);
|
BU_Long_Sub((int64_t*)instr->leftOperand, (int64_t*)instr->rightOperand);
|
||||||
break;
|
break;
|
||||||
case Mul:
|
case Mul:
|
||||||
BU_LongLong_Mul((int64_t*)instr->leftOperand, (int64_t*)instr->rightOperand);
|
BU_Long_Mul((int64_t*)instr->leftOperand, (int64_t*)instr->rightOperand);
|
||||||
break;
|
break;
|
||||||
case Div:
|
case Div:
|
||||||
BU_LongLong_Div((int64_t*)instr->leftOperand, (int64_t*)instr->rightOperand);
|
BU_Long_Div((int64_t*)instr->leftOperand, (int64_t*)instr->rightOperand);
|
||||||
break;
|
break;
|
||||||
case Compare:
|
case Compare:
|
||||||
instr->result = BU_LongLong_Compare((int64_t*)instr->leftOperand, (int64_t*)instr->rightOperand);
|
instr->result = BU_Long_Compare((int64_t*)instr->leftOperand, (int64_t*)instr->rightOperand);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
+1
-2
@@ -17,10 +17,9 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include "BlitzUtility.h"
|
#include "BlitzUtility.h"
|
||||||
#include "Type\Double.h"
|
#include "Type\Double.h"
|
||||||
#include "Type\LongLong.h"
|
|
||||||
|
|
||||||
enum MassOpType {
|
enum MassOpType {
|
||||||
LongLong = 0,
|
Long = 0,
|
||||||
Double = 1,
|
Double = 1,
|
||||||
|
|
||||||
Vector2 = 10,
|
Vector2 = 10,
|
||||||
|
|||||||
Reference in New Issue
Block a user