something like that would be so usefull, I hadn't find oppurtunity to switch Tier 2 yet, as we discussed before. Direct access without any controls and all blame is on to the users of this command if any error occurs.
MemBuffer = GetMemblockBuffer(MemblockID)
extern "C" DLL_EXPORT unsigned char* GetMemblockBuffer(UINT i)
{
unsigned char* buf = agk::GetMemblockPtr(i);
return buf;
}
WriteBuffer(MemBuffer, Offset, int)
extern "C" DLL_EXPORT void WriteBuffer(int& b, int o, int d)
{
*(b + o) = d;
}
UWriteBuffer(MemBuffer, Offset, int)
extern "C" DLL_EXPORT void UWriteBuffer(UINT& b, int o, UINT d)
{
*(b + o) = d;
}
FWriteBuffer(MemBuffer, Offset, float)
extern "C" DLL_EXPORT void FWriteBuffer(float& b, int o, float d)
{
*(b + o) = f;
}
ReadBuffer(MemBuffer, Offset)
extern "C" DLL_EXPORT int ReadBuffer(int& b, int o)
{
int r = *(b + o);
return r;
}
UReadBuffer(MemBuffer, Offset)
extern "C" DLL_EXPORT UINT ReadBuffer(UINT& b, int o)
{
UINT r = *(b + o);
return r;
}
FReadBuffer(MemBuffer, Offset)
extern "C" DLL_EXPORT float ReadBuffer(float& b, int o)
{
UINT r = *(b + o);
return r;
}
P.S. c++ codes might not be correct.