i am making a simple DarkGDK mod where the users dont have to worry about id's and i am wondering why my engine doesnt work
my files
FranticBasic3D.h:
#include "DarkGDK.h"
int FreeObj();
int FindFreeObject();
class GDKObject {
private:
int objid;
public:
GDKObject(char* filename);
void position(float x, float y, float z)
{ dbPositionObject(objid, x, y, z); }
void rotate(float x, float y, float z)
{ dbRotateObject(objid, x, y, z); }
void move(float speed)
{ dbMoveObject(objid, speed); }
int id(void){ return objid; }
};
FranticBasic3D.cpp:
#include "DarkGDK.h"
#include "FranticBasic3D.h"
GDKObject::GDKObject(char* filename)
:objid(FindFreeObject())
{
LoadObject(objid, filename)
}
int FindFreeObject()
{
for(int i=1; i>FreeObj(); i++)
{
if(!dbObjectExist(i))
{
return i;
break;
}
}
}
int FreeObj() {
int temp;
while (dbObjectExist(temp)==1)
temp++;
return temp;
}
GDKObject* LoadObject(int id, char* fileName)
{
dbLoadObject(fileName, id);
return new GDKObject();
}
Frantic.h:
#ifndef __Frantic_h__
#define __Frantic_h__
#include "FranticBasic3D.h"
#endif
and here is my test code:
#include "Frantic.h"
void DarkGDK ( void )
{
dbSyncOn ( );
dbSyncRate ( 60 );
GDKObject myObj("obj.x");
while ( LoopGDK ( ) )
{
dbSync ( );
}
return;
}
and this is the error:
c:documents and settingstommy documentsvisual studio 2008projectsfrantic3d testfrantic3d testmain.cpp(8) : error C2664: 'GDKObject::GDKObject(const GDKObject &)' : cannot convert parameter 1 from 'const char [6]' to 'const GDKObject &'
i have no constructor for GDKObject that has the paramater const GDKObject & so idk why it is telling me i do, my only constructor is GDKObject(char* filename).
any help would be appreciated