[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pingus-CVS] CVS: Games/Pingus/src editor_hotspot.hxx,1.2,1.3 entrance_d
From: |
grumbel |
Subject: |
[Pingus-CVS] CVS: Games/Pingus/src editor_hotspot.hxx,1.2,1.3 entrance_data.cxx,1.1,1.2 entrance_data.hxx,1.3,1.4 exit_data.cxx,1.1,1.2 exit_data.hxx,1.3,1.4 groundpiece_data.cxx,1.3,1.4 groundpiece_data.hxx,1.5,1.6 hotspot_data.cxx,1.1,1.2 hotspot_data.hxx,1.3,1.4 liquid_data.cxx,1.2,1.3 liquid_data.hxx,1.3,1.4 trap_data.cxx,1.1,1.2 trap_data.hxx,1.3,1.4 worldobj_data.hxx,1.2,1.3 worldobj_group_data.cxx,1.3,1.4 worldobj_group_data.hxx,1.3,1.4 xml_helper.cxx,1.3,1.4 xml_helper.hxx,1.4,1.5 |
Date: |
25 Jun 2002 12:20:36 -0000 |
Update of /usr/local/cvsroot/Games/Pingus/src
In directory dark:/tmp/cvs-serv24105
Modified Files:
editor_hotspot.hxx entrance_data.cxx entrance_data.hxx
exit_data.cxx exit_data.hxx groundpiece_data.cxx
groundpiece_data.hxx hotspot_data.cxx hotspot_data.hxx
liquid_data.cxx liquid_data.hxx trap_data.cxx trap_data.hxx
worldobj_data.hxx worldobj_group_data.cxx
worldobj_group_data.hxx xml_helper.cxx xml_helper.hxx
Log Message:
- replaced all ofstream* by ostream&
- some more prefab stuff
Index: editor_hotspot.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor_hotspot.hxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- editor_hotspot.hxx 24 Jun 2002 22:52:54 -0000 1.2
+++ editor_hotspot.hxx 25 Jun 2002 12:20:31 -0000 1.3
@@ -35,7 +35,7 @@
SpriteEditorObj (desc, pos)
{}
- void write_xml(std::ofstream* xml) { HotspotData::write_xml (xml); }
+ void write_xml(std::ostream& xml) { HotspotData::write_xml (xml); }
boost::shared_ptr<EditorObj> duplicate() {
return boost::shared_ptr<EditorObj>(new
EditorHotspot(static_cast<HotspotData>(*this)));
Index: entrance_data.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/entrance_data.cxx,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- entrance_data.cxx 12 Jun 2002 19:09:37 -0000 1.1
+++ entrance_data.cxx 25 Jun 2002 12:20:31 -0000 1.2
@@ -81,7 +81,7 @@
}
void
-EntranceData::write_xml(std::ofstream *xml)
+EntranceData::write_xml(std::ostream& xml)
{
std::string dir_str;
@@ -99,14 +99,14 @@
break;
}
- (*xml) << "<entrance>\n";
+ xml << "<entrance>\n";
XMLhelper::write_vector_xml(xml, pos);
- (*xml) << " <type>" << type << "</type>\n"
- << " <direction>" << dir_str << "</direction>\n"
- << " <release-rate>" << release_rate << "</release-rate>\n"
- << " <owner-id>" << owner_id << "</owner-id>\n"
- << "</entrance>\n"
- << std::endl;
+ xml << " <type>" << type << "</type>\n"
+ << " <direction>" << dir_str << "</direction>\n"
+ << " <release-rate>" << release_rate << "</release-rate>\n"
+ << " <owner-id>" << owner_id << "</owner-id>\n"
+ << "</entrance>\n"
+ << std::endl;
}
Index: entrance_data.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/entrance_data.hxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- entrance_data.hxx 24 Jun 2002 22:52:54 -0000 1.3
+++ entrance_data.hxx 25 Jun 2002 12:20:31 -0000 1.4
@@ -54,7 +54,7 @@
owner_id = 0;
}
- void write_xml(std::ofstream *);
+ void write_xml(std::ostream&);
EditorObjLst create_EditorObj();
WorldObj* create_WorldObj();
Index: exit_data.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/exit_data.cxx,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- exit_data.cxx 12 Jun 2002 19:09:37 -0000 1.1
+++ exit_data.cxx 25 Jun 2002 12:20:31 -0000 1.2
@@ -70,9 +70,9 @@
}
void
-ExitData::write_xml(std::ofstream* xml)
+ExitData::write_xml(std::ostream& xml)
{
- (*xml) << "<exit use-old-pos-handling=\"" << use_old_pos_handling << "\">\n";
+ xml << "<exit use-old-pos-handling=\"" << use_old_pos_handling << "\">\n";
// FIXME: Repair me
//pos.x += surf.get_width ()/2;
@@ -80,9 +80,9 @@
XMLhelper::write_vector_xml(xml, pos);
XMLhelper::write_desc_xml(xml, desc);
- (*xml) << " <owner-id>" << owner_id << "</owner-id>"
- << "</exit>\n"
- << std::endl;
+ xml << " <owner-id>" << owner_id << "</owner-id>"
+ << "</exit>\n"
+ << std::endl;
}
WorldObj*
Index: exit_data.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/exit_data.hxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- exit_data.hxx 24 Jun 2002 22:52:54 -0000 1.3
+++ exit_data.hxx 25 Jun 2002 12:20:31 -0000 1.4
@@ -52,7 +52,7 @@
use_old_pos_handling = true;
}
- void write_xml(std::ofstream *);
+ void write_xml(std::ostream&);
WorldObj* create_WorldObj();
EditorObjLst create_EditorObj();
Index: groundpiece_data.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/groundpiece_data.cxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- groundpiece_data.cxx 24 Jun 2002 18:53:14 -0000 1.3
+++ groundpiece_data.cxx 25 Jun 2002 12:20:31 -0000 1.4
@@ -127,12 +127,12 @@
}
void
-GroundpieceData::write_xml(std::ofstream* xml)
+GroundpieceData::write_xml(std::ostream& xml)
{
- (*xml) << "<groundpiece type=\"" << GroundpieceData::type_to_string(gptype)
<< "\">\n";
+ xml << "<groundpiece type=\"" << GroundpieceData::type_to_string(gptype) <<
"\">\n";
XMLhelper::write_desc_xml(xml, desc);
XMLhelper::write_vector_xml(xml, pos);
- (*xml) << "</groundpiece>\n" << std::endl;
+ xml << "</groundpiece>\n" << std::endl;
}
/* EOF */
Index: groundpiece_data.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/groundpiece_data.hxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- groundpiece_data.hxx 24 Jun 2002 22:52:54 -0000 1.5
+++ groundpiece_data.hxx 25 Jun 2002 12:20:31 -0000 1.6
@@ -58,7 +58,7 @@
GroundpieceData (xmlDocPtr doc, xmlNodePtr cur);
std::list<boost::shared_ptr<EditorObj> > create_EditorObj();
- void write_xml(std::ofstream* xml);
+ void write_xml(std::ostream& xml);
static GPType string_to_type(const std::string& arg_type);
static std::string type_to_string(GPType arg_type);
Index: hotspot_data.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/hotspot_data.cxx,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- hotspot_data.cxx 12 Jun 2002 19:09:37 -0000 1.1
+++ hotspot_data.cxx 25 Jun 2002 12:20:31 -0000 1.2
@@ -23,15 +23,15 @@
#include "hotspot.hxx"
void
-HotspotData::write_xml(std::ofstream* xml)
+HotspotData::write_xml(std::ostream& xml)
{
- (*xml) << "<hotspot>\n";
+ xml << "<hotspot>\n";
XMLhelper::write_desc_xml(xml, desc);
XMLhelper::write_vector_xml(xml, pos);
- (*xml) << " <speed>" << speed << "</speed>\n"
- << " <parallax>" << para << "</parallax>\n"
- << "</hotspot>\n"
- << std::endl;
+ xml << " <speed>" << speed << "</speed>\n"
+ << " <parallax>" << para << "</parallax>\n"
+ << "</hotspot>\n"
+ << std::endl;
}
HotspotData::HotspotData (xmlDocPtr doc, xmlNodePtr cur)
Index: hotspot_data.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/hotspot_data.hxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- hotspot_data.hxx 24 Jun 2002 22:52:54 -0000 1.3
+++ hotspot_data.hxx 25 Jun 2002 12:20:31 -0000 1.4
@@ -48,7 +48,7 @@
para = 1.0;
}
- void write_xml(std::ofstream *);
+ void write_xml(std::ostream&);
WorldObj* create_WorldObj();
EditorObjLst create_EditorObj();
Index: liquid_data.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/liquid_data.cxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- liquid_data.cxx 13 Jun 2002 14:25:12 -0000 1.2
+++ liquid_data.cxx 25 Jun 2002 12:20:31 -0000 1.3
@@ -25,15 +25,15 @@
#include "boost/smart_ptr.hpp"
void
-LiquidData::write_xml(std::ofstream* xml)
+LiquidData::write_xml(std::ostream& xml)
{
- std::cout << "LiquidData::write_xml(std::ofstream* xml)" << std::endl;
- (*xml) << "<liquid use-old-width-handling=\"" << int(old_width_handling) <<
"\">\n";
+ std::cout << "LiquidData::write_xml(std::ostream& xml)" << std::endl;
+ xml << "<liquid use-old-width-handling=\"" << int(old_width_handling) <<
"\">\n";
XMLhelper::write_desc_xml(xml, desc);
XMLhelper::write_vector_xml(xml, pos);
- (*xml) << " <width>" << width << "</width>\n"
- << " <speed>" << speed << "</speed>\n"
- << "</liquid>\n" << std::endl;
+ xml << " <width>" << width << "</width>\n"
+ << " <speed>" << speed << "</speed>\n"
+ << "</liquid>\n" << std::endl;
}
LiquidData::LiquidData (xmlDocPtr doc, xmlNodePtr cur)
Index: liquid_data.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/liquid_data.hxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- liquid_data.hxx 24 Jun 2002 22:52:55 -0000 1.3
+++ liquid_data.hxx 25 Jun 2002 12:20:31 -0000 1.4
@@ -57,7 +57,7 @@
speed = 50;
}
- void write_xml(std::ofstream*);
+ void write_xml(std::ostream&);
/** Create an WorldObj from the given data object */
WorldObj* create_WorldObj ();
Index: trap_data.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/trap_data.cxx,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- trap_data.cxx 12 Jun 2002 19:09:38 -0000 1.1
+++ trap_data.cxx 25 Jun 2002 12:20:31 -0000 1.2
@@ -62,13 +62,13 @@
}
void
-TrapData::write_xml(std::ofstream* xml)
+TrapData::write_xml(std::ostream& xml)
{
- (*xml) << "<trap>\n"
- << " <type>" << type << "</type>\n";
+ xml << "<trap>\n"
+ << " <type>" << type << "</type>\n";
XMLhelper::write_vector_xml(xml, pos);
- (*xml) << "</trap>\n"
- << std::endl;
+ xml << "</trap>\n"
+ << std::endl;
}
WorldObj*
Index: trap_data.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/trap_data.hxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- trap_data.hxx 24 Jun 2002 22:52:57 -0000 1.3
+++ trap_data.hxx 25 Jun 2002 12:20:31 -0000 1.4
@@ -48,7 +48,7 @@
virtual ~TrapData(){}
void clean(){}
- void write_xml(std::ofstream* xml);
+ void write_xml(std::ostream& xml);
/** Create an WorldObj from the given data object */
WorldObj* create_WorldObj ();
Index: worldobj_data.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldobj_data.hxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- worldobj_data.hxx 24 Jun 2002 22:52:57 -0000 1.2
+++ worldobj_data.hxx 25 Jun 2002 12:20:31 -0000 1.3
@@ -48,7 +48,7 @@
/** Writte the content of this object formated as xml to the given
stream */
- virtual void write_xml (std::ofstream* xml) =0;
+ virtual void write_xml (std::ostream& xml) =0;
/** Create an WorldObj from the given data object */
virtual WorldObj* create_WorldObj () =0;
Index: worldobj_group_data.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldobj_group_data.cxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- worldobj_group_data.cxx 24 Jun 2002 18:53:14 -0000 1.3
+++ worldobj_group_data.cxx 25 Jun 2002 12:20:31 -0000 1.4
@@ -103,12 +103,12 @@
}
void
-WorldObjGroupData::write_xml (std::ofstream* xml)
+WorldObjGroupData::write_xml (std::ostream& xml)
{
- (*xml) << "<group>\n";
+ xml << "<group>\n";
for (ObjsIter i = objs.begin (); i != objs.end (); ++i)
(*i)->write_xml (xml);
- (*xml) << "</group>\n\n";
+ xml << "</group>\n\n";
}
/** Create an WorldObj from the given data object */
Index: worldobj_group_data.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldobj_group_data.hxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- worldobj_group_data.hxx 24 Jun 2002 22:52:57 -0000 1.3
+++ worldobj_group_data.hxx 25 Jun 2002 12:20:31 -0000 1.4
@@ -37,7 +37,7 @@
void add (WorldObjData*);
- void write_xml (std::ofstream* xml);
+ void write_xml (std::ostream& xml);
/** Create an WorldObj from the given data object */
WorldObj* create_WorldObj ();
Index: xml_helper.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/xml_helper.cxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- xml_helper.cxx 21 Jun 2002 07:45:35 -0000 1.3
+++ xml_helper.cxx 25 Jun 2002 12:20:31 -0000 1.4
@@ -266,19 +266,19 @@
void
-XMLhelper::write_desc_xml(std::ofstream* xml, ResDescriptor desc)
+XMLhelper::write_desc_xml(std::ostream& xml, ResDescriptor desc)
{
- (*xml) << " <surface><resource type=\"";
+ xml << " <surface><resource type=\"";
switch (desc.type)
{
case ResDescriptor::RD_FILE:
- (*xml) << "file\">\n"
+ xml << "file\">\n"
<< " <resource-file>"
<< desc.res_name
<< "</resource-file>\n";
break;
case ResDescriptor::RD_RESOURCE:
- (*xml) << "datafile\">\n"
+ xml << "datafile\">\n"
<< " <resource-datafile>"
<< desc.datafile
<< "</resource-datafile>\n"
@@ -291,17 +291,17 @@
break;
}
- (*xml) << " </resource></surface>" << std::endl;
+ xml << " </resource></surface>" << std::endl;
}
void
-XMLhelper::write_vector_xml(std::ofstream* xml, const CL_Vector& pos)
+XMLhelper::write_vector_xml(std::ostream& xml, const CL_Vector& pos)
{
- (*xml) << " <position>\n"
- << " <x-pos>" << pos.x << "</x-pos>\n"
- << " <y-pos>" << pos.y << "</y-pos>\n"
- << " <z-pos>" << pos.z << "</z-pos>\n"
- << " </position>\n";
+ xml << " <position>\n"
+ << " <x-pos>" << pos.x << "</x-pos>\n"
+ << " <y-pos>" << pos.y << "</y-pos>\n"
+ << " <z-pos>" << pos.z << "</z-pos>\n"
+ << " </position>\n";
}
/* EOF */
Index: xml_helper.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/xml_helper.hxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- xml_helper.hxx 24 Jun 2002 22:52:57 -0000 1.4
+++ xml_helper.hxx 25 Jun 2002 12:20:31 -0000 1.5
@@ -76,9 +76,9 @@
/// A set of functions to write data down to an xml file
//@{
/** Writes the given res_desc to the ofstream */
- static void write_desc_xml(std::ofstream* xml, ResDescriptor desc);
+ static void write_desc_xml(std::ostream& xml, ResDescriptor desc);
/** Write a CL_Vector to an xml stream */
- static void write_vector_xml(std::ofstream* xml, const CL_Vector& pos);
+ static void write_vector_xml(std::ostream& xml, const CL_Vector& pos);
//@}
};
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pingus-CVS] CVS: Games/Pingus/src editor_hotspot.hxx,1.2,1.3 entrance_data.cxx,1.1,1.2 entrance_data.hxx,1.3,1.4 exit_data.cxx,1.1,1.2 exit_data.hxx,1.3,1.4 groundpiece_data.cxx,1.3,1.4 groundpiece_data.hxx,1.5,1.6 hotspot_data.cxx,1.1,1.2 hotspot_data.hxx,1.3,1.4 liquid_data.cxx,1.2,1.3 liquid_data.hxx,1.3,1.4 trap_data.cxx,1.1,1.2 trap_data.hxx,1.3,1.4 worldobj_data.hxx,1.2,1.3 worldobj_group_data.cxx,1.3,1.4 worldobj_group_data.hxx,1.3,1.4 xml_helper.cxx,1.3,1.4 xml_helper.hxx,1.4,1.5,
grumbel <=
- Prev by Date:
[Pingus-CVS] CVS: Games/Pingus/src/worldobjs conveyor_belt.cxx,1.2,1.3 conveyor_belt.hxx,1.2,1.3 ice_block.cxx,1.2,1.3 ice_block.hxx,1.2,1.3 info_box.cxx,1.1,1.2 info_box.hxx,1.3,1.4 switch_door.cxx,1.2,1.3 switch_door.hxx,1.3,1.4 teleporter.cxx,1.1,1.2 teleporter.hxx,1.3,1.4
- Next by Date:
[Pingus-CVS] [Bug #751] Level-Editor/Credits should be locked if the player hasn't finished the game.
- Previous by thread:
[Pingus-CVS] CVS: Games/Pingus/src/worldobjs conveyor_belt.cxx,1.2,1.3 conveyor_belt.hxx,1.2,1.3 ice_block.cxx,1.2,1.3 ice_block.hxx,1.2,1.3 info_box.cxx,1.1,1.2 info_box.hxx,1.3,1.4 switch_door.cxx,1.2,1.3 switch_door.hxx,1.3,1.4 teleporter.cxx,1.1,1.2 teleporter.hxx,1.3,1.4
- Next by thread:
[Pingus-CVS] [Bug #751] Level-Editor/Credits should be locked if the player hasn't finished the game.
- Index(es):