[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pingus-CVS] CVS: Games/Pingus/src Makefile.am,1.97,1.98 prefab.cxx,1.1,
From: |
grumbel |
Subject: |
[Pingus-CVS] CVS: Games/Pingus/src Makefile.am,1.97,1.98 prefab.cxx,1.1,1.2 prefab.hxx,1.1,1.2 |
Date: |
15 Sep 2002 16:49:22 -0000 |
Update of /usr/local/cvsroot/Games/Pingus/src
In directory dark:/tmp/cvs-serv12597/src
Modified Files:
Makefile.am prefab.cxx prefab.hxx
Log Message:
hooked up the prefab stuff into the makefiles
Index: Makefile.am
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/Makefile.am,v
retrieving revision 1.97
retrieving revision 1.98
diff -u -d -r1.97 -r1.98
--- Makefile.am 6 Sep 2002 17:33:29 -0000 1.97
+++ Makefile.am 15 Sep 2002 16:49:20 -0000 1.98
@@ -267,7 +267,8 @@
plt_parser.hxx \
plt_xml.cxx \
plt_xml.hxx \
-prefab_data.hxx \
+prefab.cxx \
+prefab.hxx \
psm_parser.cxx \
psm_parser.hxx \
range.cxx \
Index: prefab.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/prefab.cxx,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- prefab.cxx 15 Sep 2002 15:30:21 -0000 1.1
+++ prefab.cxx 15 Sep 2002 16:49:20 -0000 1.2
@@ -17,9 +17,11 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#include <iostream>
+#include "xml_helper.hxx"
#include "prefab.hxx"
-
-namespace EditorNS {
+#include "worldobj_group_data.hxx"
+#include "path_manager.hxx"
Prefab::Prefab (const std::string& filename)
{
@@ -30,9 +32,9 @@
{
xmlNodePtr cur = doc->ROOT;
WorldObjGroupData* group = new WorldObjGroupData (doc, cur);
- const EditorObjLst& temp = group->create_EditorObj ();
- editor_objs.insert(editor_objs.end(),temp.begin(), temp.end());
- delete group;
+ //const EditorObjLst& temp = group->create_EditorObj ();
+ //editor_objs.insert(editor_objs.end(),temp.begin(), temp.end());
+ //delete group;
}
else
{
@@ -40,26 +42,10 @@
}
}
-EditorObj*
-Prefab::create (const std::string& filename)
+Prefab*
+Prefab::create (const std::string& uid)
{
- std::cout << "Prefab::create: " << filename << std::endl;
- xmlDocPtr doc = xmlParseFile(filename.c_str ());
-
- if (doc)
- {
- xmlNodePtr cur = doc->ROOT;
- WorldObjGroupData* group = new WorldObjGroupData (doc, cur);
- const EditorObjLst& temp = group->create_EditorObj ();
- editor_objs.insert(editor_objs.end(),temp.begin(), temp.end());
- delete group;
- }
- else
- {
- std::cout << "ObjectManager::add_prefab_from_file: read error: " <<
filename << std::endl;
- }
+ return new Prefab (path_manager.complete ("prefab/") + uid);
}
-
-} // namespace EditorNS
/* EOF */
Index: prefab.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/prefab.hxx,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- prefab.hxx 15 Sep 2002 15:30:21 -0000 1.1
+++ prefab.hxx 15 Sep 2002 16:49:20 -0000 1.2
@@ -17,10 +17,12 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#ifndef HEADER_PREFAB_HXX
-#define HEADER_PREFAB_HXX
+#ifndef HEADER_PINGUS_PREFAB_HXX
+#define HEADER_PINGUS_PREFAB_HXX
-namespace EditorNS {
+#include <string>
+
+class WorldObjData;
/** The prefab class represents a prefab description file. The prefab
file consist of a black of meta data (author, description, name,
@@ -63,8 +65,6 @@
Prefab (const Prefab&);
Prefab operator= (const Prefab&);
};
-
-} // namespace EditorNS
#endif
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pingus-CVS] CVS: Games/Pingus/src Makefile.am,1.97,1.98 prefab.cxx,1.1,1.2 prefab.hxx,1.1,1.2,
grumbel <=
- Prev by Date:
[Pingus-CVS] CVS: Games/Pingus/data/prefabs test.xml,1.1,1.2
- Next by Date:
[Pingus-CVS] CVS: Games/Pingus/src/worldobjsdata Makefile.am,1.6,1.7 prefab_obj_data.cxx,1.1,1.2 prefab_obj_data.hxx,1.1,1.2
- Previous by thread:
[Pingus-CVS] CVS: Games/Pingus/data/prefabs test.xml,1.1,1.2
- Next by thread:
[Pingus-CVS] CVS: Games/Pingus/src/worldobjsdata Makefile.am,1.6,1.7 prefab_obj_data.cxx,1.1,1.2 prefab_obj_data.hxx,1.1,1.2
- Index(es):