Skip to content

Commit

Permalink
Pull in changes from FGJ2024
Browse files Browse the repository at this point in the history
  • Loading branch information
Laguna1989 committed Jan 23, 2025
1 parent 8fa2496 commit ae2b6bb
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
3 changes: 3 additions & 0 deletions impl/jamtemplate/common/tilemap/tileson_loader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,9 @@ jt::TilemapCollisions jt::tilemap::TilesonLoader::loadCollisionsFromLayer(
if (!blockedProperty) {
continue;
}
if (!blockedProperty->getValue<bool>()) {
continue;
}

auto posx = std::get<0>(pos);
auto posy = std::get<1>(pos);
Expand Down
7 changes: 7 additions & 0 deletions impl/jamtemplate/common/vector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@ jt::Vector2f& jt::operator-=(jt::Vector2f& lhs, jt::Vector2f const& rhs) noexcep
return lhs;
}

jt::Vector2f& jt::operator*=(jt::Vector2f& lhs, float const& rhs) noexcept
{
lhs.x *= rhs;
lhs.y *= rhs;
return lhs;
}

std::ostream& jt::operator<<(std::ostream& os, jt::Vector2f const& vec)
{
return os << "(" << vec.x << ", " << vec.y << ")";
Expand Down
1 change: 1 addition & 0 deletions impl/jamtemplate/common/vector.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ constexpr jt::Vector2f operator-(jt::Vector2f const& a, jt::Vector2f const& b) n

jt::Vector2f& operator+=(jt::Vector2f& lhs, jt::Vector2f const& rhs) noexcept;
jt::Vector2f& operator-=(jt::Vector2f& lhs, jt::Vector2f const& rhs) noexcept;
jt::Vector2f& operator*=(jt::Vector2f& lhs, float const& rhs) noexcept;

constexpr jt::Vector2f operator*(float const f, jt::Vector2f const& v) noexcept
{
Expand Down

0 comments on commit ae2b6bb

Please sign in to comment.