Clean-up recently added code in share/solid.c.
authorparasti <parasti@78b8d119-cf0a-0410-b17c-f493084dd1d7>
Wed, 2 Aug 2006 10:11:40 +0000 (10:11 +0000)
committerparasti <parasti@78b8d119-cf0a-0410-b17c-f493084dd1d7>
Wed, 2 Aug 2006 10:11:40 +0000 (10:11 +0000)
git-svn-id: https://s.snth.net/svn/neverball/trunk@527 78b8d119-cf0a-0410-b17c-f493084dd1d7

share/solid.c

index 5694c07..558fcb3 100644 (file)
@@ -312,7 +312,9 @@ static int sol_load_file(FILE *fin, struct s_file *fp)
     if (fp->ic)
         fp->iv = (int           *) calloc(fp->ic, sizeof (int));
 
-    if (fp->ac) fread(fp->av, 1, fp->ac, fin);
+    if (fp->ac)
+        fread(fp->av, 1, fp->ac, fin);
+
     for (i = 0; i < fp->mc; i++) sol_load_mtrl(fin, fp->mv + i);
     for (i = 0; i < fp->vc; i++) sol_load_vert(fin, fp->vv + i);
     for (i = 0; i < fp->ec; i++) sol_load_edge(fin, fp->ev + i);
@@ -337,7 +339,6 @@ static int sol_load_file(FILE *fin, struct s_file *fp)
 
 static int sol_load_head(FILE *fin, struct s_file *fp)
 {
-    int i;
     int magic;
     int version;
 
@@ -348,29 +349,34 @@ static int sol_load_head(FILE *fin, struct s_file *fp)
         return 0;
 
     get_index(fin, &fp->ac);
-    get_index(fin, &i); /* fp->mc); */
-    get_index(fin, &i); /* fp->vc); */
-    get_index(fin, &i); /* fp->ec); */
-    get_index(fin, &i); /* fp->sc); */
-    get_index(fin, &i); /* fp->tc); */
-    get_index(fin, &i); /* fp->gc); */
-    get_index(fin, &i); /* fp->lc); */
-    get_index(fin, &i); /* fp->nc); */
-    get_index(fin, &i); /* fp->pc); */
-    get_index(fin, &i); /* fp->bc); */
-    get_index(fin, &i); /* fp->cc); */
-    get_index(fin, &i); /* fp->zc); */
-    get_index(fin, &i); /* fp->jc); */
-    get_index(fin, &i); /* fp->xc); */
-    get_index(fin, &i); /* fp->rc); */
-    get_index(fin, &i); /* fp->uc); */
-    get_index(fin, &i); /* fp->wc); */
-    get_index(fin, &i); /* fp->ic); */
 
-    if (fp->ac)
-        fp->av = (char          *) calloc(fp->ac, sizeof (char));
+#if 0
+    get_index(fin, &fp->mc);
+    get_index(fin, &fp->vc);
+    get_index(fin, &fp->ec);
+    get_index(fin, &fp->sc);
+    get_index(fin, &fp->tc);
+    get_index(fin, &fp->gc);
+    get_index(fin, &fp->lc);
+    get_index(fin, &fp->nc);
+    get_index(fin, &fp->pc);
+    get_index(fin, &fp->bc);
+    get_index(fin, &fp->cc);
+    get_index(fin, &fp->zc);
+    get_index(fin, &fp->jc);
+    get_index(fin, &fp->xc);
+    get_index(fin, &fp->rc);
+    get_index(fin, &fp->uc);
+    get_index(fin, &fp->wc);
+    get_index(fin, &fp->ic);
+#endif
+    fseek(fin, 18 * 4, SEEK_CUR);
 
-    if (fp->ac) fread(fp->av, 1, fp->ac, fin);
+    if (fp->ac)
+    {
+        fp->av = (char *) calloc(fp->ac, sizeof (char));
+        fread(fp->av, 1, fp->ac, fin);
+    }
 
     return 1;
 }