Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 311aa2d29d | |||
| 690691d5a0 | |||
| 2870370b84 |
+78
-6
@@ -83,30 +83,102 @@ DLL_METHOD intptr_t DLL_CALL BP_GetVariablePointerType(int32_t pVariable) {
|
||||
|
||||
DLL_METHOD int32_t DLL_CALL BP_CallFunction0(BP_BlitzFunction0_t lpFunctionPointer) {
|
||||
#pragma comment(linker, "/EXPORT:BP_CallFunction0=_BP_CallFunction0@4")
|
||||
return lpFunctionPointer();
|
||||
int32_t returnValue, StackPointer;
|
||||
|
||||
__asm { // Store Stack Pointer
|
||||
mov StackPointer, esp;
|
||||
}
|
||||
|
||||
returnValue = lpFunctionPointer();
|
||||
|
||||
__asm { // Restore Stack Pointer
|
||||
mov esp, StackPointer;
|
||||
}
|
||||
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
DLL_METHOD int32_t DLL_CALL BP_CallFunction1(BP_BlitzFunction1_t lpFunctionPointer, int32_t p1) {
|
||||
#pragma comment(linker, "/EXPORT:BP_CallFunction1=_BP_CallFunction1@8")
|
||||
return lpFunctionPointer(p1);
|
||||
int32_t returnValue, StackPointer;
|
||||
|
||||
__asm { // Store Stack Pointer
|
||||
mov StackPointer, esp;
|
||||
}
|
||||
|
||||
returnValue = lpFunctionPointer(p1);
|
||||
|
||||
__asm { // Restore Stack Pointer
|
||||
mov esp, StackPointer;
|
||||
}
|
||||
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
DLL_METHOD int32_t DLL_CALL BP_CallFunction2(BP_BlitzFunction2_t lpFunctionPointer, int32_t p1, int32_t p2) {
|
||||
#pragma comment(linker, "/EXPORT:BP_CallFunction2=_BP_CallFunction2@12")
|
||||
return lpFunctionPointer(p1, p2);
|
||||
int32_t returnValue, StackPointer;
|
||||
|
||||
__asm { // Store Stack Pointer
|
||||
mov StackPointer, esp;
|
||||
}
|
||||
|
||||
returnValue = lpFunctionPointer(p1, p2);
|
||||
|
||||
__asm { // Restore Stack Pointer
|
||||
mov esp, StackPointer;
|
||||
}
|
||||
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
DLL_METHOD int32_t DLL_CALL BP_CallFunction3(BP_BlitzFunction3_t lpFunctionPointer, int32_t p1, int32_t p2, int32_t p3) {
|
||||
#pragma comment(linker, "/EXPORT:BP_CallFunction3=_BP_CallFunction3@16")
|
||||
return lpFunctionPointer(p1, p2, p3);
|
||||
int32_t returnValue, StackPointer;
|
||||
|
||||
__asm { // Store Stack Pointer
|
||||
mov StackPointer, esp;
|
||||
}
|
||||
|
||||
returnValue = lpFunctionPointer(p1, p2, p3);
|
||||
|
||||
__asm { // Restore Stack Pointer
|
||||
mov esp, StackPointer;
|
||||
}
|
||||
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
DLL_METHOD int32_t DLL_CALL BP_CallFunction4(BP_BlitzFunction4_t lpFunctionPointer, int32_t p1, int32_t p2, int32_t p3, int32_t p4) {
|
||||
#pragma comment(linker, "/EXPORT:BP_CallFunction4=_BP_CallFunction4@20")
|
||||
return lpFunctionPointer(p1, p2, p3, p4);
|
||||
int32_t returnValue, StackPointer;
|
||||
|
||||
__asm { // Store Stack Pointer
|
||||
mov StackPointer, esp;
|
||||
}
|
||||
|
||||
returnValue = lpFunctionPointer(p1, p2, p3, p4);
|
||||
|
||||
__asm { // Restore Stack Pointer
|
||||
mov esp, StackPointer;
|
||||
}
|
||||
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
DLL_METHOD int32_t DLL_CALL BP_CallFunction5(BP_BlitzFunction5_t lpFunctionPointer, int32_t p1, int32_t p2, int32_t p3, int32_t p4, int32_t p5) {
|
||||
#pragma comment(linker, "/EXPORT:BP_CallFunction5=_BP_CallFunction5@24")
|
||||
return lpFunctionPointer(p1, p2, p3, p4, p5);
|
||||
int32_t returnValue, StackPointer;
|
||||
|
||||
__asm { // Store Stack Pointer
|
||||
mov StackPointer, esp;
|
||||
}
|
||||
|
||||
returnValue = lpFunctionPointer(p1, p2, p3, p4, p5);
|
||||
|
||||
__asm { // Restore Stack Pointer
|
||||
mov esp, StackPointer;
|
||||
}
|
||||
|
||||
return returnValue;
|
||||
}
|
||||
+42
-79
@@ -43,13 +43,12 @@
|
||||
<OutDir>$(SolutionDir)#Build\$(ProjectName)\$(Configuration)\</OutDir>
|
||||
<IntDir>$(SolutionDir)#Intermediate\$(ProjectName)\$(Configuration)\</IntDir>
|
||||
<TargetExt>.dll</TargetExt>
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<OutDir>$(SolutionDir)#Build\$(ProjectName)\$(Configuration)\</OutDir>
|
||||
<IntDir>$(SolutionDir)#Intermediate\$(ProjectName)\$(Configuration)\</IntDir>
|
||||
<TargetExt>.dll</TargetExt>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
@@ -82,20 +81,25 @@
|
||||
<FloatingPointExceptions>true</FloatingPointExceptions>
|
||||
<UseUnicodeForAssemblerListing>true</UseUnicodeForAssemblerListing>
|
||||
<PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<ControlFlowGuard>false</ControlFlowGuard>
|
||||
<EnforceTypeConversionRules>true</EnforceTypeConversionRules>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<Version>1.0</Version>
|
||||
<GenerateDebugInformation>Debug</GenerateDebugInformation>
|
||||
<LinkStatus>
|
||||
</LinkStatus>
|
||||
<CreateHotPatchableImage>Enabled</CreateHotPatchableImage>
|
||||
<EnableCOMDATFolding>false</EnableCOMDATFolding>
|
||||
<FixedBaseAddress>false</FixedBaseAddress>
|
||||
<LargeAddressAware>false</LargeAddressAware>
|
||||
<OptimizeReferences>false</OptimizeReferences>
|
||||
<LinkTimeCodeGeneration>
|
||||
</LinkTimeCodeGeneration>
|
||||
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
|
||||
<FullProgramDatabaseFile>true</FullProgramDatabaseFile>
|
||||
</Link>
|
||||
<ProjectReference>
|
||||
<LinkLibraryDependencies>false</LinkLibraryDependencies>
|
||||
</ProjectReference>
|
||||
<ProjectReference />
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
@@ -113,7 +117,7 @@
|
||||
<StructMemberAlignment>4Bytes</StructMemberAlignment>
|
||||
<EnableParallelCodeGeneration>true</EnableParallelCodeGeneration>
|
||||
<CreateHotpatchableImage>false</CreateHotpatchableImage>
|
||||
<RuntimeTypeInfo>false</RuntimeTypeInfo>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<OpenMPSupport>false</OpenMPSupport>
|
||||
<ForcedIncludeFiles>
|
||||
</ForcedIncludeFiles>
|
||||
@@ -128,21 +132,24 @@
|
||||
<UseUnicodeForAssemblerListing>true</UseUnicodeForAssemblerListing>
|
||||
<PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<DebugInformationFormat>None</DebugInformationFormat>
|
||||
<ControlFlowGuard>false</ControlFlowGuard>
|
||||
<EnforceTypeConversionRules>true</EnforceTypeConversionRules>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<GenerateDebugInformation>No</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>false</EnableCOMDATFolding>
|
||||
<OptimizeReferences>
|
||||
</OptimizeReferences>
|
||||
<Version>1.0</Version>
|
||||
<OptimizeReferences>false</OptimizeReferences>
|
||||
<LinkStatus>
|
||||
</LinkStatus>
|
||||
<CreateHotPatchableImage>Enabled</CreateHotPatchableImage>
|
||||
<FixedBaseAddress>false</FixedBaseAddress>
|
||||
<LargeAddressAware>false</LargeAddressAware>
|
||||
<LinkTimeCodeGeneration>
|
||||
</LinkTimeCodeGeneration>
|
||||
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
|
||||
<FullProgramDatabaseFile>false</FullProgramDatabaseFile>
|
||||
</Link>
|
||||
<ProjectReference>
|
||||
<LinkLibraryDependencies>false</LinkLibraryDependencies>
|
||||
</ProjectReference>
|
||||
<ProjectReference />
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="BlitzPointer.cpp" />
|
||||
@@ -154,70 +161,26 @@
|
||||
<ClInclude Include="dllmain.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="LICENSE">
|
||||
<Link>BlitzPointer.LICENSE</Link>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="LICENSE.lesser">
|
||||
<Link>BlitzPointer.LICENSE.lesser</Link>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="BlitzPointer.decls">
|
||||
<Link>BlitzPointer.decls</Link>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</DeploymentContent>
|
||||
</None>
|
||||
<None Include="Examples\BlitzPointer.ipf">
|
||||
<Link>Examples\BlitzPointer.ipf</Link>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</DeploymentContent>
|
||||
</None>
|
||||
<None Include="Examples\Example_Shared.bb">
|
||||
<Link>Examples\Example_Shared.bb</Link>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</DeploymentContent>
|
||||
</None>
|
||||
<None Include="Examples\Example01.bb">
|
||||
<Link>Examples\Example01.bb</Link>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</DeploymentContent>
|
||||
</None>
|
||||
<None Include="Examples\Example02.bb">
|
||||
<Link>Examples\Example02.bb</Link>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</DeploymentContent>
|
||||
</None>
|
||||
<None Include="Examples\Example03.bb">
|
||||
<Link>Examples\Example03.bb</Link>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</DeploymentContent>
|
||||
</None>
|
||||
<None Include="Examples\Example04.bb">
|
||||
<Link>Examples\Example04.bb</Link>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</DeploymentContent>
|
||||
</None>
|
||||
<None Include="Examples\Example05.bb">
|
||||
<Link>Examples\Example05.bb</Link>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</DeploymentContent>
|
||||
</None>
|
||||
<None Include="Examples\Example06.bb">
|
||||
<Link>Examples\Example06.bb</Link>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</DeploymentContent>
|
||||
</None>
|
||||
<None Include="Examples\Example07.bb">
|
||||
<Link>Examples\Example07.bb</Link>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</DeploymentContent>
|
||||
</None>
|
||||
<None Include="Examples\Example08.bb">
|
||||
<Link>Examples\Example08.bb</Link>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</DeploymentContent>
|
||||
</None>
|
||||
<None Include="Resources\BlitzPointer.decls" />
|
||||
<None Include="Resources\Examples\BlitzPointer.ipf" />
|
||||
<None Include="Resources\Examples\Example01.bb" />
|
||||
<None Include="Resources\Examples\Example02.bb" />
|
||||
<None Include="Resources\Examples\Example03.bb" />
|
||||
<None Include="Resources\Examples\Example04.bb" />
|
||||
<None Include="Resources\Examples\Example05.bb" />
|
||||
<None Include="Resources\Examples\Example06.bb" />
|
||||
<None Include="Resources\Examples\Example07.bb" />
|
||||
<None Include="Resources\Examples\Example08.bb" />
|
||||
<None Include="Resources\Examples\Example_Shared.bb" />
|
||||
<None Include="Resources\LICENSE" />
|
||||
<None Include="Resources\LICENSE.lesser" />
|
||||
</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" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
|
||||
@@ -5,21 +5,15 @@
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Blitz Files">
|
||||
<UniqueIdentifier>{53eae672-7e3f-4de4-af1f-79e46e407a39}</UniqueIdentifier>
|
||||
<ParseFiles>false</ParseFiles>
|
||||
<Extensions>bb;decls;ipf</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{527b3491-2ee2-474d-863f-2d21b7abb958}</UniqueIdentifier>
|
||||
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{df5bf7dd-7995-49a8-b534-f2c83a65ad87}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||
<UniqueIdentifier>{d3963385-0917-43df-9813-3cd79d80d4d0}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Blitz Files\Examples">
|
||||
<UniqueIdentifier>{2045f2b8-f3b8-4e65-80eb-459d4e00cd5a}</UniqueIdentifier>
|
||||
<Filter Include="Resource Files\Examples">
|
||||
<UniqueIdentifier>{1af1f49c-694a-4143-b7a4-9a6805a2385c}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
@@ -42,44 +36,44 @@
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="LICENSE">
|
||||
<None Include="Resources\BlitzPointer.decls">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="LICENSE.lesser">
|
||||
<None Include="Resources\LICENSE">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="BlitzPointer.decls">
|
||||
<Filter>Blitz Files</Filter>
|
||||
<None Include="Resources\LICENSE.lesser">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="Examples\Example_Shared.bb">
|
||||
<Filter>Blitz Files\Examples</Filter>
|
||||
<None Include="Resources\Examples\Example04.bb">
|
||||
<Filter>Resource Files\Examples</Filter>
|
||||
</None>
|
||||
<None Include="Examples\Example01.bb">
|
||||
<Filter>Blitz Files\Examples</Filter>
|
||||
<None Include="Resources\Examples\Example05.bb">
|
||||
<Filter>Resource Files\Examples</Filter>
|
||||
</None>
|
||||
<None Include="Examples\Example02.bb">
|
||||
<Filter>Blitz Files\Examples</Filter>
|
||||
<None Include="Resources\Examples\Example06.bb">
|
||||
<Filter>Resource Files\Examples</Filter>
|
||||
</None>
|
||||
<None Include="Examples\Example03.bb">
|
||||
<Filter>Blitz Files\Examples</Filter>
|
||||
<None Include="Resources\Examples\Example07.bb">
|
||||
<Filter>Resource Files\Examples</Filter>
|
||||
</None>
|
||||
<None Include="Examples\Example04.bb">
|
||||
<Filter>Blitz Files\Examples</Filter>
|
||||
<None Include="Resources\Examples\Example08.bb">
|
||||
<Filter>Resource Files\Examples</Filter>
|
||||
</None>
|
||||
<None Include="Examples\Example05.bb">
|
||||
<Filter>Blitz Files\Examples</Filter>
|
||||
<None Include="Resources\Examples\BlitzPointer.ipf">
|
||||
<Filter>Resource Files\Examples</Filter>
|
||||
</None>
|
||||
<None Include="Examples\Example06.bb">
|
||||
<Filter>Blitz Files\Examples</Filter>
|
||||
<None Include="Resources\Examples\Example_Shared.bb">
|
||||
<Filter>Resource Files\Examples</Filter>
|
||||
</None>
|
||||
<None Include="Examples\Example07.bb">
|
||||
<Filter>Blitz Files\Examples</Filter>
|
||||
<None Include="Resources\Examples\Example01.bb">
|
||||
<Filter>Resource Files\Examples</Filter>
|
||||
</None>
|
||||
<None Include="Examples\Example08.bb">
|
||||
<Filter>Blitz Files\Examples</Filter>
|
||||
<None Include="Resources\Examples\Example02.bb">
|
||||
<Filter>Resource Files\Examples</Filter>
|
||||
</None>
|
||||
<None Include="Examples\BlitzPointer.ipf">
|
||||
<Filter>Blitz Files\Examples</Filter>
|
||||
<None Include="Resources\Examples\Example03.bb">
|
||||
<Filter>Resource Files\Examples</Filter>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,25 @@
|
||||
# BlitzPointer - Easy Function & Variable Pointers for Blitz3D and BlitzPlus!
|
||||
|
||||
This is part of the BlitzExtensions set, please use that one instead!
|
||||
See here: https://github.com/Xaymar/BlitzExtensions
|
||||
|
||||
# Building the Source
|
||||
|
||||
## Requirements
|
||||
|
||||
* Visual Studio 2015 (Express should work)
|
||||
|
||||
## Building
|
||||
|
||||
* Open the Project (or Solution) in Visual Studio.
|
||||
* Build the BlitzPointer project.
|
||||
* Binaries will be located in ../#Binaries/BlitzPointer/$(Configuration)/
|
||||
|
||||
# License
|
||||
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/>.
|
||||
Reference in New Issue
Block a user