M
Michael Sgier
Hello
by doing so:
COgroEnemy* ogro = new COgroEnemy;
I call the constructor which should load my model. There i get a syntax
errror. Why?
in oEnemy.h:
class COgroEnemy : public CEnemy // is derived from md.h
{
public:
COgroEnemy() { Load(char* modelFile, char* skinFile); } // here i get:
syntax error before `;' token
~COgroEnemy() {}
void Load(char* modelFile, char* skinFile);
};
in oEnemy.cpp: // is derived from md.h so the md function gets called
void COgroEnemy::Load()
{
// load model
CMD2Model::Load("models\\ogro\\tris.md2", "models\\ogro\\ogrobase.pcx");
}
in md.cpp:
CTexture* CMD2Model::Load(char *modelFile, char *skinFile)
{
....
}
And secondly is that a correct call to CMD2Model::Load in the Load
function? Could I do it otherways? And do
I need the "void Load" declaration in COgroEnemy as i've
in md.h:
// load model and skin/texture at the same time
CTexture* Load(char *modelFile, char *skinFile);
THANKS and regards
Michael
by doing so:
COgroEnemy* ogro = new COgroEnemy;
I call the constructor which should load my model. There i get a syntax
errror. Why?
in oEnemy.h:
class COgroEnemy : public CEnemy // is derived from md.h
{
public:
COgroEnemy() { Load(char* modelFile, char* skinFile); } // here i get:
syntax error before `;' token
~COgroEnemy() {}
void Load(char* modelFile, char* skinFile);
};
in oEnemy.cpp: // is derived from md.h so the md function gets called
void COgroEnemy::Load()
{
// load model
CMD2Model::Load("models\\ogro\\tris.md2", "models\\ogro\\ogrobase.pcx");
}
in md.cpp:
CTexture* CMD2Model::Load(char *modelFile, char *skinFile)
{
....
}
And secondly is that a correct call to CMD2Model::Load in the Load
function? Could I do it otherways? And do
I need the "void Load" declaration in COgroEnemy as i've
in md.h:
// load model and skin/texture at the same time
CTexture* Load(char *modelFile, char *skinFile);
THANKS and regards
Michael