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 solid_color_background.cxx,


From: torangan
Subject: [Pingus-CVS] CVS: Games/Pingus/src/worldobjs solid_color_background.cxx,NONE,1.1 solid_color_background.hxx,NONE,1.1 Makefile.am,1.7,1.8
Date: 15 Sep 2002 09:54:36 -0000

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

Modified Files:
        Makefile.am 
Added Files:
        solid_color_background.cxx solid_color_background.hxx 
Log Message:
splitted SolidColorBackground


--- NEW FILE: solid_color_background.cxx ---
//  $Id: solid_color_background.cxx,v 1.1 2002/09/15 09:54: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 <ClanLib/Display/Display/display.h>
#include "../worldobjsdata/solid_color_background_data.hxx"
#include "solid_color_background.hxx"

namespace WorldObjs {

SolidColorBackground::SolidColorBackground 
(WorldObjsData::SolidColorBackgroundData* data_)
  : data(new WorldObjsData::SolidColorBackgroundData(*data_))
{
}

SolidColorBackground::~SolidColorBackground ()
{
  delete data;
}

void
SolidColorBackground::draw_offset (int x_of, int y_of, float s)
{
  // FIXME: Probally fill_rect is better here, but slower?
  CL_Display::clear_display (data->color.red, data->color.green, 
data->color.blue, data->color.alpha);

  UNUSED_ARG(x_of);
  UNUSED_ARG(y_of);
  UNUSED_ARG(s);
}

} // namespace WorldObjs

/* EOF */



--- NEW FILE: solid_color_background.hxx ---
//  $Id: solid_color_background.hxx,v 1.1 2002/09/15 09:54: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.

#ifndef HEADER_PINGUS_WORLDOBJS_SOLID_COLOR_BACKGROUND_HXX
#define HEADER_PINGUS_WORLDOBJS_SOLID_COLOR_BACKGROUND_HXX

#include "../worldobj.hxx"

namespace WorldObjsData {
class SolidColorBackgroundData;
}

namespace WorldObjs {

class SolidColorBackground : public WorldObj
{
private:
  WorldObjsData::SolidColorBackgroundData* data;
  
public:
  SolidColorBackground (WorldObjsData::SolidColorBackgroundData* data_);
 ~SolidColorBackground ();

  // FIXME: Make z_position editable
  float get_z_pos () const { return -10; }  
  void update (float delta) { UNUSED_ARG(delta); }
  
  void draw_offset (int x_of, int y_of, float s = 1.0);
  
private:
  SolidColorBackground (const SolidColorBackground&);
  SolidColorBackground operator= (const SolidColorBackground&);
};

} // namespace WorldObjs

#endif

/* EOF */

Index: Makefile.am
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldobjs/Makefile.am,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- Makefile.am 4 Sep 2002 14:55:12 -0000       1.7
+++ Makefile.am 15 Sep 2002 09:54:34 -0000      1.8
@@ -20,17 +20,18 @@
 noinst_LIBRARIES = libpingus_worldobjs.a
 
 libpingus_worldobjs_a_SOURCES = \
-       bumper.cxx         bumper.hxx        \
-        conveyor_belt.cxx  conveyor_belt.hxx \
-       fake_exit.cxx      fake_exit.hxx     \
-       guillotine.cxx     guillotine.hxx    \
-       hammer.cxx         hammer.hxx        \
-        ice_block.cxx      ice_block.hxx     \
-        info_box.cxx       info_box.hxx      \
-       laser_exit.cxx     laser_exit.hxx    \
-       smasher.cxx        smasher.hxx       \
-       spike.cxx          spike.hxx         \
-        switch_door.cxx    switch_door.hxx   \
-        teleporter.cxx     teleporter.hxx
+       bumper.cxx                 bumper.hxx        \
+        conveyor_belt.cxx          conveyor_belt.hxx \
+       fake_exit.cxx              fake_exit.hxx     \
+       guillotine.cxx             guillotine.hxx    \
+       hammer.cxx                 hammer.hxx        \
+        ice_block.cxx              ice_block.hxx     \
+        info_box.cxx               info_box.hxx      \
+       laser_exit.cxx             laser_exit.hxx    \
+       smasher.cxx                smasher.hxx       \
+       solid_color_background.cxx solid_color_background.hxx \
+       spike.cxx                  spike.hxx         \
+        switch_door.cxx            switch_door.hxx   \
+        teleporter.cxx             teleporter.hxx
 
 ## EOF ##





reply via email to

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