[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pingus-CVS] CVS: Games/Pingus/src/actions angel.cxx,1.12,1.13 basher.cx
From: |
grumbel |
Subject: |
[Pingus-CVS] CVS: Games/Pingus/src/actions angel.cxx,1.12,1.13 basher.cxx,1.17,1.18 blocker.cxx,1.12,1.13 bridger.cxx,1.20,1.21 digger.hxx,1.10,1.11 floater.cxx,1.18,1.19 |
Date: |
4 Oct 2002 13:46:58 -0000 |
Update of /usr/local/cvsroot/Games/Pingus/src/actions
In directory dark:/tmp/cvs-serv22173/actions
Modified Files:
angel.cxx basher.cxx blocker.cxx bridger.cxx digger.hxx
floater.cxx
Log Message:
clean up the PinguHolder/World relation ship a bit
Index: angel.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/angel.cxx,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- angel.cxx 1 Oct 2002 19:53:44 -0000 1.12
+++ angel.cxx 4 Oct 2002 13:46:56 -0000 1.13
@@ -46,6 +46,7 @@
Angel::update ()
{
sprite.update ();
+
counter += game_speed;
pingu->set_pos(x_pos + 20 * sin (counter * 3.0), pingu->get_y() - 50.0f *
0.025f);
Index: basher.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/basher.cxx,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- basher.cxx 1 Oct 2002 19:53:45 -0000 1.17
+++ basher.cxx 4 Oct 2002 13:46:56 -0000 1.18
@@ -75,7 +75,7 @@
if (basher_c % 2 == 0)
bash();
}
- else if (sprite.get_progress () > 0.6f)
+ else if (sprite.get_progress () > 0.6f) // FIXME: EVIL!
{
pingu->set_action(Actions::Walker);
}
Index: blocker.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/blocker.cxx,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- blocker.cxx 1 Oct 2002 19:53:45 -0000 1.12
+++ blocker.cxx 4 Oct 2002 13:46:56 -0000 1.13
@@ -63,7 +63,8 @@
}
else
{
- PinguHolder* pingus = WorldObj::get_world()->get_pingu_p();
+ // FIXME: PinguHolder iterations should be handled otherwise
+ PinguHolder* pingus = WorldObj::get_world()->get_pingus();
for(PinguIter i = pingus->begin(); i != pingus->end(); ++i)
{
catch_pingu(*i);
Index: bridger.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/bridger.cxx,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- bridger.cxx 1 Oct 2002 19:53:45 -0000 1.20
+++ bridger.cxx 4 Oct 2002 13:46:56 -0000 1.21
@@ -92,7 +92,7 @@
build_sprite.set_direction (Sprite::RIGHT);
gc.draw(build_sprite, Vector(pingu->get_x () - (x_offset *
pingu->direction),
- pingu->get_y () + y_offset));
+ pingu->get_y () + y_offset));
break;
case B_WALKING:
@@ -100,8 +100,8 @@
walk_sprite.set_direction (Sprite::LEFT);
else
walk_sprite.set_direction (Sprite::RIGHT);
- gc.draw (walk_sprite, Vector(static_cast<int>(pingu->get_x () -
(x_offset * pingu->direction)),
- static_cast<int>(pingu->get_y () +
y_offset)));
+ gc.draw (walk_sprite, Vector(pingu->get_x () - (x_offset *
pingu->direction),
+ pingu->get_y () + y_offset));
break;
}
}
Index: digger.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/digger.hxx,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- digger.hxx 1 Oct 2002 19:53:45 -0000 1.10
+++ digger.hxx 4 Oct 2002 13:46:56 -0000 1.11
@@ -25,7 +25,6 @@
namespace Actions {
-/** FIXME: Not delta capable! */
class Digger : public PinguAction
{
private:
@@ -33,6 +32,7 @@
CL_Surface digger_radius_gfx;
Sprite sprite;
int digger_c;
+
public:
Digger();
void init (void);
Index: floater.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/floater.cxx,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- floater.cxx 1 Oct 2002 19:53:45 -0000 1.18
+++ floater.cxx 4 Oct 2002 13:46:56 -0000 1.19
@@ -43,15 +43,20 @@
sprite.update ();
pingu->set_velocity(Vector(0.0, 0.0));
- if (rel_getpixel(0, -1) == Groundtype::GP_NOTHING) {
- ++step;
- if (step > 0) {
- pingu->set_y(pingu->get_y() + 1);
- step = 0;
+
+ if (rel_getpixel(0, -1) == Groundtype::GP_NOTHING)
+ {
+ ++step;
+ if (step > 0)
+ {
+ pingu->set_y(pingu->get_y() + 1);
+ step = 0;
+ }
+ }
+ else
+ {
+ pingu->set_action (Actions::Walker);
}
- } else {
- pingu->set_action (Actions::Walker);
- }
}
void
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pingus-CVS] CVS: Games/Pingus/src/actions angel.cxx,1.12,1.13 basher.cxx,1.17,1.18 blocker.cxx,1.12,1.13 bridger.cxx,1.20,1.21 digger.hxx,1.10,1.11 floater.cxx,1.18,1.19,
grumbel <=
- Prev by Date:
[Pingus-CVS] CVS: Games/Pingus/src/actions climber.cxx,1.15,1.16 faller.cxx,1.27,1.28 jumper.cxx,1.14,1.15 miner.cxx,1.13,1.14 slider.cxx,1.12,1.13 walker.cxx,1.26,1.27
- Next by Date:
[Pingus-CVS] CVS: Games/Pingus/src/worldobjs bumper.cxx,1.9,1.10 conveyor_belt.cxx,1.19,1.20 entrance.cxx,1.4,1.5 exit.cxx,1.3,1.4 fake_exit.cxx,1.8,1.9 guillotine.cxx,1.6,1.7 hammer.cxx,1.8,1.9 ice_block.cxx,1.19,1.20 info_box.cxx,1.17,1.18 laser_exit.cxx,1.7,1.8 smasher.cxx,1.11,1.12 spike.cxx,1.6,1.7 switch_door.cxx,1.21,1.22 teleporter.cxx,1.13,1.14
- Previous by thread:
[Pingus-CVS] CVS: Games/Pingus/src/actions climber.cxx,1.15,1.16 faller.cxx,1.27,1.28 jumper.cxx,1.14,1.15 miner.cxx,1.13,1.14 slider.cxx,1.12,1.13 walker.cxx,1.26,1.27
- Next by thread:
[Pingus-CVS] CVS: Games/Pingus/src/worldobjs bumper.cxx,1.9,1.10 conveyor_belt.cxx,1.19,1.20 entrance.cxx,1.4,1.5 exit.cxx,1.3,1.4 fake_exit.cxx,1.8,1.9 guillotine.cxx,1.6,1.7 hammer.cxx,1.8,1.9 ice_block.cxx,1.19,1.20 info_box.cxx,1.17,1.18 laser_exit.cxx,1.7,1.8 smasher.cxx,1.11,1.12 spike.cxx,1.6,1.7 switch_door.cxx,1.21,1.22 teleporter.cxx,1.13,1.14
- Index(es):