[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pingus-CVS] CVS: Games/Pingus/src/worldobjsdata smasher_data.cxx,1.1,1.
From: |
grumbel |
Subject: |
[Pingus-CVS] CVS: Games/Pingus/src/worldobjsdata smasher_data.cxx,1.1,1.2 |
Date: |
10 Sep 2002 14:33:10 -0000 |
Update of /usr/local/cvsroot/Games/Pingus/src/worldobjsdata
In directory dark:/tmp/cvs-serv25283/worldobjsdata
Modified Files:
smasher_data.cxx
Log Message:
well, not a nice fix for the SpriteObj reference problem, but a working one.
a better solution might be to sync the position data of spriteobj and the
editorobj on a write call, since its not needed before
Index: smasher_data.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldobjsdata/smasher_data.cxx,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- smasher_data.cxx 4 Sep 2002 14:55:13 -0000 1.1
+++ smasher_data.cxx 10 Sep 2002 14:33:08 -0000 1.2
@@ -26,52 +26,52 @@
namespace WorldObjsData {
- SmasherData::SmasherData ()
- {
- }
+SmasherData::SmasherData ()
+{
+}
- SmasherData::SmasherData (xmlDocPtr doc, xmlNodePtr cur) :
surface(PingusResource::load_surface("Traps/smasher", "traps"))
- {
- cur = cur->children;
- while (cur)
- {
- XMLhelper::skip_blank(cur);
+SmasherData::SmasherData (xmlDocPtr doc, xmlNodePtr cur) :
surface(PingusResource::load_surface("Traps/smasher", "traps"))
+{
+ cur = cur->children;
+ while (cur)
+ {
+ XMLhelper::skip_blank(cur);
- if (strcmp(reinterpret_cast<const char*>(cur->name), "position") == 0)
- {
- pos = XMLhelper::parse_vector(doc, cur);
- }
+ if (strcmp(reinterpret_cast<const char*>(cur->name), "position") == 0)
+ {
+ pos = XMLhelper::parse_vector(doc, cur);
+ }
- cur = cur->next;
- }
- }
-
- SmasherData::SmasherData (const SmasherData& old) : WorldObjData(old),
- surface(old.surface),
- pos(old.pos)
- {
- }
+ cur = cur->next;
+ }
+}
- void
- SmasherData::write_xml (std::ostream& xml)
- {
- xml << "<worldobj name=\"smasher\">\n\t";
- XMLhelper::write_vector_xml(xml, pos);
- xml << "</worldobj>\n\n";
- }
+SmasherData::SmasherData (const SmasherData& old) : WorldObjData(old),
+ surface(old.surface),
+ pos(old.pos)
+{
+}
- WorldObj*
- SmasherData::create_WorldObj ()
- {
- return new WorldObjs::Smasher(this);
- }
+void
+SmasherData::write_xml (std::ostream& xml)
+{
+ xml << "<worldobj name=\"smasher\">\n\t";
+ XMLhelper::write_vector_xml(xml, pos);
+ xml << "</worldobj>\n\n";
+}
- EditorObjLst
- SmasherData::create_EditorObj ()
- {
- return EditorObjLst(1, new EditorObjs::SmasherObj(this));
- }
+WorldObj*
+SmasherData::create_WorldObj ()
+{
+ return new WorldObjs::Smasher(this);
+}
+EditorObjLst
+SmasherData::create_EditorObj ()
+{
+ return EditorObjLst(1, new EditorObjs::SmasherObj(*this));
}
+
+} // namespace WorldObjsData
/* EOF */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pingus-CVS] CVS: Games/Pingus/src/worldobjsdata smasher_data.cxx,1.1,1.2,
grumbel <=
- Prev by Date:
[Pingus-CVS] CVS: Games/Pingus/src editor_hotspot.hxx,1.6,1.7
- Next by Date:
[Pingus-CVS] CVS: Games/Pingus/src/editorobjs bumper_obj.cxx,1.4,1.5 fake_exit_obj.cxx,1.5,1.6 guillotine_obj.cxx,1.4,1.5 hammer_obj.cxx,1.4,1.5 laser_exit_obj.cxx,1.4,1.5 smasher_obj.cxx,1.4,1.5 smasher_obj.hxx,1.3,1.4 spike_obj.cxx,1.4,1.5 teleporter_obj.cxx,1.2,1.3 teleporter_target_obj.cxx,1.1,1.2
- Previous by thread:
[Pingus-CVS] CVS: Games/Pingus/src editor_hotspot.hxx,1.6,1.7
- Next by thread:
[Pingus-CVS] CVS: Games/Pingus/src/editorobjs bumper_obj.cxx,1.4,1.5 fake_exit_obj.cxx,1.5,1.6 guillotine_obj.cxx,1.4,1.5 hammer_obj.cxx,1.4,1.5 laser_exit_obj.cxx,1.4,1.5 smasher_obj.cxx,1.4,1.5 smasher_obj.hxx,1.3,1.4 spike_obj.cxx,1.4,1.5 teleporter_obj.cxx,1.2,1.3 teleporter_target_obj.cxx,1.1,1.2
- Index(es):