Compare commits
16 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 311aa2d29d | |||
| 690691d5a0 | |||
| 2870370b84 | |||
| 7591ca4a03 | |||
| 491e11ca77 | |||
| 7af64687cc | |||
| b12b20ff17 | |||
| 2941a6b740 | |||
| 57c310b0fc | |||
| 88122a928a | |||
| 49c7264893 | |||
| 7cc0788e8b | |||
| 95dd86e6af | |||
| 519cd5c577 | |||
| 4b428b4535 | |||
| 1ec8bc54dd |
File diff suppressed because it is too large
Load Diff
+129
-47
@@ -1,5 +1,5 @@
|
|||||||
// BlitzPointer - Adding Pointers to Blitz.
|
// BlitzPointer - Adding Pointers to Blitz.
|
||||||
// Copyright (C) 2015 Project Kube (Michael Fabian Dirks)
|
// Copyright (C) 2015 Xaymar (Michael Fabian Dirks)
|
||||||
//
|
//
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// This program is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU Lesser General Public License as
|
// it under the terms of the GNU Lesser General Public License as
|
||||||
@@ -15,88 +15,170 @@
|
|||||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
// Idea take from Code by Noodoby<http://www.blitzforum.de/forum/viewtopic.php?t=31651>
|
// Idea take from Code by Noodoby<http://www.blitzforum.de/forum/viewtopic.php?t=31651>
|
||||||
// New Code by Xaymar<http://project-kube.de>
|
// New Code by Xaymar<http://xaymar.com>
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
#include "BlitzPointer.h"
|
#include "BlitzPointer.h"
|
||||||
|
|
||||||
DLL_METHOD intptr_t DLL_CALL BP_GetReturnAddress() {
|
DLL_METHOD intptr_t DLL_CALL BP_GetReturnAddress() {
|
||||||
intptr_t StackPointer, ReturnAddress;
|
#pragma comment(linker, "/EXPORT:BP_GetReturnAddress=_BP_GetReturnAddress@0")
|
||||||
|
intptr_t BasePointer, ReturnAddress;
|
||||||
|
|
||||||
__asm { //ASM. Do touch if suicidal.
|
__asm { //ASM. Do touch if suicidal.
|
||||||
mov StackPointer, esp; // Store current Stack Pointer
|
mov BasePointer, ebp; // Store current BasePointer
|
||||||
mov esp, ebp; // On X86, EBP[0] is our own function and EBP[1] is the return address.
|
|
||||||
add esp, 4; // Which means that we can just take it from there into our own variable.
|
|
||||||
pop ReturnAddress; // Just like this.
|
|
||||||
mov esp, [StackPointer]; // And then reset the Stack Pointer.
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Blitz uses X86 Call-Near (E8) instructions to call its own functions.
|
||||||
|
// We can simply deduce the Return Address like this because of that.
|
||||||
|
//-- Parent_EBP = *EBP
|
||||||
|
//-- Parent_RP = Parent_EBP + 16
|
||||||
|
ReturnAddress = *(intptr_t*)((*(intptr_t*)BasePointer) + 16);
|
||||||
|
|
||||||
return ReturnAddress;
|
return ReturnAddress;
|
||||||
}
|
}
|
||||||
#pragma comment(linker, "/EXPORT:BP_GetReturnAddress=_BP_GetReturnAddress@0")
|
|
||||||
|
|
||||||
DLL_METHOD intptr_t DLL_CALL BP_GetFunctionPointer()
|
DLL_METHOD intptr_t DLL_CALL BP_GetFunctionPointer() {
|
||||||
{
|
#pragma comment(linker, "/EXPORT:BP_GetFunctionPointer=_BP_GetFunctionPointer@0")
|
||||||
intptr_t StackPointer, ReturnAddress;
|
intptr_t BasePointer, ReturnAddress, FunctionPointer;
|
||||||
|
|
||||||
__asm { //ASM. Do touch if suicidal.
|
__asm { //ASM. Do touch if suicidal.
|
||||||
mov StackPointer, esp; // Store current Stack Pointer
|
mov BasePointer, ebp; // Store current BasePointer
|
||||||
mov esp, ebp; // On X86, EBP[0] is our own function and EBP[1] is the return address.
|
|
||||||
add esp, 4; // Which means that we can just take it from there into our own variable.
|
|
||||||
pop ReturnAddress; // Just like this.
|
|
||||||
mov esp, [StackPointer]; // And then reset the Stack Pointer.
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Let's look backwards in memory for the function signature (0x53 0x56 0x57 0x55 0x89 0xE5) for at most one megabyte.
|
// Blitz uses X86 Call-Near (E8) instructions to call its own functions.
|
||||||
uint8_t* startPtr = (uint8_t*)ReturnAddress;
|
// We can simply deduce the Return Address like this because of that.
|
||||||
uint8_t* endPtr = (uint8_t*)(ReturnAddress - 1048576);
|
//-- Parent_EBP = *EBP
|
||||||
for (uint8_t* curPtr = startPtr; curPtr != endPtr; curPtr--) {
|
//-- Parent_RP = Parent_EBP + 16
|
||||||
if (*(curPtr) == 0x53) // push ebx
|
ReturnAddress = *(intptr_t*)((*(intptr_t*)BasePointer) + 16);
|
||||||
if (*(curPtr + 1) == 0x56) // push esi
|
|
||||||
if (*(curPtr + 2) == 0x57) // push edi
|
// And since it's a Call-Near, the call is offset to the return address.
|
||||||
if (*(curPtr + 3) == 0x55) // push ebp
|
FunctionPointer = ReturnAddress + *(intptr_t*)(ReturnAddress - 4);
|
||||||
if (*(curPtr + 4) == 0x89 && *(curPtr + 5) == 0xE5) // mov ebp,esp
|
|
||||||
return (intptr_t)curPtr;
|
return FunctionPointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
DLL_METHOD intptr_t DLL_CALL BP_GetVariablePointer(int32_t pVariable) {
|
||||||
|
#pragma comment(linker, "/EXPORT:BP_GetVariablePointer=_BP_GetVariablePointer@4")
|
||||||
|
intptr_t BasePointer;
|
||||||
|
|
||||||
|
__asm { //ASM. Do touch if suicidal.
|
||||||
|
mov BasePointer, ebp; // Store current BasePointer
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
// The Variable pointer that is used is at -9 bytes offset to the return address of this function.
|
||||||
|
return *(intptr_t*)(*(intptr_t*)(BasePointer + 4) - 9);
|
||||||
}
|
}
|
||||||
#pragma comment(linker, "/EXPORT:BP_GetFunctionPointer=_BP_GetFunctionPointer@0")
|
|
||||||
|
|
||||||
DLL_METHOD intptr_t DLL_CALL BP_GetVariablePointer() {
|
DLL_METHOD intptr_t DLL_CALL BP_GetVariablePointerType(int32_t pVariable) {
|
||||||
// ToDo: Figure out how to get the pointer of a variable reliably. Must do so without Goto.
|
#pragma comment(linker, "/EXPORT:BP_GetVariablePointerType=_BP_GetVariablePointerType@4")
|
||||||
// - Idea: Have user assign variable to the ptr first? Easier to find.
|
intptr_t BasePointer;
|
||||||
// - Strings are difficult - exclude these?
|
|
||||||
return 0;
|
__asm { //ASM. Do touch if suicidal.
|
||||||
|
mov BasePointer, ebp; // Store current BasePointer
|
||||||
|
}
|
||||||
|
|
||||||
|
// The Variable pointer that is used is at -11 bytes offset to the return address of this function.
|
||||||
|
return *(intptr_t*)(*(intptr_t*)(BasePointer + 4) - 11);
|
||||||
}
|
}
|
||||||
#pragma comment(linker, "/EXPORT:BP_GetVariablePointer=_BP_GetVariablePointer@0")
|
|
||||||
|
|
||||||
DLL_METHOD int32_t DLL_CALL BP_CallFunction0(BP_BlitzFunction0_t lpFunctionPointer) {
|
DLL_METHOD int32_t DLL_CALL BP_CallFunction0(BP_BlitzFunction0_t lpFunctionPointer) {
|
||||||
return lpFunctionPointer();
|
|
||||||
}
|
|
||||||
#pragma comment(linker, "/EXPORT:BP_CallFunction0=_BP_CallFunction0@4")
|
#pragma comment(linker, "/EXPORT:BP_CallFunction0=_BP_CallFunction0@4")
|
||||||
|
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) {
|
DLL_METHOD int32_t DLL_CALL BP_CallFunction1(BP_BlitzFunction1_t lpFunctionPointer, int32_t p1) {
|
||||||
return lpFunctionPointer(p1);
|
|
||||||
}
|
|
||||||
#pragma comment(linker, "/EXPORT:BP_CallFunction1=_BP_CallFunction1@8")
|
#pragma comment(linker, "/EXPORT:BP_CallFunction1=_BP_CallFunction1@8")
|
||||||
|
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) {
|
DLL_METHOD int32_t DLL_CALL BP_CallFunction2(BP_BlitzFunction2_t lpFunctionPointer, int32_t p1, int32_t p2) {
|
||||||
return lpFunctionPointer(p1, p2);
|
|
||||||
}
|
|
||||||
#pragma comment(linker, "/EXPORT:BP_CallFunction2=_BP_CallFunction2@12")
|
#pragma comment(linker, "/EXPORT:BP_CallFunction2=_BP_CallFunction2@12")
|
||||||
|
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) {
|
DLL_METHOD int32_t DLL_CALL BP_CallFunction3(BP_BlitzFunction3_t lpFunctionPointer, int32_t p1, int32_t p2, int32_t p3) {
|
||||||
return lpFunctionPointer(p1, p2, p3);
|
|
||||||
}
|
|
||||||
#pragma comment(linker, "/EXPORT:BP_CallFunction3=_BP_CallFunction3@16")
|
#pragma comment(linker, "/EXPORT:BP_CallFunction3=_BP_CallFunction3@16")
|
||||||
|
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) {
|
DLL_METHOD int32_t DLL_CALL BP_CallFunction4(BP_BlitzFunction4_t lpFunctionPointer, int32_t p1, int32_t p2, int32_t p3, int32_t p4) {
|
||||||
return lpFunctionPointer(p1, p2, p3, p4);
|
|
||||||
}
|
|
||||||
#pragma comment(linker, "/EXPORT:BP_CallFunction4=_BP_CallFunction4@20")
|
#pragma comment(linker, "/EXPORT:BP_CallFunction4=_BP_CallFunction4@20")
|
||||||
|
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) {
|
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) {
|
||||||
return lpFunctionPointer(p1, p2, p3, p4, p5);
|
|
||||||
}
|
|
||||||
#pragma comment(linker, "/EXPORT:BP_CallFunction5=_BP_CallFunction5@24")
|
#pragma comment(linker, "/EXPORT:BP_CallFunction5=_BP_CallFunction5@24")
|
||||||
|
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;
|
||||||
|
}
|
||||||
+5
-2
@@ -1,5 +1,5 @@
|
|||||||
// BlitzPointer - Adding Pointers to Blitz.
|
// BlitzPointer - Adding Pointers to Blitz.
|
||||||
// Copyright (C) 2015 Project Kube (Michael Fabian Dirks)
|
// Copyright (C) 2015 Xaymar (Michael Fabian Dirks)
|
||||||
//
|
//
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// This program is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU Lesser General Public License as
|
// it under the terms of the GNU Lesser General Public License as
|
||||||
@@ -29,7 +29,10 @@ typedef int32_t(__stdcall *BP_BlitzFunction5_t)(int32_t, int32_t, int32_t, int32
|
|||||||
// Basic Functionality (Pointer retrieval)
|
// Basic Functionality (Pointer retrieval)
|
||||||
DLL_METHOD intptr_t DLL_CALL BP_GetReturnAddress();
|
DLL_METHOD intptr_t DLL_CALL BP_GetReturnAddress();
|
||||||
DLL_METHOD intptr_t DLL_CALL BP_GetFunctionPointer();
|
DLL_METHOD intptr_t DLL_CALL BP_GetFunctionPointer();
|
||||||
DLL_METHOD intptr_t DLL_CALL BP_GetVariablePointer();
|
/*DLL_METHOD intptr_t DLL_CALL BP_GetLastCalledFunctionPointer( );
|
||||||
|
DLL_METHOD intptr_t DLL_CALL BP_GetNextCalledFunctionPointer();*/
|
||||||
|
DLL_METHOD intptr_t DLL_CALL BP_GetVariablePointer(int32_t pVariable);
|
||||||
|
DLL_METHOD intptr_t DLL_CALL BP_GetVariablePointerType(int32_t pVariable);
|
||||||
|
|
||||||
// Native Blitz Function Calls
|
// Native Blitz Function Calls
|
||||||
DLL_METHOD int32_t DLL_CALL BP_CallFunction0(BP_BlitzFunction0_t lpFunctionPointer);
|
DLL_METHOD int32_t DLL_CALL BP_CallFunction0(BP_BlitzFunction0_t lpFunctionPointer);
|
||||||
|
|||||||
+61
-94
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<ItemGroup Label="ProjectConfigurations">
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
<ProjectConfiguration Include="Debug|Win32">
|
<ProjectConfiguration Include="Debug|Win32">
|
||||||
<Configuration>Debug</Configuration>
|
<Configuration>Debug</Configuration>
|
||||||
@@ -13,18 +13,19 @@
|
|||||||
<PropertyGroup Label="Globals">
|
<PropertyGroup Label="Globals">
|
||||||
<ProjectGuid>{AC8F52F4-9FE6-4CEF-B549-8180757020C8}</ProjectGuid>
|
<ProjectGuid>{AC8F52F4-9FE6-4CEF-B549-8180757020C8}</ProjectGuid>
|
||||||
<RootNamespace>BlitzPointer</RootNamespace>
|
<RootNamespace>BlitzPointer</RootNamespace>
|
||||||
|
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
<UseDebugLibraries>true</UseDebugLibraries>
|
<UseDebugLibraries>true</UseDebugLibraries>
|
||||||
<PlatformToolset>v120</PlatformToolset>
|
<PlatformToolset>v140</PlatformToolset>
|
||||||
<CharacterSet>Unicode</CharacterSet>
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
<UseDebugLibraries>false</UseDebugLibraries>
|
<UseDebugLibraries>false</UseDebugLibraries>
|
||||||
<PlatformToolset>v120</PlatformToolset>
|
<PlatformToolset>v140</PlatformToolset>
|
||||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||||
<CharacterSet>Unicode</CharacterSet>
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
@@ -39,35 +40,32 @@
|
|||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
<PropertyGroup Label="UserMacros" />
|
<PropertyGroup Label="UserMacros" />
|
||||||
<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>
|
||||||
<TargetExt>.dll</TargetExt>
|
<TargetExt>.dll</TargetExt>
|
||||||
<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>
|
||||||
<TargetExt>.dll</TargetExt>
|
<TargetExt>.dll</TargetExt>
|
||||||
<LinkIncremental>false</LinkIncremental>
|
<LinkIncremental>true</LinkIncremental>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<WarningLevel>Level3</WarningLevel>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<SDLCheck>
|
|
||||||
</SDLCheck>
|
|
||||||
<AdditionalIncludeDirectories>$(ProjectDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(ProjectDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||||
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||||
<FunctionLevelLinking>false</FunctionLevelLinking>
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
<CompileAsManaged>false</CompileAsManaged>
|
<CompileAsManaged>false</CompileAsManaged>
|
||||||
<CompileAsWinRT>false</CompileAsWinRT>
|
<CompileAsWinRT>false</CompileAsWinRT>
|
||||||
<StructMemberAlignment>4Bytes</StructMemberAlignment>
|
<StructMemberAlignment>4Bytes</StructMemberAlignment>
|
||||||
<EnableParallelCodeGeneration>true</EnableParallelCodeGeneration>
|
<EnableParallelCodeGeneration>true</EnableParallelCodeGeneration>
|
||||||
<CreateHotpatchableImage>false</CreateHotpatchableImage>
|
<CreateHotpatchableImage>true</CreateHotpatchableImage>
|
||||||
<RuntimeTypeInfo>false</RuntimeTypeInfo>
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
<OpenMPSupport>false</OpenMPSupport>
|
<OpenMPSupport>false</OpenMPSupport>
|
||||||
<ForcedIncludeFiles>
|
<ForcedIncludeFiles>
|
||||||
</ForcedIncludeFiles>
|
</ForcedIncludeFiles>
|
||||||
@@ -79,32 +77,36 @@
|
|||||||
<IntrinsicFunctions>false</IntrinsicFunctions>
|
<IntrinsicFunctions>false</IntrinsicFunctions>
|
||||||
<FavorSizeOrSpeed>Neither</FavorSizeOrSpeed>
|
<FavorSizeOrSpeed>Neither</FavorSizeOrSpeed>
|
||||||
<StringPooling>true</StringPooling>
|
<StringPooling>true</StringPooling>
|
||||||
<EnableEnhancedInstructionSet>NoExtensions</EnableEnhancedInstructionSet>
|
<EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet>
|
||||||
<FloatingPointExceptions>false</FloatingPointExceptions>
|
<FloatingPointExceptions>true</FloatingPointExceptions>
|
||||||
<UseUnicodeForAssemblerListing>true</UseUnicodeForAssemblerListing>
|
<UseUnicodeForAssemblerListing>true</UseUnicodeForAssemblerListing>
|
||||||
<PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
|
<ControlFlowGuard>false</ControlFlowGuard>
|
||||||
|
<EnforceTypeConversionRules>true</EnforceTypeConversionRules>
|
||||||
</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>
|
||||||
<ProjectReference>
|
<ProjectReference />
|
||||||
<LinkLibraryDependencies>false</LinkLibraryDependencies>
|
|
||||||
</ProjectReference>
|
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<WarningLevel>Level3</WarningLevel>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<Optimization>Full</Optimization>
|
<Optimization>Full</Optimization>
|
||||||
<FunctionLevelLinking>false</FunctionLevelLinking>
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
<SDLCheck>
|
|
||||||
</SDLCheck>
|
|
||||||
<AdditionalIncludeDirectories>$(ProjectDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(ProjectDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||||
@@ -115,35 +117,39 @@
|
|||||||
<StructMemberAlignment>4Bytes</StructMemberAlignment>
|
<StructMemberAlignment>4Bytes</StructMemberAlignment>
|
||||||
<EnableParallelCodeGeneration>true</EnableParallelCodeGeneration>
|
<EnableParallelCodeGeneration>true</EnableParallelCodeGeneration>
|
||||||
<CreateHotpatchableImage>false</CreateHotpatchableImage>
|
<CreateHotpatchableImage>false</CreateHotpatchableImage>
|
||||||
<RuntimeTypeInfo>false</RuntimeTypeInfo>
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
<OpenMPSupport>false</OpenMPSupport>
|
<OpenMPSupport>false</OpenMPSupport>
|
||||||
<ForcedIncludeFiles>
|
<ForcedIncludeFiles>
|
||||||
</ForcedIncludeFiles>
|
</ForcedIncludeFiles>
|
||||||
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
|
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
|
||||||
<MinimalRebuild>false</MinimalRebuild>
|
<MinimalRebuild>false</MinimalRebuild>
|
||||||
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
|
<InlineFunctionExpansion>Default</InlineFunctionExpansion>
|
||||||
<OmitFramePointers>false</OmitFramePointers>
|
<OmitFramePointers>false</OmitFramePointers>
|
||||||
<CallingConvention>Cdecl</CallingConvention>
|
<CallingConvention>Cdecl</CallingConvention>
|
||||||
<StringPooling>true</StringPooling>
|
<StringPooling>true</StringPooling>
|
||||||
<EnableEnhancedInstructionSet>NoExtensions</EnableEnhancedInstructionSet>
|
<EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet>
|
||||||
<FloatingPointExceptions>false</FloatingPointExceptions>
|
<FloatingPointExceptions>true</FloatingPointExceptions>
|
||||||
<UseUnicodeForAssemblerListing>true</UseUnicodeForAssemblerListing>
|
<UseUnicodeForAssemblerListing>true</UseUnicodeForAssemblerListing>
|
||||||
<PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<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>
|
||||||
<ProjectReference>
|
<ProjectReference />
|
||||||
<LinkLibraryDependencies>false</LinkLibraryDependencies>
|
|
||||||
</ProjectReference>
|
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="BlitzPointer.cpp" />
|
<ClCompile Include="BlitzPointer.cpp" />
|
||||||
@@ -155,65 +161,26 @@
|
|||||||
<ClInclude Include="dllmain.h" />
|
<ClInclude Include="dllmain.h" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="LICENSE">
|
<None Include="Resources\BlitzPointer.decls" />
|
||||||
<Link>BlitzPointer.LICENSE</Link>
|
<None Include="Resources\Examples\BlitzPointer.ipf" />
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<None Include="Resources\Examples\Example01.bb" />
|
||||||
</None>
|
<None Include="Resources\Examples\Example02.bb" />
|
||||||
<None Include="LICENSE.lesser">
|
<None Include="Resources\Examples\Example03.bb" />
|
||||||
<Link>BlitzPointer.LICENSE.lesser</Link>
|
<None Include="Resources\Examples\Example04.bb" />
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<None Include="Resources\Examples\Example05.bb" />
|
||||||
</None>
|
<None Include="Resources\Examples\Example06.bb" />
|
||||||
<None Include="Blitz\BlitzPointer.decls">
|
<None Include="Resources\Examples\Example07.bb" />
|
||||||
<Link>BlitzPointer.decls</Link>
|
<None Include="Resources\Examples\Example08.bb" />
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<None Include="Resources\Examples\Example_Shared.bb" />
|
||||||
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</DeploymentContent>
|
<None Include="Resources\LICENSE" />
|
||||||
</None>
|
<None Include="Resources\LICENSE.lesser" />
|
||||||
<None Include="Blitz\BlitzPointer.ipf">
|
|
||||||
<Link>Examples\BlitzPointer.ipf</Link>
|
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
||||||
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</DeploymentContent>
|
|
||||||
</None>
|
|
||||||
<None Include="Blitz\Example_Shared.bb">
|
|
||||||
<Link>Examples\Example_Shared.bb</Link>
|
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
||||||
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</DeploymentContent>
|
|
||||||
</None>
|
|
||||||
<None Include="Blitz\Example01.bb">
|
|
||||||
<Link>Examples\Example01.bb</Link>
|
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
||||||
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</DeploymentContent>
|
|
||||||
</None>
|
|
||||||
<None Include="Blitz\Example02.bb">
|
|
||||||
<Link>Examples\Example02.bb</Link>
|
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
||||||
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</DeploymentContent>
|
|
||||||
</None>
|
|
||||||
<None Include="Blitz\Example03.bb">
|
|
||||||
<Link>Examples\Example03.bb</Link>
|
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
||||||
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</DeploymentContent>
|
|
||||||
</None>
|
|
||||||
<None Include="Blitz\Example04.bb">
|
|
||||||
<Link>Examples\Example04.bb</Link>
|
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
||||||
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</DeploymentContent>
|
|
||||||
</None>
|
|
||||||
<None Include="Blitz\Example05.bb">
|
|
||||||
<Link>Examples\Example05.bb</Link>
|
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
||||||
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</DeploymentContent>
|
|
||||||
</None>
|
|
||||||
<None Include="Blitz\Example06.bb">
|
|
||||||
<Link>Examples\Example06.bb</Link>
|
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
||||||
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</DeploymentContent>
|
|
||||||
</None>
|
|
||||||
<None Include="Blitz\Example07.bb">
|
|
||||||
<Link>Examples\Example07.bb</Link>
|
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
||||||
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</DeploymentContent>
|
|
||||||
</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>
|
||||||
|
|||||||
@@ -5,9 +5,15 @@
|
|||||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||||
</Filter>
|
</Filter>
|
||||||
<Filter Include="Blitz Files">
|
<Filter Include="Header Files">
|
||||||
<UniqueIdentifier>{53eae672-7e3f-4de4-af1f-79e46e407a39}</UniqueIdentifier>
|
<UniqueIdentifier>{527b3491-2ee2-474d-863f-2d21b7abb958}</UniqueIdentifier>
|
||||||
<ParseFiles>false</ParseFiles>
|
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Resource Files">
|
||||||
|
<UniqueIdentifier>{d3963385-0917-43df-9813-3cd79d80d4d0}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Resource Files\Examples">
|
||||||
|
<UniqueIdentifier>{1af1f49c-694a-4143-b7a4-9a6805a2385c}</UniqueIdentifier>
|
||||||
</Filter>
|
</Filter>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
@@ -22,45 +28,52 @@
|
|||||||
</ClCompile>
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="dllmain.h">
|
|
||||||
<Filter>Source Files</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="BlitzPointer.h">
|
<ClInclude Include="BlitzPointer.h">
|
||||||
<Filter>Source Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="dllmain.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="Blitz\Example05.bb">
|
<None Include="Resources\BlitzPointer.decls">
|
||||||
<Filter>Blitz Files</Filter>
|
<Filter>Resource Files</Filter>
|
||||||
</None>
|
</None>
|
||||||
<None Include="Blitz\BlitzPointer.decls">
|
<None Include="Resources\LICENSE">
|
||||||
<Filter>Blitz Files</Filter>
|
<Filter>Resource Files</Filter>
|
||||||
</None>
|
</None>
|
||||||
<None Include="Blitz\BlitzPointer.ipf">
|
<None Include="Resources\LICENSE.lesser">
|
||||||
<Filter>Blitz Files</Filter>
|
<Filter>Resource Files</Filter>
|
||||||
</None>
|
</None>
|
||||||
<None Include="Blitz\Example_Shared.bb">
|
<None Include="Resources\Examples\Example04.bb">
|
||||||
<Filter>Blitz Files</Filter>
|
<Filter>Resource Files\Examples</Filter>
|
||||||
</None>
|
</None>
|
||||||
<None Include="Blitz\Example01.bb">
|
<None Include="Resources\Examples\Example05.bb">
|
||||||
<Filter>Blitz Files</Filter>
|
<Filter>Resource Files\Examples</Filter>
|
||||||
</None>
|
</None>
|
||||||
<None Include="Blitz\Example02.bb">
|
<None Include="Resources\Examples\Example06.bb">
|
||||||
<Filter>Blitz Files</Filter>
|
<Filter>Resource Files\Examples</Filter>
|
||||||
</None>
|
</None>
|
||||||
<None Include="Blitz\Example03.bb">
|
<None Include="Resources\Examples\Example07.bb">
|
||||||
<Filter>Blitz Files</Filter>
|
<Filter>Resource Files\Examples</Filter>
|
||||||
</None>
|
</None>
|
||||||
<None Include="Blitz\Example04.bb">
|
<None Include="Resources\Examples\Example08.bb">
|
||||||
<Filter>Blitz Files</Filter>
|
<Filter>Resource Files\Examples</Filter>
|
||||||
</None>
|
</None>
|
||||||
<None Include="Blitz\Example06.bb">
|
<None Include="Resources\Examples\BlitzPointer.ipf">
|
||||||
<Filter>Blitz Files</Filter>
|
<Filter>Resource Files\Examples</Filter>
|
||||||
</None>
|
</None>
|
||||||
<None Include="Blitz\Example07.bb">
|
<None Include="Resources\Examples\Example_Shared.bb">
|
||||||
<Filter>Blitz Files</Filter>
|
<Filter>Resource Files\Examples</Filter>
|
||||||
|
</None>
|
||||||
|
<None Include="Resources\Examples\Example01.bb">
|
||||||
|
<Filter>Resource Files\Examples</Filter>
|
||||||
|
</None>
|
||||||
|
<None Include="Resources\Examples\Example02.bb">
|
||||||
|
<Filter>Resource Files\Examples</Filter>
|
||||||
|
</None>
|
||||||
|
<None Include="Resources\Examples\Example03.bb">
|
||||||
|
<Filter>Resource Files\Examples</Filter>
|
||||||
</None>
|
</None>
|
||||||
<None Include="LICENSE" />
|
|
||||||
<None Include="LICENSE.lesser" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
// BlitzPointer - Adding Pointers to Blitz.
|
// BlitzPointer - Adding Pointers to Blitz.
|
||||||
// Copyright (C) 2015 Project Kube (Michael Fabian Dirks)
|
// Copyright (C) 2015 Xaymar (Michael Fabian Dirks)
|
||||||
//
|
//
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// This program is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU Lesser General Public License as
|
// it under the terms of the GNU Lesser General Public License as
|
||||||
|
|||||||
@@ -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/>.
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,5 @@
|
|||||||
; BlitzPointer - Adding Pointers to Blitz.
|
; BlitzPointer - Adding Pointers to Blitz.
|
||||||
; Copyright (C) 2015 Project Kube (Michael Fabian Dirks)
|
; Copyright (C) 2015 Xaymar (Michael Fabian Dirks)
|
||||||
;
|
;
|
||||||
; This program is free software: you can redistribute it and/or modify
|
; This program is free software: you can redistribute it and/or modify
|
||||||
; it under the terms of the GNU Lesser General Public License as
|
; it under the terms of the GNU Lesser General Public License as
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
; BlitzPointer - Adding Pointers to Blitz.
|
; BlitzPointer - Adding Pointers to Blitz.
|
||||||
; Copyright (C) 2015 Project Kube (Michael Fabian Dirks)
|
; Copyright (C) 2015 Xaymar (Michael Fabian Dirks)
|
||||||
;
|
;
|
||||||
; This program is free software: you can redistribute it and/or modify
|
; This program is free software: you can redistribute it and/or modify
|
||||||
; it under the terms of the GNU Lesser General Public License as
|
; it under the terms of the GNU Lesser General Public License as
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
; BlitzPointer - Adding Pointers to Blitz.
|
; BlitzPointer - Adding Pointers to Blitz.
|
||||||
; Copyright (C) 2015 Project Kube (Michael Fabian Dirks)
|
; Copyright (C) 2015 Xaymar (Michael Fabian Dirks)
|
||||||
;
|
;
|
||||||
; This program is free software: you can redistribute it and/or modify
|
; This program is free software: you can redistribute it and/or modify
|
||||||
; it under the terms of the GNU Lesser General Public License as
|
; it under the terms of the GNU Lesser General Public License as
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
; BlitzPointer - Adding Pointers to Blitz.
|
; BlitzPointer - Adding Pointers to Blitz.
|
||||||
; Copyright (C) 2015 Project Kube (Michael Fabian Dirks)
|
; Copyright (C) 2015 Xaymar (Michael Fabian Dirks)
|
||||||
;
|
;
|
||||||
; This program is free software: you can redistribute it and/or modify
|
; This program is free software: you can redistribute it and/or modify
|
||||||
; it under the terms of the GNU Lesser General Public License as
|
; it under the terms of the GNU Lesser General Public License as
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
; BlitzPointer - Adding Pointers to Blitz.
|
; BlitzPointer - Adding Pointers to Blitz.
|
||||||
; Copyright (C) 2015 Project Kube (Michael Fabian Dirks)
|
; Copyright (C) 2015 Xaymar (Michael Fabian Dirks)
|
||||||
;
|
;
|
||||||
; This program is free software: you can redistribute it and/or modify
|
; This program is free software: you can redistribute it and/or modify
|
||||||
; it under the terms of the GNU Lesser General Public License as
|
; it under the terms of the GNU Lesser General Public License as
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
; BlitzPointer - Adding Pointers to Blitz.
|
; BlitzPointer - Adding Pointers to Blitz.
|
||||||
; Copyright (C) 2015 Project Kube (Michael Fabian Dirks)
|
; Copyright (C) 2015 Xaymar (Michael Fabian Dirks)
|
||||||
;
|
;
|
||||||
; This program is free software: you can redistribute it and/or modify
|
; This program is free software: you can redistribute it and/or modify
|
||||||
; it under the terms of the GNU Lesser General Public License as
|
; it under the terms of the GNU Lesser General Public License as
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
; BlitzPointer - Adding Pointers to Blitz.
|
; BlitzPointer - Adding Pointers to Blitz.
|
||||||
; Copyright (C) 2015 Project Kube (Michael Fabian Dirks)
|
; Copyright (C) 2015 Xaymar (Michael Fabian Dirks)
|
||||||
;
|
;
|
||||||
; This program is free software: you can redistribute it and/or modify
|
; This program is free software: you can redistribute it and/or modify
|
||||||
; it under the terms of the GNU Lesser General Public License as
|
; it under the terms of the GNU Lesser General Public License as
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
; along with this program. If not, see <http:;www.gnu.org/licenses/>.
|
; along with this program. If not, see <http:;www.gnu.org/licenses/>.
|
||||||
|
|
||||||
; ---------------------------------------------------------------------------- ;
|
; ---------------------------------------------------------------------------- ;
|
||||||
; Example 6 - Callbacks
|
; Example 7 - Callbacks
|
||||||
; ---------------------------------------------------------------------------- ;
|
; ---------------------------------------------------------------------------- ;
|
||||||
; License: Creative Commons Attribution 2.0
|
; License: Creative Commons Attribution 2.0
|
||||||
; Author: Michael Fabian Dirks<michael.dirks@realitybends.de>
|
; Author: Michael Fabian Dirks<michael.dirks@realitybends.de>
|
||||||
@@ -0,0 +1,84 @@
|
|||||||
|
; BlitzPointer - Adding Pointers to 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/>.
|
||||||
|
|
||||||
|
; ---------------------------------------------------------------------------- ;
|
||||||
|
; Example 8 - Variable-pointers
|
||||||
|
; ---------------------------------------------------------------------------- ;
|
||||||
|
; Variable-pointers are really neat. Not only can you have a single variable for
|
||||||
|
; a lot of things in many locations (even across thread) but you can pass them
|
||||||
|
; to DLLs too! This opens up Blitz to a whole new way of working with DLLs.
|
||||||
|
|
||||||
|
; Three functions were added for this, each for the respective type
|
||||||
|
; - BP_GetVariablePointerInt(Int%)
|
||||||
|
; - BP_GetVariablePointerFloat(Float#)
|
||||||
|
; - BP_GetVariablePointerType(Type.)
|
||||||
|
; (Strings are not supported sorry.)
|
||||||
|
|
||||||
|
; Integers and Floats are really simple, just declare them and grab the pointer.
|
||||||
|
Global MyInteger% = 66
|
||||||
|
Global MyFloat# = 66.6
|
||||||
|
Global Pointer% = 0
|
||||||
|
|
||||||
|
; Grab the Integer Pointer and modify the value.
|
||||||
|
Pointer = BP_GetVariablePointerInt(MyInteger)
|
||||||
|
Print "MyInteger: " + PeekMemoryInt(Pointer)
|
||||||
|
PokeMemoryInt(Pointer, 33)
|
||||||
|
Print "MyInteger: " + PeekMemoryInt(Pointer)
|
||||||
|
|
||||||
|
; Grab the Float Pointer and modify the value.
|
||||||
|
Pointer = BP_GetVariablePointerFloat(MyFloat)
|
||||||
|
Print "MyFloat: " + PeekMemoryFloat(Pointer)
|
||||||
|
PokeMemoryFloat(Pointer, 33.3)
|
||||||
|
Print "MyFloat: " + PeekMemoryFloat(Pointer)
|
||||||
|
|
||||||
|
; Types are a tiny bit harder but open up so many possibilities once you get
|
||||||
|
; used to them. Start by defining a Type, we'll use a simple one for this.
|
||||||
|
Type MyType
|
||||||
|
Field Check%
|
||||||
|
End Type
|
||||||
|
|
||||||
|
; Now create some elements that we can use when modifying the pointer
|
||||||
|
Global MyElement.MyType = New MyType
|
||||||
|
Global MyElement1.MyType = New MyType
|
||||||
|
Global MyElement2.MyType = New MyType
|
||||||
|
Global MyElement3.MyType = New MyType
|
||||||
|
MyElement\Check = -1
|
||||||
|
MyElement1\Check = $F
|
||||||
|
MyElement2\Check = $FF
|
||||||
|
MyElement3\Check = $FFF
|
||||||
|
|
||||||
|
; Store the Pointer and original element.
|
||||||
|
Pointer = BP_GetVariablePointerType(MyElement)
|
||||||
|
Local TempPointer% = PeekMemoryInt(Pointer)
|
||||||
|
|
||||||
|
; Modifying is as simple as storing a new value to the address the pointer is
|
||||||
|
; pointing at. The Int() thing is explained in Example 5.
|
||||||
|
Print "MyElement\Check: " + MyElement\Check
|
||||||
|
PokeMemoryInt(Pointer, Int(MyElement1))
|
||||||
|
Print "MyElement\Check: " + MyElement\Check
|
||||||
|
PokeMemoryInt(Pointer, Int(MyElement2))
|
||||||
|
Print "MyElement\Check: " + MyElement\Check
|
||||||
|
PokeMemoryInt(Pointer, Int(MyElement3))
|
||||||
|
Print "MyElement\Check: " + MyElement\Check
|
||||||
|
|
||||||
|
; Always return things to their original condition. Just in case.
|
||||||
|
PokeMemoryInt(Pointer, TempPointer)
|
||||||
|
Print "MyElement\Check: " + MyElement\Check
|
||||||
|
|
||||||
|
WaitKey()
|
||||||
|
|
||||||
|
; You can do some magic with this, such as iterating through types yourself by
|
||||||
|
; changing the pointer to the next element or previous element. See Example 6.
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
; BlitzPointer - Adding Pointers to Blitz.
|
; BlitzPointer - Adding Pointers to Blitz.
|
||||||
; Copyright (C) 2015 Project Kube (Michael Fabian Dirks)
|
; Copyright (C) 2015 Xaymar (Michael Fabian Dirks)
|
||||||
;
|
;
|
||||||
; This program is free software: you can redistribute it and/or modify
|
; This program is free software: you can redistribute it and/or modify
|
||||||
; it under the terms of the GNU Lesser General Public License as
|
; it under the terms of the GNU Lesser General Public License as
|
||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
// BlitzPointer - Adding Pointers to Blitz.
|
// BlitzPointer - Adding Pointers to Blitz.
|
||||||
// Copyright (C) 2015 Project Kube (Michael Fabian Dirks)
|
// Copyright (C) 2015 Xaymar (Michael Fabian Dirks)
|
||||||
//
|
//
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// This program is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU Lesser General Public License as
|
// it under the terms of the GNU Lesser General Public License as
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// BlitzPointer - Adding Pointers to Blitz.
|
// BlitzPointer - Adding Pointers to Blitz.
|
||||||
// Copyright (C) 2015 Project Kube (Michael Fabian Dirks)
|
// Copyright (C) 2015 Xaymar (Michael Fabian Dirks)
|
||||||
//
|
//
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// This program is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU Lesser General Public License as
|
// it under the terms of the GNU Lesser General Public License as
|
||||||
|
|||||||
Reference in New Issue
Block a user