|
|
|
@ -48,6 +48,7 @@ DFHackObject* API_Alloc(const char* path_to_xml)
|
|
|
|
|
return (DFHackObject*)api;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//FIXME: X:\dfhack\DFHackAPI_C.cpp:56: warning: deleting `DFHackObject* ' is undefined
|
|
|
|
|
void API_Free(DFHackObject* api)
|
|
|
|
|
{
|
|
|
|
|
if(api != NULL)
|
|
|
|
@ -61,12 +62,8 @@ int API_Attach(DFHackObject* api)
|
|
|
|
|
{
|
|
|
|
|
if(api != NULL)
|
|
|
|
|
{
|
|
|
|
|
if(((DFHack::API*)api)->Attach())
|
|
|
|
|
return 1;
|
|
|
|
|
else
|
|
|
|
|
return 0;
|
|
|
|
|
return ((DFHack::API*)api)->Attach();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return -1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -74,10 +71,7 @@ int API_Detach(DFHackObject* api)
|
|
|
|
|
{
|
|
|
|
|
if(api != NULL)
|
|
|
|
|
{
|
|
|
|
|
if(((DFHack::API*)api)->Detach())
|
|
|
|
|
return 1;
|
|
|
|
|
else
|
|
|
|
|
return 0;
|
|
|
|
|
return ((DFHack::API*)api)->Detach();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return -1;
|
|
|
|
@ -87,10 +81,7 @@ int API_isAttached(DFHackObject* api)
|
|
|
|
|
{
|
|
|
|
|
if(api != NULL)
|
|
|
|
|
{
|
|
|
|
|
if(((DFHack::API*)api)->isAttached())
|
|
|
|
|
return 1;
|
|
|
|
|
else
|
|
|
|
|
return 0;
|
|
|
|
|
return ((DFHack::API*)api)->isAttached();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return -1;
|
|
|
|
@ -100,10 +91,7 @@ int API_Suspend(DFHackObject* api)
|
|
|
|
|
{
|
|
|
|
|
if(api != NULL)
|
|
|
|
|
{
|
|
|
|
|
if(((DFHack::API*)api)->Suspend())
|
|
|
|
|
return 1;
|
|
|
|
|
else
|
|
|
|
|
return 0;
|
|
|
|
|
return ((DFHack::API*)api)->Suspend();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return -1;
|
|
|
|
@ -113,10 +101,7 @@ int API_Resume(DFHackObject* api)
|
|
|
|
|
{
|
|
|
|
|
if(api != NULL)
|
|
|
|
|
{
|
|
|
|
|
if(((DFHack::API*)api)->Resume())
|
|
|
|
|
return 1;
|
|
|
|
|
else
|
|
|
|
|
return 0;
|
|
|
|
|
return ((DFHack::API*)api)->Resume();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return -1;
|
|
|
|
@ -126,10 +111,7 @@ int API_isSuspended(DFHackObject* api)
|
|
|
|
|
{
|
|
|
|
|
if(api != NULL)
|
|
|
|
|
{
|
|
|
|
|
if(((DFHack::API*)api)->isSuspended())
|
|
|
|
|
return 1;
|
|
|
|
|
else
|
|
|
|
|
return 0;
|
|
|
|
|
return ((DFHack::API*)api)->isSuspended();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return -1;
|
|
|
|
@ -139,10 +121,7 @@ int API_ForceResume(DFHackObject* api)
|
|
|
|
|
{
|
|
|
|
|
if(api != NULL)
|
|
|
|
|
{
|
|
|
|
|
if(((DFHack::API*)api)->ForceResume())
|
|
|
|
|
return 1;
|
|
|
|
|
else
|
|
|
|
|
return 0;
|
|
|
|
|
return ((DFHack::API*)api)->ForceResume();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return -1;
|
|
|
|
@ -152,10 +131,7 @@ int API_AsyncSuspend(DFHackObject* api)
|
|
|
|
|
{
|
|
|
|
|
if(api != NULL)
|
|
|
|
|
{
|
|
|
|
|
if(((DFHack::API*)api)->AsyncSuspend())
|
|
|
|
|
return 1;
|
|
|
|
|
else
|
|
|
|
|
return 0;
|
|
|
|
|
return ((DFHack::API*)api)->AsyncSuspend();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return -1;
|
|
|
|
|