Initial Commit
This commit is contained in:
@@ -0,0 +1,383 @@
|
|||||||
|
.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"
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
[IDEal Project file]
|
||||||
|
<Settings>
|
||||||
|
Version="1"
|
||||||
|
Expanded="True"
|
||||||
|
Icon=""
|
||||||
|
MainFile="Example07.bb"
|
||||||
|
Compiler="Blitz3D"
|
||||||
|
CommandLine=""
|
||||||
|
</Settings>
|
||||||
|
<Folders>
|
||||||
|
</Folders>
|
||||||
|
<Files>
|
||||||
|
AbsPath="\Example01.bb" PrjFolder="" Line="0" Column="0" Tip="0" Visible="False"
|
||||||
|
AbsPath="\Example02.bb" PrjFolder="" Line="0" Column="0" Tip="0" Visible="False"
|
||||||
|
AbsPath="\Example03.bb" PrjFolder="" Line="0" Column="0" Tip="0" Visible="False"
|
||||||
|
AbsPath="\Example04.bb" PrjFolder="" Line="0" Column="0" Tip="0" Visible="False"
|
||||||
|
AbsPath="\Example05.bb" PrjFolder="" Line="0" Column="0" Tip="0" Visible="False"
|
||||||
|
AbsPath="\Example06.bb" PrjFolder="" Line="0" Column="0" Tip="0" Visible="False"
|
||||||
|
AbsPath="\Example07.bb" PrjFolder="" Line="0" Column="0" Tip="0" Visible="False"
|
||||||
|
AbsPath="\Example_Shared.bb" PrjFolder="" Line="0" Column="0" Tip="0" Visible="False"
|
||||||
|
</Files>
|
||||||
@@ -0,0 +1,56 @@
|
|||||||
|
; ---------------------------------------------------------------------------- ;
|
||||||
|
; Example 1 - Retrieving Function Pointers
|
||||||
|
; ---------------------------------------------------------------------------- ;
|
||||||
|
; License: Creative Commons Attribution 2.0
|
||||||
|
; Author: Michael Fabian Dirks<michael.dirks@realitybends.de>
|
||||||
|
|
||||||
|
; If you don't know what a pointer is, I recommend googling it.
|
||||||
|
|
||||||
|
; Blitz doesn't offer native ways of getting function pointers, nor would they
|
||||||
|
; work with anything but tailored ASM calls. So what can they be useful for?
|
||||||
|
; Here are some examples on what you can do:
|
||||||
|
; * Footprint-only Callbacks (no longer need to override functions)
|
||||||
|
; * Creating APIs that support multiple versions.
|
||||||
|
|
||||||
|
|
||||||
|
Include "Example_Shared.bb"
|
||||||
|
ExampleInit()
|
||||||
|
|
||||||
|
; We begin by initalizing a variable to hold our pointer. Globals work best for
|
||||||
|
; this task as we don't have to use a function parameter.
|
||||||
|
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
|
||||||
|
; 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()
|
||||||
|
; 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
|
||||||
|
EndIf
|
||||||
|
|
||||||
|
; For proof reasons, we show the pointer on the screen.
|
||||||
|
Text 0, 0, "Function Pointer"
|
||||||
|
Text 0,15, " 0x" + Replace(RSet(Hex(fpOurFunction),8)," ","0")
|
||||||
|
End Function
|
||||||
|
; Now we call our function once. Since there is no function pointer assigned
|
||||||
|
; it will return almost immediately.
|
||||||
|
OurFunction()
|
||||||
|
|
||||||
|
While Not KeyHit(1)
|
||||||
|
ExampleUpdate()
|
||||||
|
|
||||||
|
OurFunction()
|
||||||
|
|
||||||
|
ExampleLoop()
|
||||||
|
Wend
|
||||||
|
|
||||||
|
End
|
||||||
|
;~IDEal Editor Parameters:
|
||||||
|
;~C#Blitz3D
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
; ---------------------------------------------------------------------------- ;
|
||||||
|
; Example 2 - Calling Functions (Beginner)
|
||||||
|
; ---------------------------------------------------------------------------- ;
|
||||||
|
; License: Creative Commons Attribution 2.0
|
||||||
|
; Author: Michael Fabian Dirks<michael.dirks@realitybends.de>
|
||||||
|
; Prerequisite: Example 1
|
||||||
|
|
||||||
|
; Since we now know how to retrieve a function pointer, how about we call it?
|
||||||
|
|
||||||
|
Include "Example_Shared.bb"
|
||||||
|
ExampleInit()
|
||||||
|
|
||||||
|
Global fpOurFunction = 0
|
||||||
|
Function OurFunction()
|
||||||
|
If fpOurFunction = 0 Then
|
||||||
|
fpOurFunction = BlitzPointer_GetFunctionPointer()
|
||||||
|
Return
|
||||||
|
EndIf
|
||||||
|
|
||||||
|
Text 0, 0, "Function Pointer"
|
||||||
|
Text 0,15, " 0x" + Replace(RSet(Hex(fpOurFunction),8)," ","0")
|
||||||
|
End Function
|
||||||
|
OurFunction()
|
||||||
|
|
||||||
|
While Not KeyHit(1)
|
||||||
|
ExampleUpdate()
|
||||||
|
|
||||||
|
; 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
|
||||||
|
; 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.
|
||||||
|
; We'll talk about the other ways of calling a function in Example 3.
|
||||||
|
|
||||||
|
ExampleLoop()
|
||||||
|
Wend
|
||||||
|
|
||||||
|
End
|
||||||
|
;~IDEal Editor Parameters:
|
||||||
|
;~C#Blitz3D
|
||||||
@@ -0,0 +1,73 @@
|
|||||||
|
; ---------------------------------------------------------------------------- ;
|
||||||
|
; Example 3 - Calling Functions (Intermediate)
|
||||||
|
; ---------------------------------------------------------------------------- ;
|
||||||
|
; License: Creative Commons Attribution 2.0
|
||||||
|
; Author: Michael Fabian Dirks<michael.dirks@realitybends.de>
|
||||||
|
; Prerequisite: Example 2
|
||||||
|
|
||||||
|
; BlitzPointer offers a lot of ways to call our function pointer. Each one
|
||||||
|
; describes return type, parameter count and parameter types.
|
||||||
|
; So, what magic can we do with those?
|
||||||
|
|
||||||
|
; BlitzPointer supports three return types:
|
||||||
|
; ---------------------------------------------------------------------------- ;
|
||||||
|
; Type Id Description Calling Function
|
||||||
|
; ---------------------------------------------------------------------------- ;
|
||||||
|
; void V Nothing BlitzPointer_CallFunctionV
|
||||||
|
; int I 32-bit Integer BlitzPointer_CallFunctionI
|
||||||
|
; float F Floating Point BlitzPointer_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.
|
||||||
|
|
||||||
|
Include "Example_Shared.bb"
|
||||||
|
ExampleInit()
|
||||||
|
|
||||||
|
; 'void' function
|
||||||
|
Global fpVoidFunction = 0
|
||||||
|
Function VoidFunction()
|
||||||
|
If fpVoidFunction = 0 Then
|
||||||
|
fpVoidFunction = BlitzPointer_GetFunctionPointer()
|
||||||
|
Return
|
||||||
|
EndIf
|
||||||
|
Text 0, 0, "Void Return Type"
|
||||||
|
End Function
|
||||||
|
VoidFunction()
|
||||||
|
|
||||||
|
; 'int' function
|
||||||
|
Global fpIntFunction = 0
|
||||||
|
Function IntFunction%()
|
||||||
|
If fpIntFunction = 0 Then
|
||||||
|
fpIntFunction = BlitzPointer_GetFunctionPointer()
|
||||||
|
Return
|
||||||
|
EndIf
|
||||||
|
Text 0, 15, "Int Return Type"
|
||||||
|
Return MilliSecs()
|
||||||
|
End Function
|
||||||
|
IntFunction()
|
||||||
|
|
||||||
|
; 'float' function
|
||||||
|
Global fpFloatFunction = 0
|
||||||
|
Function FloatFunction#()
|
||||||
|
If fpFloatFunction = 0 Then
|
||||||
|
fpFloatFunction = BlitzPointer_GetFunctionPointer()
|
||||||
|
Return
|
||||||
|
EndIf
|
||||||
|
Text 0, 30, "Float Return Type"
|
||||||
|
Return MilliSecs() / 1000.0
|
||||||
|
End Function
|
||||||
|
FloatFunction()
|
||||||
|
|
||||||
|
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)
|
||||||
|
|
||||||
|
ExampleLoop()
|
||||||
|
Wend
|
||||||
|
End
|
||||||
|
;~IDEal Editor Parameters:
|
||||||
|
;~C#Blitz3D
|
||||||
@@ -0,0 +1,112 @@
|
|||||||
|
; ---------------------------------------------------------------------------- ;
|
||||||
|
; Example 4 - Calling Functions (Advanced)
|
||||||
|
; ---------------------------------------------------------------------------- ;
|
||||||
|
; License: Creative Commons Attribution 2.0
|
||||||
|
; Author: Michael Fabian Dirks<michael.dirks@realitybends.de>
|
||||||
|
; Prerequisite: Example 3
|
||||||
|
|
||||||
|
; Returned values aren't everything, don't you agree? That is why BlitzPointer
|
||||||
|
; offers you the ability to pass parameters too, even allowing you to pass Type
|
||||||
|
; Objects without having to use Handle() and Object() (both slow functions).
|
||||||
|
; At the time of writing this example, BlitzPointer supports four parameters at
|
||||||
|
; most - plenty of space to pass type objects and variables on.
|
||||||
|
|
||||||
|
; There are three parameter types in Blitz that we can use:
|
||||||
|
; ---------------------------------------------------------------------------- ;
|
||||||
|
; 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
|
||||||
|
|
||||||
|
; Watch out:
|
||||||
|
; Calling a function that has parameters without giving enough parameters will
|
||||||
|
; fill those parameters with values that have been on the stack (and possibly
|
||||||
|
; corrupt the stack too - you never know).
|
||||||
|
|
||||||
|
Include "Example_Shared.bb"
|
||||||
|
ExampleInit()
|
||||||
|
|
||||||
|
; Example Function: Divide p1 by 60 and return the result.
|
||||||
|
Global fpCurInGameSecond = 0
|
||||||
|
Function CurInGameSecond%(p1%=0)
|
||||||
|
If fpCurInGameSecond = 0 Then
|
||||||
|
fpCurInGameSecond = BlitzPointer_GetFunctionPointer()
|
||||||
|
Return
|
||||||
|
EndIf
|
||||||
|
Text 5, 15, "IIFunction"
|
||||||
|
Text 125, 15, p1
|
||||||
|
|
||||||
|
Return (p1 Shr 2) / 15 ; Division by 60
|
||||||
|
End Function
|
||||||
|
CurInGameSecond()
|
||||||
|
|
||||||
|
; Example Function: Multiply p1 by p2 and return the result.
|
||||||
|
Global fpCurInGameSecondEx = 0
|
||||||
|
Function CurInGameSecondEx#(p1%=0, p2#=0)
|
||||||
|
If fpCurInGameSecondEx = 0 Then
|
||||||
|
fpCurInGameSecondEx = BlitzPointer_GetFunctionPointer()
|
||||||
|
Return
|
||||||
|
EndIf
|
||||||
|
|
||||||
|
Text 5, 30, "FIFFunction"
|
||||||
|
Text 125, 30, p1
|
||||||
|
Text 245, 30, p2
|
||||||
|
|
||||||
|
Return p1 * p2
|
||||||
|
End Function
|
||||||
|
CurInGameSecondEx()
|
||||||
|
|
||||||
|
; Example Function: Convert between Float and Int easily
|
||||||
|
; For this to work we must take and return a float.
|
||||||
|
Global fpConvertIntFloat
|
||||||
|
Function ConvertIntFloat#(p1#=0)
|
||||||
|
If fpConvertIntFloat = 0 Then
|
||||||
|
fpConvertIntFloat = BlitzPointer_GetFunctionPointer()
|
||||||
|
Print Hex(fpConvertIntFloat)
|
||||||
|
WaitKey()
|
||||||
|
Return
|
||||||
|
EndIf
|
||||||
|
|
||||||
|
Return p1
|
||||||
|
End Function
|
||||||
|
ConvertIntFloat()
|
||||||
|
|
||||||
|
; Pointer-parameters are a bit trickier and require memory access, see UserLibs.txt.
|
||||||
|
|
||||||
|
Local Frame% = 0
|
||||||
|
While Not KeyHit(1)
|
||||||
|
ExampleUpdate()
|
||||||
|
|
||||||
|
Text 0, 0, "Functions"
|
||||||
|
Text 120, 0, "Parameter 1"
|
||||||
|
Text 240, 0, "Parameter 2"
|
||||||
|
Text 360, 0, "Parameter 3"
|
||||||
|
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)
|
||||||
|
|
||||||
|
Local TempFlt# = Frame / 60.0
|
||||||
|
Local TempInt% = BlitzPointer_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)
|
||||||
|
|
||||||
|
ExampleLoop()
|
||||||
|
|
||||||
|
; Allow us to pause execution
|
||||||
|
While KeyDown(57)
|
||||||
|
WaitTimer(Example_Timer)
|
||||||
|
Wend
|
||||||
|
|
||||||
|
Frame=Frame+1
|
||||||
|
Wend
|
||||||
|
End
|
||||||
|
;~IDEal Editor Parameters:
|
||||||
|
;~C#Blitz3D
|
||||||
@@ -0,0 +1,58 @@
|
|||||||
|
; ---------------------------------------------------------------------------- ;
|
||||||
|
; Example 5 - Calling Functions (Advanced)
|
||||||
|
; ---------------------------------------------------------------------------- ;
|
||||||
|
; License: Creative Commons Attribution 2.0
|
||||||
|
; Author: Michael Fabian Dirks<michael.dirks@realitybends.de>
|
||||||
|
; Prerequisite: Example 4
|
||||||
|
|
||||||
|
; In Blitz, there are only three real types: Int, Float and String - anything
|
||||||
|
; else is a pointer that can be represented using Int. That is why almost all
|
||||||
|
; Blitz functions return an Int.
|
||||||
|
; Using this knowledge we can try (and succeed) passing a Type Object into a
|
||||||
|
; function - using nothing more than the Int() function.
|
||||||
|
|
||||||
|
Include "Example_Shared.bb"
|
||||||
|
ExampleInit()
|
||||||
|
|
||||||
|
; We'll have to define a Type that can be passed to our function, any Type will
|
||||||
|
; do fine.
|
||||||
|
Type MyType
|
||||||
|
Field Test
|
||||||
|
Field Name$
|
||||||
|
End Type
|
||||||
|
|
||||||
|
; The function can be defined like any other Blitz function.
|
||||||
|
Global fpMyTypeFunc = 0
|
||||||
|
Function MyTypeFunc(This.MyType)
|
||||||
|
If fpMyTypeFunc = 0 Then
|
||||||
|
fpMyTypeFunc = BlitzPointer_GetFunctionPointer()
|
||||||
|
Return
|
||||||
|
EndIf
|
||||||
|
If This = Null Then Return
|
||||||
|
|
||||||
|
; Display the content of the Type Object.
|
||||||
|
Text 0, Handle(This) * 15, This\Test + This\Name
|
||||||
|
End Function
|
||||||
|
MyTypeFunc(Null)
|
||||||
|
|
||||||
|
; And create two testing objects.
|
||||||
|
Local MT1.MyType = New MyType
|
||||||
|
MT1\Test = 1
|
||||||
|
MT1\Name = "First Object"
|
||||||
|
|
||||||
|
Local MT2.MyType = New MyType
|
||||||
|
MT2\Name = "Second Object"
|
||||||
|
|
||||||
|
While Not KeyHit(1)
|
||||||
|
ExampleUpdate()
|
||||||
|
|
||||||
|
; 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)
|
||||||
|
|
||||||
|
ExampleLoop()
|
||||||
|
Wend
|
||||||
|
End
|
||||||
|
;~IDEal Editor Parameters:
|
||||||
|
;~C#Blitz3D
|
||||||
@@ -0,0 +1,103 @@
|
|||||||
|
; ---------------------------------------------------------------------------- ;
|
||||||
|
; Example 6 - Direct Memory Access
|
||||||
|
; ---------------------------------------------------------------------------- ;
|
||||||
|
; License: Creative Commons Attribution 2.0
|
||||||
|
; Author: Michael Fabian Dirks<michael.dirks@realitybends.de>
|
||||||
|
; Prerequisite: Example 5
|
||||||
|
|
||||||
|
; --!-!!!-!--
|
||||||
|
; This Example is aimed at Experts. You will most likely never need this.
|
||||||
|
; --!-!!!-!--
|
||||||
|
|
||||||
|
; BlitzPointer ships with functions for direct memory access, allowing you to
|
||||||
|
; modify things that were previously out of reach. The functions follow the
|
||||||
|
; typical style of Bank access, Peek and Poke:
|
||||||
|
; PeekMemoryByte%(MemoryAddress%) / PokeMemoryByte(MemoryAddress%, Value%)
|
||||||
|
; PeekMemoryShort%(MemoryAddress%) / PokeMemoryShort(MemoryAddress%, Value%)
|
||||||
|
; PeekMemoryInt%(MemoryAddress%) / PokeMemoryInt(MemoryAddress%, Value%)
|
||||||
|
; PeekMemoryFloat#(MemoryAddress%) / PokeMemoryFloat(MemoryAddress%, Value#)
|
||||||
|
; PeekMemory%(MemoryAddress%, Length%, Bank%) / PokeMemory%(MemoryAddress%, Length%, Bank%)
|
||||||
|
; This function allows you to directly read and write from memory into a Bank
|
||||||
|
; or from a Bank, saving you a few instructions per access. It will only read
|
||||||
|
; or write as many bytes as your Bank holds and returns the amount of read or
|
||||||
|
; written bytes.
|
||||||
|
|
||||||
|
; These allow us to do simple direct memory modification, allowing us to do some
|
||||||
|
; things that were previously only possible using MemMove and MemCopy from
|
||||||
|
; the Windows libraries.
|
||||||
|
|
||||||
|
; For example, Types in Blitz follow this structure:
|
||||||
|
; ---------------------------------------------------------------------------- ;
|
||||||
|
; Offset Type Description
|
||||||
|
; ---------------------------------------------------------------------------- ;
|
||||||
|
; 0 Pointer Pointer to Field Data
|
||||||
|
; 4 Pointer Next Type Object or Type Structure (Last Element Signal)
|
||||||
|
; 8 Pointer Prev Type Object or Type Structure (First Element Signal)
|
||||||
|
; 12 Pointer Type Structure
|
||||||
|
; 16 Integer Reference Count
|
||||||
|
; 20+ ... Your Field Data usually follows here.
|
||||||
|
;
|
||||||
|
; We can do some fun stuff with this information.
|
||||||
|
|
||||||
|
; If you want to know more about the internal structure of Blitz, there are some
|
||||||
|
; resources that people have compiled in addition to the official source:
|
||||||
|
; Structures: http://www.blitzforum.de/forum/viewtopic.php?t=4320
|
||||||
|
; Source Code: http://github.com/blitz-research/
|
||||||
|
|
||||||
|
Include "Example_Shared.bb"
|
||||||
|
ExampleInit()
|
||||||
|
|
||||||
|
; Our Type will hold one of every Element.
|
||||||
|
Type EverythingType
|
||||||
|
Field MyInt%
|
||||||
|
Field MyFloat#
|
||||||
|
Field MyString$
|
||||||
|
Field MyObject.EverythingType
|
||||||
|
; It is important to note that Blitz doesn't consider Arrays as pointers, but
|
||||||
|
; as solid blocks in memory instead. This is why we can't make them dynamic,
|
||||||
|
; and have to use Dim or Banks.
|
||||||
|
Field MyIntArray%[5]
|
||||||
|
Field MyFloatArray#[5]
|
||||||
|
Field MyStringArray$[5]
|
||||||
|
Field MyObjectArray.EverythingType[5]
|
||||||
|
End Type
|
||||||
|
|
||||||
|
; And create a function that modifies only using pointers.
|
||||||
|
Global fpMyPointerFunction% = 0
|
||||||
|
Function MyPointerFunction(Pointer%)
|
||||||
|
If fpMyPointerFunction = 0 Then
|
||||||
|
fpMyPointerFunction = BlitzPointer_GetFunctionPointer()
|
||||||
|
Return
|
||||||
|
EndIf
|
||||||
|
|
||||||
|
; Simple Memory modification
|
||||||
|
PokeMemoryInt Pointer + 20, PeekMemoryInt(Pointer + 20) + 1
|
||||||
|
PokeMemoryFloat Pointer + 24, PeekMemoryFloat(Pointer + 24) + 1
|
||||||
|
|
||||||
|
; Sick of reference counting? Do Circular References without incrementing that!
|
||||||
|
PokeMemoryInt Pointer + 32, Pointer
|
||||||
|
End Function
|
||||||
|
MyPointerFunction(0)
|
||||||
|
|
||||||
|
Local Instance.EverythingType = New EverythingType
|
||||||
|
|
||||||
|
While Not KeyHit(1)
|
||||||
|
ExampleUpdate()
|
||||||
|
|
||||||
|
MyPointerFunction(Int(Instance))
|
||||||
|
|
||||||
|
Text 0, 0, "\MyInt"
|
||||||
|
Text 200, 0, Instance\MyInt
|
||||||
|
Text 0,15, "\MyFloat"
|
||||||
|
Text 200,15, Instance\MyFloat
|
||||||
|
; Circular Reference
|
||||||
|
Text 0,45, "\MyObject\MyInt"
|
||||||
|
Text 200,45, Instance\MyObject\MyInt
|
||||||
|
Text 0,60, "\MyObject\MyObject\MyInt"
|
||||||
|
Text 200,60, Instance\MyObject\MyObject\MyInt
|
||||||
|
|
||||||
|
ExampleLoop()
|
||||||
|
Wend
|
||||||
|
End
|
||||||
|
;~IDEal Editor Parameters:
|
||||||
|
;~C#Blitz3D
|
||||||
@@ -0,0 +1,299 @@
|
|||||||
|
; ---------------------------------------------------------------------------- ;
|
||||||
|
; Example 6 - Callbacks
|
||||||
|
; ---------------------------------------------------------------------------- ;
|
||||||
|
; License: Creative Commons Attribution 2.0
|
||||||
|
; Author: Michael Fabian Dirks<michael.dirks@realitybends.de>
|
||||||
|
; Prerequisite: Example 5
|
||||||
|
|
||||||
|
; In my opinion, Callbacks are one of the best things that people have figured
|
||||||
|
; out is useful. We can completely combine all our update logic into one single
|
||||||
|
; function call without ever having to worry about how to handle a new object.
|
||||||
|
; Well, unless you are a terrible planner anyways.
|
||||||
|
|
||||||
|
Include "Example_Shared.bb"
|
||||||
|
ExampleInit()
|
||||||
|
SeedRnd MilliSecs()
|
||||||
|
|
||||||
|
; We'll begin by creating a basic Type that holds our generic object. By itself
|
||||||
|
; this generic object does nothing, but we define custom callbacks later on.
|
||||||
|
; For optimization reasons (saves some memory) we can use a manually defined
|
||||||
|
; index for our callbacks.
|
||||||
|
|
||||||
|
; Using an Index to store our Callbacks is more efficient that storing it for
|
||||||
|
; each entry. By doing this we can also have multiple functions that use the
|
||||||
|
; same structure (Update, PhysicsUpdate, Render, ...). It is wise to reserve
|
||||||
|
; the first index to check for incorrectly created objects.
|
||||||
|
Dim CallbackIndex(10)
|
||||||
|
|
||||||
|
; Here we define our Type. Since each object has an Index, we
|
||||||
|
Type TGeneric
|
||||||
|
; For optimization reasons and saving memory, we just store a callback index.
|
||||||
|
Field Index
|
||||||
|
|
||||||
|
; We only need to store the pointer to our Type object, nothing else.
|
||||||
|
Field Pointer
|
||||||
|
End Type
|
||||||
|
|
||||||
|
Function TGenericUpdate()
|
||||||
|
Local This.TGeneric
|
||||||
|
For This = Each TGeneric
|
||||||
|
If This\Pointer <> 0 Then
|
||||||
|
If BlitzPointer_CallFunctionII(CallbackIndex(This\Index), This\Pointer) Then
|
||||||
|
Delete This
|
||||||
|
EndIf
|
||||||
|
EndIf
|
||||||
|
Next
|
||||||
|
End Function
|
||||||
|
|
||||||
|
; TGeneric will call a function pointer with the following footprint:
|
||||||
|
; int FUNCTION(pointer)
|
||||||
|
; We will need to implement this function footprint in every callback.
|
||||||
|
|
||||||
|
; Our first Type will hold Cubes that moves up and down.
|
||||||
|
Type TCube
|
||||||
|
; Our TCube is represented by an actual Cube in the world, so let's store it.
|
||||||
|
Field Entity
|
||||||
|
; This is the original position of the Cube. Y is dynamically modified in code.
|
||||||
|
Field PosX#, PosY#, PosZ#
|
||||||
|
; And finally, the time it was created.
|
||||||
|
Field Time
|
||||||
|
End Type
|
||||||
|
; Assign an index to our new Type (starting at 1)
|
||||||
|
Const CALLBACK_INDEX_TCUBE% = 1
|
||||||
|
|
||||||
|
Function TCubeCreate.TCube(X#, Y#, Z#)
|
||||||
|
; Create our Object
|
||||||
|
Local This.TCube = New TCube
|
||||||
|
This\Entity = CreateCube(Example_SceneRoot)
|
||||||
|
This\PosX = X
|
||||||
|
This\PosY = Y
|
||||||
|
This\PosZ = Z
|
||||||
|
This\Time = MilliSecs()
|
||||||
|
|
||||||
|
; And now store it withing TGeneric
|
||||||
|
Local TG.TGeneric = New TGeneric
|
||||||
|
TG\Index = CALLBACK_INDEX_TCUBE
|
||||||
|
; To get the pointer we need (and can store), we just use Int() on the object.
|
||||||
|
TG\Pointer = Int(This)
|
||||||
|
|
||||||
|
; That's all we had to do.
|
||||||
|
Return This
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Function TCubeCallback%(This.TCube)
|
||||||
|
If CallbackIndex(CALLBACK_INDEX_TCUBE) = 0 Then
|
||||||
|
CallbackIndex(CALLBACK_INDEX_TCUBE) = BlitzPointer_GetFunctionPointer()
|
||||||
|
Return
|
||||||
|
EndIf
|
||||||
|
; Safeguard against stupidity (it affect everyone).
|
||||||
|
If This = Null Then Return True
|
||||||
|
|
||||||
|
Local TimeDiff = (MilliSecs() - This\Time)
|
||||||
|
|
||||||
|
Local YOffset# = Cos((Cos(This\PosX) * 180) + (Sin(This\PosZ) * 180) + (TimeDiff / 10.0)) * 5 + 5
|
||||||
|
PositionEntity This\Entity, This\PosX, This\PosY + YOffset, This\PosZ
|
||||||
|
EntityAlpha This\Entity, 1.0 - (TimeDiff / 5000.0)
|
||||||
|
|
||||||
|
; We will allow the object to exist for at most 5 seconds.
|
||||||
|
If TimeDiff > 5000 Then
|
||||||
|
TCubeDestroy(This)
|
||||||
|
Return True
|
||||||
|
EndIf
|
||||||
|
Return False
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Function TCubeDestroy(This.TCube)
|
||||||
|
; Safeguard against stupidity (it affect everyone).
|
||||||
|
If This = Null Then Return
|
||||||
|
|
||||||
|
FreeEntity This\Entity
|
||||||
|
Delete This
|
||||||
|
End Function
|
||||||
|
|
||||||
|
; And call the function once to automagically register it as a callback.
|
||||||
|
TCubeCallback(Null)
|
||||||
|
|
||||||
|
; Next up is our second Type. It will hold a simple sphere that grows over time.
|
||||||
|
Type TSphere
|
||||||
|
; Again, represented by an actual Sphere in the world.
|
||||||
|
Field Entity
|
||||||
|
; And the time it was created.
|
||||||
|
Field Time
|
||||||
|
End Type
|
||||||
|
; And we will assign the second index to it.
|
||||||
|
Const CALLBACK_INDEX_TSPHERE% = 2
|
||||||
|
|
||||||
|
Function TSphereCreate.TSphere(X#, Y#, Z#)
|
||||||
|
; Initialize our TSphere instance.
|
||||||
|
Local This.TSphere = New TSphere
|
||||||
|
This\Entity = CreateSphere(32, Example_SceneRoot)
|
||||||
|
PositionEntity This\Entity, X, Y, Z
|
||||||
|
This\Time = MilliSecs()
|
||||||
|
|
||||||
|
; And now store it withing TGeneric
|
||||||
|
Local TG.TGeneric = New TGeneric
|
||||||
|
TG\Index = CALLBACK_INDEX_TSPHERE
|
||||||
|
TG\Pointer = Int(This)
|
||||||
|
|
||||||
|
Return This
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Function TSphereUpdate%(This.TSphere)
|
||||||
|
If CallbackIndex(CALLBACK_INDEX_TSPHERE) = 0 Then
|
||||||
|
CallbackIndex(CALLBACK_INDEX_TSPHERE) = BlitzPointer_GetFunctionPointer()
|
||||||
|
Return
|
||||||
|
EndIf
|
||||||
|
; Safeguard against stupidity (it affect everyone).
|
||||||
|
If This = Null Then Return True
|
||||||
|
|
||||||
|
Local TimeDiff = (MilliSecs() - This\Time)
|
||||||
|
Local TimePrc# = TimeDiff / 2500.0
|
||||||
|
|
||||||
|
Local Stp#, StpSize#
|
||||||
|
Local R#, G#, B#, A#, Scale#
|
||||||
|
;Step
|
||||||
|
StpSize# = 0.05:Stp# = 1.0 / (1.0 - StpSize)
|
||||||
|
R = Interp(1, 1, TimePrc * Stp)
|
||||||
|
G = Interp(1, 1, TimePrc * Stp)
|
||||||
|
B = Interp(1, 0, TimePrc * Stp)
|
||||||
|
;Step
|
||||||
|
StpSize# = 0.20:Stp# = 1.0 / (1.0 - StpSize)
|
||||||
|
R = Interp(R, 1, (TimePrc - 0.05) * Stp)
|
||||||
|
G = Interp(G, 0.75, (TimePrc - 0.05) * Stp)
|
||||||
|
B = Interp(B, 0, (TimePrc - 0.05) * Stp)
|
||||||
|
;Step
|
||||||
|
StpSize# = 0.25:Stp# = 1.0 / (1.0 - StpSize)
|
||||||
|
R = Interp(R, 1, (TimePrc - 0.25) * Stp)
|
||||||
|
G = Interp(G, 0, (TimePrc - 0.25) * Stp)
|
||||||
|
B = Interp(B, 0, (TimePrc - 0.25) * Stp)
|
||||||
|
;Step
|
||||||
|
StpSize# = 0.50:Stp# = 1.0 / (1.0 - StpSize)
|
||||||
|
R = Interp(R, 0, (TimePrc - 0.50) * Stp)
|
||||||
|
G = Interp(G, 0, (TimePrc - 0.50) * Stp)
|
||||||
|
B = Interp(B, 0, (TimePrc - 0.50) * Stp)
|
||||||
|
|
||||||
|
;AlphaStop 1 at (0.8 of 1.0)
|
||||||
|
A = Interp(1, 0, (TimePrc - 0.8) * 5)
|
||||||
|
|
||||||
|
Scale = Interp(1, 20, Sin(TimePrc * 90))
|
||||||
|
ScaleEntity This\Entity, Scale,Scale,Scale
|
||||||
|
EntityColor This\Entity, R * 255, G * 255, B * 255
|
||||||
|
EntityAlpha This\Entity, A
|
||||||
|
|
||||||
|
; We will allow the object to exist for at most 2.5 seconds.
|
||||||
|
If TimeDiff > 2500 Then
|
||||||
|
TSphereDestroy(This)
|
||||||
|
Return True
|
||||||
|
EndIf
|
||||||
|
Return False
|
||||||
|
End Function
|
||||||
|
TSphereUpdate(Null)
|
||||||
|
|
||||||
|
Function TSphereDestroy(This.TSphere)
|
||||||
|
; Safeguard against stupidity (it affect everyone).
|
||||||
|
If This = Null Then Return
|
||||||
|
|
||||||
|
FreeEntity This\Entity
|
||||||
|
Delete This
|
||||||
|
End Function
|
||||||
|
|
||||||
|
; And finally, a terrain that we can pick a spawning position from.
|
||||||
|
Local Terrain = CreateTerrain(256, Example_SceneRoot)
|
||||||
|
ScaleEntity Terrain, 1 / 256.0, 64, 1 / 256.0
|
||||||
|
MoveEntity Terrain, -100, 0, -100
|
||||||
|
ScaleEntity Terrain, 1 / 256.0 * 201, 64, 1 / 256.0 * 201
|
||||||
|
EntityColor Terrain, 25, 92, 25
|
||||||
|
TerrainShading Terrain, True
|
||||||
|
TerrainDetail Terrain, 32767, False
|
||||||
|
EntityPickMode Terrain, 2, True
|
||||||
|
|
||||||
|
RandomTerrain(Terrain, 256, 8, 8)
|
||||||
|
|
||||||
|
MoveEntity Example_Camera, 0, 0, -125
|
||||||
|
;HideEntity Example_Floor
|
||||||
|
|
||||||
|
While Not KeyHit(1)
|
||||||
|
TGenericUpdate()
|
||||||
|
|
||||||
|
; Space to randomize Terrain
|
||||||
|
If KeyHit(57) Then
|
||||||
|
RandomTerrain(Terrain, 256, Rand(1,8), Rand(1,8))
|
||||||
|
EndIf
|
||||||
|
|
||||||
|
Local ZDelta = MouseZSpeed()
|
||||||
|
If KeyHit(2) Or ZDelta > 0 Then
|
||||||
|
CameraPick(Example_Camera, MouseX(), MouseY())
|
||||||
|
TCubeCreate(PickedX(), PickedY(), PickedZ())
|
||||||
|
EndIf
|
||||||
|
|
||||||
|
If KeyHit(3) Or ZDelta < 0 Then
|
||||||
|
CameraPick(Example_Camera, MouseX(), MouseY())
|
||||||
|
TSphereCreate(PickedX(), PickedY(), PickedZ())
|
||||||
|
EndIf
|
||||||
|
|
||||||
|
ExampleUpdate()
|
||||||
|
ExampleLoop()
|
||||||
|
UpdateWorld()
|
||||||
|
Wend
|
||||||
|
|
||||||
|
Function RandomTerrain(Terrain, GridSize, CellsX = 1, CellsZ = 1)
|
||||||
|
Local CellW, CellH, CellX, CellZ, TerX, TerZ, CellPrcX#, CellPrcZ#
|
||||||
|
Local HTL#, HTR#, HBL#, HBR#, HCC#
|
||||||
|
|
||||||
|
CellW = Floor(GridSize / Float(CellsX))
|
||||||
|
CellH = Floor(GridSize / Float(CellsZ))
|
||||||
|
|
||||||
|
Local RowSize = CellsZ + 1
|
||||||
|
Local TempBankSize = (CellsX + 1) * RowSize * 4
|
||||||
|
Local TempBank = CreateBank(TempBankSize)
|
||||||
|
For CellX = 0 To CellsX
|
||||||
|
For CellZ = 0 To CellsZ
|
||||||
|
PokeFloat TempBank, 4 * (CellX * RowSize + CellZ), Rnd(0, 1)
|
||||||
|
Next
|
||||||
|
Next
|
||||||
|
|
||||||
|
Local OCellX, OCellZ:OCellX = -1: OCellZ = -1
|
||||||
|
For TerX = 1 To (GridSize - 1)
|
||||||
|
CellX = Floor(TerX / Float(CellW))
|
||||||
|
CellPrcX = (TerX Mod CellW) / Float(CellW - 1)
|
||||||
|
For TerZ = 1 To (GridSize - 1)
|
||||||
|
CellZ = Floor(TerZ / Float(CellH))
|
||||||
|
CellPrcZ = (TerZ Mod CellH) / Float(CellH - 1)
|
||||||
|
;DebugLog CellPrcZ
|
||||||
|
|
||||||
|
If CellX <> OCellX Or CellZ <> OCellZ Then
|
||||||
|
HTL = PeekFloat(TempBank, 4 * (((CellX + 0) * RowSize + (CellZ + 0))))
|
||||||
|
HTR = PeekFloat(TempBank, 4 * (((CellX + 1) * RowSize + (CellZ + 0))))
|
||||||
|
HBL = PeekFloat(TempBank, 4 * (((CellX + 0) * RowSize + (CellZ + 1))))
|
||||||
|
HBR = PeekFloat(TempBank, 4 * (((CellX + 1) * RowSize + (CellZ + 1))))
|
||||||
|
OCellX = CellX:OCellZ = CellZ
|
||||||
|
EndIf
|
||||||
|
|
||||||
|
Local PrcX#, PrcZ#
|
||||||
|
; Normally, you'd use a bezier curve for this.
|
||||||
|
PrcX = (Sin(-90 + CellPrcX*180) * 0.5 + 0.5)
|
||||||
|
PrcZ = (Sin(-90 + CellPrcZ*180) * 0.5 + 0.5)
|
||||||
|
Local Height# = Interp(Interp(HTL, HTR, PrcX), Interp(HBL, HBR, PrcX), PrcZ)
|
||||||
|
|
||||||
|
ModifyTerrain Terrain, TerX, TerZ, Height
|
||||||
|
Next
|
||||||
|
Next
|
||||||
|
FreeBank TempBank
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Function Min#(A#, B#)
|
||||||
|
If B < A Then Return B
|
||||||
|
Return A
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Function Max#(A#, B#)
|
||||||
|
If B > A Then Return B
|
||||||
|
Return A
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Function Interp#(L#, R#, Lerp#)
|
||||||
|
Lerp = Min(Max(Lerp, 0.0), 1.0)
|
||||||
|
Return L * (1.0 - Lerp) + R * Lerp
|
||||||
|
End Function
|
||||||
|
;~IDEal Editor Parameters:
|
||||||
|
;~C#Blitz3D
|
||||||
@@ -0,0 +1,67 @@
|
|||||||
|
Global Example_Timer
|
||||||
|
; Camera
|
||||||
|
Global Example_Camera_YawPivot
|
||||||
|
Global Example_Camera_PitchPivot
|
||||||
|
Global Example_Camera
|
||||||
|
; Scene
|
||||||
|
Global Example_SceneRoot
|
||||||
|
Global Example_SceneLight
|
||||||
|
Global Example_Floor
|
||||||
|
Global Example_Block
|
||||||
|
|
||||||
|
Function ExampleInit()
|
||||||
|
Example_Timer = CreateTimer(60)
|
||||||
|
|
||||||
|
Graphics3D 1024, 768, 32, 2
|
||||||
|
SetBuffer BackBuffer()
|
||||||
|
|
||||||
|
Example_Camera_YawPivot = CreatePivot()
|
||||||
|
Example_Camera_PitchPivot = CreatePivot(Example_Camera_YawPivot)
|
||||||
|
Example_Camera = CreateCamera(Example_Camera_PitchPivot)
|
||||||
|
MoveEntity Example_Camera, 0, 0, -20
|
||||||
|
TurnEntity Example_Camera_PitchPivot, 30, 0, 0
|
||||||
|
|
||||||
|
Example_SceneRoot = CreatePivot()
|
||||||
|
|
||||||
|
AmbientLight 51, 51, 51
|
||||||
|
Example_SceneLight = CreateLight(1, Example_SceneRoot)
|
||||||
|
RotateEntity Example_SceneLight, 70, 30, 0
|
||||||
|
|
||||||
|
Example_Floor = CreateCube(Example_SceneRoot)
|
||||||
|
EntityColor Example_Floor, 153, 255, 153
|
||||||
|
EntityShininess Example_Floor, 1.0
|
||||||
|
ScaleEntity Example_Floor, 100, 0.001, 100
|
||||||
|
|
||||||
|
;Example_Block = CreateCube(Example_SceneRoot)
|
||||||
|
;MoveEntity Example_Block, 0, 1, 0
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Function ExampleUpdate()
|
||||||
|
Local MX#, MY#
|
||||||
|
|
||||||
|
MX = (MouseX() - 512) / 512.0
|
||||||
|
MY = (MouseY() - 384) / 384.0
|
||||||
|
|
||||||
|
If MouseHit(1) Then
|
||||||
|
MoveMouse 512, 384
|
||||||
|
ElseIf MouseDown(1) Then
|
||||||
|
TurnEntity Example_Camera_YawPivot, 0, -MX, 0
|
||||||
|
TurnEntity Example_Camera_PitchPivot, MY, 0, 0
|
||||||
|
;MoveMouse 512, 384
|
||||||
|
EndIf
|
||||||
|
|
||||||
|
If MouseHit(2) Then
|
||||||
|
MoveMouse 512, 384
|
||||||
|
ElseIf MouseDown(2) Then
|
||||||
|
MoveEntity Example_Camera, 0, 0, MY
|
||||||
|
;MoveMouse 512, 384
|
||||||
|
EndIf
|
||||||
|
|
||||||
|
RenderWorld
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Function ExampleLoop()
|
||||||
|
Flip 0:Cls:WaitTimer(Example_Timer)
|
||||||
|
End Function
|
||||||
|
;~IDEal Editor Parameters:
|
||||||
|
;~C#Blitz3D
|
||||||
+134
@@ -0,0 +1,134 @@
|
|||||||
|
#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()
|
||||||
|
|
||||||
|
*/
|
||||||
@@ -0,0 +1,75 @@
|
|||||||
|
#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")
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
// Original Code by Noodoby<http://www.blitzforum.de/forum/viewtopic.php?t=31651>
|
||||||
|
// Modified Code by Xaymar<http://project-kube.de>
|
||||||
|
|
||||||
|
#include "BlitzPointer.h"
|
||||||
|
|
||||||
|
DLL_EXPORT intptr_t BlitzPointer_GetReturnAddress() {
|
||||||
|
intptr_t StackPointer, 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.
|
||||||
|
}
|
||||||
|
|
||||||
|
return ReturnAddress;
|
||||||
|
}
|
||||||
|
#pragma comment(linker, "/EXPORT:BlitzPointer_GetReturnAddress=_BlitzPointer_GetReturnAddress@0")
|
||||||
|
|
||||||
|
DLL_EXPORT intptr_t BlitzPointer_GetFunctionPointer()
|
||||||
|
{
|
||||||
|
intptr_t StackPointer, 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.
|
||||||
|
}
|
||||||
|
|
||||||
|
// 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;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#pragma comment(linker, "/EXPORT:BlitzPointer_GetFunctionPointer=_BlitzPointer_GetFunctionPointer@0")
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
#include "dllmain.h"
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
DLL_EXPORT intptr_t BlitzPointer_GetReturnAddress();
|
||||||
|
DLL_EXPORT intptr_t BlitzPointer_GetFunctionPointer();
|
||||||
|
|
||||||
|
// 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() }
|
||||||
@@ -0,0 +1,193 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
|
<ProjectConfiguration Include="Debug|Win32">
|
||||||
|
<Configuration>Debug</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Release|Win32">
|
||||||
|
<Configuration>Release</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
</ItemGroup>
|
||||||
|
<PropertyGroup Label="Globals">
|
||||||
|
<ProjectGuid>{AC8F52F4-9FE6-4CEF-B549-8180757020C8}</ProjectGuid>
|
||||||
|
<RootNamespace>BlitzPointer</RootNamespace>
|
||||||
|
</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>
|
||||||
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
|
<UseDebugLibraries>false</UseDebugLibraries>
|
||||||
|
<PlatformToolset>v120</PlatformToolset>
|
||||||
|
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||||
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||||
|
<ImportGroup Label="ExtensionSettings">
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<PropertyGroup Label="UserMacros" />
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
|
<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>
|
||||||
|
<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>
|
||||||
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
|
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||||
|
<FunctionLevelLinking>false</FunctionLevelLinking>
|
||||||
|
<CompileAsManaged>false</CompileAsManaged>
|
||||||
|
<CompileAsWinRT>false</CompileAsWinRT>
|
||||||
|
<StructMemberAlignment>4Bytes</StructMemberAlignment>
|
||||||
|
<EnableParallelCodeGeneration>true</EnableParallelCodeGeneration>
|
||||||
|
<CreateHotpatchableImage>false</CreateHotpatchableImage>
|
||||||
|
<RuntimeTypeInfo>false</RuntimeTypeInfo>
|
||||||
|
<OpenMPSupport>false</OpenMPSupport>
|
||||||
|
<ForcedIncludeFiles>
|
||||||
|
</ForcedIncludeFiles>
|
||||||
|
<MinimalRebuild>false</MinimalRebuild>
|
||||||
|
<PreprocessKeepComments>false</PreprocessKeepComments>
|
||||||
|
<InlineFunctionExpansion>Disabled</InlineFunctionExpansion>
|
||||||
|
<OmitFramePointers>false</OmitFramePointers>
|
||||||
|
<CallingConvention>StdCall</CallingConvention>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<Version>1.0</Version>
|
||||||
|
<LinkStatus>
|
||||||
|
</LinkStatus>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<Optimization>Full</Optimization>
|
||||||
|
<FunctionLevelLinking>false</FunctionLevelLinking>
|
||||||
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
|
<SDLCheck>
|
||||||
|
</SDLCheck>
|
||||||
|
<AdditionalIncludeDirectories>$(SolutionDir);$(ProjectDir)</AdditionalIncludeDirectories>
|
||||||
|
<MultiProcessorCompilation>false</MultiProcessorCompilation>
|
||||||
|
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||||
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
|
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||||
|
<CompileAsManaged>false</CompileAsManaged>
|
||||||
|
<CompileAsWinRT>false</CompileAsWinRT>
|
||||||
|
<StructMemberAlignment>4Bytes</StructMemberAlignment>
|
||||||
|
<EnableParallelCodeGeneration>true</EnableParallelCodeGeneration>
|
||||||
|
<CreateHotpatchableImage>false</CreateHotpatchableImage>
|
||||||
|
<RuntimeTypeInfo>false</RuntimeTypeInfo>
|
||||||
|
<OpenMPSupport>false</OpenMPSupport>
|
||||||
|
<ForcedIncludeFiles>
|
||||||
|
</ForcedIncludeFiles>
|
||||||
|
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
|
||||||
|
<MinimalRebuild>false</MinimalRebuild>
|
||||||
|
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
|
||||||
|
<OmitFramePointers>false</OmitFramePointers>
|
||||||
|
<CallingConvention>StdCall</CallingConvention>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||||
|
<EnableCOMDATFolding>
|
||||||
|
</EnableCOMDATFolding>
|
||||||
|
<OptimizeReferences>
|
||||||
|
</OptimizeReferences>
|
||||||
|
<Version>1.0</Version>
|
||||||
|
<LinkStatus>
|
||||||
|
</LinkStatus>
|
||||||
|
</Link>
|
||||||
|
</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" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClInclude Include="BlitzPointer.h" />
|
||||||
|
<ClInclude Include="dllmain.h" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<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\Example06.bb">
|
||||||
|
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</DeploymentContent>
|
||||||
|
</None>
|
||||||
|
<None Include="Blitz\Example07.bb">
|
||||||
|
<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>
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
|
<ImportGroup Label="ExtensionTargets">
|
||||||
|
</ImportGroup>
|
||||||
|
</Project>
|
||||||
@@ -0,0 +1,70 @@
|
|||||||
|
<?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>
|
||||||
|
</Project>
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<PropertyGroup />
|
||||||
|
</Project>
|
||||||
@@ -0,0 +1,74 @@
|
|||||||
|
#include "dllmain.h"
|
||||||
|
|
||||||
|
DLL_EXPORT uint32_t PeekMemory(intptr_t* address, uint32_t length, intptr_t bank) {
|
||||||
|
uint32_t bankAddress, bankSize;
|
||||||
|
bankAddress = *(uint32_t*)(bank + 4);
|
||||||
|
bankSize = *(uint32_t*)(bank + 8);
|
||||||
|
|
||||||
|
// Limit reading to bank size.
|
||||||
|
length = (length > bankSize ? bankSize : length);
|
||||||
|
|
||||||
|
for (uint32_t offset = 0; offset < length; offset++) {
|
||||||
|
*(int32_t*)(bankAddress + offset) = *(address + offset);
|
||||||
|
}
|
||||||
|
|
||||||
|
return length;
|
||||||
|
}
|
||||||
|
#pragma comment(linker, "/EXPORT:PeekMemory=_PeekMemory@12")
|
||||||
|
|
||||||
|
DLL_EXPORT uint32_t PokeMemory(intptr_t address, uint32_t length, intptr_t bank) {
|
||||||
|
uint32_t bankAddress, bankSize;
|
||||||
|
bankAddress = *(uint32_t*)(bank + 4);
|
||||||
|
bankSize = *(uint32_t*)(bank + 8);
|
||||||
|
|
||||||
|
// Limit reading to bank size.
|
||||||
|
length = (length > bankSize ? bankSize : length);
|
||||||
|
|
||||||
|
for (uint32_t offset = 0; offset < length; offset++) {
|
||||||
|
*(int32_t*)(address + offset) = *(int32_t*)(bankAddress + offset);
|
||||||
|
}
|
||||||
|
|
||||||
|
return length;
|
||||||
|
}
|
||||||
|
#pragma comment(linker, "/EXPORT:PokeMemory=_PokeMemory@12")
|
||||||
|
|
||||||
|
DLL_EXPORT int8_t PeekMemoryByte(intptr_t* address) {
|
||||||
|
return *(int8_t*)address;
|
||||||
|
}
|
||||||
|
#pragma comment(linker, "/EXPORT:PeekMemoryByte=_PeekMemoryByte@4")
|
||||||
|
|
||||||
|
DLL_EXPORT void PokeMemoryByte(intptr_t* address, int8_t value) {
|
||||||
|
*(int8_t*)address = value;
|
||||||
|
}
|
||||||
|
#pragma comment(linker, "/EXPORT:PokeMemoryByte=_PokeMemoryByte@8")
|
||||||
|
|
||||||
|
DLL_EXPORT int16_t PeekMemoryShort(intptr_t* address) {
|
||||||
|
return *(int16_t*)address;
|
||||||
|
}
|
||||||
|
#pragma comment(linker, "/EXPORT:PeekMemoryShort=_PeekMemoryShort@4")
|
||||||
|
|
||||||
|
DLL_EXPORT void PokeMemoryShort(intptr_t* address, int16_t value) {
|
||||||
|
*(int16_t*)address = value;
|
||||||
|
}
|
||||||
|
#pragma comment(linker, "/EXPORT:PokeMemoryShort=_PokeMemoryShort@8")
|
||||||
|
|
||||||
|
DLL_EXPORT int32_t PeekMemoryInt(intptr_t* address) {
|
||||||
|
return *(int32_t*)address;
|
||||||
|
}
|
||||||
|
#pragma comment(linker, "/EXPORT:PeekMemoryInt=_PeekMemoryInt@4")
|
||||||
|
|
||||||
|
DLL_EXPORT void PokeMemoryInt(intptr_t* address, int32_t value) {
|
||||||
|
*(int32_t*)address = value;
|
||||||
|
}
|
||||||
|
#pragma comment(linker, "/EXPORT:PokeMemoryInt=_PokeMemoryInt@8")
|
||||||
|
|
||||||
|
DLL_EXPORT float_t PeekMemoryFloat(intptr_t* address) {
|
||||||
|
return *(float_t*)address;
|
||||||
|
}
|
||||||
|
#pragma comment(linker, "/EXPORT:PeekMemoryFloat=_PeekMemoryFloat@4")
|
||||||
|
|
||||||
|
DLL_EXPORT void PokeMemoryFloat(intptr_t* address, float_t value) {
|
||||||
|
*(float_t*)address = value;
|
||||||
|
}
|
||||||
|
#pragma comment(linker, "/EXPORT:PokeMemoryFloat=_PokeMemoryFloat@8")
|
||||||
|
|
||||||
+16
@@ -0,0 +1,16 @@
|
|||||||
|
#pragma once
|
||||||
|
#include "dllmain.h"
|
||||||
|
|
||||||
|
bool WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) {
|
||||||
|
switch (fdwReason) {
|
||||||
|
case DLL_PROCESS_ATTACH:
|
||||||
|
break;
|
||||||
|
case DLL_PROCESS_DETACH:
|
||||||
|
break;
|
||||||
|
case DLL_THREAD_ATTACH:
|
||||||
|
break;
|
||||||
|
case DLL_THREAD_DETACH:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user