[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pingus-CVS] CVS: Games/Pingus/src/traps fake_exit.cxx,1.3,1.4 hammer.cx
From: |
torangan |
Subject: |
[Pingus-CVS] CVS: Games/Pingus/src/traps fake_exit.cxx,1.3,1.4 hammer.cxx,1.3,1.4 laser_exit.cxx,1.3,1.4 smasher.cxx,1.4,1.5 |
Date: |
28 Jun 2002 15:12:25 -0000 |
Update of /usr/local/cvsroot/Games/Pingus/src/traps
In directory dark:/tmp/cvs-serv7425/traps
Modified Files:
fake_exit.cxx hammer.cxx laser_exit.cxx smasher.cxx
Log Message:
- changed action names from string to enum
- implemented actions slots for wall and fall case
- some cleanup
Index: fake_exit.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/traps/fake_exit.cxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- fake_exit.cxx 26 Jun 2002 17:43:18 -0000 1.3
+++ fake_exit.cxx 28 Jun 2002 15:12:23 -0000 1.4
@@ -25,6 +25,8 @@
#include "fake_exit.hxx"
+using namespace Pingus::Actions;
+
FakeExit::FakeExit(const TrapData& data) : smashing(false)
{
surface = PingusResource::load_surface("Traps/fake_exit", "traps");
@@ -72,7 +74,7 @@
}
if (counter >= 3 && counter <= 5) {
- pingu->set_action("smashed");
+ pingu->set_action(Smashed);
}
}
}
Index: hammer.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/traps/hammer.cxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- hammer.cxx 26 Jun 2002 17:43:18 -0000 1.3
+++ hammer.cxx 28 Jun 2002 15:12:23 -0000 1.4
@@ -24,6 +24,8 @@
#include "../pingu_holder.hxx"
#include "../pingu.hxx"
+using namespace Pingus::Actions;
+
Hammer::Hammer(const TrapData& data)
{
pos = data.pos;
@@ -68,7 +70,7 @@
if (counter >= (int)(surface.get_num_frames()) - 3) {
if (pingu->get_x() > pos.x + 55 && pingu->get_x() < pos.x + 77
&& pingu->get_y() > pos.y + 146 && pingu->get_y() < pos.y + 185)
- pingu->set_action("smashed");
+ pingu->set_action(Smashed);
}
}
Index: laser_exit.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/traps/laser_exit.cxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- laser_exit.cxx 26 Jun 2002 17:43:18 -0000 1.3
+++ laser_exit.cxx 28 Jun 2002 15:12:23 -0000 1.4
@@ -77,7 +77,7 @@
if (!(pingu->get_action() && pingu->get_action()->get_name() ==
"LaserKill"))
{
killing = true;
- pingu->set_action("laserkill");
+ pingu->set_action(Laserkill);
}
}
}
Index: smasher.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/traps/smasher.cxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- smasher.cxx 26 Jun 2002 17:43:18 -0000 1.4
+++ smasher.cxx 28 Jun 2002 15:12:23 -0000 1.5
@@ -29,6 +29,8 @@
#include "../pingu_action_factory.hxx"
#include "../pingu.hxx"
+using namespace Pingus::Actions;
+
Smasher::Smasher(const TrapData& data) : smashing(false), downwards(false),
count(0)
{
pos = data.pos;
@@ -70,7 +72,7 @@
if ((*pingu)->is_inside (int(pos.x + 30), int(pos.y + 90),
int(pos.x + 250), int(pos.y + 190)))
{
- (*pingu)->set_action ("splashed");
+ (*pingu)->set_action (Splashed);
}
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pingus-CVS] CVS: Games/Pingus/src/traps fake_exit.cxx,1.3,1.4 hammer.cxx,1.3,1.4 laser_exit.cxx,1.3,1.4 smasher.cxx,1.4,1.5,
torangan <=
- Prev by Date:
[Pingus-CVS] CVS: Games/Pingus/src/editor object_manager.cxx,1.8,1.9
- Next by Date:
[Pingus-CVS] CVS: Games/Pingus/src/actions angel.hxx,1.3,1.4 basher.cxx,1.7,1.8 basher.hxx,1.4,1.5 blocker.cxx,1.2,1.3 blocker.hxx,1.3,1.4 boarder.cxx,1.2,1.3 boarder.hxx,1.4,1.5 bomber.hxx,1.4,1.5 bridger.cxx,1.6,1.7 bridger.hxx,1.6,1.7 climber.cxx,1.4,1.5 climber.hxx,1.3,1.4 digger.cxx,1.4,1.5 digger.hxx,1.3,1.4 drown.hxx,1.3,1.4 exiter.hxx,1.3,1.4 faller.cxx,1.10,1.11 faller.hxx,1.5,1.6 floater.cxx,1.6,1.7 floater.hxx,1.3,1.4 jumper.cxx,1.3,1.4 jumper.hxx,1.3,1.4 laser_kill.hxx,1.3,1.4 miner.cxx,1.4,1.5 miner.hxx,1.3,1.4 rocket_launcher.cxx,1.1,1.2 rocket_launcher.hxx,1.3,1.4 slider.cxx,1.2,1.3 slider.hxx,1.3,1.4 smashed.hxx,1.3,1.4 splashed.hxx,1.3,1.4 superman.hxx,1.3,1.4 teleported.cxx,1.2,1.3 teleported.hxx,1.3,1.4 waiter.cxx,1.1,1.2 waiter.hxx,1.3,1.4 walker.cxx,1.10,1.11 walker.hxx,1.3,1.4
- Previous by thread:
[Pingus-CVS] CVS: Games/Pingus/src/editor object_manager.cxx,1.8,1.9
- Next by thread:
[Pingus-CVS] CVS: Games/Pingus/src/actions angel.hxx,1.3,1.4 basher.cxx,1.7,1.8 basher.hxx,1.4,1.5 blocker.cxx,1.2,1.3 blocker.hxx,1.3,1.4 boarder.cxx,1.2,1.3 boarder.hxx,1.4,1.5 bomber.hxx,1.4,1.5 bridger.cxx,1.6,1.7 bridger.hxx,1.6,1.7 climber.cxx,1.4,1.5 climber.hxx,1.3,1.4 digger.cxx,1.4,1.5 digger.hxx,1.3,1.4 drown.hxx,1.3,1.4 exiter.hxx,1.3,1.4 faller.cxx,1.10,1.11 faller.hxx,1.5,1.6 floater.cxx,1.6,1.7 floater.hxx,1.3,1.4 jumper.cxx,1.3,1.4 jumper.hxx,1.3,1.4 laser_kill.hxx,1.3,1.4 miner.cxx,1.4,1.5 miner.hxx,1.3,1.4 rocket_launcher.cxx,1.1,1.2 rocket_launcher.hxx,1.3,1.4 slider.cxx,1.2,1.3 slider.hxx,1.3,1.4 smashed.hxx,1.3,1.4 splashed.hxx,1.3,1.4 superman.hxx,1.3,1.4 teleported.cxx,1.2,1.3 teleported.hxx,1.3,1.4 waiter.cxx,1.1,1.2 waiter.hxx,1.3,1.4 walker.cxx,1.10,1.11 walker.hxx,1.3,1.4
- Index(es):