- context.set_alpha(alpha);
- context.draw_surface(background2, Vector(SCREEN_WIDTH/2 - background->get_width()/2 - background->get_width() + backgroundOffset, height - background->get_height()), layer);
- context.draw_surface(background2, Vector(SCREEN_WIDTH/2 - background->get_width()/2 + backgroundOffset, height - background->get_height()), layer);
- for (int x = (SCREEN_WIDTH/2 - background->get_width()/2 - (static_cast<int>(ceilf((float)SCREEN_WIDTH / (float)background->get_width()) - 1) * background->get_width())); x < SCREEN_WIDTH; x+=background->get_width()) {
- context.draw_surface(background, Vector(x, height - background->get_height()), layer);
+ context.set_alpha(m_alpha);
+ context.draw_surface(m_background2,
+ Vector(SCREEN_WIDTH/2 - m_background->get_width()/2 - m_background->get_width() + m_backgroundOffset,
+ m_height - m_background->get_height()),
+ layer);
+ context.draw_surface(m_background2,
+ Vector(SCREEN_WIDTH/2 - m_background->get_width()/2 + m_backgroundOffset,
+ m_height - m_background->get_height()),
+ layer);
+ for (int x = (SCREEN_WIDTH/2 - m_background->get_width()/2
+ - (static_cast<int>(ceilf((float)SCREEN_WIDTH /
+ (float)m_background->get_width()) - 1) * m_background->get_width()));
+ x < SCREEN_WIDTH;
+ x += m_background->get_width())
+ {
+ context.draw_surface(m_background, Vector(x, m_height - m_background->get_height()), layer);