pingus-cvs
[Top][All Lists]
Advanced

[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.11,1.12 liquid_data.cxx,1.6,1.7 liquid_data.hxx,1.3,1.4 surface_background_data.cxx,1.6,1.7 surface_background_data.hxx,1.3,1.4 teleporter_data.cxx,1.8,1.9
Date: 18 Feb 2003 17:04:17 -0000

Update of /usr/local/cvsroot/Games/Pingus/src/worldobjsdata
In directory dark:/tmp/cvs-serv4269/worldobjsdata

Modified Files:
        groundpiece_data.cxx liquid_data.cxx liquid_data.hxx 
        surface_background_data.cxx surface_background_data.hxx 
        teleporter_data.cxx 
Log Message:
- added keep_aspect to surface backgrounds
- fixed anim bug in liquid


Index: groundpiece_data.cxx
===================================================================
RCS file: 
/usr/local/cvsroot/Games/Pingus/src/worldobjsdata/groundpiece_data.cxx,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- groundpiece_data.cxx        18 Feb 2003 11:28:41 -0000      1.11
+++ groundpiece_data.cxx        18 Feb 2003 17:04:13 -0000      1.12
@@ -37,6 +37,10 @@
 {
   gptype = Groundtype::GP_GROUND;
 
+  XMLFileReader reader(doc, cur);
+  reader.read_vector("position", pos);
+  reader.read_desc("surface", desc);
+
   std::string gptype_string;
   if (XMLhelper::get_prop(cur, "type", gptype_string))
     {
@@ -45,15 +49,10 @@
     }
   else
     {
-      //std::cout << "XMLPLF: groundtype empty, which might be ok." << 
std::endl;
+      std::string type;
+      reader.read_string("type", type);
+      gptype = Groundtype::string_to_type (type);
     }
-
-  XMLFileReader reader(doc, cur);
-  reader.read_vector("position", pos);
-  reader.read_desc("surface", desc);
-  std::string type;
-  reader.read_string("type", type);
-  gptype = Groundtype::string_to_type (type);
 }
 
 GroundpieceData::GroundpieceData (const GroundpieceData& old) 

Index: liquid_data.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldobjsdata/liquid_data.cxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- liquid_data.cxx     18 Feb 2003 01:23:52 -0000      1.6
+++ liquid_data.cxx     18 Feb 2003 17:04:13 -0000      1.7
@@ -39,8 +39,6 @@
     width(0),
     speed(0)
 {
-  std::cout << "LiquidData::create(xmlDocPtr doc, xmlNodePtr cur)" << 
std::endl;
-  
   if (XMLhelper::get_prop(cur, "use-old-width-handling", old_width_handling))
     {
       std::cout << "XMLPLF: Use Old Width Handling: " << old_width_handling << 
std::endl;
@@ -53,12 +51,13 @@
   reader.read_int("width", width);
 }
 
-LiquidData::LiquidData (const LiquidData& old) : WorldObjData(old),
-                                                 desc(old.desc),
-                                                pos(old.pos),
-                                                
old_width_handling(old.old_width_handling),
-                                                width(old.width),
-                                                speed(old.speed)
+LiquidData::LiquidData (const LiquidData& old)
+  : WorldObjData(old),
+    desc(old.desc),
+    pos(old.pos),
+    old_width_handling(old.old_width_handling),
+    width(old.width),
+    speed(old.speed)
 {
 }
 
@@ -78,14 +77,12 @@
 WorldObj* 
 LiquidData::create_WorldObj ()
 {
-  std::cout << "LiquidData::create_WorldObj ()" << std::endl;
   return new WorldObjs::Liquid(*this);
 }
 
 EditorObjLst
 LiquidData::create_EditorObj () 
 { 
-  std::cout << "LiquidData::create_EditorObj ()" << std::endl;
   return EditorObjLst(1, new EditorObjs::LiquidObj(*this));
 }
 

Index: liquid_data.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldobjsdata/liquid_data.hxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- liquid_data.hxx     28 Sep 2002 11:52:27 -0000      1.3
+++ liquid_data.hxx     18 Feb 2003 17:04:13 -0000      1.4
@@ -37,6 +37,8 @@
   bool old_width_handling;
   
   int width;
+
+  /** Number of miliseconds between frames */
   int speed;
 
 public:  

Index: surface_background_data.cxx
===================================================================
RCS file: 
/usr/local/cvsroot/Games/Pingus/src/worldobjsdata/surface_background_data.cxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- surface_background_data.cxx 18 Feb 2003 01:23:52 -0000      1.6
+++ surface_background_data.cxx 18 Feb 2003 17:04:13 -0000      1.7
@@ -34,7 +34,8 @@
     scroll_y(0.0),
     color(Color(0,0,0,0)),
     stretch_x(false),
-    stretch_y(false)
+    stretch_y(false),
+    keep_aspect(false)
 {
 }
 
@@ -48,7 +49,8 @@
     scroll_y(old.scroll_y),
     color(old.color),
     stretch_x(old.stretch_x),
-    stretch_y(old.stretch_y)
+    stretch_y(old.stretch_y),
+    keep_aspect(old.keep_aspect)
 {
 }
 
@@ -69,7 +71,8 @@
       << "  <para-x>"    << para_x << "</para-x>\n"
       << "  <para-y>"    << para_y << "</para-y>\n"
       << "  <stretch-x>" << stretch_x << "</stretch-x>\n"
-      << "  <stretch-y>" << stretch_y << "</stretch-y>\n";
+      << "  <stretch-y>" << stretch_y << "</stretch-y>\n"
+      << "  <keep-aspect>" << keep_aspect << "</keep_aspect>\n";
   XMLhelper::write_vector_xml(xml, pos);
   xml << "</background>\n"
       << std::endl;
@@ -81,6 +84,8 @@
 
   XMLFileReader reader(doc, cur);
 
+  reader.read_vector("position", pos);
+
   reader.read_desc("surface", desc);
   reader.read_color("color", color);
 
@@ -93,7 +98,7 @@
   reader.read_bool("stretch-x", stretch_x);
   reader.read_bool("stretch-y", stretch_y);
 
-  reader.read_vector("position", pos);
+  reader.read_bool("keep-aspect", keep_aspect);
 }
 
 WorldObj* 

Index: surface_background_data.hxx
===================================================================
RCS file: 
/usr/local/cvsroot/Games/Pingus/src/worldobjsdata/surface_background_data.hxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- surface_background_data.hxx 28 Sep 2002 11:52:27 -0000      1.3
+++ surface_background_data.hxx 18 Feb 2003 17:04:13 -0000      1.4
@@ -51,11 +51,14 @@
       for components are passed to the fill_rect() call. */
   Color color;
 
-  /// Stretch the background to the full screen size in x direction
+  /** Stretch the background to the full screen size in x direction */
   bool stretch_x;
 
-  /// Stretch the background to the full screen size in x direction
+  /** Stretch the background to the full screen size in x direction */
   bool stretch_y;
+
+  /** If streched in x or y direction keep the aspect ratio */
+  bool keep_aspect;
 
 public:
   /// Init all fields with some usefull defaults values.

Index: teleporter_data.cxx
===================================================================
RCS file: 
/usr/local/cvsroot/Games/Pingus/src/worldobjsdata/teleporter_data.cxx,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- teleporter_data.cxx 18 Feb 2003 10:14:52 -0000      1.8
+++ teleporter_data.cxx 18 Feb 2003 17:04:13 -0000      1.9
@@ -68,7 +68,6 @@
 EditorObjLst
 TeleporterData::create_EditorObj ()
 {
-  std::cout << "TeleportData::create_EditorObj () " << std::endl;
   EditorObjLst objs(2);
   
   EditorObjs::TeleporterObj*       teleporter        = new 
EditorObjs::TeleporterObj(*this);
@@ -76,8 +75,6 @@
 
   objs[0] = teleporter;
   objs[1] = teleporter_target;
-
-  std::cout << "TeleportData::create_EditorObj (): done" << std::endl;
 
   return objs;
 }





reply via email to

[Prev in Thread] Current Thread [Next in Thread]