[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pingus-CVS] CVS: Games/Pingus/src/actions climber.cxx,1.12,1.13 climber
From: |
grumbel |
Subject: |
[Pingus-CVS] CVS: Games/Pingus/src/actions climber.cxx,1.12,1.13 climber.hxx,1.8,1.9 |
Date: |
16 Sep 2002 23:06:03 -0000 |
Update of /usr/local/cvsroot/Games/Pingus/src/actions
In directory dark:/tmp/cvs-serv17228/actions
Modified Files:
climber.cxx climber.hxx
Log Message:
CL_Vector() constructor with one argument is \!evil\!, probally timeto fork or
wrap it
Index: climber.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/climber.cxx,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- climber.cxx 16 Sep 2002 20:31:09 -0000 1.12
+++ climber.cxx 16 Sep 2002 23:06:01 -0000 1.13
@@ -35,15 +35,19 @@
// these alignments are necessary to prevent climber walking
// inside the wall.
- sprite_height = sprite.get_height();
- sprite_width = sprite.get_width();
- if (pingu->direction.is_left ()) {
- sprite.set_align (0, -sprite_height/2);
- sprite.set_direction (Sprite::LEFT);
- } else {
- sprite.set_align (-sprite_width, -sprite_height/2);
- sprite.set_direction (Sprite::RIGHT);
- }
+ int sprite_height = sprite.get_height();
+ int sprite_width = sprite.get_width();
+
+ if (pingu->direction.is_left ())
+ {
+ sprite.set_align (0, -sprite_height/2);
+ sprite.set_direction (Sprite::LEFT);
+ }
+ else
+ {
+ sprite.set_align (-sprite_width, -sprite_height/2);
+ sprite.set_direction (Sprite::RIGHT);
+ }
}
void
@@ -66,7 +70,8 @@
// and there is still ground to walk on
if (rel_getpixel(1, 1) != Groundtype::GP_NOTHING)
{
- pingu->set_pos(pingu->get_y() - 1);
+ pingu->set_pos(pingu->get_x(),
+ pingu->get_y() - 1);
return;
}
else if (rel_getpixel(1, 1) == Groundtype::GP_NOTHING)
@@ -77,7 +82,8 @@
if (!head_collision_on_walk(pingu->direction, 1))
{
// Get ready to walk
- pingu->set_pos(pingu->get_x() + pingu->direction, pingu->get_y()
- 1);
+ pingu->set_pos(pingu->get_x() + pingu->direction,
+ pingu->get_y() - 1);
}
else
{
Index: climber.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/climber.hxx,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- climber.hxx 10 Sep 2002 19:24:19 -0000 1.8
+++ climber.hxx 16 Sep 2002 23:06:01 -0000 1.9
@@ -29,7 +29,6 @@
{
private:
Sprite sprite;
- int sprite_width, sprite_height;
public:
Climber ();
void init ();
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pingus-CVS] CVS: Games/Pingus/src/actions climber.cxx,1.12,1.13 climber.hxx,1.8,1.9,
grumbel <=
- Prev by Date:
[Pingus-CVS] CVS: Games/Pingus/src/worldobjs bumper.cxx,1.5,1.6 bumper.hxx,1.3,1.4 conveyor_belt.cxx,1.15,1.16 conveyor_belt.hxx,1.11,1.12 ice_block.cxx,1.15,1.16 ice_block.hxx,1.10,1.11 smasher.cxx,1.6,1.7 smasher.hxx,1.3,1.4 switch_door.cxx,1.17,1.18 switch_door.hxx,1.13,1.14
- Next by Date:
[Pingus-CVS] CVS: Games/Pingus/src pingu.cxx,1.26,1.27
- Previous by thread:
[Pingus-CVS] CVS: Games/Pingus/src/worldobjs bumper.cxx,1.5,1.6 bumper.hxx,1.3,1.4 conveyor_belt.cxx,1.15,1.16 conveyor_belt.hxx,1.11,1.12 ice_block.cxx,1.15,1.16 ice_block.hxx,1.10,1.11 smasher.cxx,1.6,1.7 smasher.hxx,1.3,1.4 switch_door.cxx,1.17,1.18 switch_door.hxx,1.13,1.14
- Next by thread:
[Pingus-CVS] CVS: Games/Pingus/src pingu.cxx,1.26,1.27
- Index(es):