[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pingus-CVS] CVS: Games/Pingus/src/worldobjsdata conveyor_belt_data.cxx,
From: |
torangan |
Subject: |
[Pingus-CVS] CVS: Games/Pingus/src/worldobjsdata conveyor_belt_data.cxx,NONE,1.1 conveyor_belt_data.hxx,NONE,1.1 ice_block_data.cxx,NONE,1.1 ice_block_data.hxx,NONE,1.1 Makefile.am,1.4,1.5 guillotine_data.cxx,1.4,1.5 info_box_data.cxx,1.1,1.2 switch_door_data.cxx,1.1,1.2 |
Date: |
14 Sep 2002 19:06:37 -0000 |
Update of /usr/local/cvsroot/Games/Pingus/src/worldobjsdata
In directory dark:/tmp/cvs-serv10275/worldobjsdata
Modified Files:
Makefile.am guillotine_data.cxx info_box_data.cxx
switch_door_data.cxx
Added Files:
conveyor_belt_data.cxx conveyor_belt_data.hxx
ice_block_data.cxx ice_block_data.hxx
Log Message:
- splitted IceBlock / ConveyorBelt
- removed unrequired includes (ignoring system headers)
--- NEW FILE: conveyor_belt_data.cxx ---
// $Id: conveyor_belt_data.cxx,v 1.1 2002/09/14 19:06:34 torangan Exp $
//
// Pingus - A free Lemmings clone
// Copyright (C) 2000 Ingo Ruhnke <address@hidden>
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <fstream>
#include "../pingus_resource.hxx"
#include "../xml_helper.hxx"
#include "../editorobjs/conveyor_belt_obj.hxx"
#include "../worldobjs/conveyor_belt.hxx"
#include "conveyor_belt_data.hxx"
namespace WorldObjsData {
ConveyorBeltData::ConveyorBeltData ()
: left_sur (PingusResource::load_surface ("conveyorbelt_left",
"worldobjs")),
right_sur (PingusResource::load_surface ("conveyorbelt_right",
"worldobjs")),
middle_sur(PingusResource::load_surface ("conveyorbelt_middle",
"worldobjs")),
width(5),
speed(2),
counter(0)
{
}
ConveyorBeltData::ConveyorBeltData (xmlDocPtr doc, xmlNodePtr cur)
{
cur = cur->children;
while (cur)
{
if (xmlIsBlankNode(cur))
{
cur = cur->next;
continue;
}
else if (XMLhelper::equal_str(cur->name, "position"))
{
pos = XMLhelper::parse_vector(doc, cur);
}
else if (XMLhelper::equal_str(cur->name, "width"))
{
width = XMLhelper::parse_int(doc, cur);
}
else if (XMLhelper::equal_str(cur->name, "speed"))
{
speed = XMLhelper::parse_int(doc, cur);
}
else
std::cout << "ConveyorBeltData::create (): Unhandled " << cur->name <<
std::endl;
cur = cur->next;
}
}
ConveyorBeltData::ConveyorBeltData (const ConveyorBeltData& old) :
WorldObjData(old),
pos(old.pos),
left_sur(old.left_sur),
right_sur(old.right_sur),
middle_sur(old.middle_sur),
width(old.width),
speed(old.speed),
counter(old.counter)
{
}
/** Writte the content of this object formated as xml to the given
stream */
void
ConveyorBeltData::write_xml (std::ostream& xml)
{
xml << " <worldobj type=\"conveyorbelt\">";
XMLhelper::write_vector_xml (xml, pos);
xml << " <width>" << width << "</width>\n"
<< " <speed>" << speed << "</speed>\n"
<< " </worldobj>\n" << std::endl;
}
WorldObj*
ConveyorBeltData::create_WorldObj ()
{
return new WorldObjs::ConveyorBelt(this);
}
EditorObjLst
ConveyorBeltData::create_EditorObj ()
{
return EditorObjLst(1, new EditorObjs::ConveyorBeltObj(this));
}
} // namespace WorldObjsData
/* EOF */
--- NEW FILE: conveyor_belt_data.hxx ---
// $Id: conveyor_belt_data.hxx,v 1.1 2002/09/14 19:06:35 torangan Exp $
//
// Pingus - A free Lemmings clone
// Copyright (C) 2000 Ingo Ruhnke <address@hidden>
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// 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_PINGUS_WORLDOBJSDATA_CONVEYOR_BELT_DATA_HXX
#define HEADER_PINGUS_WORLDOBJSDATA_CONVEYOR_BELT_DATA_HXX
#include <ClanLib/Core/Math/cl_vector.h>
#include <ClanLib/Display/Display/surface.h>
#include "../libxmlfwd.hxx"
#include "../worldobj_data.hxx"
namespace WorldObjsData {
class ConveyorBeltData : public WorldObjData
{
public:
CL_Vector pos;
CL_Surface left_sur;
CL_Surface right_sur;
CL_Surface middle_sur;
int width;
double speed;
float counter;
ConveyorBeltData ();
ConveyorBeltData (const ConveyorBeltData& old);
ConveyorBeltData (xmlDocPtr doc, xmlNodePtr cur);
/** Write the content of this object formatted as xml to the given
stream */
void write_xml (std::ostream& xml);
/** Create an WorldObj from the given data object */
WorldObj* create_WorldObj ();
/** Create an EditorObj from the given data object */
EditorObjLst create_EditorObj ();
private:
ConveyorBeltData operator= (const ConveyorBeltData&);
};
} // namespace WorldObjsData
#endif
/* EOF */
--- NEW FILE: ice_block_data.cxx ---
// $Id: ice_block_data.cxx,v 1.1 2002/09/14 19:06:35 torangan Exp $
//
// Pingus - A free Lemmings clone
// Copyright (C) 2000 Ingo Ruhnke <address@hidden>
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <fstream>
#include "../pingus_resource.hxx"
#include "../xml_helper.hxx"
#include "../editorobjs/ice_block_obj.hxx"
#include "../worldobjs/ice_block.hxx"
#include "ice_block_data.hxx"
namespace WorldObjsData {
IceBlockData::IceBlockData () : block_sur(PingusResource::load_surface
("iceblock", "worldobjs")),
width(1)
{
}
IceBlockData::IceBlockData (const IceBlockData& old) : WorldObjData(old),
pos(old.pos),
block_sur(old.block_sur),
width(old.width)
{
}
IceBlockData::IceBlockData (xmlDocPtr doc, xmlNodePtr cur)
{
cur = cur->children;
while (cur)
{
if (xmlIsBlankNode(cur))
{
cur = cur->next;
continue;
}
else if (XMLhelper::equal_str(cur->name, "position"))
{
pos = XMLhelper::parse_vector (doc, cur);
}
else if (XMLhelper::equal_str(cur->name, "width"))
{
width = XMLhelper::parse_int (doc, cur);
}
else
std::cout << "IceBlockData::creata (): Unhandled " << cur->name <<
std::endl;
cur = cur->next;
}
}
void
IceBlockData::write_xml (std::ostream& xml)
{
xml << " <worldobj type=\"iceblock\">";
XMLhelper::write_vector_xml (xml, pos);
xml << " <width>" << width << "</width>\n"
<< " </worldobj>\n" << std::endl;
}
WorldObj*
IceBlockData::create_WorldObj ()
{
return new WorldObjs::IceBlock(this);
}
EditorObjLst
IceBlockData::create_EditorObj ()
{
return EditorObjLst(1, new EditorObjs::IceBlockObj(this));
}
} // namespace WorldObjsData
/* EOF */
--- NEW FILE: ice_block_data.hxx ---
// $Id: ice_block_data.hxx,v 1.1 2002/09/14 19:06:35 torangan Exp $
//
// Pingus - A free Lemmings clone
// Copyright (C) 2000 Ingo Ruhnke <address@hidden>
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// 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_PINGUS_WORLDOBJSDATA_ICE_BLOCK_DATA_HXX
#define HEADER_PINGUS_WORLDOBJSDATA_ICE_BLOCK_DATA_HXX
#include <ClanLib/Core/Math/cl_vector.h>
#include <ClanLib/Display/Display/surface.h>
#include "../libxmlfwd.hxx"
#include "../worldobj_data.hxx"
namespace WorldObjsData {
class IceBlockData : public WorldObjData
{
public:
/// The upper/left position of the iceblock's
CL_Vector pos;
CL_Surface block_sur;
/** The number of iceblocks, only complete blocks are supported */
int width;
IceBlockData ();
IceBlockData (const IceBlockData& old);
IceBlockData (xmlDocPtr doc, xmlNodePtr cur);
/** Write the content of this object formatted as xml to the given
stream */
void write_xml (std::ostream& xml);
/** Create an WorldObj from the given data object */
WorldObj* create_WorldObj ();
/** Create an EditorObj from the given data object */
EditorObjLst create_EditorObj ();
private:
IceBlockData operator= (const IceBlockData&);
};
} // namespace WorldObjsData
#endif
/* EOF */
Index: Makefile.am
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldobjsdata/Makefile.am,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- Makefile.am 14 Sep 2002 13:35:38 -0000 1.4
+++ Makefile.am 14 Sep 2002 19:06:34 -0000 1.5
@@ -18,15 +18,17 @@
noinst_LIBRARIES = libpingus_worldobjsdata.a
libpingus_worldobjsdata_a_SOURCES = \
- bumper_data.cxx bumper_data.hxx \
- fake_exit_data.cxx fake_exit_data.hxx \
- guillotine_data.cxx guillotine_data.hxx \
- hammer_data.cxx hammer_data.hxx \
- info_box_data.cxx info_box_data.hxx \
- laser_exit_data.cxx laser_exit_data.hxx \
- smasher_data.cxx smasher_data.hxx \
- spike_data.cxx spike_data.hxx \
- switch_door_data.cxx switch_door_data.hxx \
- teleporter_data.cxx teleporter_data.hxx
+ bumper_data.cxx bumper_data.hxx \
+ conveyor_belt_data.cxx conveyor_belt_data.hxx \
+ fake_exit_data.cxx fake_exit_data.hxx \
+ guillotine_data.cxx guillotine_data.hxx \
+ hammer_data.cxx hammer_data.hxx \
+ ice_block_data.cxx ice_block_data.hxx \
+ info_box_data.cxx info_box_data.hxx \
+ laser_exit_data.cxx laser_exit_data.hxx \
+ smasher_data.cxx smasher_data.hxx \
+ spike_data.cxx spike_data.hxx \
+ switch_door_data.cxx switch_door_data.hxx \
+ teleporter_data.cxx teleporter_data.hxx
# EOF #
Index: guillotine_data.cxx
===================================================================
RCS file:
/usr/local/cvsroot/Games/Pingus/src/worldobjsdata/guillotine_data.cxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- guillotine_data.cxx 10 Sep 2002 21:03:33 -0000 1.4
+++ guillotine_data.cxx 14 Sep 2002 19:06:35 -0000 1.5
@@ -18,13 +18,12 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <fstream>
+#include <iostream>
#include "guillotine_data.hxx"
#include "../xml_helper.hxx"
#include "../editorobjs/guillotine_obj.hxx"
#include "../worldobjs/guillotine.hxx"
#include "../pingus_resource.hxx"
-
-#include <iostream>
namespace WorldObjsData {
Index: info_box_data.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldobjsdata/info_box_data.cxx,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- info_box_data.cxx 14 Sep 2002 13:35:38 -0000 1.1
+++ info_box_data.cxx 14 Sep 2002 19:06:35 -0000 1.2
@@ -18,7 +18,6 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <fstream>
-#include <ClanLib/Display/Font/font.h>
#include "../pingus_resource.hxx"
#include "../xml_helper.hxx"
#include "../editorobjs/info_box_obj.hxx"
Index: switch_door_data.cxx
===================================================================
RCS file:
/usr/local/cvsroot/Games/Pingus/src/worldobjsdata/switch_door_data.cxx,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- switch_door_data.cxx 11 Sep 2002 15:27:19 -0000 1.1
+++ switch_door_data.cxx 14 Sep 2002 19:06:35 -0000 1.2
@@ -21,7 +21,6 @@
#include "../pingus_resource.hxx"
#include "../xml_helper.hxx"
#include "../editorobjs/switch_door_obj.hxx"
-#include "../editorobjs/switch_door_switch_obj.hxx"
#include "../worldobjs/switch_door.hxx"
#include "switch_door_data.hxx"
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pingus-CVS] CVS: Games/Pingus/src/worldobjsdata conveyor_belt_data.cxx,NONE,1.1 conveyor_belt_data.hxx,NONE,1.1 ice_block_data.cxx,NONE,1.1 ice_block_data.hxx,NONE,1.1 Makefile.am,1.4,1.5 guillotine_data.cxx,1.4,1.5 info_box_data.cxx,1.1,1.2 switch_door_data.cxx,1.1,1.2,
torangan <=
- Prev by Date:
[Pingus-CVS] CVS: Games/Pingus/src/editorobjs conveyor_belt_obj.cxx,NONE,1.1 conveyor_belt_obj.hxx,NONE,1.1 ice_block_obj.cxx,NONE,1.1 ice_block_obj.hxx,NONE,1.1 Makefile.am,1.4,1.5 info_box_obj.cxx,1.1,1.2 info_box_obj.hxx,1.1,1.2 switch_door_obj.cxx,1.1,1.2 switch_door_obj.hxx,1.1,1.2 switch_door_switch_obj.hxx,1.1,1.2 teleporter_obj.cxx,1.4,1.5 teleporter_obj.hxx,1.4,1.5
- Next by Date:
[Pingus-CVS] CVS: Games/Pingus/src/worldobjs bumper.cxx,1.3,1.4 conveyor_belt.cxx,1.12,1.13 conveyor_belt.hxx,1.9,1.10 fake_exit.cxx,1.3,1.4 guillotine.cxx,1.3,1.4 hammer.cxx,1.3,1.4 hammer.hxx,1.3,1.4 ice_block.cxx,1.12,1.13 ice_block.hxx,1.8,1.9 info_box.cxx,1.12,1.13 info_box.hxx,1.10,1.11 laser_exit.cxx,1.4,1.5 smasher.cxx,1.3,1.4 spike.cxx,1.3,1.4 switch_door.cxx,1.14,1.15 switch_door.hxx,1.11,1.12 teleporter.cxx,1.9,1.10 teleporter.hxx,1.12,1.13
- Previous by thread:
[Pingus-CVS] CVS: Games/Pingus/src/editorobjs conveyor_belt_obj.cxx,NONE,1.1 conveyor_belt_obj.hxx,NONE,1.1 ice_block_obj.cxx,NONE,1.1 ice_block_obj.hxx,NONE,1.1 Makefile.am,1.4,1.5 info_box_obj.cxx,1.1,1.2 info_box_obj.hxx,1.1,1.2 switch_door_obj.cxx,1.1,1.2 switch_door_obj.hxx,1.1,1.2 switch_door_switch_obj.hxx,1.1,1.2 teleporter_obj.cxx,1.4,1.5 teleporter_obj.hxx,1.4,1.5
- Next by thread:
[Pingus-CVS] CVS: Games/Pingus/src/worldobjs bumper.cxx,1.3,1.4 conveyor_belt.cxx,1.12,1.13 conveyor_belt.hxx,1.9,1.10 fake_exit.cxx,1.3,1.4 guillotine.cxx,1.3,1.4 hammer.cxx,1.3,1.4 hammer.hxx,1.3,1.4 ice_block.cxx,1.12,1.13 ice_block.hxx,1.8,1.9 info_box.cxx,1.12,1.13 info_box.hxx,1.10,1.11 laser_exit.cxx,1.4,1.5 smasher.cxx,1.3,1.4 spike.cxx,1.3,1.4 switch_door.cxx,1.14,1.15 switch_door.hxx,1.11,1.12 teleporter.cxx,1.9,1.10 teleporter.hxx,1.12,1.13
- Index(es):