// Jason Brillante "Damdoshi"
// Hanged Bunny Studio 2014-2015
//
// KoBang!

#include		"kobang.hpp"

void			kobang::start(void)
{
  if (!win.isOpen())
    {
      win.create(sf::VideoMode(800, 600), "KoBang!", sf::Style::Fullscreen);
      win.setKeyRepeatEnabled(false);
    }

  width = 14;
  deepness = 5;

  shot.loadFromFile("./shot.ogg");
  get.loadFromFile("./get.ogg");
  shots.setBuffer(shot);
  gets.setBuffer(get);
  shots.setVolume(50);
  gets.setVolume(50);
  music.openFromFile("./music.ogg");
  music.setLoop(true);

  bomb_delay = 20;
  eye_counter = 0;
  serie_cnt = 0;
  catch_serie = 0;
  msg = "";
  msg_timer = 0;
  bombs.clear();
  started = 0;
  herolife = 5;
  heroshield = 2;
  shield_regen = 0;
  heroscore = 0;
  serie = 0;
  bomb_timer = 100;
  sens = 0;
  global_speed = 0.05;
  struct_limit = 0;
  heropos = 0;
  bomberpos = 1;
  nextpos = bomberpos;
  changediscotype();
  disco = 5;
  rcolor = 255;
  gcolor = 0;
  bcolor = 0;
  rot = 44;
  deforming = 0;
  angle = 0;
  speed = 0;
  eye_size = 50;
  color_var = 0;
  randomize = 0;
  backtransparency = 255;
  eye_asked_size = 50;
  deform();
  (this->*(shape[0]))();
  //(this->*(shape[rand() % 3]))();
}
