Quote:
as for assigning b_dot i did use exactely as you said:
p.bmap=bmapCheck(b_dot, b_dot_file);
No you assign to p.bmap. I don't know what it is, but you should at least assign to b_dot too, since that is what you will pass as input the next time you call it: b_dot=bmapCheck(b_dot, b_dot_file);
Here is the (untested) code using a BMAP**. Does this crash?
Code:
BMAP* b_dot = NULL;
char* b_dot_file = "dot.tga";
//then i fill it like this
BMAP* bmapCheck(BMAP** source, char* file)
{
if (*source == NULL) {
*source = bmap_create(file);
}
return(*source);
}
bmapCheck(&b_dot, b_dot_file); // now b_dot should point to the new bitmap