Skip to content

Commit

Permalink
Revert commit f5eea9b
Browse files Browse the repository at this point in the history
  • Loading branch information
bruhmoent committed Jul 13, 2024
1 parent e284551 commit efe487d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 14 deletions.
14 changes: 4 additions & 10 deletions src/object/player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -254,12 +254,6 @@ Player::Player(PlayerStatus& player_status, const std::string& name_, int player
SoundManager::current()->preload("sounds/invincible_start.ogg");
SoundManager::current()->preload("sounds/splash.wav");
SoundManager::current()->preload("sounds/grow.wav");
m_bubble_particles[0] = Surface::from_file("images/particles/air_bubble-1.png");
m_bubble_particles[1] = Surface::from_file("images/particles/air_bubble-2.png");
m_bubble_particles[2] = Surface::from_file("images/particles/air_bubble-3.png");
m_bubble_particles[3] = Surface::from_file("images/particles/air_bubble-4.png");
m_bubble_timer.start(3.0f + (rand() % 2));

m_col.set_size(TUX_WIDTH, is_big() ? BIG_TUX_HEIGHT : SMALL_TUX_HEIGHT);

m_sprite->set_angle(0.0f);
Expand Down Expand Up @@ -521,6 +515,7 @@ Player::update(float dt_sec)
if (m_physic.get_velocity_y() > -350.f && m_controller->hold(Control::UP))
m_physic.set_velocity_y(-350.f);
}
<<<<<<< HEAD

if (m_bubble_timer.check())
{
Expand Down Expand Up @@ -583,6 +578,8 @@ Player::update(float dt_sec)
bool is_out_of_water = Sector::get().is_free_of_tiles(bubble_box, true, Tile::WATER);
return is_out_of_water;
}), m_active_bubbles.end());
=======
>>>>>>> parent of f5eea9bed (Add bubbles while being underwater)
}
else
{
Expand Down Expand Up @@ -2314,13 +2311,10 @@ Player::draw(DrawingContext& context)
get_bonus() == EARTH_BONUS ? Color(1.f, 0.9f, 0.6f) :
Color(1.f, 1.f, 1.f));

for (auto bubble_sprite : m_active_bubbles)
{
context.color().draw_surface(bubble_sprite.first, bubble_sprite.second, LAYER_OBJECTS);
}
m_sprite->set_color(m_stone ? Color(1.f, 1.f, 1.f) : power_color);
}


void
Player::collision_tile(uint32_t tile_attributes)
{
Expand Down
4 changes: 0 additions & 4 deletions src/object/player.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -552,10 +552,6 @@ class Player final : public MovingObject

SurfacePtr m_airarrow; /**< arrow indicating Tux' position when he's above the camera */

SurfacePtr m_bubble_particles[4]; /**< bubble particles for swimming */
Timer m_bubble_timer; /**< timer for spawning bubble particles */
std::vector<std::pair<SurfacePtr, glm::vec2>> m_active_bubbles; /**< active bubble particles */

Vector m_floor_normal;

bool m_ghost_mode; /**< indicates if Tux should float around and through solid objects */
Expand Down

0 comments on commit efe487d

Please sign in to comment.