Code: Select all
22 C:\Dev-Cpp\Engine\Func\Engine.h storage class specified for field `load3ds'
Code: Select all
#ifndef _ENGINE_H_
#define _ENGINE_H_
#include <windows.h>
#include <stdio.h>
#include <GL/gl.h>
#include <GL/glu.h>
extern "C" __declspec(dllexport) void make_light (int name, float pos_x, float pos_y, float pos_z, float color_r, float color_g, float color_b, float alf);
extern "C" __declspec(dllexport) void change_light (int name, float pos_x, float pos_y, float pos_z, float color_r, float color_g, float color_b, float alf);
extern "C" __declspec(dllexport) void material (float amb_r, float amb_g, float amb_b, float met_r, float met_g,float met_b);
extern "C" __declspec(dllexport) void textureffgLoader (char * name, int id);
extern "C" __declspec(dllexport) void texturetgaLoader(char * name, int id);
extern "C" __declspec(dllexport) void texturebmpLoader(char * name, int id);
extern "C" __declspec(dllexport) class OBJECT
{
public:
OBJECT();
~OBJECT();
void load3ds(char *name); //<------------ error!
void loadobj(char *name);
void loadmd2(char *name);
bool display(int frame);
void kill();
int frames();
int vertexs();
int triangles();
private:
typedef struct{
float x,y,z;
float nx, ny, nz;
bool norm;
}vertexx;
typedef struct{
int a,b,c;
}trianglex;
typedef struct{
float u,v;
}texcoordx;
typedef struct
{
char name[20];
int vert_num;
int poly_num;
int fram_num;
vertexx vertex[5000];
trianglex triangle[5000];
texcoordx texcoord[5000];
int tex;
}objects, *objectsp;
objects object;
typedef struct
{
int magic;
int version;
int skinWidth;
int skinHeight;
int frameSize;
int numSkins;
int numVertices;
int numTexCoords;
int numTriangles;
int numGlCommands;
int numFrames;
int offsetSkins;
int offsetTexCoords;
int offsetTriangles;
int offsetFrames;
int offsetGlCommands;
int offsetEnd;
}Md2Header;
Md2Header Md21;
typedef struct
{
char skinName[64];
}ASkin;
typedef struct
{
short u, v;
}ATexCoord;
typedef struct
{
float vertex[3];
float normal[3];
}AVertice;
typedef struct
{
short vertexIndex[3];
short texIndex[3];
}ATriangle;
typedef struct
{
unsigned char vertex[3];
unsigned char lightNormalIndex;
}AVert;
typedef struct
{
float scale[3];
float translate[3];
char strFrameName[16];
AVertice *Vertsp;
}AFrame;
ASkin *Skinsp;
ATexCoord *TexCoordsp;
AFrame *Framesp;
ATriangle *Trianglesp;
};
int OBJECT::frames()
{
return object.fram_num;
}
int OBJECT::vertexs()
{
return object.vert_num;
}
int OBJECT::triangles()
{
return object.poly_num;
}
OBJECT::OBJECT()
{
}
OBJECT::~OBJECT()
{
}
#endif
thx!