pingus-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pingus-CVS] CVS: Games/Pingus/src/worldobjs worldobj_group.cxx,NONE,1.1


From: grumbel
Subject: [Pingus-CVS] CVS: Games/Pingus/src/worldobjs worldobj_group.cxx,NONE,1.1 worldobj_group.hxx,NONE,1.1 Makefile.am,1.8,1.9
Date: 15 Sep 2002 20:33:48 -0000

Update of /usr/local/cvsroot/Games/Pingus/src/worldobjs
In directory dark:/tmp/cvs-serv21042/worldobjs

Modified Files:
        Makefile.am 
Added Files:
        worldobj_group.cxx worldobj_group.hxx 
Log Message:
- some more prefab stuff

--- NEW FILE: worldobj_group.cxx ---
//  $Id: worldobj_group.cxx,v 1.1 2002/09/15 20:33:45 grumbel Exp $
//
//  Pingus - A free Lemmings clone
//  Copyright (C) 2002 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 "../graphic_context.hxx"
#include "worldobj_group.hxx"

namespace WorldObj {

WorldObjGroup::WorldObjGroup (WorldObjGroupData* data_)
  : data (data_)
{
}

void
WorldObjGroup::update (float delta)
{
  for (std::vector<WorldObj*>::iterator i = objs.begin (); i != objs.end (); 
++i)
    (*i)->update (delta);
}

void
WorldObjGroup::draw (GraphicContext& gc)
{
  for (std::vector<WorldObj*>::iterator i = objs.begin (); i != objs.end (); 
++i)
    (*i)->draw (gc);  
}

} // namespace WorldObj

/* EOF */

--- NEW FILE: worldobj_group.hxx ---
//  $Id: worldobj_group.hxx,v 1.1 2002/09/15 20:33:45 grumbel Exp $
// 
//  Pingus - A free Lemmings clone
//  Copyright (C) 2002 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_WORLDOBJ_GROUP_HXX
#define HEADER_WORLDOBJ_GROUP_HXX

#include "../worldobj.hxx"
#include "../worldobjsdata/worldobj_group_data.hxx"

namespace WorldObj {

/** */
class WorldObjGroup : public WorldObj
{
private:
  std::vector<WorldObj*> objs;
  WorldObjGroupData* const data;
public:
  WorldObjGroup (WorldObjGroupData* data_);
  
  void update (float delta);
  void draw (GraphicContext& gc);

private:
  WorldObjGroup (const WorldObjGroup&);
  WorldObjGroup operator= (const WorldObjGroup&);
};

} // namespace WorldObj

#endif

/* EOF */

Index: Makefile.am
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldobjs/Makefile.am,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- Makefile.am 15 Sep 2002 09:54:34 -0000      1.8
+++ Makefile.am 15 Sep 2002 20:33:45 -0000      1.9
@@ -32,6 +32,7 @@
        solid_color_background.cxx solid_color_background.hxx \
        spike.cxx                  spike.hxx         \
         switch_door.cxx            switch_door.hxx   \
-        teleporter.cxx             teleporter.hxx
+        teleporter.cxx             teleporter.hxx    \
+        worldobj_group.hxx         worldobj_group.cxx
 
 ## EOF ##





reply via email to

[Prev in Thread] Current Thread [Next in Thread]