1.3 Update:

- Blitz functions are callable using __stdcall, use it instead of using tailored asm.
- DLLs that rely on this DLL no longer have to load the DLL to call Blitz functions, just include BlitzPointer.h and use the typedefs BP_BlitzFunction#_t.
- Removed Hybrid support until Hybrid is open-source.
This commit is contained in:
Michael Dirks
2015-06-20 15:08:27 +02:00
parent a5640928fc
commit 880e754254
16 changed files with 484 additions and 684 deletions
+10 -10
View File
@@ -16,7 +16,7 @@
#include "dllmain.h"
DLL_EXPORT uint32_t PeekMemory(uint32_t* address, uint32_t length, intptr_t bank) {
DLL_METHOD uint32_t DLL_CALL PeekMemory(uint32_t* address, uint32_t length, intptr_t bank) {
uint32_t bankAddress, bankSize;
bankAddress = *(uint32_t*)(bank + 4);
bankSize = *(uint32_t*)(bank + 8);
@@ -32,7 +32,7 @@ DLL_EXPORT uint32_t PeekMemory(uint32_t* address, uint32_t length, intptr_t bank
}
#pragma comment(linker, "/EXPORT:PeekMemory=_PeekMemory@12")
DLL_EXPORT uint32_t PokeMemory(uint32_t address, uint32_t length, intptr_t bank) {
DLL_METHOD uint32_t DLL_CALL PokeMemory(uint32_t address, uint32_t length, intptr_t bank) {
uint32_t bankAddress, bankSize;
bankAddress = *(uint32_t*)(bank + 4);
bankSize = *(uint32_t*)(bank + 8);
@@ -48,42 +48,42 @@ DLL_EXPORT uint32_t PokeMemory(uint32_t address, uint32_t length, intptr_t bank)
}
#pragma comment(linker, "/EXPORT:PokeMemory=_PokeMemory@12")
DLL_EXPORT int8_t PeekMemoryByte(uint32_t* address) {
DLL_METHOD int8_t DLL_CALL PeekMemoryByte(uint32_t* address) {
return *(int8_t*)address;
}
#pragma comment(linker, "/EXPORT:PeekMemoryByte=_PeekMemoryByte@4")
DLL_EXPORT void PokeMemoryByte(uint32_t* address, int8_t value) {
DLL_METHOD void DLL_CALL PokeMemoryByte(uint32_t* address, int8_t value) {
*(int8_t*)address = value;
}
#pragma comment(linker, "/EXPORT:PokeMemoryByte=_PokeMemoryByte@8")
DLL_EXPORT int16_t PeekMemoryShort(uint32_t* address) {
DLL_METHOD int16_t DLL_CALL PeekMemoryShort(uint32_t* address) {
return *(int16_t*)address;
}
#pragma comment(linker, "/EXPORT:PeekMemoryShort=_PeekMemoryShort@4")
DLL_EXPORT void PokeMemoryShort(uint32_t* address, int16_t value) {
DLL_METHOD void DLL_CALL PokeMemoryShort(uint32_t* address, int16_t value) {
*(int16_t*)address = value;
}
#pragma comment(linker, "/EXPORT:PokeMemoryShort=_PokeMemoryShort@8")
DLL_EXPORT int32_t PeekMemoryInt(uint32_t* address) {
DLL_METHOD int32_t DLL_CALL PeekMemoryInt(uint32_t* address) {
return *(int32_t*)address;
}
#pragma comment(linker, "/EXPORT:PeekMemoryInt=_PeekMemoryInt@4")
DLL_EXPORT void PokeMemoryInt(uint32_t* address, int32_t value) {
DLL_METHOD void DLL_CALL PokeMemoryInt(uint32_t* address, int32_t value) {
*(int32_t*)address = value;
}
#pragma comment(linker, "/EXPORT:PokeMemoryInt=_PokeMemoryInt@8")
DLL_EXPORT float_t PeekMemoryFloat(uint32_t* address) {
DLL_METHOD float_t DLL_CALL PeekMemoryFloat(uint32_t* address) {
return *(float_t*)address;
}
#pragma comment(linker, "/EXPORT:PeekMemoryFloat=_PeekMemoryFloat@4")
DLL_EXPORT void PokeMemoryFloat(uint32_t* address, float_t value) {
DLL_METHOD void DLL_CALL PokeMemoryFloat(uint32_t* address, float_t value) {
*(float_t*)address = value;
}
#pragma comment(linker, "/EXPORT:PokeMemoryFloat=_PokeMemoryFloat@8")