i am trying to add SC_Start to the h and cpp file
it builds right but in my main.cpp
where i call SC_Start() it sais
error C3861: 'SC_Start': identifier not found
this is how it looks like:
header file
at the first line
#ifndef _GDKLIB_DBPCOLLISIONS_H
#define _GDKLIB_DBPCOLLISIONS_H
#include "../core/dgdk-darkgdk.h"
void SC_Start();
void SC_SetupObject(int32_t objectID, int32_t groupID, int32_t objectType);
void SC_SetupComplexObject(int32_t objectID, int32_t groupID, int32_t facesPerNode);
void SC_SetupTerrainCollision(int32_t terrainID, int32_t groupID, int32_t objectID);
void SC_UpdateObject(int32_t objectID);
void SC_RemoveObject(int32_t objectID);
void SC_SetObjectCollisionOn(int32_t objectID);
void SC_SetObjectCollisionOff(int32_t objectID);
int32_t SC_Collisionstatus(int32_t objectID);
void SC_AllowObjectScaling(int32_t objectID);
void SC_SetMaxCollisions(int32_t maxCollisions);
int32_t SC_RayCast(int32_t objectID, float x1, float y1, float z1, float x2, float y2, float z2, int32_t excludeObject);
int32_t SC_RayCastGroup(int32_t groupID, float x1, float y1, float z1, float x2, float y2, float z2, int32_t excludeObject);
int32_t SC_MultipleRayCast(int32_t objectID, float x1, float y1, float z1, float x2, float y2, float z2, int32_t excludeObject);
int32_t SC_MultipleRayCastGroup(int32_t groupID, float x1, float y1, float z1, float x2, float y2, float z2, int32_t excludeObject);
int32_t SC_SphereCast(int32_t objectID, float x1, float y1, float z1, float x2, float y2, float z2, float radius, int32_t excludeObject);
int32_t SC_SphereCastGroup(int32_t groupID, float x1, float y1, float z1, float x2, float y2, float z2, float radius, int32_t excludeObject);
int32_t SC_SphereSlide(int32_t objectID, float x1, float y1, float z1, float x2, float y2, float z2, float radius, int32_t excludeObject);
int32_t SC_SphereSlideGroup(int32_t groupID, float x1, float y1, float z1, float x2, float y2, float z2, float radius, int32_t excludeObject);
int32_t SC_ObjectCollision(int32_t objectIDa, int32_t objectIDb);
int32_t SC_GroupCollision(int32_t objectID, int32_t groupID);
int32_t SC_GetObjectHit(int32_t collisionID);
int32_t SC_GetObjectHit();
int32_t SC_GetGroupHit(int32_t collisionID);
int32_t SC_GetGroupHit();
int32_t SC_GetFaceHit(int32_t collisionID);
int32_t SC_GetFaceHit();
int32_t SC_GetNumCollisions();
float SC_GetStaticCollisionX(int32_t collisionID);
float SC_GetStaticCollisionX();
float SC_GetStaticCollisionY(int32_t collisionID);
float SC_GetStaticCollisionY();
float SC_GetStaticCollisionZ(int32_t collisionID);
float SC_GetStaticCollisionZ();
float SC_GetCollisionNormalX(int32_t collisionID);
float SC_GetCollisionNormalX();
float SC_GetCollisionNormalY(int32_t collisionID);
float SC_GetCollisionNormalY();
float SC_GetCollisionNormalZ(int32_t collisionID);
float SC_GetCollisionNormalZ();
float SC_GetCollisionBounceX(int32_t collisionID);
float SC_GetCollisionBounceX();
float SC_GetCollisionBounceY(int32_t collisionID);
float SC_GetCollisionBounceY();
float SC_GetCollisionBounceZ(int32_t collisionID);
float SC_GetCollisionBounceZ();
float SC_GetCollisionSlideX(int32_t collisionID);
float SC_GetCollisionSlideX();
float SC_GetCollisionSlideY(int32_t collisionID);
float SC_GetCollisionSlideY();
float SC_GetCollisionSlideZ(int32_t collisionID);
float SC_GetCollisionSlideZ();
float SC_GetCollisionDistance(int32_t collisionID);
float SC_GetCollisionDistance();
int32_t SC_GetObjectCount();
int32_t SC_GetRayCount();
void SC_DrawObjectBounds(int32_t objectID);
void SC_RemoveVisualBounds(int32_t objectID);
float SC_IntersectObject(int32_t objectID, float x1, float y1, float z1, float x2, float y2, float z2);
void SC_SaveCollisionObject(int32_t objectID, std::string fileName);
void SC_SetupObjectFromFile(int32_t objectID, int32_t groupID, std::string fileName);
void SC_ErrorMode(int32_t mode);
#endif /* _GDKLIB_DBPCOLLISIONS_H */
at the cpp file
typedef void (__cdecl *ProtoSC_Start_0)();
void SC_Start() {
static ProtoSC_Start_0 Ptr;
if (!Ptr && !GDKLoadPtr(&Ptr,"SC_Collision.dll","?SC_Start@@YAXH@Z"))
return;
if (GDKWaitFunction()) {
Ptr();
GDKCleanupFunctionCall();
}
return;
}
and in the main.cpp
however it dosent work..
for some reason the compiler cause the error.
edit : got it working
2nd edit: got it working but no collision detection working yet..
guess i'll wait for the update.. this sux.