Beispiel #1
0
game::game(state_machine& sm)
    : m_bkg(load_image_resource("game.png")),
      m_selection(load_image_resource("selection.png", with_alpha)),
      m_digits(load_image_resource("digits.png")),
      m_board_bkg(load_image_resource("board.png", with_alpha)),
      m_queue_bkg(load_image_resource("queue.png", with_alpha)),
      m_bonus_gfx(load_image_resource("bonus.png", with_alpha)),
      m_selx(-1),
      m_sely(-1),
      m_queue(queue_size),
      m_active_special(0),
      m_sm(sm) {
  m_quit.pos() = rect(340, 380, 72, 39);
  m_quit.set_resource(load_button_resource("quit"));
  m_specials[0].m_button.pos() = rect(60, 40, 72, 39);
  m_specials[0].m_button.set_resource(load_button_resource("quit"));
  m_specials[1].m_button.pos() = rect(150, 40, 72, 39);
  m_specials[1].m_button.set_resource(load_button_resource("quit"));
  m_specials[2].m_button.pos() = rect(240, 40, 72, 39);
  m_specials[2].m_button.set_resource(load_button_resource("quit"));
}
Beispiel #2
0
 font(const std::string& name)
     : m_bmp(load_image_resource(name + ".png", with_alpha)) {
   load_def(name);
 }
Beispiel #3
0
 queue(int size) :
   m_size(size),
   m_digits(load_image_resource("digits.png"))
 {
 }