Index: src/ActionButton.cc =================================================================== RCS file: /usr/local/cvsroot/Games/Pingus/src/ActionButton.cc,v retrieving revision 1.22 diff -u -r1.22 ActionButton.cc --- src/ActionButton.cc 2001/12/06 10:50:39 1.22 +++ src/ActionButton.cc 2001/12/09 06:43:42 @@ -270,7 +270,7 @@ && CL_Mouse::get_x() > x_pos && CL_Mouse::get_x() < x_pos + 60 && CL_Mouse::get_y() < y_pos + 35 && CL_Mouse::get_y() > y_pos) { - font_b->print_left (61, y_pos, name.c_str()); + font_b->print_left (x_pos + 61, y_pos, name.c_str()); } surface.put_screen(x_pos + 3, y_pos + 1, action_c); Index: src/actions/Faller.cc =================================================================== RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/Faller.cc,v retrieving revision 1.6 diff -u -r1.6 Faller.cc --- src/actions/Faller.cc 2001/12/06 10:50:40 1.6 +++ src/actions/Faller.cc 2001/12/09 06:44:17 @@ -31,6 +31,11 @@ { faller = Sprite("Pingus/faller" + to_string(pingu->owner_id), "pingus"); faller.set_align_center_bottom (); + + // FIXME: we can save some cpu cycles & memory if we do this when it + // is necessary + tumbler = Sprite("Pingus/tumble" + to_string(pingu->owner_id), "pingus"); + tumbler.set_align_center_bottom (); } void @@ -39,6 +44,13 @@ tumbler.update (delta); faller.update (delta); + for (unsigned int i=0; i < pingu->persist.size(); ++i) { + if (pingu->persist[i]->get_name() == "Floater") { + pingu->set_paction("floater"); + return; + } + } + // Apply all forces pingu->velocity = ForcesHolder::apply_forces(pingu->pos, pingu->velocity); @@ -90,7 +102,7 @@ } else // Ping is on ground { - if (rel_getpixel(0, -1) == ColMap::WATER) + if (rel_getpixel(0, -1) & ColMap::WATER) { pingu->set_paction("drown"); return; Index: src/actions/Walker.cc =================================================================== RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/Walker.cc,v retrieving revision 1.7 diff -u -r1.7 Walker.cc --- src/actions/Walker.cc 2001/12/06 10:50:40 1.7 +++ src/actions/Walker.cc 2001/12/09 06:44:18 @@ -51,7 +51,7 @@ for(y_inc=1; y_inc <= max_steps; y_inc++) if (rel_getpixel(1, y_inc) == ColMap::NOTHING) break; - pingu->pos.y -= --y_inc; + pingu->pos.y -= y_inc; pingu->pos.x += pingu->direction; } else @@ -69,7 +69,13 @@ { if (pingus_debug_flags & PINGUS_DEBUG_ACTIONS) std::cout << "Pingu: We are in front of a wall, setting persistant action" << std::endl; - pingu->set_paction(pingu->persist[i]->get_name()); + // pingu->set_paction(pingu->persist[i]->get_name()); + // FIXME: above fails because of Capitalised name + // returned from get_name(). May be we should + // use capitalised names everywhere. + + // Do we set any other action here? + pingu->set_paction("climber"); } return; } Index: src/actions/climber.cc =================================================================== RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/climber.cc,v retrieving revision 1.17 diff -u -r1.17 climber.cc --- src/actions/climber.cc 2001/08/10 10:56:14 1.17 +++ src/actions/climber.cc 2001/12/09 06:44:19 @@ -30,6 +30,18 @@ Climber::init(void) { sprite = Sprite ("Pingus/climber0", "pingus"); + + // 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); + } } void @@ -42,6 +54,8 @@ printf("%3d %3d %3d\n", rel_getpixel(1,0), rel_getpixel(0,0), rel_getpixel(-1,0)); printf("%3d %3d %3d\n", rel_getpixel(1,-1), rel_getpixel(0,-1),rel_getpixel(-1, -1)); */ + + sprite.update(delta); // If above is free if (rel_getpixel(0, 1) == ColMap::NOTHING Index: src/actions/climber.hh =================================================================== RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/climber.hh,v retrieving revision 1.12 diff -u -r1.12 climber.hh --- src/actions/climber.hh 2001/08/16 17:46:51 1.12 +++ src/actions/climber.hh 2001/12/09 06:44:19 @@ -28,6 +28,7 @@ { private: Sprite sprite; + int sprite_width, sprite_height; public: Climber(); void init();