[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pingus-CVS] CVS: Games/Pingus/src/worldobjs thunderstorm_background.cxx
From: |
torangan |
Subject: |
[Pingus-CVS] CVS: Games/Pingus/src/worldobjs thunderstorm_background.cxx,NONE,1.1 thunderstorm_background.hxx,NONE,1.1 Makefile.am,1.12,1.13 |
Date: |
18 Sep 2002 15:00:39 -0000 |
Update of /usr/local/cvsroot/Games/Pingus/src/worldobjs
In directory dark:/tmp/cvs-serv16342/worldobjs
Modified Files:
Makefile.am
Added Files:
thunderstorm_background.cxx thunderstorm_background.hxx
Log Message:
removed last background
--- NEW FILE: thunderstorm_background.cxx ---
// $Id: thunderstorm_background.cxx,v 1.1 2002/09/18 15:00:37 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 "../pingus_resource.hxx"
#include "../worldobjsdata/thunderstorm_background_data.hxx"
#include "thunderstorm_background.hxx"
namespace WorldObjs {
ThunderstormBackground::ThunderstormBackground
(WorldObjsData::ThunderstormBackgroundData* data_)
: clouds_sur(PingusResource::load_surface("Textures/thunderstorm",
"textures")),
x_pos(0),
data(new WorldObjsData::ThunderstormBackgroundData(*data_))
{
// flash_sur.push_back(PingusResource::load_surface("flash1",
"thunderstorm"));
// flash_sur.push_back(PingusResource::load_surface("flash2",
"thunderstorm"));
}
ThunderstormBackground::~ThunderstormBackground ()
{
delete data;
}
float
ThunderstormBackground::get_z_pos () const
{
return data->pos.z;
}
void
ThunderstormBackground::update (float /*delta*/)
{
++x_pos;
if (x_pos >= static_cast<int>(clouds_sur.get_width()))
x_pos = 0;
}
void
ThunderstormBackground::draw_offset (int x_of, int y_of, float /*s*/)
{
clouds_sur.put_screen(x_pos + x_of, y_of);
}
} // namespace WorldObjs
/* EOF */
--- NEW FILE: thunderstorm_background.hxx ---
// $Id: thunderstorm_background.hxx,v 1.1 2002/09/18 15:00:37 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_THUNDERSTORM_BACKGROUND_HXX
#define HEADER_PINGUS_WORLDOBJS_THUNDERSTORM_BACKGROUND_HXX
#include "../worldobj.hxx"
namespace WorldObjsData {
class ThunderstormBackgroundData;
}
namespace WorldObjs {
class ThunderstormBackground : public WorldObj
{
private:
CL_Surface clouds_sur;
//std::vector<CL_Surface> flash_sur;
int x_pos;
WorldObjsData::ThunderstormBackgroundData* const data;
public:
ThunderstormBackground (WorldObjsData::ThunderstormBackgroundData* data_);
~ThunderstormBackground ();
float get_z_pos () const;
void update (float delta);
void draw_offset (int x_of, int y_of, float s = 1.0);
private:
ThunderstormBackground (const ThunderstormBackground&);
ThunderstormBackground operator= (const ThunderstormBackground&);
};
} // namespace WorldObjs
#endif
/* EOF */
Index: Makefile.am
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldobjs/Makefile.am,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- Makefile.am 16 Sep 2002 20:52:22 -0000 1.12
+++ Makefile.am 18 Sep 2002 15:00:37 -0000 1.13
@@ -29,7 +29,9 @@
ice_block.cxx ice_block.hxx \
info_box.cxx info_box.hxx \
laser_exit.cxx laser_exit.hxx \
+ rain_generator.hxx rain_generator.cxx \
smasher.cxx smasher.hxx \
+ snow_generator.hxx snow_generator.cxx \
solid_color_background.cxx solid_color_background.hxx \
spike.cxx spike.hxx \
starfield_background.cxx starfield_background.hxx \
@@ -37,8 +39,7 @@
surface_background.cxx surface_background.hxx \
switch_door.cxx switch_door.hxx \
teleporter.cxx teleporter.hxx \
- worldobj_group.hxx worldobj_group.cxx\
- rain_generator.hxx rain_generator.cxx \
- snow_generator.hxx snow_generator.cxx
+ thunderstorm_background.cxx thunderstorm_background.hxx \
+ worldobj_group.hxx worldobj_group.cxx
## EOF ##
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pingus-CVS] CVS: Games/Pingus/src/worldobjs thunderstorm_background.cxx,NONE,1.1 thunderstorm_background.hxx,NONE,1.1 Makefile.am,1.12,1.13,
torangan <=
- Prev by Date:
[Pingus-CVS] CVS: Games/Pingus/src/editorobjs thunderstorm_background_obj.cxx,NONE,1.1 thunderstorm_background_obj.hxx,NONE,1.1 Makefile.am,1.8,1.9
- Next by Date:
[Pingus-CVS] CVS: Games/Pingus/src/backgrounds .cvsignore,1.1,NONE Makefile.am,1.7,NONE README,1.1,NONE thunderstorm_background.cxx,1.1,NONE thunderstorm_background.hxx,1.4,NONE thunderstorm_background_data.cxx,1.6,NONE thunderstorm_background_data.hxx,1.9,NONE
- Previous by thread:
[Pingus-CVS] CVS: Games/Pingus/src/editorobjs thunderstorm_background_obj.cxx,NONE,1.1 thunderstorm_background_obj.hxx,NONE,1.1 Makefile.am,1.8,1.9
- Next by thread:
[Pingus-CVS] CVS: Games/Pingus/src/backgrounds .cvsignore,1.1,NONE Makefile.am,1.7,NONE README,1.1,NONE thunderstorm_background.cxx,1.1,NONE thunderstorm_background.hxx,1.4,NONE thunderstorm_background_data.cxx,1.6,NONE thunderstorm_background_data.hxx,1.9,NONE
- Index(es):