added ReadRaw/WriteRaw

develop
doomchild 2010-04-30 16:04:05 -05:00
parent d750e30612
commit 177bbf30c0
1 changed files with 108 additions and 9 deletions

@ -48,8 +48,6 @@ DFHackObject* API_Alloc(const char* path_to_xml)
return (DFHackObject*)api;
}
/*
void API_Free(DFHackObject* api)
{
if(api != NULL)
@ -59,24 +57,125 @@ void API_Free(DFHackObject* api)
}
}
bool API_Attach(DFHackObject* api)
int API_Attach(DFHackObject* api)
{
if(api != NULL)
return ((DFHack::API*)api)->Attach();
{
if(((DFHack::API*)api)->Attach())
return 1;
else
return 0;
}
return -1;
}
bool API_Detach(DFHackObject* api)
int API_Detach(DFHackObject* api)
{
if(api != NULL)
return ((DFHack::API*)api)->Detach();
{
if(((DFHack::API*)api)->Detach())
return 1;
else
return 0;
}
return -1;
}
bool API_isAttached(DFHackObject* api)
int API_isAttached(DFHackObject* api)
{
if(api != NULL)
return ((DFHack::API*)api)->isAttached();
{
if(((DFHack::API*)api)->isAttached())
return 1;
else
return 0;
}
return -1;
}
int API_Suspend(DFHackObject* api)
{
if(api != NULL)
{
if(((DFHack::API*)api)->Suspend())
return 1;
else
return 0;
}
return -1;
}
int API_Resume(DFHackObject* api)
{
if(api != NULL)
{
if(((DFHack::API*)api)->Resume())
return 1;
else
return 0;
}
return -1;
}
int API_isSuspended(DFHackObject* api)
{
if(api != NULL)
{
if(((DFHack::API*)api)->isSuspended())
return 1;
else
return 0;
}
return -1;
}
int API_ForceResume(DFHackObject* api)
{
if(api != NULL)
{
if(((DFHack::API*)api)->ForceResume())
return 1;
else
return 0;
}
return -1;
}
int API_AsyncSuspend(DFHackObject* api)
{
if(api != NULL)
{
if(((DFHack::API*)api)->AsyncSuspend())
return 1;
else
return 0;
}
return -1;
}
void API_ReadRaw(DFHackObject* api, const uint32_t offset, const uint32_t size, uint8_t* target)
{
if(api != NULL)
{
((DFHack::API*)api)->ReadRaw(offset, size, target);
}
}
void API_WriteRaw(DFHackObject* api, const uint32_t offset, const uint32_t size, uint8_t* source)
{
if(api != NULL)
{
((DFHack::API*)api)->WriteRaw(offset, size, source);
}
}
*/
#ifdef __cplusplus
}