Skip to content

Commit

Permalink
Remove str2dir function
Browse files Browse the repository at this point in the history
  • Loading branch information
tobbi committed Aug 1, 2023
1 parent c290e2a commit c1666ff
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
8 changes: 1 addition & 7 deletions src/badguy/badguy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ BadGuy::BadGuy(const ReaderMapping& reader, const std::string& sprite_name_, int
{
std::string dir_str = "auto";
reader.get("direction", dir_str);
m_start_dir = str2dir( dir_str );
m_start_dir = string_to_dir(dir_str);
m_dir = m_start_dir;

reader.get("dead-script", m_dead_script);
Expand Down Expand Up @@ -290,12 +290,6 @@ BadGuy::update(float dt_sec)
m_on_ground_flag = false;
}

Direction
BadGuy::str2dir(const std::string& dir_str) const
{
return string_to_dir(dir_str);
}

void
BadGuy::initialize()
{
Expand Down
3 changes: 0 additions & 3 deletions src/badguy/badguy.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -209,9 +209,6 @@ class BadGuy : public MovingSprite,
pixels. Minimum value for height is 1 pixel */
bool might_fall(int height = 1) const;

/** Get Direction from String. */
Direction str2dir(const std::string& dir_str) const;

/** Update on_ground_flag judging by solid collision @c hit. This
gets called from the base implementation of collision_solid, so
call this when overriding collision_solid's default
Expand Down

0 comments on commit c1666ff

Please sign in to comment.