21 Commits

Author SHA1 Message Date
Michael Fabian Dirks 311aa2d29d Add Resource files to project. 2016-07-20 02:07:12 +02:00
Michael Fabain Dirks 690691d5a0 Create Readme.md 2016-07-01 13:53:19 +02:00
Michael Fabian Dirks 2870370b84 Update 2016-03-11 14:13:39 +01:00
Michael Dirks 7591ca4a03 Fixed Variable Pointers being wrong (ASM cleanup again). 2016-02-06 18:32:16 +01:00
Michael Dirks 491e11ca77 Fix GetReturnAddress 2016-02-06 00:22:24 +01:00
Michael Dirks 7af64687cc Incorrect Stack movement causing MAV and invalid Pointers. Woops. 2016-02-06 00:16:32 +01:00
Michael Dirks b12b20ff17 Fix decls including non-existent functions. 2016-01-04 03:44:09 +01:00
Michael Dirks 2941a6b740 Attempted to implement LastCalledFunctionPointer and NextCalledFunctionPointer, aborted as not useful enough and unsure how to make these user-friendly. 2016-01-04 03:43:35 +01:00
Michael Dirks 57c310b0fc - Simplify assembler instructions so that we mess around less. 2015-12-30 06:24:35 +01:00
Michael Dirks 88122a928a - Fixed BP_GetReturnAddress not returning the correct address.
- Changed BP_GetFunctionPointer to use intelligent stackframe reading instead of memory scanning (faster & safer).
2015-12-30 06:19:44 +01:00
Michael Dirks 49c7264893 Fix broken decls. 2015-12-30 05:23:34 +01:00
Michael Dirks 7cc0788e8b - Update Headers in files to match new owner.
- Update Example08.bb to be more detailed
- Added function to grab Type pointers (would previously crash).
2015-12-30 05:11:33 +01:00
Michael Dirks 95dd86e6af Add Example08 to the project, rewrite GetFunctionPointer started. 2015-12-30 04:14:53 +01:00
Michael Dirks 519cd5c577 Upgrade to VS2015, implement variable pointers.
Signed-off-by: Michael Dirks <michael.fabian.dirks@gmail.com>
2015-12-30 04:12:21 +01:00
Michael Dirks 4b428b4535 Add Example08 - usage of Variable Pointers 2015-12-30 04:05:25 +01:00
Michael Dirks 1ec8bc54dd 1.3.1 Update - Move files to new locations, parameter count increased to 5. 2015-06-20 23:47:21 +02:00
Michael Dirks ce731d795f Increased parameter count to 5 from 4. 2015-06-20 23:37:47 +02:00
Michael Dirks 78aac62649 Prepare changes to filter-only project. 2015-06-20 16:52:16 +02:00
Michael Dirks 5581958a44 30 minutes wasted playing find-the-old-DLL. At least BlitzPointer.cpp is only compiled once now. 2015-06-20 16:20:03 +02:00
Michael Dirks a1d252deba extern "c" -> extern "C" 2015-06-20 15:51:53 +02:00
Michael Dirks 880e754254 1.3 Update:
- Blitz functions are callable using __stdcall, use it instead of using tailored asm.
- DLLs that rely on this DLL no longer have to load the DLL to call Blitz functions, just include BlitzPointer.h and use the typedefs BP_BlitzFunction#_t.
- Removed Hybrid support until Hybrid is open-source.
2015-06-20 15:08:27 +02:00
24 changed files with 1630 additions and 909 deletions
-399
View File
@@ -1,399 +0,0 @@
; BlitzPointer - Adding Pointers to Blitz.
; Copyright (C) 2015 Project Kube (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/>.
.lib "BlitzPointer.dll"
; Memory Modification
PeekMemoryByte%(lpMemoryPointer%)
PeekMemoryShort%(lpMemoryPointer%)
PeekMemoryInt%(lpMemoryPointer%)
PeekMemoryFloat#(lpMemoryPointer%)
PeekMemory(lpMemoryPointer%, iLength%, lpBank*)
PokeMemoryByte(lpMemoryPointer%, value%)
PokeMemoryShort(lpMemoryPointer%, value%)
PokeMemoryInt(lpMemoryPointer%, value%)
PokeMemoryFloat(lpMemoryPointer%, value#)
PokeMemory(lpMemoryPointer%, iLength%, lpBank*)
; BlitzPointer
BlitzPointer_GetReturnAddress%()
BlitzPointer_GetFunctionPointer%()
; Function Calling
BlitzPointer_CallFunctionV(lpFunctionPointer%) : "BlitzPointer_CallFunction0"
BlitzPointer_CallFunctionVI(lpFunctionPointer%, P1%) : "BlitzPointer_CallFunction1"
BlitzPointer_CallFunctionVII(lpFunctionPointer%, p1%, p2%) : "BlitzPointer_CallFunction2"
BlitzPointer_CallFunctionVIII(lpFunctionPointer%, p1%, p2%, p3%) : "BlitzPointer_CallFunction3"
BlitzPointer_CallFunctionVIIII(lpFunctionPointer%, p1%, p2%, p3%, p4%) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionVIIIF(lpFunctionPointer%, p1%, p2%, p3%, p4#) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionVIIIP(lpFunctionPointer%, p1%, p2%, p3%, p4*) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionVIIF(lpFunctionPointer%, p1%, p2%, p3#) : "BlitzPointer_CallFunction3"
BlitzPointer_CallFunctionVIIFI(lpFunctionPointer%, p1%, p2%, p3#, p4%) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionVIIFF(lpFunctionPointer%, p1%, p2%, p3#, p4#) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionVIIFP(lpFunctionPointer%, p1%, p2%, p3#, p4*) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionVIIP(lpFunctionPointer%, p1%, p2%, p3*) : "BlitzPointer_CallFunction3"
BlitzPointer_CallFunctionVIIPI(lpFunctionPointer%, p1%, p2%, p3*, p4%) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionVIIPF(lpFunctionPointer%, p1%, p2%, p3*, p4#) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionVIIPP(lpFunctionPointer%, p1%, p2%, p3*, p4*) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionVIF(lpFunctionPointer%, p1%, p2#) : "BlitzPointer_CallFunction2"
BlitzPointer_CallFunctionVIFI(lpFunctionPointer%, p1%, p2#, p3%) : "BlitzPointer_CallFunction3"
BlitzPointer_CallFunctionVIFII(lpFunctionPointer%, p1%, p2#, p3%, p4%) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionVIFIF(lpFunctionPointer%, p1%, p2#, p3%, p4#) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionVIFIP(lpFunctionPointer%, p1%, p2#, p3%, p4*) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionVIFF(lpFunctionPointer%, p1%, p2#, p3#) : "BlitzPointer_CallFunction3"
BlitzPointer_CallFunctionVIFFI(lpFunctionPointer%, p1%, p2#, p3#, p4%) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionVIFFF(lpFunctionPointer%, p1%, p2#, p3#, p4#) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionVIFFP(lpFunctionPointer%, p1%, p2#, p3#, p4*) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionVIFP(lpFunctionPointer%, p1%, p2#, p3*) : "BlitzPointer_CallFunction3"
BlitzPointer_CallFunctionVIFPI(lpFunctionPointer%, p1%, p2#, p3*, p4%) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionVIFPF(lpFunctionPointer%, p1%, p2#, p3*, p4#) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionVIFPP(lpFunctionPointer%, p1%, p2#, p3*, p4*) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionVIP(lpFunctionPointer%, p1%, p2*) : "BlitzPointer_CallFunction2"
BlitzPointer_CallFunctionVIPI(lpFunctionPointer%, p1%, p2*, p3%) : "BlitzPointer_CallFunction3"
BlitzPointer_CallFunctionVIPII(lpFunctionPointer%, p1%, p2*, p3%, p4%) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionVIPIF(lpFunctionPointer%, p1%, p2*, p3%, p4#) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionVIPIP(lpFunctionPointer%, p1%, p2*, p3%, p4*) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionVIPF(lpFunctionPointer%, p1%, p2*, p3#) : "BlitzPointer_CallFunction3"
BlitzPointer_CallFunctionVIPFI(lpFunctionPointer%, p1%, p2*, p3#, p4%) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionVIPFF(lpFunctionPointer%, p1%, p2*, p3#, p4#) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionVIPFP(lpFunctionPointer%, p1%, p2*, p3#, p4*) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionVIPP(lpFunctionPointer%, p1%, p2*, p3*) : "BlitzPointer_CallFunction3"
BlitzPointer_CallFunctionVIPPI(lpFunctionPointer%, p1%, p2*, p3*, p4%) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionVIPPF(lpFunctionPointer%, p1%, p2*, p3*, p4#) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionVIPPP(lpFunctionPointer%, p1%, p2*, p3*, p4*) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionVF(lpFunctionPointer%, P1#) : "BlitzPointer_CallFunction1"
BlitzPointer_CallFunctionVFI(lpFunctionPointer%, p1#, p2%) : "BlitzPointer_CallFunction2"
BlitzPointer_CallFunctionVFII(lpFunctionPointer%, p1#, p2%, p3%) : "BlitzPointer_CallFunction3"
BlitzPointer_CallFunctionVFIII(lpFunctionPointer%, p1#, p2%, p3%, p4%) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionVFIIF(lpFunctionPointer%, p1#, p2%, p3%, p4#) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionVFIIP(lpFunctionPointer%, p1#, p2%, p3%, p4*) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionVFIF(lpFunctionPointer%, p1#, p2%, p3#) : "BlitzPointer_CallFunction3"
BlitzPointer_CallFunctionVFIFI(lpFunctionPointer%, p1#, p2%, p3#, p4%) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionVFIFF(lpFunctionPointer%, p1#, p2%, p3#, p4#) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionVFIFP(lpFunctionPointer%, p1#, p2%, p3#, p4*) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionVFIP(lpFunctionPointer%, p1#, p2%, p3*) : "BlitzPointer_CallFunction3"
BlitzPointer_CallFunctionVFIPI(lpFunctionPointer%, p1#, p2%, p3*, p4%) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionVFIPF(lpFunctionPointer%, p1#, p2%, p3*, p4#) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionVFIPP(lpFunctionPointer%, p1#, p2%, p3*, p4*) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionVFF(lpFunctionPointer%, p1#, p2#) : "BlitzPointer_CallFunction2"
BlitzPointer_CallFunctionVFFI(lpFunctionPointer%, p1#, p2#, p3%) : "BlitzPointer_CallFunction3"
BlitzPointer_CallFunctionVFFII(lpFunctionPointer%, p1#, p2#, p3%, p4%) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionVFFIF(lpFunctionPointer%, p1#, p2#, p3%, p4#) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionVFFIP(lpFunctionPointer%, p1#, p2#, p3%, p4*) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionVFFF(lpFunctionPointer%, p1#, p2#, p3#) : "BlitzPointer_CallFunction3"
BlitzPointer_CallFunctionVFFFI(lpFunctionPointer%, p1#, p2#, p3#, p4%) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionVFFFF(lpFunctionPointer%, p1#, p2#, p3#, p4#) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionVFFFP(lpFunctionPointer%, p1#, p2#, p3#, p4*) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionVFFP(lpFunctionPointer%, p1#, p2#, p3*) : "BlitzPointer_CallFunction3"
BlitzPointer_CallFunctionVFFPI(lpFunctionPointer%, p1#, p2#, p3*, p4%) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionVFFPF(lpFunctionPointer%, p1#, p2#, p3*, p4#) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionVFFPP(lpFunctionPointer%, p1#, p2#, p3*, p4*) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionVFP(lpFunctionPointer%, p1#, p2*) : "BlitzPointer_CallFunction2"
BlitzPointer_CallFunctionVFPI(lpFunctionPointer%, p1#, p2*, p3%) : "BlitzPointer_CallFunction3"
BlitzPointer_CallFunctionVFPII(lpFunctionPointer%, p1#, p2*, p3%, p4%) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionVFPIF(lpFunctionPointer%, p1#, p2*, p3%, p4#) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionVFPIP(lpFunctionPointer%, p1#, p2*, p3%, p4*) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionVFPF(lpFunctionPointer%, p1#, p2*, p3#) : "BlitzPointer_CallFunction3"
BlitzPointer_CallFunctionVFPFI(lpFunctionPointer%, p1#, p2*, p3#, p4%) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionVFPFF(lpFunctionPointer%, p1#, p2*, p3#, p4#) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionVFPFP(lpFunctionPointer%, p1#, p2*, p3#, p4*) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionVFPP(lpFunctionPointer%, p1#, p2*, p3*) : "BlitzPointer_CallFunction3"
BlitzPointer_CallFunctionVFPPI(lpFunctionPointer%, p1#, p2*, p3*, p4%) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionVFPPF(lpFunctionPointer%, p1#, p2*, p3*, p4#) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionVFPPP(lpFunctionPointer%, p1#, p2*, p3*, p4*) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionVP(lpFunctionPointer%, P1*) : "BlitzPointer_CallFunction1"
BlitzPointer_CallFunctionVPI(lpFunctionPointer%, p1*, p2%) : "BlitzPointer_CallFunction2"
BlitzPointer_CallFunctionVPII(lpFunctionPointer%, p1*, p2%, p3%) : "BlitzPointer_CallFunction3"
BlitzPointer_CallFunctionVPIII(lpFunctionPointer%, p1*, p2%, p3%, p4%) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionVPIIF(lpFunctionPointer%, p1*, p2%, p3%, p4#) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionVPIIP(lpFunctionPointer%, p1*, p2%, p3%, p4*) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionVPIF(lpFunctionPointer%, p1*, p2%, p3#) : "BlitzPointer_CallFunction3"
BlitzPointer_CallFunctionVPIFI(lpFunctionPointer%, p1*, p2%, p3#, p4%) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionVPIFF(lpFunctionPointer%, p1*, p2%, p3#, p4#) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionVPIFP(lpFunctionPointer%, p1*, p2%, p3#, p4*) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionVPIP(lpFunctionPointer%, p1*, p2%, p3*) : "BlitzPointer_CallFunction3"
BlitzPointer_CallFunctionVPIPI(lpFunctionPointer%, p1*, p2%, p3*, p4%) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionVPIPF(lpFunctionPointer%, p1*, p2%, p3*, p4#) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionVPIPP(lpFunctionPointer%, p1*, p2%, p3*, p4*) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionVPF(lpFunctionPointer%, p1*, p2#) : "BlitzPointer_CallFunction2"
BlitzPointer_CallFunctionVPFI(lpFunctionPointer%, p1*, p2#, p3%) : "BlitzPointer_CallFunction3"
BlitzPointer_CallFunctionVPFII(lpFunctionPointer%, p1*, p2#, p3%, p4%) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionVPFIF(lpFunctionPointer%, p1*, p2#, p3%, p4#) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionVPFIP(lpFunctionPointer%, p1*, p2#, p3%, p4*) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionVPFF(lpFunctionPointer%, p1*, p2#, p3#) : "BlitzPointer_CallFunction3"
BlitzPointer_CallFunctionVPFFI(lpFunctionPointer%, p1*, p2#, p3#, p4%) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionVPFFF(lpFunctionPointer%, p1*, p2#, p3#, p4#) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionVPFFP(lpFunctionPointer%, p1*, p2#, p3#, p4*) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionVPFP(lpFunctionPointer%, p1*, p2#, p3*) : "BlitzPointer_CallFunction3"
BlitzPointer_CallFunctionVPFPI(lpFunctionPointer%, p1*, p2#, p3*, p4%) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionVPFPF(lpFunctionPointer%, p1*, p2#, p3*, p4#) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionVPFPP(lpFunctionPointer%, p1*, p2#, p3*, p4*) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionVPP(lpFunctionPointer%, p1*, p2*) : "BlitzPointer_CallFunction2"
BlitzPointer_CallFunctionVPPI(lpFunctionPointer%, p1*, p2*, p3%) : "BlitzPointer_CallFunction3"
BlitzPointer_CallFunctionVPPII(lpFunctionPointer%, p1*, p2*, p3%, p4%) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionVPPIF(lpFunctionPointer%, p1*, p2*, p3%, p4#) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionVPPIP(lpFunctionPointer%, p1*, p2*, p3%, p4*) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionVPPF(lpFunctionPointer%, p1*, p2*, p3#) : "BlitzPointer_CallFunction3"
BlitzPointer_CallFunctionVPPFI(lpFunctionPointer%, p1*, p2*, p3#, p4%) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionVPPFF(lpFunctionPointer%, p1*, p2*, p3#, p4#) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionVPPFP(lpFunctionPointer%, p1*, p2*, p3#, p4*) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionVPPP(lpFunctionPointer%, p1*, p2*, p3*) : "BlitzPointer_CallFunction3"
BlitzPointer_CallFunctionVPPPI(lpFunctionPointer%, p1*, p2*, p3*, p4%) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionVPPPF(lpFunctionPointer%, p1*, p2*, p3*, p4#) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionVPPPP(lpFunctionPointer%, p1*, p2*, p3*, p4*) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionI%(lpFunctionPointer%) : "BlitzPointer_CallFunction0"
BlitzPointer_CallFunctionII%(lpFunctionPointer%, P1%) : "BlitzPointer_CallFunction1"
BlitzPointer_CallFunctionIII%(lpFunctionPointer%, p1%, p2%) : "BlitzPointer_CallFunction2"
BlitzPointer_CallFunctionIIII%(lpFunctionPointer%, p1%, p2%, p3%) : "BlitzPointer_CallFunction3"
BlitzPointer_CallFunctionIIIII%(lpFunctionPointer%, p1%, p2%, p3%, p4%) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionIIIIF%(lpFunctionPointer%, p1%, p2%, p3%, p4#) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionIIIIP%(lpFunctionPointer%, p1%, p2%, p3%, p4*) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionIIIF%(lpFunctionPointer%, p1%, p2%, p3#) : "BlitzPointer_CallFunction3"
BlitzPointer_CallFunctionIIIFI%(lpFunctionPointer%, p1%, p2%, p3#, p4%) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionIIIFF%(lpFunctionPointer%, p1%, p2%, p3#, p4#) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionIIIFP%(lpFunctionPointer%, p1%, p2%, p3#, p4*) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionIIIP%(lpFunctionPointer%, p1%, p2%, p3*) : "BlitzPointer_CallFunction3"
BlitzPointer_CallFunctionIIIPI%(lpFunctionPointer%, p1%, p2%, p3*, p4%) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionIIIPF%(lpFunctionPointer%, p1%, p2%, p3*, p4#) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionIIIPP%(lpFunctionPointer%, p1%, p2%, p3*, p4*) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionIIF%(lpFunctionPointer%, p1%, p2#) : "BlitzPointer_CallFunction2"
BlitzPointer_CallFunctionIIFI%(lpFunctionPointer%, p1%, p2#, p3%) : "BlitzPointer_CallFunction3"
BlitzPointer_CallFunctionIIFII%(lpFunctionPointer%, p1%, p2#, p3%, p4%) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionIIFIF%(lpFunctionPointer%, p1%, p2#, p3%, p4#) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionIIFIP%(lpFunctionPointer%, p1%, p2#, p3%, p4*) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionIIFF%(lpFunctionPointer%, p1%, p2#, p3#) : "BlitzPointer_CallFunction3"
BlitzPointer_CallFunctionIIFFI%(lpFunctionPointer%, p1%, p2#, p3#, p4%) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionIIFFF%(lpFunctionPointer%, p1%, p2#, p3#, p4#) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionIIFFP%(lpFunctionPointer%, p1%, p2#, p3#, p4*) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionIIFP%(lpFunctionPointer%, p1%, p2#, p3*) : "BlitzPointer_CallFunction3"
BlitzPointer_CallFunctionIIFPI%(lpFunctionPointer%, p1%, p2#, p3*, p4%) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionIIFPF%(lpFunctionPointer%, p1%, p2#, p3*, p4#) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionIIFPP%(lpFunctionPointer%, p1%, p2#, p3*, p4*) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionIIP%(lpFunctionPointer%, p1%, p2*) : "BlitzPointer_CallFunction2"
BlitzPointer_CallFunctionIIPI%(lpFunctionPointer%, p1%, p2*, p3%) : "BlitzPointer_CallFunction3"
BlitzPointer_CallFunctionIIPII%(lpFunctionPointer%, p1%, p2*, p3%, p4%) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionIIPIF%(lpFunctionPointer%, p1%, p2*, p3%, p4#) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionIIPIP%(lpFunctionPointer%, p1%, p2*, p3%, p4*) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionIIPF%(lpFunctionPointer%, p1%, p2*, p3#) : "BlitzPointer_CallFunction3"
BlitzPointer_CallFunctionIIPFI%(lpFunctionPointer%, p1%, p2*, p3#, p4%) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionIIPFF%(lpFunctionPointer%, p1%, p2*, p3#, p4#) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionIIPFP%(lpFunctionPointer%, p1%, p2*, p3#, p4*) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionIIPP%(lpFunctionPointer%, p1%, p2*, p3*) : "BlitzPointer_CallFunction3"
BlitzPointer_CallFunctionIIPPI%(lpFunctionPointer%, p1%, p2*, p3*, p4%) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionIIPPF%(lpFunctionPointer%, p1%, p2*, p3*, p4#) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionIIPPP%(lpFunctionPointer%, p1%, p2*, p3*, p4*) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionIF%(lpFunctionPointer%, P1#) : "BlitzPointer_CallFunction1"
BlitzPointer_CallFunctionIFI%(lpFunctionPointer%, p1#, p2%) : "BlitzPointer_CallFunction2"
BlitzPointer_CallFunctionIFII%(lpFunctionPointer%, p1#, p2%, p3%) : "BlitzPointer_CallFunction3"
BlitzPointer_CallFunctionIFIII%(lpFunctionPointer%, p1#, p2%, p3%, p4%) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionIFIIF%(lpFunctionPointer%, p1#, p2%, p3%, p4#) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionIFIIP%(lpFunctionPointer%, p1#, p2%, p3%, p4*) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionIFIF%(lpFunctionPointer%, p1#, p2%, p3#) : "BlitzPointer_CallFunction3"
BlitzPointer_CallFunctionIFIFI%(lpFunctionPointer%, p1#, p2%, p3#, p4%) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionIFIFF%(lpFunctionPointer%, p1#, p2%, p3#, p4#) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionIFIFP%(lpFunctionPointer%, p1#, p2%, p3#, p4*) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionIFIP%(lpFunctionPointer%, p1#, p2%, p3*) : "BlitzPointer_CallFunction3"
BlitzPointer_CallFunctionIFIPI%(lpFunctionPointer%, p1#, p2%, p3*, p4%) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionIFIPF%(lpFunctionPointer%, p1#, p2%, p3*, p4#) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionIFIPP%(lpFunctionPointer%, p1#, p2%, p3*, p4*) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionIFF%(lpFunctionPointer%, p1#, p2#) : "BlitzPointer_CallFunction2"
BlitzPointer_CallFunctionIFFI%(lpFunctionPointer%, p1#, p2#, p3%) : "BlitzPointer_CallFunction3"
BlitzPointer_CallFunctionIFFII%(lpFunctionPointer%, p1#, p2#, p3%, p4%) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionIFFIF%(lpFunctionPointer%, p1#, p2#, p3%, p4#) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionIFFIP%(lpFunctionPointer%, p1#, p2#, p3%, p4*) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionIFFF%(lpFunctionPointer%, p1#, p2#, p3#) : "BlitzPointer_CallFunction3"
BlitzPointer_CallFunctionIFFFI%(lpFunctionPointer%, p1#, p2#, p3#, p4%) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionIFFFF%(lpFunctionPointer%, p1#, p2#, p3#, p4#) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionIFFFP%(lpFunctionPointer%, p1#, p2#, p3#, p4*) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionIFFP%(lpFunctionPointer%, p1#, p2#, p3*) : "BlitzPointer_CallFunction3"
BlitzPointer_CallFunctionIFFPI%(lpFunctionPointer%, p1#, p2#, p3*, p4%) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionIFFPF%(lpFunctionPointer%, p1#, p2#, p3*, p4#) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionIFFPP%(lpFunctionPointer%, p1#, p2#, p3*, p4*) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionIFP%(lpFunctionPointer%, p1#, p2*) : "BlitzPointer_CallFunction2"
BlitzPointer_CallFunctionIFPI%(lpFunctionPointer%, p1#, p2*, p3%) : "BlitzPointer_CallFunction3"
BlitzPointer_CallFunctionIFPII%(lpFunctionPointer%, p1#, p2*, p3%, p4%) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionIFPIF%(lpFunctionPointer%, p1#, p2*, p3%, p4#) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionIFPIP%(lpFunctionPointer%, p1#, p2*, p3%, p4*) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionIFPF%(lpFunctionPointer%, p1#, p2*, p3#) : "BlitzPointer_CallFunction3"
BlitzPointer_CallFunctionIFPFI%(lpFunctionPointer%, p1#, p2*, p3#, p4%) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionIFPFF%(lpFunctionPointer%, p1#, p2*, p3#, p4#) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionIFPFP%(lpFunctionPointer%, p1#, p2*, p3#, p4*) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionIFPP%(lpFunctionPointer%, p1#, p2*, p3*) : "BlitzPointer_CallFunction3"
BlitzPointer_CallFunctionIFPPI%(lpFunctionPointer%, p1#, p2*, p3*, p4%) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionIFPPF%(lpFunctionPointer%, p1#, p2*, p3*, p4#) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionIFPPP%(lpFunctionPointer%, p1#, p2*, p3*, p4*) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionIP%(lpFunctionPointer%, P1*) : "BlitzPointer_CallFunction1"
BlitzPointer_CallFunctionIPI%(lpFunctionPointer%, p1*, p2%) : "BlitzPointer_CallFunction2"
BlitzPointer_CallFunctionIPII%(lpFunctionPointer%, p1*, p2%, p3%) : "BlitzPointer_CallFunction3"
BlitzPointer_CallFunctionIPIII%(lpFunctionPointer%, p1*, p2%, p3%, p4%) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionIPIIF%(lpFunctionPointer%, p1*, p2%, p3%, p4#) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionIPIIP%(lpFunctionPointer%, p1*, p2%, p3%, p4*) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionIPIF%(lpFunctionPointer%, p1*, p2%, p3#) : "BlitzPointer_CallFunction3"
BlitzPointer_CallFunctionIPIFI%(lpFunctionPointer%, p1*, p2%, p3#, p4%) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionIPIFF%(lpFunctionPointer%, p1*, p2%, p3#, p4#) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionIPIFP%(lpFunctionPointer%, p1*, p2%, p3#, p4*) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionIPIP%(lpFunctionPointer%, p1*, p2%, p3*) : "BlitzPointer_CallFunction3"
BlitzPointer_CallFunctionIPIPI%(lpFunctionPointer%, p1*, p2%, p3*, p4%) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionIPIPF%(lpFunctionPointer%, p1*, p2%, p3*, p4#) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionIPIPP%(lpFunctionPointer%, p1*, p2%, p3*, p4*) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionIPF%(lpFunctionPointer%, p1*, p2#) : "BlitzPointer_CallFunction2"
BlitzPointer_CallFunctionIPFI%(lpFunctionPointer%, p1*, p2#, p3%) : "BlitzPointer_CallFunction3"
BlitzPointer_CallFunctionIPFII%(lpFunctionPointer%, p1*, p2#, p3%, p4%) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionIPFIF%(lpFunctionPointer%, p1*, p2#, p3%, p4#) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionIPFIP%(lpFunctionPointer%, p1*, p2#, p3%, p4*) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionIPFF%(lpFunctionPointer%, p1*, p2#, p3#) : "BlitzPointer_CallFunction3"
BlitzPointer_CallFunctionIPFFI%(lpFunctionPointer%, p1*, p2#, p3#, p4%) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionIPFFF%(lpFunctionPointer%, p1*, p2#, p3#, p4#) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionIPFFP%(lpFunctionPointer%, p1*, p2#, p3#, p4*) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionIPFP%(lpFunctionPointer%, p1*, p2#, p3*) : "BlitzPointer_CallFunction3"
BlitzPointer_CallFunctionIPFPI%(lpFunctionPointer%, p1*, p2#, p3*, p4%) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionIPFPF%(lpFunctionPointer%, p1*, p2#, p3*, p4#) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionIPFPP%(lpFunctionPointer%, p1*, p2#, p3*, p4*) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionIPP%(lpFunctionPointer%, p1*, p2*) : "BlitzPointer_CallFunction2"
BlitzPointer_CallFunctionIPPI%(lpFunctionPointer%, p1*, p2*, p3%) : "BlitzPointer_CallFunction3"
BlitzPointer_CallFunctionIPPII%(lpFunctionPointer%, p1*, p2*, p3%, p4%) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionIPPIF%(lpFunctionPointer%, p1*, p2*, p3%, p4#) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionIPPIP%(lpFunctionPointer%, p1*, p2*, p3%, p4*) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionIPPF%(lpFunctionPointer%, p1*, p2*, p3#) : "BlitzPointer_CallFunction3"
BlitzPointer_CallFunctionIPPFI%(lpFunctionPointer%, p1*, p2*, p3#, p4%) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionIPPFF%(lpFunctionPointer%, p1*, p2*, p3#, p4#) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionIPPFP%(lpFunctionPointer%, p1*, p2*, p3#, p4*) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionIPPP%(lpFunctionPointer%, p1*, p2*, p3*) : "BlitzPointer_CallFunction3"
BlitzPointer_CallFunctionIPPPI%(lpFunctionPointer%, p1*, p2*, p3*, p4%) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionIPPPF%(lpFunctionPointer%, p1*, p2*, p3*, p4#) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionIPPPP%(lpFunctionPointer%, p1*, p2*, p3*, p4*) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionF#(lpFunctionPointer%) : "BlitzPointer_CallFunction0"
BlitzPointer_CallFunctionFI#(lpFunctionPointer%, P1%) : "BlitzPointer_CallFunction1"
BlitzPointer_CallFunctionFII#(lpFunctionPointer%, p1%, p2%) : "BlitzPointer_CallFunction2"
BlitzPointer_CallFunctionFIII#(lpFunctionPointer%, p1%, p2%, p3%) : "BlitzPointer_CallFunction3"
BlitzPointer_CallFunctionFIIII#(lpFunctionPointer%, p1%, p2%, p3%, p4%) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionFIIIF#(lpFunctionPointer%, p1%, p2%, p3%, p4#) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionFIIIP#(lpFunctionPointer%, p1%, p2%, p3%, p4*) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionFIIF#(lpFunctionPointer%, p1%, p2%, p3#) : "BlitzPointer_CallFunction3"
BlitzPointer_CallFunctionFIIFI#(lpFunctionPointer%, p1%, p2%, p3#, p4%) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionFIIFF#(lpFunctionPointer%, p1%, p2%, p3#, p4#) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionFIIFP#(lpFunctionPointer%, p1%, p2%, p3#, p4*) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionFIIP#(lpFunctionPointer%, p1%, p2%, p3*) : "BlitzPointer_CallFunction3"
BlitzPointer_CallFunctionFIIPI#(lpFunctionPointer%, p1%, p2%, p3*, p4%) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionFIIPF#(lpFunctionPointer%, p1%, p2%, p3*, p4#) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionFIIPP#(lpFunctionPointer%, p1%, p2%, p3*, p4*) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionFIF#(lpFunctionPointer%, p1%, p2#) : "BlitzPointer_CallFunction2"
BlitzPointer_CallFunctionFIFI#(lpFunctionPointer%, p1%, p2#, p3%) : "BlitzPointer_CallFunction3"
BlitzPointer_CallFunctionFIFII#(lpFunctionPointer%, p1%, p2#, p3%, p4%) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionFIFIF#(lpFunctionPointer%, p1%, p2#, p3%, p4#) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionFIFIP#(lpFunctionPointer%, p1%, p2#, p3%, p4*) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionFIFF#(lpFunctionPointer%, p1%, p2#, p3#) : "BlitzPointer_CallFunction3"
BlitzPointer_CallFunctionFIFFI#(lpFunctionPointer%, p1%, p2#, p3#, p4%) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionFIFFF#(lpFunctionPointer%, p1%, p2#, p3#, p4#) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionFIFFP#(lpFunctionPointer%, p1%, p2#, p3#, p4*) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionFIFP#(lpFunctionPointer%, p1%, p2#, p3*) : "BlitzPointer_CallFunction3"
BlitzPointer_CallFunctionFIFPI#(lpFunctionPointer%, p1%, p2#, p3*, p4%) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionFIFPF#(lpFunctionPointer%, p1%, p2#, p3*, p4#) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionFIFPP#(lpFunctionPointer%, p1%, p2#, p3*, p4*) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionFIP#(lpFunctionPointer%, p1%, p2*) : "BlitzPointer_CallFunction2"
BlitzPointer_CallFunctionFIPI#(lpFunctionPointer%, p1%, p2*, p3%) : "BlitzPointer_CallFunction3"
BlitzPointer_CallFunctionFIPII#(lpFunctionPointer%, p1%, p2*, p3%, p4%) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionFIPIF#(lpFunctionPointer%, p1%, p2*, p3%, p4#) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionFIPIP#(lpFunctionPointer%, p1%, p2*, p3%, p4*) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionFIPF#(lpFunctionPointer%, p1%, p2*, p3#) : "BlitzPointer_CallFunction3"
BlitzPointer_CallFunctionFIPFI#(lpFunctionPointer%, p1%, p2*, p3#, p4%) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionFIPFF#(lpFunctionPointer%, p1%, p2*, p3#, p4#) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionFIPFP#(lpFunctionPointer%, p1%, p2*, p3#, p4*) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionFIPP#(lpFunctionPointer%, p1%, p2*, p3*) : "BlitzPointer_CallFunction3"
BlitzPointer_CallFunctionFIPPI#(lpFunctionPointer%, p1%, p2*, p3*, p4%) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionFIPPF#(lpFunctionPointer%, p1%, p2*, p3*, p4#) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionFIPPP#(lpFunctionPointer%, p1%, p2*, p3*, p4*) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionFF#(lpFunctionPointer%, P1#) : "BlitzPointer_CallFunction1"
BlitzPointer_CallFunctionFFI#(lpFunctionPointer%, p1#, p2%) : "BlitzPointer_CallFunction2"
BlitzPointer_CallFunctionFFII#(lpFunctionPointer%, p1#, p2%, p3%) : "BlitzPointer_CallFunction3"
BlitzPointer_CallFunctionFFIII#(lpFunctionPointer%, p1#, p2%, p3%, p4%) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionFFIIF#(lpFunctionPointer%, p1#, p2%, p3%, p4#) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionFFIIP#(lpFunctionPointer%, p1#, p2%, p3%, p4*) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionFFIF#(lpFunctionPointer%, p1#, p2%, p3#) : "BlitzPointer_CallFunction3"
BlitzPointer_CallFunctionFFIFI#(lpFunctionPointer%, p1#, p2%, p3#, p4%) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionFFIFF#(lpFunctionPointer%, p1#, p2%, p3#, p4#) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionFFIFP#(lpFunctionPointer%, p1#, p2%, p3#, p4*) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionFFIP#(lpFunctionPointer%, p1#, p2%, p3*) : "BlitzPointer_CallFunction3"
BlitzPointer_CallFunctionFFIPI#(lpFunctionPointer%, p1#, p2%, p3*, p4%) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionFFIPF#(lpFunctionPointer%, p1#, p2%, p3*, p4#) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionFFIPP#(lpFunctionPointer%, p1#, p2%, p3*, p4*) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionFFF#(lpFunctionPointer%, p1#, p2#) : "BlitzPointer_CallFunction2"
BlitzPointer_CallFunctionFFFI#(lpFunctionPointer%, p1#, p2#, p3%) : "BlitzPointer_CallFunction3"
BlitzPointer_CallFunctionFFFII#(lpFunctionPointer%, p1#, p2#, p3%, p4%) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionFFFIF#(lpFunctionPointer%, p1#, p2#, p3%, p4#) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionFFFIP#(lpFunctionPointer%, p1#, p2#, p3%, p4*) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionFFFF#(lpFunctionPointer%, p1#, p2#, p3#) : "BlitzPointer_CallFunction3"
BlitzPointer_CallFunctionFFFFI#(lpFunctionPointer%, p1#, p2#, p3#, p4%) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionFFFFF#(lpFunctionPointer%, p1#, p2#, p3#, p4#) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionFFFFP#(lpFunctionPointer%, p1#, p2#, p3#, p4*) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionFFFP#(lpFunctionPointer%, p1#, p2#, p3*) : "BlitzPointer_CallFunction3"
BlitzPointer_CallFunctionFFFPI#(lpFunctionPointer%, p1#, p2#, p3*, p4%) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionFFFPF#(lpFunctionPointer%, p1#, p2#, p3*, p4#) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionFFFPP#(lpFunctionPointer%, p1#, p2#, p3*, p4*) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionFFP#(lpFunctionPointer%, p1#, p2*) : "BlitzPointer_CallFunction2"
BlitzPointer_CallFunctionFFPI#(lpFunctionPointer%, p1#, p2*, p3%) : "BlitzPointer_CallFunction3"
BlitzPointer_CallFunctionFFPII#(lpFunctionPointer%, p1#, p2*, p3%, p4%) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionFFPIF#(lpFunctionPointer%, p1#, p2*, p3%, p4#) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionFFPIP#(lpFunctionPointer%, p1#, p2*, p3%, p4*) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionFFPF#(lpFunctionPointer%, p1#, p2*, p3#) : "BlitzPointer_CallFunction3"
BlitzPointer_CallFunctionFFPFI#(lpFunctionPointer%, p1#, p2*, p3#, p4%) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionFFPFF#(lpFunctionPointer%, p1#, p2*, p3#, p4#) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionFFPFP#(lpFunctionPointer%, p1#, p2*, p3#, p4*) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionFFPP#(lpFunctionPointer%, p1#, p2*, p3*) : "BlitzPointer_CallFunction3"
BlitzPointer_CallFunctionFFPPI#(lpFunctionPointer%, p1#, p2*, p3*, p4%) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionFFPPF#(lpFunctionPointer%, p1#, p2*, p3*, p4#) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionFFPPP#(lpFunctionPointer%, p1#, p2*, p3*, p4*) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionFP#(lpFunctionPointer%, P1*) : "BlitzPointer_CallFunction1"
BlitzPointer_CallFunctionFPI#(lpFunctionPointer%, p1*, p2%) : "BlitzPointer_CallFunction2"
BlitzPointer_CallFunctionFPII#(lpFunctionPointer%, p1*, p2%, p3%) : "BlitzPointer_CallFunction3"
BlitzPointer_CallFunctionFPIII#(lpFunctionPointer%, p1*, p2%, p3%, p4%) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionFPIIF#(lpFunctionPointer%, p1*, p2%, p3%, p4#) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionFPIIP#(lpFunctionPointer%, p1*, p2%, p3%, p4*) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionFPIF#(lpFunctionPointer%, p1*, p2%, p3#) : "BlitzPointer_CallFunction3"
BlitzPointer_CallFunctionFPIFI#(lpFunctionPointer%, p1*, p2%, p3#, p4%) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionFPIFF#(lpFunctionPointer%, p1*, p2%, p3#, p4#) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionFPIFP#(lpFunctionPointer%, p1*, p2%, p3#, p4*) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionFPIP#(lpFunctionPointer%, p1*, p2%, p3*) : "BlitzPointer_CallFunction3"
BlitzPointer_CallFunctionFPIPI#(lpFunctionPointer%, p1*, p2%, p3*, p4%) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionFPIPF#(lpFunctionPointer%, p1*, p2%, p3*, p4#) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionFPIPP#(lpFunctionPointer%, p1*, p2%, p3*, p4*) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionFPF#(lpFunctionPointer%, p1*, p2#) : "BlitzPointer_CallFunction2"
BlitzPointer_CallFunctionFPFI#(lpFunctionPointer%, p1*, p2#, p3%) : "BlitzPointer_CallFunction3"
BlitzPointer_CallFunctionFPFII#(lpFunctionPointer%, p1*, p2#, p3%, p4%) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionFPFIF#(lpFunctionPointer%, p1*, p2#, p3%, p4#) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionFPFIP#(lpFunctionPointer%, p1*, p2#, p3%, p4*) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionFPFF#(lpFunctionPointer%, p1*, p2#, p3#) : "BlitzPointer_CallFunction3"
BlitzPointer_CallFunctionFPFFI#(lpFunctionPointer%, p1*, p2#, p3#, p4%) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionFPFFF#(lpFunctionPointer%, p1*, p2#, p3#, p4#) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionFPFFP#(lpFunctionPointer%, p1*, p2#, p3#, p4*) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionFPFP#(lpFunctionPointer%, p1*, p2#, p3*) : "BlitzPointer_CallFunction3"
BlitzPointer_CallFunctionFPFPI#(lpFunctionPointer%, p1*, p2#, p3*, p4%) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionFPFPF#(lpFunctionPointer%, p1*, p2#, p3*, p4#) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionFPFPP#(lpFunctionPointer%, p1*, p2#, p3*, p4*) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionFPP#(lpFunctionPointer%, p1*, p2*) : "BlitzPointer_CallFunction2"
BlitzPointer_CallFunctionFPPI#(lpFunctionPointer%, p1*, p2*, p3%) : "BlitzPointer_CallFunction3"
BlitzPointer_CallFunctionFPPII#(lpFunctionPointer%, p1*, p2*, p3%, p4%) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionFPPIF#(lpFunctionPointer%, p1*, p2*, p3%, p4#) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionFPPIP#(lpFunctionPointer%, p1*, p2*, p3%, p4*) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionFPPF#(lpFunctionPointer%, p1*, p2*, p3#) : "BlitzPointer_CallFunction3"
BlitzPointer_CallFunctionFPPFI#(lpFunctionPointer%, p1*, p2*, p3#, p4%) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionFPPFF#(lpFunctionPointer%, p1*, p2*, p3#, p4#) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionFPPFP#(lpFunctionPointer%, p1*, p2*, p3#, p4*) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionFPPP#(lpFunctionPointer%, p1*, p2*, p3*) : "BlitzPointer_CallFunction3"
BlitzPointer_CallFunctionFPPPI#(lpFunctionPointer%, p1*, p2*, p3*, p4%) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionFPPPF#(lpFunctionPointer%, p1*, p2*, p3*, p4#) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionFPPPP#(lpFunctionPointer%, p1*, p2*, p3*, p4*) : "BlitzPointer_CallFunction4"
BlitzPointer_CallFunctionS$(lpFunctionPointer%) : "BlitzPointer_CallFunctionT0"
-150
View File
@@ -1,150 +0,0 @@
// BlitzPointer - Adding Pointers to Blitz.
// Copyright (C) 2015 Project Kube (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 "BlitzPointer.h"
// Hybrid specific defines.
#define CALLFUNCTION_DECL_BEGIN_64(NAME) DLL_EXPORT int64_t BlitzPointer_CallFunction##NAME(intptr_t lpFunctionPointer
#define CALLFUNCTION_IMPL_PARAMETER_64(INDEX, NAME) __asm MOV RAX, [NAME] __asm mov [esp + INDEX * 4], RAX
#define CALLFUNCTION_IMPL_CALL_64() __asm CALL QWORD ptr[lpFunctionPointer]
#define CALLFUNCTION_IMPL_RESULT_64() int64_t result; __asm MOV [result], RAX
/*
// No Parameters
CALLFUNCTION_DECL_BEGIN_64(Q0)
CALLFUNCTION_DECL_END() CALLFUNCTION_IMPL_BEGIN()
CALLFUNCTION_IMPL_SAFEGUARD()
CALLFUNCTION_IMPL_CALL_64()
CALLFUNCTION_IMPL_RESULT_64()
CALLFUNCTION_IMPL_RETURN()
CALLFUNCTION_IMPL_END()
// One Parameter
CALLFUNCTION_DECL_BEGIN_64(Q1D)
CALLFUNCTION_DECL_PARAMETER(int32_t, p1)
CALLFUNCTION_DECL_END() CALLFUNCTION_IMPL_BEGIN()
CALLFUNCTION_IMPL_SAFEGUARD()
CALLFUNCTION_IMPL_PREPARE(1)
CALLFUNCTION_IMPL_PARAMETER(0, p1)
CALLFUNCTION_IMPL_CALL_64()
CALLFUNCTION_IMPL_RESULT_64()
CALLFUNCTION_IMPL_RETURN()
CALLFUNCTION_IMPL_END()
CALLFUNCTION_DECL_BEGIN_64(Q1Q)
CALLFUNCTION_DECL_PARAMETER(int64_t, p1)
CALLFUNCTION_DECL_END() CALLFUNCTION_IMPL_BEGIN()
CALLFUNCTION_IMPL_SAFEGUARD()
CALLFUNCTION_IMPL_PREPARE(1)
CALLFUNCTION_IMPL_PARAMETER_64(0, p1)
CALLFUNCTION_IMPL_CALL_64()
CALLFUNCTION_IMPL_RESULT_64()
CALLFUNCTION_IMPL_RETURN()
CALLFUNCTION_IMPL_END()
// Two Parameters
CALLFUNCTION_DECL_BEGIN(D2DQ)
CALLFUNCTION_DECL_PARAMETER(int32_t, p1)
CALLFUNCTION_DECL_PARAMETER(int64_t, p2)
CALLFUNCTION_DECL_END() CALLFUNCTION_IMPL_BEGIN()
CALLFUNCTION_IMPL_SAFEGUARD()
CALLFUNCTION_IMPL_PREPARE(2)
CALLFUNCTION_IMPL_PARAMETER_64(1, p2)
CALLFUNCTION_IMPL_PARAMETER(0, p1)
CALLFUNCTION_IMPL_CALL()
CALLFUNCTION_IMPL_RESULT()
CALLFUNCTION_IMPL_RETURN()
CALLFUNCTION_IMPL_END()
CALLFUNCTION_DECL_BEGIN(D2QD)
CALLFUNCTION_DECL_PARAMETER(int64_t, p1)
CALLFUNCTION_DECL_PARAMETER(int32_t, p2)
CALLFUNCTION_DECL_END() CALLFUNCTION_IMPL_BEGIN()
CALLFUNCTION_IMPL_SAFEGUARD()
CALLFUNCTION_IMPL_PREPARE(2)
CALLFUNCTION_IMPL_PARAMETER(1, p2)
CALLFUNCTION_IMPL_PARAMETER_64(0, p1)
CALLFUNCTION_IMPL_CALL()
CALLFUNCTION_IMPL_RESULT()
CALLFUNCTION_IMPL_RETURN()
CALLFUNCTION_IMPL_END()
CALLFUNCTION_DECL_BEGIN(D2QQ)
CALLFUNCTION_DECL_PARAMETER(int64_t, p1)
CALLFUNCTION_DECL_PARAMETER(int64_t, p2)
CALLFUNCTION_DECL_END() CALLFUNCTION_IMPL_BEGIN()
CALLFUNCTION_IMPL_SAFEGUARD()
CALLFUNCTION_IMPL_PREPARE(2)
CALLFUNCTION_IMPL_PARAMETER_64(1, p2)
CALLFUNCTION_IMPL_PARAMETER_64(0, p1)
CALLFUNCTION_IMPL_CALL()
CALLFUNCTION_IMPL_RESULT()
CALLFUNCTION_IMPL_RETURN()
CALLFUNCTION_IMPL_END()
CALLFUNCTION_DECL_BEGIN_64(Q2DD)
CALLFUNCTION_DECL_PARAMETER(int32_t, p1)
CALLFUNCTION_DECL_PARAMETER(int64_t, p2)
CALLFUNCTION_DECL_END() CALLFUNCTION_IMPL_BEGIN()
CALLFUNCTION_IMPL_SAFEGUARD()
CALLFUNCTION_IMPL_PREPARE(2)
CALLFUNCTION_IMPL_PARAMETER_64(1, p2)
CALLFUNCTION_IMPL_PARAMETER(0, p1)
CALLFUNCTION_IMPL_CALL()
CALLFUNCTION_IMPL_RESULT_64()
CALLFUNCTION_IMPL_RETURN()
CALLFUNCTION_IMPL_END()
CALLFUNCTION_DECL_BEGIN_64(Q2DQ)
CALLFUNCTION_DECL_PARAMETER(int32_t, p1)
CALLFUNCTION_DECL_PARAMETER(int64_t, p2)
CALLFUNCTION_DECL_END() CALLFUNCTION_IMPL_BEGIN()
CALLFUNCTION_IMPL_SAFEGUARD()
CALLFUNCTION_IMPL_PREPARE(2)
CALLFUNCTION_IMPL_PARAMETER_64(1, p2)
CALLFUNCTION_IMPL_PARAMETER(0, p1)
CALLFUNCTION_IMPL_CALL()
CALLFUNCTION_IMPL_RESULT_64()
CALLFUNCTION_IMPL_RETURN()
CALLFUNCTION_IMPL_END()
CALLFUNCTION_DECL_BEGIN_64(Q2QD)
CALLFUNCTION_DECL_PARAMETER(int64_t, p1)
CALLFUNCTION_DECL_PARAMETER(int32_t, p2)
CALLFUNCTION_DECL_END() CALLFUNCTION_IMPL_BEGIN()
CALLFUNCTION_IMPL_SAFEGUARD()
CALLFUNCTION_IMPL_PREPARE(2)
CALLFUNCTION_IMPL_PARAMETER(1, p2)
CALLFUNCTION_IMPL_PARAMETER_64(0, p1)
CALLFUNCTION_IMPL_CALL()
CALLFUNCTION_IMPL_RESULT_64()
CALLFUNCTION_IMPL_RETURN()
CALLFUNCTION_IMPL_END()
CALLFUNCTION_DECL_BEGIN_64(Q2QQ)
CALLFUNCTION_DECL_PARAMETER(int64_t, p1)
CALLFUNCTION_DECL_PARAMETER(int64_t, p2)
CALLFUNCTION_DECL_END() CALLFUNCTION_IMPL_BEGIN()
CALLFUNCTION_IMPL_SAFEGUARD()
CALLFUNCTION_IMPL_PREPARE(2)
CALLFUNCTION_IMPL_PARAMETER_64(1, p2)
CALLFUNCTION_IMPL_PARAMETER_64(0, p1)
CALLFUNCTION_IMPL_CALL()
CALLFUNCTION_IMPL_RESULT_64()
CALLFUNCTION_IMPL_RETURN()
CALLFUNCTION_IMPL_END()
*/
-91
View File
@@ -1,91 +0,0 @@
// BlitzPointer - Adding Pointers to Blitz.
// Copyright (C) 2015 Project Kube (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 "BlitzPointer.h"
// No Parameters
CALLFUNCTION_DECL_BEGIN(0)
CALLFUNCTION_DECL_END() CALLFUNCTION_IMPL_BEGIN()
CALLFUNCTION_IMPL_SAFEGUARD()
CALLFUNCTION_IMPL_CALL()
CALLFUNCTION_IMPL_RESULT()
CALLFUNCTION_IMPL_RETURN()
CALLFUNCTION_IMPL_END()
#pragma comment(linker, "/EXPORT:BlitzPointer_CallFunction0=_BlitzPointer_CallFunction0@4")
// One Parameter
CALLFUNCTION_DECL_BEGIN(1)
CALLFUNCTION_DECL_PARAMETER(int32_t, p1)
CALLFUNCTION_DECL_END() CALLFUNCTION_IMPL_BEGIN()
CALLFUNCTION_IMPL_SAFEGUARD()
CALLFUNCTION_IMPL_PREPARE(1)
CALLFUNCTION_IMPL_PARAMETER(0, p1)
CALLFUNCTION_IMPL_CALL()
CALLFUNCTION_IMPL_RESULT()
CALLFUNCTION_IMPL_RETURN()
CALLFUNCTION_IMPL_END()
#pragma comment(linker, "/EXPORT:BlitzPointer_CallFunction1=_BlitzPointer_CallFunction1@8")
// Two Parameters
CALLFUNCTION_DECL_BEGIN(2)
CALLFUNCTION_DECL_PARAMETER(int32_t, p1)
CALLFUNCTION_DECL_PARAMETER(int32_t, p2)
CALLFUNCTION_DECL_END() CALLFUNCTION_IMPL_BEGIN()
CALLFUNCTION_IMPL_SAFEGUARD()
CALLFUNCTION_IMPL_PREPARE(2)
CALLFUNCTION_IMPL_PARAMETER(1, p2)
CALLFUNCTION_IMPL_PARAMETER(0, p1)
CALLFUNCTION_IMPL_CALL()
CALLFUNCTION_IMPL_RESULT()
CALLFUNCTION_IMPL_RETURN()
CALLFUNCTION_IMPL_END()
#pragma comment(linker, "/EXPORT:BlitzPointer_CallFunction2=_BlitzPointer_CallFunction2@12")
// Three Parameters
CALLFUNCTION_DECL_BEGIN(3)
CALLFUNCTION_DECL_PARAMETER(int32_t, p1)
CALLFUNCTION_DECL_PARAMETER(int32_t, p2)
CALLFUNCTION_DECL_PARAMETER(int32_t, p3)
CALLFUNCTION_DECL_END() CALLFUNCTION_IMPL_BEGIN()
CALLFUNCTION_IMPL_SAFEGUARD()
CALLFUNCTION_IMPL_PREPARE(3)
CALLFUNCTION_IMPL_PARAMETER(2, p3)
CALLFUNCTION_IMPL_PARAMETER(1, p2)
CALLFUNCTION_IMPL_PARAMETER(0, p1)
CALLFUNCTION_IMPL_CALL()
CALLFUNCTION_IMPL_RESULT()
CALLFUNCTION_IMPL_RETURN()
CALLFUNCTION_IMPL_END()
#pragma comment(linker, "/EXPORT:BlitzPointer_CallFunction3=_BlitzPointer_CallFunction3@16")
// Four Parameters
CALLFUNCTION_DECL_BEGIN(4)
CALLFUNCTION_DECL_PARAMETER(int32_t, p1)
CALLFUNCTION_DECL_PARAMETER(int32_t, p2)
CALLFUNCTION_DECL_PARAMETER(int32_t, p3)
CALLFUNCTION_DECL_PARAMETER(int32_t, p4)
CALLFUNCTION_DECL_END() CALLFUNCTION_IMPL_BEGIN()
CALLFUNCTION_IMPL_SAFEGUARD()
CALLFUNCTION_IMPL_PREPARE(4)
CALLFUNCTION_IMPL_PARAMETER(3, p4)
CALLFUNCTION_IMPL_PARAMETER(2, p3)
CALLFUNCTION_IMPL_PARAMETER(1, p2)
CALLFUNCTION_IMPL_PARAMETER(0, p1)
CALLFUNCTION_IMPL_CALL()
CALLFUNCTION_IMPL_RESULT()
CALLFUNCTION_IMPL_RETURN()
CALLFUNCTION_IMPL_END()
#pragma comment(linker, "/EXPORT:BlitzPointer_CallFunction4=_BlitzPointer_CallFunction4@20")
+152 -31
View File
@@ -1,5 +1,5 @@
// 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
// it under the terms of the GNU Lesser General Public License as
@@ -15,49 +15,170 @@
// 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>
// New Code by Xaymar<http://project-kube.de>
// New Code by Xaymar<http://xaymar.com>
#pragma once
#include "BlitzPointer.h"
DLL_EXPORT intptr_t BlitzPointer_GetReturnAddress() {
intptr_t StackPointer, ReturnAddress;
DLL_METHOD intptr_t DLL_CALL BP_GetReturnAddress() {
#pragma comment(linker, "/EXPORT:BP_GetReturnAddress=_BP_GetReturnAddress@0")
intptr_t BasePointer, ReturnAddress;
__asm { //ASM. Do touch if suicidal.
mov StackPointer, esp; // Store current Stack Pointer
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.
mov BasePointer, ebp; // Store current BasePointer
}
// 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;
}
#pragma comment(linker, "/EXPORT:BlitzPointer_GetReturnAddress=_BlitzPointer_GetReturnAddress@0")
DLL_EXPORT intptr_t BlitzPointer_GetFunctionPointer()
{
intptr_t StackPointer, ReturnAddress;
DLL_METHOD intptr_t DLL_CALL BP_GetFunctionPointer() {
#pragma comment(linker, "/EXPORT:BP_GetFunctionPointer=_BP_GetFunctionPointer@0")
intptr_t BasePointer, ReturnAddress, FunctionPointer;
__asm { //ASM. Do touch if suicidal.
mov StackPointer, esp; // Store current Stack Pointer
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.
mov BasePointer, ebp; // Store current BasePointer
}
// Let's look backwards in memory for the function signature (0x53 0x56 0x57 0x55 0x89 0xE5) for at most one megabyte.
uint8_t* startPtr = (uint8_t*)ReturnAddress;
uint8_t* endPtr = (uint8_t*)(ReturnAddress - 1048576);
for (uint8_t* curPtr = startPtr; curPtr != endPtr; curPtr--) {
if (*(curPtr) == 0x53) // push ebx
if (*(curPtr + 1) == 0x56) // push esi
if (*(curPtr + 2) == 0x57) // push edi
if (*(curPtr + 3) == 0x55) // push ebp
if (*(curPtr + 4) == 0x89 && *(curPtr + 5) == 0xE5) // mov ebp,esp
return (intptr_t)curPtr;
}
// 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 0;
// And since it's a Call-Near, the call is offset to the return address.
FunctionPointer = ReturnAddress + *(intptr_t*)(ReturnAddress - 4);
return FunctionPointer;
}
#pragma comment(linker, "/EXPORT:BlitzPointer_GetFunctionPointer=_BlitzPointer_GetFunctionPointer@0")
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
}
// 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);
}
DLL_METHOD intptr_t DLL_CALL BP_GetVariablePointerType(int32_t pVariable) {
#pragma comment(linker, "/EXPORT:BP_GetVariablePointerType=_BP_GetVariablePointerType@4")
intptr_t BasePointer;
__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);
}
DLL_METHOD int32_t DLL_CALL BP_CallFunction0(BP_BlitzFunction0_t lpFunctionPointer) {
#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) {
#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) {
#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) {
#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) {
#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) {
#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;
}
+23 -15
View File
@@ -1,5 +1,5 @@
// 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
// it under the terms of the GNU Lesser General Public License as
@@ -18,18 +18,26 @@
#include "dllmain.h"
#include <string>
DLL_EXPORT intptr_t BlitzPointer_GetReturnAddress();
DLL_EXPORT intptr_t BlitzPointer_GetFunctionPointer();
// Types of Blitz Functions.
typedef int32_t(__stdcall *BP_BlitzFunction0_t)();
typedef int32_t(__stdcall *BP_BlitzFunction1_t)(int32_t);
typedef int32_t(__stdcall *BP_BlitzFunction2_t)(int32_t, int32_t);
typedef int32_t(__stdcall *BP_BlitzFunction3_t)(int32_t, int32_t, int32_t);
typedef int32_t(__stdcall *BP_BlitzFunction4_t)(int32_t, int32_t, int32_t, int32_t);
typedef int32_t(__stdcall *BP_BlitzFunction5_t)(int32_t, int32_t, int32_t, int32_t, int32_t);
// Defines for easier function generation.
#define CALLFUNCTION_DECL_BEGIN(NAME) DLL_EXPORT int32_t BlitzPointer_CallFunction##NAME(intptr_t lpFunctionPointer
#define CALLFUNCTION_DECL_PARAMETER(TYPE, NAME) , TYPE NAME
#define CALLFUNCTION_DECL_END() )
#define CALLFUNCTION_IMPL_BEGIN() {
#define CALLFUNCTION_IMPL_SAFEGUARD() if (!lpFunctionPointer) return NULL;
#define CALLFUNCTION_IMPL_PREPARE(COUNT) __asm SUB ESP, COUNT * 4
#define CALLFUNCTION_IMPL_PARAMETER(INDEX, NAME) __asm MOV EAX, [NAME] __asm MOV [ESP + INDEX * 4], EAX
#define CALLFUNCTION_IMPL_CALL() __asm CALL DWORD ptr[lpFunctionPointer]
#define CALLFUNCTION_IMPL_RESULT() int32_t result; __asm MOV [result], EAX
#define CALLFUNCTION_IMPL_RETURN() return result;
#define CALLFUNCTION_IMPL_END() }
// Basic Functionality (Pointer retrieval)
DLL_METHOD intptr_t DLL_CALL BP_GetReturnAddress();
DLL_METHOD intptr_t DLL_CALL BP_GetFunctionPointer();
/*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
DLL_METHOD int32_t DLL_CALL BP_CallFunction0(BP_BlitzFunction0_t lpFunctionPointer);
DLL_METHOD int32_t DLL_CALL BP_CallFunction1(BP_BlitzFunction1_t lpFunctionPointer, int32_t p1);
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_CallFunction3(BP_BlitzFunction3_t lpFunctionPointer, int32_t p1, int32_t p2, int32_t p3);
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_CallFunction5(BP_BlitzFunction5_t lpFunctionPointer, int32_t p1, int32_t p2, int32_t p3, int32_t p4, int32_t p5);
+80 -98
View File
@@ -1,5 +1,5 @@
<?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">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
@@ -13,18 +13,19 @@
<PropertyGroup Label="Globals">
<ProjectGuid>{AC8F52F4-9FE6-4CEF-B549-8180757020C8}</ProjectGuid>
<RootNamespace>BlitzPointer</RootNamespace>
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v120</PlatformToolset>
<PlatformToolset>v140</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v120</PlatformToolset>
<PlatformToolset>v140</PlatformToolset>
<WholeProgramOptimization>false</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
@@ -39,37 +40,32 @@
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<OutDir>$(SolutionDir)\#Build\$(ProjectName)\$(Configuration)\</OutDir>
<IntDir>$(SolutionDir)\#Intermediate\$(ProjectName)\$(Configuration)\</IntDir>
<OutDir>$(SolutionDir)#Build\$(ProjectName)\$(Configuration)\</OutDir>
<IntDir>$(SolutionDir)#Intermediate\$(ProjectName)\$(Configuration)\</IntDir>
<TargetExt>.dll</TargetExt>
<LinkIncremental>true</LinkIncremental>
<IncludePath>$(ProjectDir);$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<OutDir>$(SolutionDir)\#Build\$(ProjectName)\$(Configuration)\</OutDir>
<IntDir>$(SolutionDir)\#Intermediate\$(ProjectName)\$(Configuration)\</IntDir>
<OutDir>$(SolutionDir)#Build\$(ProjectName)\$(Configuration)\</OutDir>
<IntDir>$(SolutionDir)#Intermediate\$(ProjectName)\$(Configuration)\</IntDir>
<TargetExt>.dll</TargetExt>
<LinkIncremental>true</LinkIncremental>
<IncludePath>$(ProjectDir);$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<SDLCheck>
</SDLCheck>
<AdditionalIncludeDirectories>$(SolutionDir);$(ProjectDir)</AdditionalIncludeDirectories>
<MultiProcessorCompilation>false</MultiProcessorCompilation>
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
<AdditionalIncludeDirectories>$(ProjectDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
<FunctionLevelLinking>false</FunctionLevelLinking>
<FunctionLevelLinking>true</FunctionLevelLinking>
<CompileAsManaged>false</CompileAsManaged>
<CompileAsWinRT>false</CompileAsWinRT>
<StructMemberAlignment>4Bytes</StructMemberAlignment>
<EnableParallelCodeGeneration>true</EnableParallelCodeGeneration>
<CreateHotpatchableImage>false</CreateHotpatchableImage>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<CreateHotpatchableImage>true</CreateHotpatchableImage>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<OpenMPSupport>false</OpenMPSupport>
<ForcedIncludeFiles>
</ForcedIncludeFiles>
@@ -77,25 +73,42 @@
<PreprocessKeepComments>false</PreprocessKeepComments>
<InlineFunctionExpansion>Disabled</InlineFunctionExpansion>
<OmitFramePointers>false</OmitFramePointers>
<CallingConvention>StdCall</CallingConvention>
<CallingConvention>Cdecl</CallingConvention>
<IntrinsicFunctions>false</IntrinsicFunctions>
<FavorSizeOrSpeed>Neither</FavorSizeOrSpeed>
<StringPooling>true</StringPooling>
<EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet>
<FloatingPointExceptions>true</FloatingPointExceptions>
<UseUnicodeForAssemblerListing>true</UseUnicodeForAssemblerListing>
<PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
<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 />
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>Full</Optimization>
<FunctionLevelLinking>false</FunctionLevelLinking>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>
</SDLCheck>
<AdditionalIncludeDirectories>$(SolutionDir);$(ProjectDir)</AdditionalIncludeDirectories>
<MultiProcessorCompilation>false</MultiProcessorCompilation>
<AdditionalIncludeDirectories>$(ProjectDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
@@ -104,33 +117,41 @@
<StructMemberAlignment>4Bytes</StructMemberAlignment>
<EnableParallelCodeGeneration>true</EnableParallelCodeGeneration>
<CreateHotpatchableImage>false</CreateHotpatchableImage>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<OpenMPSupport>false</OpenMPSupport>
<ForcedIncludeFiles>
</ForcedIncludeFiles>
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
<MinimalRebuild>false</MinimalRebuild>
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
<InlineFunctionExpansion>Default</InlineFunctionExpansion>
<OmitFramePointers>false</OmitFramePointers>
<CallingConvention>StdCall</CallingConvention>
<CallingConvention>Cdecl</CallingConvention>
<StringPooling>true</StringPooling>
<EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet>
<FloatingPointExceptions>true</FloatingPointExceptions>
<UseUnicodeForAssemblerListing>true</UseUnicodeForAssemblerListing>
<PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
<DebugInformationFormat>None</DebugInformationFormat>
<ControlFlowGuard>false</ControlFlowGuard>
<EnforceTypeConversionRules>true</EnforceTypeConversionRules>
</ClCompile>
<Link>
<GenerateDebugInformation>false</GenerateDebugInformation>
<EnableCOMDATFolding>
</EnableCOMDATFolding>
<OptimizeReferences>
</OptimizeReferences>
<Version>1.0</Version>
<GenerateDebugInformation>No</GenerateDebugInformation>
<EnableCOMDATFolding>false</EnableCOMDATFolding>
<OptimizeReferences>false</OptimizeReferences>
<LinkStatus>
</LinkStatus>
<CreateHotPatchableImage>Enabled</CreateHotPatchableImage>
<FixedBaseAddress>false</FixedBaseAddress>
<LargeAddressAware>false</LargeAddressAware>
<LinkTimeCodeGeneration>
</LinkTimeCodeGeneration>
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
<FullProgramDatabaseFile>false</FullProgramDatabaseFile>
</Link>
<ProjectReference />
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="BlitzHybrid.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="BlitzNative.cpp" />
<ClCompile Include="BlitzPointer.cpp" />
<ClCompile Include="dllmain.cpp" />
<ClCompile Include="MemoryHelpers.cpp" />
@@ -140,65 +161,26 @@
<ClInclude Include="dllmain.h" />
</ItemGroup>
<ItemGroup>
<None Include="LICENSE">
<Link>LICENSE</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="LICENSE.lesser">
<Link>LICENSE.lesser</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Blitz\BlitzPointer.decls">
<Link>BlitzPointer.decls</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</DeploymentContent>
</None>
<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>
<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>
+78 -69
View File
@@ -1,70 +1,79 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<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>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="dllmain.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="BlitzPointer.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="BlitzNative.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="BlitzHybrid.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="MemoryHelpers.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="dllmain.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="BlitzPointer.h">
<Filter>Source Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="Blitz\Example05.bb">
<Filter>Blitz Files</Filter>
</None>
<None Include="Blitz\BlitzPointer.decls">
<Filter>Blitz Files</Filter>
</None>
<None Include="Blitz\BlitzPointer.ipf">
<Filter>Blitz Files</Filter>
</None>
<None Include="Blitz\Example_Shared.bb">
<Filter>Blitz Files</Filter>
</None>
<None Include="Blitz\Example01.bb">
<Filter>Blitz Files</Filter>
</None>
<None Include="Blitz\Example02.bb">
<Filter>Blitz Files</Filter>
</None>
<None Include="Blitz\Example03.bb">
<Filter>Blitz Files</Filter>
</None>
<None Include="Blitz\Example04.bb">
<Filter>Blitz Files</Filter>
</None>
<None Include="Blitz\Example06.bb">
<Filter>Blitz Files</Filter>
</None>
<None Include="Blitz\Example07.bb">
<Filter>Blitz Files</Filter>
</None>
</ItemGroup>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</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>{d3963385-0917-43df-9813-3cd79d80d4d0}</UniqueIdentifier>
</Filter>
<Filter Include="Resource Files\Examples">
<UniqueIdentifier>{1af1f49c-694a-4143-b7a4-9a6805a2385c}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="dllmain.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="BlitzPointer.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="MemoryHelpers.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="BlitzPointer.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="dllmain.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="Resources\BlitzPointer.decls">
<Filter>Resource Files</Filter>
</None>
<None Include="Resources\LICENSE">
<Filter>Resource Files</Filter>
</None>
<None Include="Resources\LICENSE.lesser">
<Filter>Resource Files</Filter>
</None>
<None Include="Resources\Examples\Example04.bb">
<Filter>Resource Files\Examples</Filter>
</None>
<None Include="Resources\Examples\Example05.bb">
<Filter>Resource Files\Examples</Filter>
</None>
<None Include="Resources\Examples\Example06.bb">
<Filter>Resource Files\Examples</Filter>
</None>
<None Include="Resources\Examples\Example07.bb">
<Filter>Resource Files\Examples</Filter>
</None>
<None Include="Resources\Examples\Example08.bb">
<Filter>Resource Files\Examples</Filter>
</None>
<None Include="Resources\Examples\BlitzPointer.ipf">
<Filter>Resource Files\Examples</Filter>
</None>
<None Include="Resources\Examples\Example_Shared.bb">
<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>
</ItemGroup>
</Project>
+11 -11
View File
@@ -1,5 +1,5 @@
// 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
// it under the terms of the GNU Lesser General Public License as
@@ -16,7 +16,7 @@
#include "dllmain.h"
DLL_EXPORT uint32_t PeekMemory(uint32_t* address, uint32_t length, intptr_t bank) {
DLL_METHOD uint32_t DLL_CALL PeekMemory(uint32_t* address, uint32_t length, intptr_t bank) {
uint32_t bankAddress, bankSize;
bankAddress = *(uint32_t*)(bank + 4);
bankSize = *(uint32_t*)(bank + 8);
@@ -32,7 +32,7 @@ DLL_EXPORT uint32_t PeekMemory(uint32_t* address, uint32_t length, intptr_t bank
}
#pragma comment(linker, "/EXPORT:PeekMemory=_PeekMemory@12")
DLL_EXPORT uint32_t PokeMemory(uint32_t address, uint32_t length, intptr_t bank) {
DLL_METHOD uint32_t DLL_CALL PokeMemory(uint32_t address, uint32_t length, intptr_t bank) {
uint32_t bankAddress, bankSize;
bankAddress = *(uint32_t*)(bank + 4);
bankSize = *(uint32_t*)(bank + 8);
@@ -48,42 +48,42 @@ DLL_EXPORT uint32_t PokeMemory(uint32_t address, uint32_t length, intptr_t bank)
}
#pragma comment(linker, "/EXPORT:PokeMemory=_PokeMemory@12")
DLL_EXPORT int8_t PeekMemoryByte(uint32_t* address) {
DLL_METHOD int8_t DLL_CALL PeekMemoryByte(uint32_t* address) {
return *(int8_t*)address;
}
#pragma comment(linker, "/EXPORT:PeekMemoryByte=_PeekMemoryByte@4")
DLL_EXPORT void PokeMemoryByte(uint32_t* address, int8_t value) {
DLL_METHOD void DLL_CALL PokeMemoryByte(uint32_t* address, int8_t value) {
*(int8_t*)address = value;
}
#pragma comment(linker, "/EXPORT:PokeMemoryByte=_PokeMemoryByte@8")
DLL_EXPORT int16_t PeekMemoryShort(uint32_t* address) {
DLL_METHOD int16_t DLL_CALL PeekMemoryShort(uint32_t* address) {
return *(int16_t*)address;
}
#pragma comment(linker, "/EXPORT:PeekMemoryShort=_PeekMemoryShort@4")
DLL_EXPORT void PokeMemoryShort(uint32_t* address, int16_t value) {
DLL_METHOD void DLL_CALL PokeMemoryShort(uint32_t* address, int16_t value) {
*(int16_t*)address = value;
}
#pragma comment(linker, "/EXPORT:PokeMemoryShort=_PokeMemoryShort@8")
DLL_EXPORT int32_t PeekMemoryInt(uint32_t* address) {
DLL_METHOD int32_t DLL_CALL PeekMemoryInt(uint32_t* address) {
return *(int32_t*)address;
}
#pragma comment(linker, "/EXPORT:PeekMemoryInt=_PeekMemoryInt@4")
DLL_EXPORT void PokeMemoryInt(uint32_t* address, int32_t value) {
DLL_METHOD void DLL_CALL PokeMemoryInt(uint32_t* address, int32_t value) {
*(int32_t*)address = value;
}
#pragma comment(linker, "/EXPORT:PokeMemoryInt=_PokeMemoryInt@8")
DLL_EXPORT float_t PeekMemoryFloat(uint32_t* address) {
DLL_METHOD float_t DLL_CALL PeekMemoryFloat(uint32_t* address) {
return *(float_t*)address;
}
#pragma comment(linker, "/EXPORT:PeekMemoryFloat=_PeekMemoryFloat@4")
DLL_EXPORT void PokeMemoryFloat(uint32_t* address, float_t value) {
DLL_METHOD void DLL_CALL PokeMemoryFloat(uint32_t* address, float_t value) {
*(float_t*)address = value;
}
#pragma comment(linker, "/EXPORT:PokeMemoryFloat=_PokeMemoryFloat@8")
+25
View File
@@ -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.
; 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
; it under the terms of the GNU Lesser General Public License as
@@ -38,14 +38,14 @@ Global fpOurFunction = 0
; Our function can be anything we want, however we must be able to call it once
; without effect before we can actually retrieve the function pointer. Why?
; Simple! The BlitzPointer_GetFunctionPointer traces the return address for the
; Simple! The BP_GetFunctionPointer traces the return address for the
; Blitz function signature - and thus can't work outside a function.
Function OurFunction()
; Let's begin by checking if we already have the pointer. Not required, but
; we do it anyway to save some scanning time on every call.
If fpOurFunction = 0 Then
; Now let us call the above mentioned function to retrieve the pointer.
fpOurFunction = BlitzPointer_GetFunctionPointer()
fpOurFunction = BP_GetFunctionPointer()
; Weether you use a Return or an Else is up to you. Return is technically
; faster in Blitz, as using Else causes a complex ASM construction.
Return
@@ -1,5 +1,5 @@
; 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
; it under the terms of the GNU Lesser General Public License as
@@ -29,7 +29,7 @@ ExampleInit()
Global fpOurFunction = 0
Function OurFunction()
If fpOurFunction = 0 Then
fpOurFunction = BlitzPointer_GetFunctionPointer()
fpOurFunction = BP_GetFunctionPointer()
Return
EndIf
@@ -44,7 +44,7 @@ While Not KeyHit(1)
; BlitzPointer offers many ways of calling our function pointer. Each one
; describes different return types, parameter count and parameter types.
; Let's use the one that doesn't return a value for now.
BlitzPointer_CallFunctionV fpOurFunction
BP_CallFunctionV fpOurFunction
; Now if we run the program, instead of a fixed native call, we're calling a
; function pointer instead. Pretty useful in my opinion, especially for UI,
; networking, fake classes, etc.
@@ -1,5 +1,5 @@
; 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
; it under the terms of the GNU Lesser General Public License as
@@ -29,9 +29,9 @@
; ---------------------------------------------------------------------------- ;
; Type Id Description Calling Function
; ---------------------------------------------------------------------------- ;
; void V Nothing BlitzPointer_CallFunctionV
; int I 32-bit Integer BlitzPointer_CallFunctionI
; float F Floating Point BlitzPointer_CallFunctionF
; void V Nothing BP_CallFunctionV
; int I 32-bit Integer BP_CallFunctionI
; float F Floating Point BP_CallFunctionF
; Now that we know what we can and can't do (without memory leaks at least),
; let's try out the return types ourselves.
@@ -43,7 +43,7 @@ ExampleInit()
Global fpVoidFunction = 0
Function VoidFunction()
If fpVoidFunction = 0 Then
fpVoidFunction = BlitzPointer_GetFunctionPointer()
fpVoidFunction = BP_GetFunctionPointer()
Return
EndIf
Text 0, 0, "Void Return Type"
@@ -54,7 +54,7 @@ VoidFunction()
Global fpIntFunction = 0
Function IntFunction%()
If fpIntFunction = 0 Then
fpIntFunction = BlitzPointer_GetFunctionPointer()
fpIntFunction = BP_GetFunctionPointer()
Return
EndIf
Text 0, 15, "Int Return Type"
@@ -66,7 +66,7 @@ IntFunction()
Global fpFloatFunction = 0
Function FloatFunction#()
If fpFloatFunction = 0 Then
fpFloatFunction = BlitzPointer_GetFunctionPointer()
fpFloatFunction = BP_GetFunctionPointer()
Return
EndIf
Text 0, 30, "Float Return Type"
@@ -78,9 +78,9 @@ While Not KeyHit(1)
ExampleUpdate()
; Calling the function and using the return value is really easy to do now:
BlitzPointer_CallFunctionV(fpVoidFunction) ; void returns nothing.
Text 200, 15, BlitzPointer_CallFunctionI(fpIntFunction)
Text 200, 30, BlitzPointer_CallFunctionF(fpFloatFunction)
BP_CallFunctionV(fpVoidFunction) ; void returns nothing.
Text 200, 15, BP_CallFunctionI(fpIntFunction)
Text 200, 30, BP_CallFunctionF(fpFloatFunction)
ExampleLoop()
Wend
@@ -1,5 +1,5 @@
; 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
; it under the terms of the GNU Lesser General Public License as
@@ -31,9 +31,9 @@
; ---------------------------------------------------------------------------- ;
; Type Id Description Calling Function
; ---------------------------------------------------------------------------- ;
; int I 32-bit Integer BlitzPointer_CallFunction*I
; float F Floating Point BlitzPointer_CallFunction*F
; pointer P Memory Pointer BlitzPointer_CallFunction*P
; int I 32-bit Integer BP_CallFunction*I
; float F Floating Point BP_CallFunction*F
; pointer P Memory Pointer BP_CallFunction*P
; Watch out:
; Calling a function that has parameters without giving enough parameters will
@@ -47,7 +47,7 @@ ExampleInit()
Global fpCurInGameSecond = 0
Function CurInGameSecond%(p1%=0)
If fpCurInGameSecond = 0 Then
fpCurInGameSecond = BlitzPointer_GetFunctionPointer()
fpCurInGameSecond = BP_GetFunctionPointer()
Return
EndIf
Text 5, 15, "IIFunction"
@@ -61,7 +61,7 @@ CurInGameSecond()
Global fpCurInGameSecondEx = 0
Function CurInGameSecondEx#(p1%=0, p2#=0)
If fpCurInGameSecondEx = 0 Then
fpCurInGameSecondEx = BlitzPointer_GetFunctionPointer()
fpCurInGameSecondEx = BP_GetFunctionPointer()
Return
EndIf
@@ -78,7 +78,7 @@ CurInGameSecondEx()
Global fpConvertIntFloat
Function ConvertIntFloat#(p1#=0)
If fpConvertIntFloat = 0 Then
fpConvertIntFloat = BlitzPointer_GetFunctionPointer()
fpConvertIntFloat = BP_GetFunctionPointer()
Print Hex(fpConvertIntFloat)
WaitKey()
Return
@@ -101,18 +101,18 @@ While Not KeyHit(1)
Text 480, 0, "Parameter 4"
Text 600, 0, "Result"
Text 605, 15, BlitzPointer_CallFunctionII(fpCurInGameSecond, Frame)
Text 605, 30, BlitzPointer_CallFunctionFIF(fpCurInGameSecondEx, Frame, 0.016666666)
Text 605, 15, BP_CallFunctionII(fpCurInGameSecond, Frame)
Text 605, 30, BP_CallFunctionFIF(fpCurInGameSecondEx, Frame, 0.016666666)
Local TempFlt# = Frame / 60.0
Local TempInt% = BlitzPointer_CallFunctionIF(fpConvertIntFloat, TempFlt)
Local TempInt% = BP_CallFunctionIF(fpConvertIntFloat, TempFlt)
Text 5, 60, "Float -> Int"
Text 125, 60, TempFlt
Text 605, 60, Hex(TempInt)
Text 5, 75, "Int -> Float"
Text 125, 75, Hex(TempInt)
Text 605, 75, BlitzPointer_CallFunctionFI(fpConvertIntFloat, TempInt)
Text 605, 75, BP_CallFunctionFI(fpConvertIntFloat, TempInt)
ExampleLoop()
@@ -1,5 +1,5 @@
; 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
; it under the terms of the GNU Lesser General Public License as
@@ -41,7 +41,7 @@ End Type
Global fpMyTypeFunc = 0
Function MyTypeFunc(This.MyType)
If fpMyTypeFunc = 0 Then
fpMyTypeFunc = BlitzPointer_GetFunctionPointer()
fpMyTypeFunc = BP_GetFunctionPointer()
Return
EndIf
If This = Null Then Return
@@ -64,8 +64,8 @@ While Not KeyHit(1)
; Now in order to pass a Type Object to a function, we have to get a pointer
; from it. Thankfully, Blitz has this already built in: Int().
If KeyDown(2) Then BlitzPointer_CallFunctionVI fpMyTypeFunc, Int(MT1)
If KeyDown(3) Then BlitzPointer_CallFunctionVI fpMyTypeFunc, Int(MT2)
If KeyDown(2) Then BP_CallFunctionVI fpMyTypeFunc, Int(MT1)
If KeyDown(3) Then BP_CallFunctionVI fpMyTypeFunc, Int(MT2)
ExampleLoop()
Wend
@@ -1,5 +1,5 @@
; 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
; it under the terms of the GNU Lesser General Public License as
@@ -82,7 +82,7 @@ End Type
Global fpMyPointerFunction% = 0
Function MyPointerFunction(Pointer%)
If fpMyPointerFunction = 0 Then
fpMyPointerFunction = BlitzPointer_GetFunctionPointer()
fpMyPointerFunction = BP_GetFunctionPointer()
Return
EndIf
@@ -1,5 +1,5 @@
; 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
; 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/>.
; ---------------------------------------------------------------------------- ;
; Example 6 - Callbacks
; Example 7 - Callbacks
; ---------------------------------------------------------------------------- ;
; License: Creative Commons Attribution 2.0
; Author: Michael Fabian Dirks<michael.dirks@realitybends.de>
@@ -54,7 +54,7 @@ Function TGenericUpdate()
Local This.TGeneric
For This = Each TGeneric
If This\Pointer <> 0 Then
If BlitzPointer_CallFunctionII(CallbackIndex(This\Index), This\Pointer) Then
If BP_CallFunctionII(CallbackIndex(This\Index), This\Pointer) Then
Delete This
EndIf
EndIf
@@ -98,7 +98,7 @@ End Function
Function TCubeCallback%(This.TCube)
If CallbackIndex(CALLBACK_INDEX_TCUBE) = 0 Then
CallbackIndex(CALLBACK_INDEX_TCUBE) = BlitzPointer_GetFunctionPointer()
CallbackIndex(CALLBACK_INDEX_TCUBE) = BP_GetFunctionPointer()
Return
EndIf
; Safeguard against stupidity (it affect everyone).
@@ -156,7 +156,7 @@ End Function
Function TSphereUpdate%(This.TSphere)
If CallbackIndex(CALLBACK_INDEX_TSPHERE) = 0 Then
CallbackIndex(CALLBACK_INDEX_TSPHERE) = BlitzPointer_GetFunctionPointer()
CallbackIndex(CALLBACK_INDEX_TSPHERE) = BP_GetFunctionPointer()
Return
EndIf
; Safeguard against stupidity (it affect everyone).
+84
View File
@@ -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.
; 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
; it under the terms of the GNU Lesser General Public License as
View File
+1 -1
View File
@@ -1,5 +1,5 @@
// 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
// it under the terms of the GNU Lesser General Public License as
+4 -5
View File
@@ -1,5 +1,5 @@
// 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
// it under the terms of the GNU Lesser General Public License as
@@ -14,9 +14,7 @@
// 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/>.
// STL Exceptions
#include <exception>
#include <stdexcept>
#pragma once
// Memory Management
#include <memory>
@@ -25,4 +23,5 @@
#include <windows.h>
// Macros
#define DLL_EXPORT extern "C" //__declspec(dllexport)
#define DLL_METHOD extern "C"
#define DLL_CALL __stdcall