X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fyoink;a=blobdiff_plain;f=src%2FCharacter.cc;fp=src%2FCharacter.cc;h=b26f2d4f06b2432da563d7c791594d26ecdc6530;hp=ffecfd5b8c5db2c2c82c3e4cc478c00d718f3fed;hb=23d8f7a5fbd1eca7f46f2342c20ac5e28ae0128a;hpb=fa9438c66ae0154e6d9ad196e0fb39649d359da4 diff --git a/src/Character.cc b/src/Character.cc index ffecfd5..b26f2d4 100644 --- a/src/Character.cc +++ b/src/Character.cc @@ -71,8 +71,8 @@ private: Character::Character(const std::string& name) : - tilemap_(name), - animation_(name) + tilemap(name), + animation(name) { current.init(); @@ -118,7 +118,7 @@ void Character::update(Mf::Scalar t, Mf::Scalar dt) current.force = userForce; current.integrate(t, dt); - animation_.update(t, dt); + animation.update(t, dt); } @@ -127,16 +127,16 @@ void Character::draw(Mf::Scalar alpha) const Mf::Vector2 position = cml::lerp(previous.position, current.position, alpha); //glColor3f(1.0f, 1.0f, 1.0f); - tilemap_.bind(); + tilemap.bind(); - Mf::Tilemap::Index frame = animation_.getFrame(); + Tilemap::Index frame = animation.getFrame(); - Mf::Tilemap::Orientation orientation = Mf::Tilemap::NORMAL; + Tilemap::Orientation orientation = Tilemap::NORMAL; - if (current.velocity[0] < 0.0) orientation = Mf::Tilemap::REVERSE; + if (current.velocity[0] < 0.0) orientation = Tilemap::REVERSE; Mf::Scalar coords[8]; - tilemap_.getTileCoords(frame, coords, orientation); + tilemap.getTileCoords(frame, coords, orientation); Mf::Scalar s = 16.0; @@ -164,16 +164,5 @@ void Character::draw(Mf::Scalar alpha) const } -Mf::Tilemap& Character::getTilemap() -{ - return tilemap_; -} - -Mf::Animation& Character::getAnimation() -{ - return animation_; -} - - /** vim: set ts=4 sw=4 tw=80: *************************************************/