Browse Source

stdfloat compilation issues

David Rose 13 years ago
parent
commit
3c8cb76565

+ 3 - 16
pandatool/src/objegg/objToEggConverter.cxx

@@ -546,7 +546,7 @@ get_face_vertex(const string &reference) {
     if (entry._vi - 1 < (int)_rgb_table.size()) {
       // We have a per-vertex color too.
       LRGBColor rgb = _rgb_table[entry._vi - 1];
-      LColorf rgba(rgb[0], rgb[1], rgb[2], 1.0);
+      LColor rgba(rgb[0], rgb[1], rgb[2], 1.0);
       synth.set_color(rgba);
     }
   }
@@ -709,8 +709,8 @@ process_f_node(vector_string &words) {
       if (vi0 == 0 || vi1 == 0) {
         continue;
       }
-      const LVecBase4f &p0 = _v_table[vi0 - 1];
-      const LVecBase4f &p1 = _v_table[vi1 - 1];
+      const LVecBase4 &p0 = _v_table[vi0 - 1];
+      const LVecBase4 &p1 = _v_table[vi1 - 1];
       
       normal[0] += p0[1] * p1[2] - p0[2] * p1[1];
       normal[1] += p0[2] * p1[0] - p0[0] * p1[2];
@@ -718,19 +718,6 @@ process_f_node(vector_string &words) {
     }
     normal.normalize();
     synth_vni = add_synth_normal(normal);
-
-    /*
-    // Roll the polygon around to put the "non-vn" vertex at the
-    // end.
-    while (non_vn_index + 1 < verts.size()) {
-      VertexEntry entry = verts.back();
-      verts.pop_back();
-      verts.insert(verts.begin(), entry);
-      ++non_vn_index;
-    }
-
-    verts.back()._synth_vni = synth_vni;
-    */
   }
 
   Triangulator3 tri;

+ 14 - 14
pandatool/src/pfmprogs/pfmTrans.cxx

@@ -341,13 +341,13 @@ dispatch_scale(const string &opt, const string &arg, void *var) {
   bool okflag = false;
   if (words.size() == 3) {
     okflag =
-      string_to_float(words[0], sx) &&
-      string_to_float(words[1], sy) &&
-      string_to_float(words[2], sz);
+      string_to_stdfloat(words[0], sx) &&
+      string_to_stdfloat(words[1], sy) &&
+      string_to_stdfloat(words[2], sz);
 
   } else if (words.size() == 1) {
     okflag =
-      string_to_float(words[0], sx);
+      string_to_stdfloat(words[0], sx);
     sy = sz = sx;
   }
 
@@ -392,9 +392,9 @@ ns_dispatch_rotate_xyz(const string &opt, const string &arg, void *var) {
   bool okflag = false;
   if (words.size() == 3) {
     okflag =
-      string_to_float(words[0], xyz[0]) &&
-      string_to_float(words[1], xyz[1]) &&
-      string_to_float(words[2], xyz[2]);
+      string_to_stdfloat(words[0], xyz[0]) &&
+      string_to_stdfloat(words[1], xyz[1]) &&
+      string_to_stdfloat(words[2], xyz[2]);
   }
 
   if (!okflag) {
@@ -444,10 +444,10 @@ ns_dispatch_rotate_axis(const string &opt, const string &arg, void *var) {
   bool okflag = false;
   if (words.size() == 4) {
     okflag =
-      string_to_float(words[0], angle) &&
-      string_to_float(words[1], axis[0]) &&
-      string_to_float(words[2], axis[1]) &&
-      string_to_float(words[3], axis[2]);
+      string_to_stdfloat(words[0], angle) &&
+      string_to_stdfloat(words[1], axis[0]) &&
+      string_to_stdfloat(words[2], axis[1]) &&
+      string_to_stdfloat(words[3], axis[2]);
   }
 
   if (!okflag) {
@@ -479,9 +479,9 @@ dispatch_translate(const string &opt, const string &arg, void *var) {
   bool okflag = false;
   if (words.size() == 3) {
     okflag =
-      string_to_float(words[0], trans[0]) &&
-      string_to_float(words[1], trans[1]) &&
-      string_to_float(words[2], trans[2]);
+      string_to_stdfloat(words[0], trans[0]) &&
+      string_to_stdfloat(words[1], trans[1]) &&
+      string_to_stdfloat(words[2], trans[2]);
   }
 
   if (!okflag) {

+ 10 - 10
pandatool/src/progbase/programBase.cxx

@@ -993,31 +993,31 @@ dispatch_color(const string &opt, const string &arg, void *var) {
   switch (words.size()) {
   case 4:
     okflag =
-      string_to_float(words[0], ip[0]) &&
-      string_to_float(words[1], ip[1]) &&
-      string_to_float(words[2], ip[2]) &&
-      string_to_float(words[3], ip[3]);
+      string_to_stdfloat(words[0], ip[0]) &&
+      string_to_stdfloat(words[1], ip[1]) &&
+      string_to_stdfloat(words[2], ip[2]) &&
+      string_to_stdfloat(words[3], ip[3]);
     break;
 
   case 3:
     okflag =
-      string_to_float(words[0], ip[0]) &&
-      string_to_float(words[1], ip[1]) &&
-      string_to_float(words[2], ip[2]);
+      string_to_stdfloat(words[0], ip[0]) &&
+      string_to_stdfloat(words[1], ip[1]) &&
+      string_to_stdfloat(words[2], ip[2]);
     ip[3] = 1.0;
     break;
 
   case 2:
     okflag =
-      string_to_float(words[0], ip[0]) &&
-      string_to_float(words[1], ip[3]);
+      string_to_stdfloat(words[0], ip[0]) &&
+      string_to_stdfloat(words[1], ip[3]);
     ip[1] = ip[0];
     ip[2] = ip[0];
     break;
 
   case 1:
     okflag =
-      string_to_float(words[0], ip[0]);
+      string_to_stdfloat(words[0], ip[0]);
     ip[1] = ip[0];
     ip[2] = ip[0];
     ip[3] = 1.0;