I am writing a function that parses a texture and animation data file and loads it into some global structures that I declared. I get a compiler warning "Assignment from an incompatible pointer type" on a specific line. This is a lot of code, so I'm just going to post the important parts here.
Firstly, I have a structure data type for my animation routines:
typedef struct {
unsigned int frames;
GLuint *tex;
float *time;
struct animation *next;
} animation;
As you can see, the last variable in the structure is a pointer to another default animation when the animation is complete.
Here is the declaration of the download function:
void LoadTexturePalette(GLuint **texture, animation **anim, const char *filename)
The function loads information into an array of animations, therefore a double pointer.
, , ( ), "".
fread(tmp, 1, 4, file);
(*anim)[i].next = &((*anim)[*tmp]);
. , , , , .