IanM's C++ interface is what you want to access DBPro's internal functions.
http://forum.thegamecreators.com/?m=forum_view&t=34809&b=5
Here's a simple C++ function I wrote that access DBPro's internal functions from c++:
// DBPDIST.cpp : Defines the entry point for the DLL application.
//
#include "stdafx.h"
#include <dbpro.hpp>
// Include Core (optional)
//#include "globstruct.h"
GlobStruct* g_pGlob = NULL;
using namespace DBPro;
#define MYCOMMAND __declspec ( dllexport )
BOOL APIENTRY DllMain( HANDLE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
return TRUE;
}
MYCOMMAND void Constructor ( void )
{
// Create memory here
}
MYCOMMAND void Destructor ( void )
{
// Free memory here
}
MYCOMMAND void ReceiveCoreDataPtr ( LPVOID pCore )
{
// Get Core Data Pointer here
g_pGlob = (GlobStruct*)pCore;
// if(pCore)
//MessageBox(0, "I got called", "ReceiveCoreDataPtr", MB_OK);
}
MYCOMMAND DWORD GET_DISTANCE(float x1, float y1, float z1, float x2, float y2, float z2)
{
float fDist;
float dx,dy,dz;
dx = x1 - x2;
dy = y1 - y2;
dz = z1 - z2;
fDist = sqrt((dx*dx)+(dz*dz)+(dy*dy));
return *(DWORD*)&fDist;
}
MYCOMMAND DWORD OBJECT_DISTANCE(int object1, int object2)
{
// Some variables
float fDist;
float dx,dy,dz,x1,x2,y1,y2,z1,z2;
// Get positions
x1 = ObjectPositionX(object1);
y1 = ObjectPositionY(object1);
z1 = ObjectPositionZ(object1);
x2 = ObjectPositionX(object2);
y2 = ObjectPositionY(object2);
z2 = ObjectPositionZ(object2);
// Work out deltas
dx = x1 - x2;
dy = y1 - y2;
dz = z1 - z2;
// Calculations
fDist = sqrt((dx*dx)+(dz*dz)+(dy*dy));
return *(DWORD*)&fDist;
}