[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pingus-CVS] CVS: Games/Pingus/src/entrances cloud.cxx,NONE,1.1 cloud.hx
From: |
grumbel |
Subject: |
[Pingus-CVS] CVS: Games/Pingus/src/entrances cloud.cxx,NONE,1.1 cloud.hxx,NONE,1.1 woodthing.cxx,NONE,1.1 woodthing.hxx,NONE,1.1 Makefile.am,1.3,1.4 Cloud.cc,1.12,NONE Cloud.hh,1.8,NONE WoodThing.cc,1.15,NONE WoodThing.hh,1.8,NONE |
Date: |
12 Jun 2002 19:02:56 -0000 |
Update of /usr/local/cvsroot/Games/Pingus/src/entrances
In directory dark:/tmp/cvs-serv12666
Modified Files:
Makefile.am
Added Files:
cloud.cxx cloud.hxx woodthing.cxx woodthing.hxx
Removed Files:
Cloud.cc Cloud.hh WoodThing.cc WoodThing.hh
Log Message:
The big rename...
--- NEW FILE: cloud.cxx ---
// $Id: cloud.cxx,v 1.1 2002/06/12 19:02:54 grumbel 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.
#include <cstdlib>
#include <assert.h>
#include "../pingus_resource.hxx"
#include "../particles/smoke_particle.hxx"
#include "../particles/ground_particle.hxx"
#include "../algo.hxx"
#include "cloud.hxx"
Cloud::Cloud(EntranceData data)
: Entrance (data)
{
pos = data.pos;
release_rate = data.release_rate;
last_release = -release_rate;
pos.z = 100;
direction = data.direction;
surface = PingusResource::load_surface("Entrances/cloud","entrances");
}
void
Cloud::draw_offset(int x, int y, float s)
{
if (s == 1.0) {
surface.put_screen(int(x + pos.x - 115),
int(y + pos.y - 100));
} else {
surface.put_screen(int((pos.x-32 + x) * s),
int((pos.y-16 + y) * s),
s, s);
}
}
/* EOF */
--- NEW FILE: cloud.hxx ---
// $Id: cloud.hxx,v 1.1 2002/06/12 19:02:54 grumbel 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 CLOUD_HH
#define CLOUD_HH
#include "../entrance.hxx"
///
class Cloud : public Entrance
{
private:
public:
Cloud(EntranceData);
void draw_offset(int x, int y, float s = 1.0);
};
#endif
/* EOF */
--- NEW FILE: woodthing.cxx ---
// $Id: woodthing.cxx,v 1.1 2002/06/12 19:02:54 grumbel 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.
#include <cstdlib>
#include "../particles/particle_holder.hxx"
#include "../world.hxx"
#include "../pingus_resource.hxx"
#include "../particles/smoke_particle.hxx"
#include "../algo.hxx"
#include "woodthing.hxx"
WoodThing::WoodThing(EntranceData data)
: Entrance (data)
{
pos = data.pos;
release_rate = data.release_rate;
last_release = -release_rate;
direction = data.direction;
surface = PingusResource::load_surface("Entrances/woodthing_mov",
"entrances");
surface2 = PingusResource::load_surface("Entrances/woodthing_nmov",
"entrances");
counter.set_size(surface.get_num_frames());
counter.set_type(GameCounter::once);
counter.set_speed(2);
counter = surface.get_num_frames() - 1;
}
void
WoodThing::update(float delta)
{
Entrance::update (delta);
--counter;
if (rand() % 5 == 0)
{
world->get_particle_holder()
->add_particle(new SmokeParticle(int(pos.x - (surface.get_width()/2) -
24),
int(pos.y - surface.get_height() + 32
- 147),
-0.6 * (frand() + 1), -0.6 * (frand()
+ 1)));
}
}
void
WoodThing::draw_offset(int x, int y, float s)
{
if (s == 1.0)
{
surface.put_screen(int(pos.x - (surface.get_width()/2) + x),
int(pos.y - surface.get_height() + 32 + y),
counter);
}
else
{
surface.put_screen((int)((pos.x-32 + x) * s),
(int)((pos.y-16 + y) * s),
s, s);
}
}
/* EOF */
--- NEW FILE: woodthing.hxx ---
// $Id: woodthing.hxx,v 1.1 2002/06/12 19:02:54 grumbel 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 WOODTHING_HH
#define WOODTHING_HH
#include "../game_counter.hxx"
#include "../entrance.hxx"
///
class WoodThing : public Entrance
{
private:
GameCounter counter;
CL_Surface surface2;
public:
WoodThing(EntranceData);
void update(float delta);
void draw_offset(int x, int y, float s = 1.0);
};
#endif
/* EOF */
Index: Makefile.am
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/entrances/Makefile.am,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- Makefile.am 10 Aug 2001 10:56:14 -0000 1.3
+++ Makefile.am 12 Jun 2002 19:02:54 -0000 1.4
@@ -18,5 +18,5 @@
noinst_LIBRARIES = libpingus_entrances.a
libpingus_entrances_a_SOURCES = \
- WoodThing.cc WoodThing.hh \
- Cloud.cc Cloud.hh
\ No newline at end of file
+ woodthing.cxx woodthing.hxx \
+ cloud.cxx cloud.hxx
\ No newline at end of file
--- Cloud.cc DELETED ---
--- Cloud.hh DELETED ---
--- WoodThing.cc DELETED ---
--- WoodThing.hh DELETED ---
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pingus-CVS] CVS: Games/Pingus/src/entrances cloud.cxx,NONE,1.1 cloud.hxx,NONE,1.1 woodthing.cxx,NONE,1.1 woodthing.hxx,NONE,1.1 Makefile.am,1.3,1.4 Cloud.cc,1.12,NONE Cloud.hh,1.8,NONE WoodThing.cc,1.15,NONE WoodThing.hh,1.8,NONE,
grumbel <=
- Prev by Date:
[Pingus-CVS] CVS: Games/Pingus/src/backgrounds solidcolor_background.cxx,NONE,1.1 solidcolor_background.hxx,NONE,1.1 starfield_background.cxx,NONE,1.1 starfield_background.hxx,NONE,1.1 surface_background.cxx,NONE,1.1 surface_background.hxx,NONE,1.1 surface_background_data.cxx,NONE,1.1 surface_background_data.hxx,NONE,1.1 thunderstorm_background.cxx,NONE,1.1 thunderstorm_background.hxx,NONE,1.1 thunderstorm_background_data.cxx,NONE,1.1 thunderstorm_background_data.hxx,NONE,1.1 Makefile.am,1.4,1.5 SolidColorBackground.cc,1.16,NONE SurfaceBackgroundData.cc,1.21,NONE ThunderstormBackgroundData.cc,1.15,NONE
- Next by Date:
[Pingus-CVS] CVS: Games/Pingus/src/worldobjs conveyor_belt.cxx,NONE,1.1 conveyor_belt.hxx,NONE,1.1 ice_block.cxx,NONE,1.1 ice_block.hxx,NONE,1.1 info_box.cxx,NONE,1.1 info_box.hxx,NONE,1.1 switch_door.cxx,NONE,1.1 switch_door.hxx,NONE,1.1 teleporter.cxx,NONE,1.1 teleporter.hxx,NONE,1.1 Makefile.am,1.5,1.6 ConveyorBelt.hh,1.23,NONE IceBlock.hh,1.24,NONE InfoBox.hh,1.8,NONE SwitchDoor.hh,1.24,NONE Teleporter.cc,1.40,NONE
- Previous by thread:
[Pingus-CVS] CVS: Games/Pingus/src/backgrounds solidcolor_background.cxx,NONE,1.1 solidcolor_background.hxx,NONE,1.1 starfield_background.cxx,NONE,1.1 starfield_background.hxx,NONE,1.1 surface_background.cxx,NONE,1.1 surface_background.hxx,NONE,1.1 surface_background_data.cxx,NONE,1.1 surface_background_data.hxx,NONE,1.1 thunderstorm_background.cxx,NONE,1.1 thunderstorm_background.hxx,NONE,1.1 thunderstorm_background_data.cxx,NONE,1.1 thunderstorm_background_data.hxx,NONE,1.1 Makefile.am,1.4,1.5 SolidColorBackground.cc,1.16,NONE SurfaceBackgroundData.cc,1.21,NONE ThunderstormBackgroundData.cc,1.15,NONE
- Next by thread:
[Pingus-CVS] CVS: Games/Pingus/src/worldobjs conveyor_belt.cxx,NONE,1.1 conveyor_belt.hxx,NONE,1.1 ice_block.cxx,NONE,1.1 ice_block.hxx,NONE,1.1 info_box.cxx,NONE,1.1 info_box.hxx,NONE,1.1 switch_door.cxx,NONE,1.1 switch_door.hxx,NONE,1.1 teleporter.cxx,NONE,1.1 teleporter.hxx,NONE,1.1 Makefile.am,1.5,1.6 ConveyorBelt.hh,1.23,NONE IceBlock.hh,1.24,NONE InfoBox.hh,1.8,NONE SwitchDoor.hh,1.24,NONE Teleporter.cc,1.40,NONE
- Index(es):