r2145 - tools/ObjToMap/objtomap

savagex at icculus.org savagex at icculus.org
Thu Jan 25 07:06:42 EST 2007


Author: savagex
Date: 2007-01-25 07:06:42 -0500 (Thu, 25 Jan 2007)
New Revision: 2145

Modified:
   tools/ObjToMap/objtomap/ObjToMap.java
Log:
simply map writer, doesn't bomb out with big maps anymore (accumulating 
a whole map in one String actually is a bad idea )


Modified: tools/ObjToMap/objtomap/ObjToMap.java
===================================================================
--- tools/ObjToMap/objtomap/ObjToMap.java	2007-01-24 21:04:54 UTC (rev 2144)
+++ tools/ObjToMap/objtomap/ObjToMap.java	2007-01-25 12:06:42 UTC (rev 2145)
@@ -119,17 +119,14 @@
             return;
         }
         
-        StringBuffer sb = new StringBuffer();
+        out.print("{\n\"classname\" \"worldspawn\"\n");
         
-        sb.append("{\n\"classname\" \"worldspawn\"\n");
-        
         for(int i = 0; i < faces.size(); i++) {
             Face f = (Face)faces.get(i);
-            sb.append(f.generateBrush());
+            out.print(f.generateBrush());
         }
         
-        sb.append("}\n");
-        out.print(sb.toString());
+        out.print("}\n");
         out.flush();
         out.close();
     }




More information about the nexuiz-commits mailing list