[BACK]Return to graph.c CVS log [TXT][DIR] Up to [local] / OpenXM / src / oxmgraph

Diff for /OpenXM/src/oxmgraph/graph.c between version 1.1 and 1.2

version 1.1, 2009/02/08 04:56:59 version 1.2, 2009/02/22 02:14:44
Line 158  int str_position = 500;
Line 158  int str_position = 500;
 void makeTexture(void)  void makeTexture(void)
 {  {
   FILE *fp;    FILE *fp;
   int x, z;    int x, z;
     char *oxhome;
     char fname[1024];
   
   /* texture file open (file name is "inobuta.tga")*/    /* texture file open (file name is "inobuta.tga")*/
   if((fp=fopen("inobuta.tga", "rb"))==NULL){    oxhome = getenv("OpenXM_HOME");
     fprintf(stderr, "texture file cannot be open\n");    if (oxhome != NULL) {
     return;          sprintf(fname,"%s/share/oxmgraph/inobuta.tga",oxhome);
     }else{
           sprintf(fname,"/usr/local/share/oxmgraph/inobuta.tgz");
     }
     if((fp=fopen(fname, "rb"))==NULL){
           if ((fp = fopen("inobuta.tgz","rb")) == NULL) {
             fprintf(stderr, "texture file cannot be open\n");
             return;
           }
   }    }
   fseek(fp, 18, SEEK_SET);    fseek(fp, 18, SEEK_SET);
   for (x=0; x<TEX_HEIGHT; x++) {    for (x=0; x<TEX_HEIGHT; x++) {

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>