[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pingus-CVS] CVS: Games/Pingus/src/worldobjsdata bumper_data.cxx,NONE,1.
From: |
torangan |
Subject: |
[Pingus-CVS] CVS: Games/Pingus/src/worldobjsdata bumper_data.cxx,NONE,1.1 bumper_data.hxx,NONE,1.1 fake_exit_data.cxx,NONE,1.1 fake_exit_data.hxx,NONE,1.1 guillotine_data.cxx,NONE,1.1 guillotine_data.hxx,NONE,1.1 hammer_data.cxx,NONE,1.1 hammer_data.hxx,NONE,1.1 laser_exit_data.cxx,NONE,1.1 laser_exit_data.hxx,NONE,1.1 smasher_data.cxx,NONE,1.1 smasher_data.hxx,NONE,1.1 spike_data.cxx,NONE,1.1 spike_data.hxx,NONE,1.1 |
Date: |
4 Sep 2002 14:55:15 -0000 |
Update of /usr/local/cvsroot/Games/Pingus/src/worldobjsdata
In directory dark:/tmp/cvs-serv11465/worldobjsdata
Added Files:
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 laser_exit_data.cxx
laser_exit_data.hxx smasher_data.cxx smasher_data.hxx
spike_data.cxx spike_data.hxx
Log Message:
- removed traps
- various cleanup
--- NEW FILE: bumper_data.cxx ---
// $Id: bumper_data.cxx,v 1.1 2002/09/04 14:55:13 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 "bumper_data.hxx"
#include "../xml_helper.hxx"
#include "../editorobjs/bumper_obj.hxx"
#include "../worldobjs/bumper.hxx"
#include "../pingus_resource.hxx"
namespace WorldObjsData {
BumperData::BumperData ()
{
}
BumperData::BumperData (xmlDocPtr doc, xmlNodePtr cur) :
surface(PingusResource::load_surface("Traps/bumper", "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);
}
cur = cur->next;
}
}
BumperData::BumperData (const BumperData& old) : WorldObjData(old),
surface(old.surface),
pos(old.pos)
{
}
void
BumperData::write_xml (std::ostream& xml)
{
xml << "<worldobj name=\"bumper\">\n\t";
XMLhelper::write_vector_xml(xml, pos);
xml << "</worldobj>\n\n";
}
WorldObj*
BumperData::create_WorldObj ()
{
return new WorldObjs::Bumper(this);
}
EditorObjLst
BumperData::create_EditorObj ()
{
return EditorObjLst(1, new EditorObjs::BumperObj(this));
}
}
/* EOF */
--- NEW FILE: bumper_data.hxx ---
// $Id: bumper_data.hxx,v 1.1 2002/09/04 14:55:13 torangan Exp $
//
// Pingus - A free Lemmings clone
// Copyright (C) 1999 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_BUMPER_DATA_HXX
#define HEADER_PINGUS_WORLDOBJSDATA_BUMPER_DATA_HXX
#include <ClanLib/Core/Math/cl_vector.h>
#include <ClanLib/Display/Display/surface.h>
#include "../worldobj_data.hxx"
#include "../libxmlfwd.hxx"
namespace WorldObjsData {
class BumperData : public WorldObjData {
public:
CL_Surface surface;
CL_Vector pos;
public:
BumperData ();
BumperData (xmlDocPtr doc, xmlNodePtr node);
BumperData (const BumperData& old);
void write_xml (std::ostream& xml);
WorldObj* create_WorldObj ();
EditorObjLst create_EditorObj ();
private:
BumperData operator= (const BumperData&);
};
}
#endif
/* EOF */
--- NEW FILE: fake_exit_data.cxx ---
// $Id: fake_exit_data.cxx,v 1.1 2002/09/04 14:55:13 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 "fake_exit_data.hxx"
#include "../xml_helper.hxx"
#include "../editorobjs/fake_exit_obj.hxx"
#include "../worldobjs/fake_exit.hxx"
#include "../pingus_resource.hxx"
namespace WorldObjsData {
FakeExitData::FakeExitData ()
{
}
FakeExitData::FakeExitData (xmlDocPtr doc, xmlNodePtr cur) :
surface(PingusResource::load_surface("Traps/fake_exit", "traps"))
{
cur = cur->children;
while (cur)
{
XMLhelper::skip_blank(cur);
if (! strcmp(reinterpret_cast<const char*>(cur->name), "position"))
{
pos = XMLhelper::parse_vector(doc, cur);
}
cur = cur->next;
}
}
FakeExitData::FakeExitData (const FakeExitData& old) : WorldObjData(old),
surface(old.surface),
pos(old.pos)
{
}
void
FakeExitData::write_xml (std::ostream& xml)
{
xml << "<worldobj name=\"fake_exit\">\n\t";
XMLhelper::write_vector_xml(xml, pos);
xml << "</worldobj>\n\n";
}
WorldObj*
FakeExitData::create_WorldObj ()
{
return new WorldObjs::FakeExit(this);
}
EditorObjLst
FakeExitData::create_EditorObj ()
{
return EditorObjLst(1, new EditorObjs::FakeExitObj(this));
}
}
/* EOF */
--- NEW FILE: fake_exit_data.hxx ---
// $Id: fake_exit_data.hxx,v 1.1 2002/09/04 14:55:13 torangan Exp $
//
// Pingus - A free Lemmings clone
// Copyright (C) 1999 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_FAKE_EXIT_DATA_HXX
#define HEADER_PINGUS_WORLDOBJSDATA_FAKE_EXIT_DATA_HXX
#include <ClanLib/Core/Math/cl_vector.h>
#include <ClanLib/Display/Display/surface.h>
#include "../game_counter.hxx"
#include "../libxmlfwd.hxx"
#include "../worldobj_data.hxx"
namespace WorldObjsData {
class FakeExitData : public WorldObjData {
public:
CL_Surface surface;
CL_Vector pos;
GameCounter counter;
public:
FakeExitData ();
FakeExitData (xmlDocPtr doc, xmlNodePtr node);
FakeExitData (const FakeExitData& old);
void write_xml (std::ostream& xml);
WorldObj* create_WorldObj ();
EditorObjLst create_EditorObj ();
private:
FakeExitData operator= (const FakeExitData&);
};
}
#endif
/* EOF */
--- NEW FILE: guillotine_data.cxx ---
// $Id: guillotine_data.cxx,v 1.1 2002/09/04 14:55:13 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 "guillotine_data.hxx"
#include "../xml_helper.hxx"
#include "../editorobjs/guillotine_obj.hxx"
#include "../worldobjs/guillotine.hxx"
#include "../pingus_resource.hxx"
#include <iostream>
namespace WorldObjsData {
GuillotineData::GuillotineData ()
{
}
GuillotineData::GuillotineData (xmlDocPtr doc, xmlNodePtr cur)
: surface
(PingusResource::load_surface("Traps/guillotinekill", "traps")),
idle_surf(PingusResource::load_surface("Traps/guillotineidle", "traps"))
{
if (cur->name)
std::cout << (const char*)cur->name << std::endl;
cur = cur->children;
while (cur)
{
XMLhelper::skip_blank(cur);
if (! strcmp(reinterpret_cast<const char*>(cur->name), "position"))
{
pos = XMLhelper::parse_vector(doc, cur);
}
else
std::cout << (const char*)cur->name << std::endl;
cur = cur->next;
}
}
GuillotineData::GuillotineData (const GuillotineData& old) :
WorldObjData(old),
surface(old.surface),
idle_surf(old.idle_surf),
pos(old.pos)
{
}
void
GuillotineData::write_xml (std::ostream& xml)
{
xml << "<worldobj name=\"guillotine\">\n\t";
XMLhelper::write_vector_xml(xml, pos);
xml << "</worldobj>\n\n";
}
WorldObj*
GuillotineData::create_WorldObj ()
{
return new WorldObjs::Guillotine(this);
}
EditorObjLst
GuillotineData::create_EditorObj ()
{
return EditorObjLst(1, new EditorObjs::GuillotineObj(this));
}
}
/* EOF */
--- NEW FILE: guillotine_data.hxx ---
// $Id: guillotine_data.hxx,v 1.1 2002/09/04 14:55:13 torangan Exp $
//
// Pingus - A free Lemmings clone
// Copyright (C) 1999 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_GUILLOTINE_DATA_HXX
#define HEADER_PINGUS_WORLDOBJSDATA_GUILLOTINE_DATA_HXX
#include <ClanLib/Core/Math/cl_vector.h>
#include <ClanLib/Display/Display/surface.h>
#include "../direction.hxx"
#include "../game_counter.hxx"
#include "../libxmlfwd.hxx"
#include "../worldobj_data.hxx"
namespace WorldObjsData {
class GuillotineData : public WorldObjData {
public:
CL_Surface surface;
CL_Surface idle_surf;
CL_Vector pos;
Direction direction;
GameCounter counter;
GameCounter idle_counter;
public:
GuillotineData ();
GuillotineData (xmlDocPtr doc, xmlNodePtr node);
GuillotineData (const GuillotineData& old);
void write_xml (std::ostream& xml);
WorldObj* create_WorldObj ();
EditorObjLst create_EditorObj ();
private:
GuillotineData operator= (const GuillotineData&);
};
}
#endif
/* EOF */
--- NEW FILE: hammer_data.cxx ---
// $Id: hammer_data.cxx,v 1.1 2002/09/04 14:55:13 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 "hammer_data.hxx"
#include "../xml_helper.hxx"
#include "../editorobjs/hammer_obj.hxx"
#include "../worldobjs/hammer.hxx"
#include "../pingus_resource.hxx"
namespace WorldObjsData {
HammerData::HammerData ()
{
}
HammerData::HammerData (xmlDocPtr doc, xmlNodePtr cur) :
surface(PingusResource::load_surface("Traps/hammer", "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);
}
cur = cur->next;
}
}
HammerData::HammerData (const HammerData& old) : WorldObjData(old),
surface(old.surface),
pos(old.pos)
{
}
void
HammerData::write_xml (std::ostream& xml)
{
xml << "<worldobj name=\"hammer\">\n\t";
XMLhelper::write_vector_xml(xml, pos);
xml << "</worldobj>\n\n";
}
WorldObj*
HammerData::create_WorldObj ()
{
return new WorldObjs::Hammer(this);
}
EditorObjLst
HammerData::create_EditorObj ()
{
return EditorObjLst(1, new EditorObjs::HammerObj(this));
}
}
/* EOF */
--- NEW FILE: hammer_data.hxx ---
// $Id: hammer_data.hxx,v 1.1 2002/09/04 14:55:13 torangan Exp $
//
// Pingus - A free Lemmings clone
// Copyright (C) 1999 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_HAMMER_DATA_HXX
#define HEADER_PINGUS_WORLDOBJSDATA_HAMMER_DATA_HXX
#include <ClanLib/Core/Math/cl_vector.h>
#include <ClanLib/Display/Display/surface.h>
#include "../game_counter.hxx"
#include "../libxmlfwd.hxx"
#include "../worldobj_data.hxx"
namespace WorldObjsData {
class HammerData : public WorldObjData {
public:
CL_Surface surface;
CL_Vector pos;
GameCounter counter;
public:
HammerData ();
HammerData (xmlDocPtr doc, xmlNodePtr node);
HammerData (const HammerData& old);
void write_xml (std::ostream& xml);
WorldObj* create_WorldObj ();
EditorObjLst create_EditorObj ();
private:
HammerData operator= (const HammerData&);
};
}
#endif
/* EOF */
--- NEW FILE: laser_exit_data.cxx ---
// $Id: laser_exit_data.cxx,v 1.1 2002/09/04 14:55:13 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 "laser_exit_data.hxx"
#include "../xml_helper.hxx"
#include "../editorobjs/laser_exit_obj.hxx"
#include "../worldobjs/laser_exit.hxx"
#include "../pingus_resource.hxx"
namespace WorldObjsData {
LaserExitData::LaserExitData ()
{
}
LaserExitData::LaserExitData (xmlDocPtr doc, xmlNodePtr cur) :
surface(PingusResource::load_surface("Traps/laser_exit", "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);
}
cur = cur->next;
}
}
LaserExitData::LaserExitData (const LaserExitData& old) : WorldObjData(old),
surface(old.surface),
pos(old.pos)
{
}
void
LaserExitData::write_xml (std::ostream& xml)
{
xml << "<worldobj name=\"laser_exit\">\n\t";
XMLhelper::write_vector_xml(xml, pos);
xml << "</worldobj>\n\n";
}
WorldObj*
LaserExitData::create_WorldObj ()
{
return new WorldObjs::LaserExit(this);
}
EditorObjLst
LaserExitData::create_EditorObj ()
{
return EditorObjLst(1, new EditorObjs::LaserExitObj(this));
}
}
/* EOF */
--- NEW FILE: laser_exit_data.hxx ---
// $Id: laser_exit_data.hxx,v 1.1 2002/09/04 14:55:13 torangan Exp $
//
// Pingus - A free Lemmings clone
// Copyright (C) 1999 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_LASER_EXIT_DATA_HXX
#define HEADER_PINGUS_WORLDOBJSDATA_LASER_EXIT_DATA_HXX
#include <ClanLib/Core/Math/cl_vector.h>
#include <ClanLib/Display/Display/surface.h>
#include "../game_counter.hxx"
#include "../libxmlfwd.hxx"
#include "../worldobj_data.hxx"
namespace WorldObjsData {
class LaserExitData : public WorldObjData {
public:
CL_Surface surface;
CL_Vector pos;
GameCounter counter;
public:
LaserExitData ();
LaserExitData (xmlDocPtr doc, xmlNodePtr node);
LaserExitData (const LaserExitData& old);
void write_xml (std::ostream& xml);
WorldObj* create_WorldObj ();
EditorObjLst create_EditorObj ();
private:
LaserExitData operator= (const LaserExitData&);
};
}
#endif
/* EOF */
--- NEW FILE: smasher_data.cxx ---
// $Id: smasher_data.cxx,v 1.1 2002/09/04 14:55:13 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 "smasher_data.hxx"
#include "../xml_helper.hxx"
#include "../editorobjs/smasher_obj.hxx"
#include "../worldobjs/smasher.hxx"
#include "../pingus_resource.hxx"
namespace WorldObjsData {
SmasherData::SmasherData ()
{
}
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);
}
cur = cur->next;
}
}
SmasherData::SmasherData (const SmasherData& old) : WorldObjData(old),
surface(old.surface),
pos(old.pos)
{
}
void
SmasherData::write_xml (std::ostream& xml)
{
xml << "<worldobj name=\"smasher\">\n\t";
XMLhelper::write_vector_xml(xml, pos);
xml << "</worldobj>\n\n";
}
WorldObj*
SmasherData::create_WorldObj ()
{
return new WorldObjs::Smasher(this);
}
EditorObjLst
SmasherData::create_EditorObj ()
{
return EditorObjLst(1, new EditorObjs::SmasherObj(this));
}
}
/* EOF */
--- NEW FILE: smasher_data.hxx ---
// $Id: smasher_data.hxx,v 1.1 2002/09/04 14:55:13 torangan Exp $
//
// Pingus - A free Lemmings clone
// Copyright (C) 1999 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_SMASHER_DATA_HXX
#define HEADER_PINGUS_WORLDOBJSDATA_SMASHER_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 SmasherData : public WorldObjData {
public:
CL_Surface surface;
CL_Vector pos;
public:
SmasherData ();
SmasherData (xmlDocPtr doc, xmlNodePtr node);
SmasherData (const SmasherData& old);
void write_xml (std::ostream& xml);
WorldObj* create_WorldObj ();
EditorObjLst create_EditorObj ();
private:
SmasherData operator= (const SmasherData&);
};
}
#endif
/* EOF */
--- NEW FILE: spike_data.cxx ---
// $Id: spike_data.cxx,v 1.1 2002/09/04 14:55:13 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 "spike_data.hxx"
#include "../xml_helper.hxx"
#include "../editorobjs/spike_obj.hxx"
#include "../worldobjs/spike.hxx"
#include "../pingus_resource.hxx"
namespace WorldObjsData {
SpikeData::SpikeData ()
{
}
SpikeData::SpikeData (xmlDocPtr doc, xmlNodePtr cur) :
surface(PingusResource::load_surface("Traps/spike", "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);
}
cur = cur->next;
}
}
SpikeData::SpikeData (const SpikeData& old) : WorldObjData(old),
surface(old.surface),
pos(old.pos)
{
}
void
SpikeData::write_xml (std::ostream& xml)
{
xml << "<worldobj name=\"spike\">\n\t";
XMLhelper::write_vector_xml(xml, pos);
xml << "</worldobj>\n\n";
}
WorldObj*
SpikeData::create_WorldObj ()
{
return new WorldObjs::Spike(this);
}
EditorObjLst
SpikeData::create_EditorObj ()
{
return EditorObjLst(1, new EditorObjs::SpikeObj(this));
}
}
/* EOF */
--- NEW FILE: spike_data.hxx ---
// $Id: spike_data.hxx,v 1.1 2002/09/04 14:55:13 torangan Exp $
//
// Pingus - A free Lemmings clone
// Copyright (C) 1999 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_SPIKE_DATA_HXX
#define HEADER_PINGUS_WORLDOBJSDATA_SPIKE_DATA_HXX
#include <ClanLib/Core/Math/cl_vector.h>
#include <ClanLib/Display/Display/surface.h>
#include "../game_counter.hxx"
#include "../libxmlfwd.hxx"
#include "../worldobj_data.hxx"
namespace WorldObjsData {
class SpikeData : public WorldObjData {
public:
CL_Surface surface;
CL_Vector pos;
GameCounter counter;
public:
SpikeData ();
SpikeData (xmlDocPtr doc, xmlNodePtr node);
SpikeData (const SpikeData& old);
void write_xml (std::ostream& xml);
WorldObj* create_WorldObj ();
EditorObjLst create_EditorObj ();
private:
SpikeData operator= (const SpikeData&);
};
}
#endif
/* EOF */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pingus-CVS] CVS: Games/Pingus/src/worldobjsdata bumper_data.cxx,NONE,1.1 bumper_data.hxx,NONE,1.1 fake_exit_data.cxx,NONE,1.1 fake_exit_data.hxx,NONE,1.1 guillotine_data.cxx,NONE,1.1 guillotine_data.hxx,NONE,1.1 hammer_data.cxx,NONE,1.1 hammer_data.hxx,NONE,1.1 laser_exit_data.cxx,NONE,1.1 laser_exit_data.hxx,NONE,1.1 smasher_data.cxx,NONE,1.1 smasher_data.hxx,NONE,1.1 spike_data.cxx,NONE,1.1 spike_data.hxx,NONE,1.1,
torangan <=
- Prev by Date:
[Pingus-CVS] CVS: Games/Pingus/src/editorobjs Makefile.am,NONE,1.1 bumper_obj.cxx,NONE,1.1 bumper_obj.hxx,NONE,1.1 fake_exit_obj.cxx,NONE,1.1 fake_exit_obj.hxx,NONE,1.1 guillotine_obj.cxx,NONE,1.1 guillotine_obj.hxx,NONE,1.1 hammer_obj.cxx,NONE,1.1 hammer_obj.hxx,NONE,1.1 laser_exit_obj.cxx,NONE,1.1 laser_exit_obj.hxx,NONE,1.1 smasher_obj.cxx,NONE,1.1 smasher_obj.hxx,NONE,1.1 spike_obj.cxx,NONE,1.1 spike_obj.hxx,NONE,1.1
- Next by Date:
[Pingus-CVS] CVS: Games/Pingus/src/actions angel.cxx,1.7,1.8 angel.hxx,1.7,1.8 basher.cxx,1.11,1.12 basher.hxx,1.7,1.8 blocker.cxx,1.5,1.6 boarder.cxx,1.5,1.6 bomber.cxx,1.9,1.10 bridger.cxx,1.11,1.12 climber.cxx,1.7,1.8 digger.cxx,1.9,1.10 drown.cxx,1.4,1.5 exiter.cxx,1.4,1.5 faller.cxx,1.16,1.17 floater.cxx,1.11,1.12 jumper.cxx,1.7,1.8 miner.cxx,1.7,1.8 rocket_launcher.cxx,1.5,1.6 slider.cxx,1.5,1.6 smashed.cxx,1.3,1.4 splashed.cxx,1.4,1.5 superman.cxx,1.3,1.4 waiter.cxx,1.4,1.5 walker.cxx,1.17,1.18
- Previous by thread:
[Pingus-CVS] CVS: Games/Pingus/src/editorobjs Makefile.am,NONE,1.1 bumper_obj.cxx,NONE,1.1 bumper_obj.hxx,NONE,1.1 fake_exit_obj.cxx,NONE,1.1 fake_exit_obj.hxx,NONE,1.1 guillotine_obj.cxx,NONE,1.1 guillotine_obj.hxx,NONE,1.1 hammer_obj.cxx,NONE,1.1 hammer_obj.hxx,NONE,1.1 laser_exit_obj.cxx,NONE,1.1 laser_exit_obj.hxx,NONE,1.1 smasher_obj.cxx,NONE,1.1 smasher_obj.hxx,NONE,1.1 spike_obj.cxx,NONE,1.1 spike_obj.hxx,NONE,1.1
- Next by thread:
[Pingus-CVS] CVS: Games/Pingus/src/actions angel.cxx,1.7,1.8 angel.hxx,1.7,1.8 basher.cxx,1.11,1.12 basher.hxx,1.7,1.8 blocker.cxx,1.5,1.6 boarder.cxx,1.5,1.6 bomber.cxx,1.9,1.10 bridger.cxx,1.11,1.12 climber.cxx,1.7,1.8 digger.cxx,1.9,1.10 drown.cxx,1.4,1.5 exiter.cxx,1.4,1.5 faller.cxx,1.16,1.17 floater.cxx,1.11,1.12 jumper.cxx,1.7,1.8 miner.cxx,1.7,1.8 rocket_launcher.cxx,1.5,1.6 slider.cxx,1.5,1.6 smashed.cxx,1.3,1.4 splashed.cxx,1.4,1.5 superman.cxx,1.3,1.4 waiter.cxx,1.4,1.5 walker.cxx,1.17,1.18
- Index(es):