[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pingus-CVS] CVS: Games/Pingus/src/worldobjsdata groundpiece_data.cxx,1.
From: |
grumbel |
Subject: |
[Pingus-CVS] CVS: Games/Pingus/src/worldobjsdata groundpiece_data.cxx,1.2,1.3 |
Date: |
16 Sep 2002 22:36:51 -0000 |
Update of /usr/local/cvsroot/Games/Pingus/src/worldobjsdata
In directory dark:/tmp/cvs-serv15865/worldobjsdata
Modified Files:
groundpiece_data.cxx
Log Message:
editor saves now in the new groundpiece format
WARNING: this is not well tested and might trash your levels
Index: groundpiece_data.cxx
===================================================================
RCS file:
/usr/local/cvsroot/Games/Pingus/src/worldobjsdata/groundpiece_data.cxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- groundpiece_data.cxx 16 Sep 2002 21:03:59 -0000 1.2
+++ groundpiece_data.cxx 16 Sep 2002 22:36:48 -0000 1.3
@@ -41,7 +41,7 @@
xmlFree(gptype_c_str);
}
else
- std::cout << "XMLPLF: groundtype empty" << std::endl;
+ std::cout << "XMLPLF: groundtype empty, which might be ok." << std::endl;
cur = cur->children;
@@ -61,6 +61,11 @@
{
desc = XMLhelper::parse_surface(doc, cur);
}
+ else if (XMLhelper::equal_str(cur->name, "type"))
+ {
+ std::string type = XMLhelper::parse_string(doc, cur);
+ gptype = Groundtype::string_to_type (type);
+ }
else
{
printf("Unhandled: %s\n", (char*)cur->name);
@@ -112,10 +117,11 @@
void
GroundpieceData::write_xml(std::ostream& xml)
{
- xml << "<groundpiece type=\"" << Groundtype::type_to_string(gptype) <<
"\">\n";
+ xml << "<worldobj type=\"groundpiece\">\n";
+ xml << " <type>" << Groundtype::type_to_string(gptype) << "</type>\n";
XMLhelper::write_desc_xml(xml, desc);
XMLhelper::write_vector_xml(xml, pos);
- xml << "</groundpiece>\n" << std::endl;
+ xml << "</worldobj>\n" << std::endl;
}
} // namespace WorldObjsData
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pingus-CVS] CVS: Games/Pingus/src/worldobjsdata groundpiece_data.cxx,1.2,1.3,
grumbel <=
- Prev by Date:
[Pingus-CVS] CVS: Games/Pingus/src pingus_main.cxx,1.15,1.16
- Next by Date:
[Pingus-CVS] CVS: Games/Pingus/src/worldobjs bumper.cxx,1.5,1.6 bumper.hxx,1.3,1.4 conveyor_belt.cxx,1.15,1.16 conveyor_belt.hxx,1.11,1.12 ice_block.cxx,1.15,1.16 ice_block.hxx,1.10,1.11 smasher.cxx,1.6,1.7 smasher.hxx,1.3,1.4 switch_door.cxx,1.17,1.18 switch_door.hxx,1.13,1.14
- Previous by thread:
[Pingus-CVS] CVS: Games/Pingus/src pingus_main.cxx,1.15,1.16
- Next by thread:
[Pingus-CVS] CVS: Games/Pingus/src/worldobjs bumper.cxx,1.5,1.6 bumper.hxx,1.3,1.4 conveyor_belt.cxx,1.15,1.16 conveyor_belt.hxx,1.11,1.12 ice_block.cxx,1.15,1.16 ice_block.hxx,1.10,1.11 smasher.cxx,1.6,1.7 smasher.hxx,1.3,1.4 switch_door.cxx,1.17,1.18 switch_door.hxx,1.13,1.14
- Index(es):