objwriter.cxx

changeset 1
f0c61c204bc8
parent 0
8dce9696d62d
child 3
08cab2b67dce
--- a/objwriter.cxx	Fri Jul 13 17:20:51 2012 +0300
+++ b/objwriter.cxx	Fri Jul 13 18:41:40 2012 +0300
@@ -48,10 +48,8 @@
 #include "bots.h"
 
 ObjWriter::ObjWriter (str path) {
-	numstates = 0;
-	
 	fp = fopen (path, "w");
-	CHECK_FILE (path, "writing");
+	CHECK_FILE (fp, path, "writing");
 }
 
 ObjWriter::~ObjWriter () {
@@ -69,16 +67,4 @@
 
 void ObjWriter::WriteString (str s) {
 	WriteString (s.chars());
-}
-
-// Writes a state label
-void ObjWriter::WriteState (str name) {
-	printf ("write state %s\n", (char*)name);
-	Write (DH_STATENAME);
-	Write (name.len());
-	WriteString (name);
-	Write (DH_STATEIDX);
-	Write (numstates);
-	
-	numstates++;
 }
\ No newline at end of file

mercurial