// Jason Brillante "Damdoshi"
// Hanged Bunny Studio 2014-2015
//
// Sewer Glue

#include		"SewerGlue.hpp"
#include		"Intro.hpp"
#include		"Menu.hpp"
#include		"Ingame.hpp"
#include		"GameOver.hpp"

bool			hbs::SewerGlue::Start(void)
{
  int			i;

  module[INTRO] = new hbs::Intro;
  module[MENU] = new hbs::Menu;
  module[INGAME] = new hbs::Ingame;
  module[GAMEOVER] = new hbs::GameOver;
  for (i = FIRST_KLONDIKE; i < LAST_KLONDIKE; ++i)
    if (module[i]->Start(*this) == false)
      return (false);
  if (false)
    screen.create(sf::VideoMode::getDesktopMode(), "SewerGlue", sf::Style::Fullscreen);
  else
    screen.create(sf::VideoMode(1280, 768), "SewerGlue");
  if (!screen.isOpen())
    return (false);
  if (lowres_screen.create(167, 92) == false)
    {
      screen.close();
      return (false);
    }
  lowres_screen.clear();

  x_tilesize = screen.getSize().x / 167;
  y_tilesize = screen.getSize().y / 92;

  klondike = INTRO;

  chrono.Reset();
  return (true);
}

