


en gros tu inclus ca
j'ia pas testé, mais ca doit marcher





extern c_log;



// prend en parametre le tableau contenant
// les id de textures (vierge au début, ca le remplit !
bool LoadTexturesConf(int id_tex[])
{
  FILE *fp;
  fp = fopen("./textures/textures.conf","rb");
  bool c = false;

  if (fp)
  {
    char str[256], path[256];
    int  num = -1;

    while (fgets(str,256,fp))
    {
      // init
      memset(path,0,256*sizeof(char));
      num = -1;
      //
      sscanf(str,"%i:%s",&num,path);

      c = gl_GenTexture(id_tex[num],path,GL_LINEAR_MIPMAP_LINEAR, GL_LINEAR_MIPMAP_LINEAR, GL_REPEAT, GL_REPEAT, 1);
      if (!c)
        c_log.printf("(LoadTexturesConf) :: Erreur lors du chargement de %s",path);

    }
    fclose(fp);
  }

  return (c ? true : false);
}
