pingus-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pingus-CVS] CVS: Games/Pingus/src/backgrounds solidcolor_background.cxx


From: torangan
Subject: [Pingus-CVS] CVS: Games/Pingus/src/backgrounds solidcolor_background.cxx,1.4,1.5 starfield_background.cxx,1.8,1.9 surface_background_data.cxx,1.4,1.5 thunderstorm_background_data.cxx,1.5,1.6
Date: 10 Sep 2002 21:03:34 -0000

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

Modified Files:
        solidcolor_background.cxx starfield_background.cxx 
        surface_background_data.cxx thunderstorm_background_data.cxx 
Log Message:
added and applied to XMLhelper methods


Index: solidcolor_background.cxx
===================================================================
RCS file: 
/usr/local/cvsroot/Games/Pingus/src/backgrounds/solidcolor_background.cxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- solidcolor_background.cxx   23 Aug 2002 15:49:54 -0000      1.4
+++ solidcolor_background.cxx   10 Sep 2002 21:03:32 -0000      1.5
@@ -31,7 +31,7 @@
 SolidColorBackgroundData::SolidColorBackgroundData(xmlDocPtr doc, xmlNodePtr 
cur)
 {
   cur = cur->children;
-  while (cur != NULL)
+  while (cur)
     {
       if (xmlIsBlankNode(cur)) 
        {
@@ -39,7 +39,7 @@
          continue;
        }
 
-      if (strcmp ((char*) cur->name, "color") == 0)
+      if (XMLhelper::equal_str(cur->name, "color"))
        {
          color = XMLhelper::parse_color (doc, cur);
        }

Index: starfield_background.cxx
===================================================================
RCS file: 
/usr/local/cvsroot/Games/Pingus/src/backgrounds/starfield_background.cxx,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- starfield_background.cxx    23 Aug 2002 15:49:54 -0000      1.8
+++ starfield_background.cxx    10 Sep 2002 21:03:32 -0000      1.9
@@ -73,7 +73,7 @@
 
   cur = cur->children;
 
-  while (cur != NULL)
+  while (cur)
     {
       if (xmlIsBlankNode(cur)) 
        {
@@ -81,27 +81,27 @@
          continue;
        }
       
-      if (strcmp((char*)cur->name, "small-stars") == 0)
+      if (XMLhelper::equal_str(cur->name, "small-stars"))
        {
-         char* count = (char*)xmlGetProp(cur, (xmlChar*)"count");
+         char* count = XMLhelper::get_prop(cur, "count");
          if (count)
            {
              small_stars_count = StringConverter::to_int(count);
              xmlFree(count);
            }
        }
-      else if (strcmp((char*)cur->name, "middle-stars") == 0)
+      else if (XMLhelper::equal_str(cur->name, "middle-stars"))
        {
-         char* count = (char*)xmlGetProp(cur, (xmlChar*)"count");
+         char* count = XMLhelper::get_prop(cur, "count");
          if (count)
            {
              middle_stars_count = StringConverter::to_int(count);
              xmlFree(count);
            }     
        }
-      else if (strcmp((char*)cur->name, "large-stars") == 0)
+      else if (XMLhelper::equal_str(cur->name, "large-stars"))
        {
-         char* count = (char*)xmlGetProp(cur, (xmlChar*)"count");
+         char* count = XMLhelper::get_prop(cur, "count");
          if (count)
            {
              large_stars_count = StringConverter::to_int(count);

Index: surface_background_data.cxx
===================================================================
RCS file: 
/usr/local/cvsroot/Games/Pingus/src/backgrounds/surface_background_data.cxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- surface_background_data.cxx 23 Aug 2002 15:49:54 -0000      1.4
+++ surface_background_data.cxx 10 Sep 2002 21:03:32 -0000      1.5
@@ -101,7 +101,7 @@
   pos.z = -150;
 
   cur = cur->children;  
-  while (cur != NULL)
+  while (cur)
     {
       if (xmlIsBlankNode(cur)) 
        {
@@ -109,39 +109,39 @@
          continue;
        }
 
-      if (strcmp((char*)cur->name, "surface") == 0)
+      if (XMLhelper::equal_str(cur->name, "surface"))
        {
          desc = XMLhelper::parse_surface(doc, cur);
        }
-      else if (strcmp((char*)cur->name, "color") == 0)
+      else if (XMLhelper::equal_str(cur->name, "color"))
        {
          color = XMLhelper::parse_color(doc, cur);
        }
-      else if (strcmp((char*)cur->name, "para-x") == 0)
+      else if (XMLhelper::equal_str(cur->name, "para-x"))
        {
          para_x = XMLhelper::parse_float(doc, cur);
        }
-      else if (strcmp((char*)cur->name, "para-y") == 0)
+      else if (XMLhelper::equal_str(cur->name, "para-y"))
        {
          para_y = XMLhelper::parse_float(doc, cur);
        }
-      else if (strcmp((char*)cur->name, "scroll-x") == 0)
+      else if (XMLhelper::equal_str(cur->name, "scroll-x"))
        {
          scroll_x = XMLhelper::parse_float(doc, cur);
        }
-      else if (strcmp((char*)cur->name, "scroll-y") == 0)
+      else if (XMLhelper::equal_str(cur->name, "scroll-y"))
        {
          scroll_y = XMLhelper::parse_float(doc, cur);
        }
-      else if (strcmp((char*)cur->name, "stretch-x") == 0)
+      else if (XMLhelper::equal_str(cur->name, "stretch-x"))
        {
          stretch_x = XMLhelper::parse_float(doc, cur);
        }
-      else if (strcmp((char*)cur->name, "stretch-y") == 0)
+      else if (XMLhelper::equal_str(cur->name, "stretch-y"))
        {
          stretch_y = XMLhelper::parse_float(doc, cur);
        }
-      else if (strcmp((char*)cur->name, "position") == 0)
+      else if (XMLhelper::equal_str(cur->name, "position"))
        {
          pos = XMLhelper::parse_vector(doc, cur);  
        }

Index: thunderstorm_background_data.cxx
===================================================================
RCS file: 
/usr/local/cvsroot/Games/Pingus/src/backgrounds/thunderstorm_background_data.cxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- thunderstorm_background_data.cxx    23 Aug 2002 15:49:54 -0000      1.5
+++ thunderstorm_background_data.cxx    10 Sep 2002 21:03:32 -0000      1.6
@@ -37,14 +37,14 @@
 ThunderstormBackgroundData::ThunderstormBackgroundData (xmlDocPtr doc, 
xmlNodePtr cur)
 {
   cur = cur->children; 
-  while (cur != NULL)
+  while (cur)
     {
       if (xmlIsBlankNode(cur)) {
        cur = cur->next;
        continue;
       }
 
-      if (strcmp ((char*) cur->name, "position") == 0) {
+      if (XMLhelper::equal_str(cur->name, "position")) {
        pos = XMLhelper::parse_vector (doc, cur);
       } else {
        std::cout << "ThunderstormBackgroundData::create(xmlDocPtr doc, 
xmlNodePtr cur) error" << std::endl;





reply via email to

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