[Top][All Lists]
[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;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [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,
torangan <=
- Prev by Date:
[Pingus-CVS] CVS: Games/Pingus/src/actions angel.cxx,1.9,1.10 angel.hxx,1.9,1.10 basher.cxx,1.13,1.14 basher.hxx,1.9,1.10 blocker.cxx,1.7,1.8 blocker.hxx,1.8,1.9 boarder.cxx,1.7,1.8 boarder.hxx,1.8,1.9 bomber.cxx,1.11,1.12 bomber.hxx,1.10,1.11 bridger.cxx,1.13,1.14 bridger.hxx,1.10,1.11 climber.cxx,1.9,1.10 climber.hxx,1.7,1.8 digger.cxx,1.11,1.12 digger.hxx,1.7,1.8 drown.cxx,1.6,1.7 drown.hxx,1.7,1.8 exiter.cxx,1.6,1.7 exiter.hxx,1.7,1.8 faller.cxx,1.20,1.21 faller.hxx,1.12,1.13 floater.cxx,1.13,1.14 floater.hxx,1.9,1.10 jumper.cxx,1.9,1.10 jumper.hxx,1.7,1.8 laser_kill.cxx,1.4,1.5 laser_kill.hxx,1.7,1.8 miner.cxx,1.9,1.10 miner.hxx,1.7,1.8 rocket_launcher.cxx,1.7,1.8 rocket_launcher.hxx,1.7,1.8 slider.cxx,1.7,1.8 slider.hxx,1.7,1.8 smashed.cxx,1.5,1.6 smashed.hxx,1.7,1.8 splashed.cxx,1.6,1.7 splashed.hxx,1.7,1.8 superman.cxx,1.5,1.6 superman.hxx,1.8,1.9 teleported.cxx,1.6,1.7 teleported.hxx,1.7,1.8 waiter.cxx,1.6,1.7 waiter.hxx,1.7,1.8 walker.cxx,1.20,1.21 walker.hxx,1.7,1.8
- Next by Date:
[Pingus-CVS] CVS: Games/Pingus/src/worldobjs conveyor_belt.cxx,1.10,1.11 ice_block.cxx,1.11,1.12 info_box.cxx,1.10,1.11 switch_door.cxx,1.11,1.12
- Previous by thread:
[Pingus-CVS] CVS: Games/Pingus/src/actions angel.cxx,1.9,1.10 angel.hxx,1.9,1.10 basher.cxx,1.13,1.14 basher.hxx,1.9,1.10 blocker.cxx,1.7,1.8 blocker.hxx,1.8,1.9 boarder.cxx,1.7,1.8 boarder.hxx,1.8,1.9 bomber.cxx,1.11,1.12 bomber.hxx,1.10,1.11 bridger.cxx,1.13,1.14 bridger.hxx,1.10,1.11 climber.cxx,1.9,1.10 climber.hxx,1.7,1.8 digger.cxx,1.11,1.12 digger.hxx,1.7,1.8 drown.cxx,1.6,1.7 drown.hxx,1.7,1.8 exiter.cxx,1.6,1.7 exiter.hxx,1.7,1.8 faller.cxx,1.20,1.21 faller.hxx,1.12,1.13 floater.cxx,1.13,1.14 floater.hxx,1.9,1.10 jumper.cxx,1.9,1.10 jumper.hxx,1.7,1.8 laser_kill.cxx,1.4,1.5 laser_kill.hxx,1.7,1.8 miner.cxx,1.9,1.10 miner.hxx,1.7,1.8 rocket_launcher.cxx,1.7,1.8 rocket_launcher.hxx,1.7,1.8 slider.cxx,1.7,1.8 slider.hxx,1.7,1.8 smashed.cxx,1.5,1.6 smashed.hxx,1.7,1.8 splashed.cxx,1.6,1.7 splashed.hxx,1.7,1.8 superman.cxx,1.5,1.6 superman.hxx,1.8,1.9 teleported.cxx,1.6,1.7 teleported.hxx,1.7,1.8 waiter.cxx,1.6,1.7 waiter.hxx,1.7,1.8 walker.cxx,1.20,1.21 walker.hxx,1.7,1.8
- Next by thread:
[Pingus-CVS] CVS: Games/Pingus/src/worldobjs conveyor_belt.cxx,1.10,1.11 ice_block.cxx,1.11,1.12 info_box.cxx,1.10,1.11 switch_door.cxx,1.11,1.12
- Index(es):