Beispiel #1
0
void CSListView::reinitItems(ListItem< StatusItem >* items)
{
	EnableWindow(m_handle, FALSE);
	removeItems();
	initItems(items);
	EnableWindow(m_handle, TRUE);
}
Beispiel #2
0
void KyraEngine_MR::preinit() {
	_itemBuffer1 = new int8[72];
	_itemBuffer2 = new int8[144];
	initMouseShapes();
	initItems();

	_screen->setMouseCursor(0, 0, _gameShapes[0]);
}
void Item$initItems()
{
    new WoodKnife(500);
    //new StoneKnife(501);
    //new IronKnife(502);
    //new GoldKnife(503);
    //new DiamondKnife(504);

    _Item$initItems();
}
Beispiel #4
0
void Engine::start()
{
    //start console thread
    console_thread = new sf::Thread(&Engine::console, this);
    console_thread->launch();

    //init curses
    std::cout << "Initializing SFMLCurs...";
    if(initCurses()) std::cout << "done.\n";
    else std::cout << "failed.\n";

    //init screen
    std::cout << "Initializing screen...";
    if(initScreen()) std::cout << "done.\n";
    else std::cout << "failed.\n";

    std::cout << "Initializing liquids...";
    if(initLiquids()) std::cout << "done.\n";
    else std::cout << "failed.\n";

    std::cout << "Initializing map tiles...";
    if(initMapTiles()) std::cout << "done.\n";
    else std::cout << "failed.\n";

    std::cout << "Initializing monster database list...";
    if(initMonsters()) std::cout << "done.\n";
    else std::cout << "failed.\n";

    std::cout << "Initializing item database list...";
    if(initItems()) std::cout << "done.\n";
    else std::cout << "failed.\n";

    //debug noise
    //noisetest();

    std::cout << "Starting new game.\n";
    newGame();

    //start mainloop
    std::cout << "Starting main loop...\n";
    mainLoop();

    //if player died...
    if(!m_Player->isAlive()) playerDeath();

}
worldRenderer::worldRenderer(maze *m) : m(m), bridge(m) {
	pillarBox.setSize(pillarSize, pillarHeight, pillarSize, pillarHeight);
    groundBox.setSize(tileSize, blockHeight * 2.f, tileSize, tileSize);
    wallBox.setSize(tileSize - wallThickness, wallHeight, wallThickness, tileSize * 0.5f);
    startBox.setSize(startBoxSize, startBoxHeight, startBoxSize, startBoxSize);
    endBox.setSize(startBoxSize, startBoxHeight, startBoxSize, startBoxSize);
    arrowBox.setSize(startBoxSize, startBoxHeight, startBoxSize, startBoxSize);
    marble.setSize(marbleRadius, 16, 16);

	width = m->width();
	height = m->height();

	initPillars();
	initGround();
	initWalls();
	initItems();
}
VConfirmDeletionDialog::VConfirmDeletionDialog(const QString &p_title,
                                               const QString &p_text,
                                               const QString &p_info,
                                               const QVector<ConfirmItemInfo> &p_items,
                                               bool p_enableAskAgain,
                                               bool p_askAgainEnabled,
                                               bool p_enablePreview,
                                               QWidget *p_parent)
    : QDialog(p_parent),
      m_enableAskAgain(p_enableAskAgain),
      m_askAgainEnabled(p_askAgainEnabled),
      m_enablePreview(p_enablePreview),
      m_items(p_items)
{
    setupUI(p_title, p_text, p_info);

    initItems();

    updateCountLabel();
}
Beispiel #7
0
void	Client::initAI()
{
  _time = 1260;
  _party = false;
  _seek = false;
  _accept = false;
  _invite = false;
  _leader = true;
  _leaderId = "";
  _lvl = 0;
  _messages.clear();
  _teammate.clear();
  srand(time(NULL));
  _id = rand() % 100000000 + ::getpid();
  _nbCmd = 0;
  if (_height < _width)
    _minEdge = _width;
  else
    _minEdge = _height;
  initItems();
  defineTime();
}
Beispiel #8
0
FFDemo::FFDemo()
{
    mRunning = true;
    SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO);
    mScreen = SDL_SetVideoMode(320, 240, 32, SDL_HWSURFACE | SDL_DOUBLEBUF | SDL_HWACCEL);
    SDL_EnableUNICODE(1);
    SDL_EnableKeyRepeat(SDL_DEFAULT_REPEAT_DELAY, SDL_DEFAULT_REPEAT_INTERVAL);
    SDL_ShowCursor(0);
    SDL_WM_SetCaption("Gui-chan FF demo", NULL);
    Mix_OpenAudio(22050, MIX_DEFAULT_FORMAT, 2, 1024);

    mChooseSound = Mix_LoadWAV("sound/sound1.wav");
    mEscapeSound = Mix_LoadWAV("sound/sound2.wav");

    mSDLImageLoader = new fcn::SDLImageLoader();
    fcn::Image::setImageLoader(mSDLImageLoader); 
    mSDLGraphics = new fcn::SDLGraphics();
    mSDLGraphics->setTarget(mScreen);
    mSDLInput = new fcn::SDLInput();
	
    mSplashImage = fcn::Image::load("images/splash.png");	

    mTop = new fcn::Container();
    mTop->setBaseColor(fcn::Color(0x000000));
    mTop->setDimension(fcn::Rectangle(0, 0, 320, 240));
    mGui = new fcn::Gui();
    mGui->setTabbingEnabled(false);
    mGui->setGraphics(mSDLGraphics);
    mGui->setInput(mSDLInput);	
    mGui->setTop(mTop);
    mFontWhite = new fcn::ImageFont("images/rpgfont.png", " abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.,!?-+/():;%&`'*#=[]\""); 	
    mFontCyan = new fcn::ImageFont("images/rpgfont2.png", " abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.,!?-+/():;%&`'*#=[]\"");	
    fcn::Widget::setGlobalFont(mFontWhite);
	
    initMain();

    mMenu = new FFContainer();
    mMenu->setDimension(fcn::Rectangle(230, 0, 90, 130));
    mMenu->setOpaque(false);
    mTop->add(mMenu);
	
    mGoldFootsteps = new FFContainer();
    mGoldFootsteps->setDimension(fcn::Rectangle(210, 170, 110, 70));
    mGoldFootsteps->setOpaque(false);
    mGoldFootsteps->setFrameSize(0);
    mTop->add(mGoldFootsteps);

    mTime = new FFContainer();
    mTime->setDimension(fcn::Rectangle(230, 130, 90, 40));
    mTime->setOpaque(false);
    mTop->add(mTime);
																	 
    mGoldFootstepsInfo1 = new fcn::TextBox("Steps\n\nGP");
    mGoldFootstepsInfo1->setFont(mFontCyan);
    mGoldFootstepsInfo1->setOpaque(false);
    mGoldFootstepsInfo1->setEditable(false);
    mGoldFootstepsInfo1->setFocusable(false);
    mGoldFootstepsInfo1->setFrameSize(0);
		
    mGoldFootstepsInfo2 = new fcn::TextBox("\n    9119092\n\n    1009213");
    mGoldFootstepsInfo2->setOpaque(false);
    mGoldFootstepsInfo2->setEditable(false);
    mGoldFootstepsInfo2->setFocusable(false);
    mGoldFootstepsInfo2->setFrameSize(0);
	
    mTimeLabel1 = new fcn::Label("Time");
    mTimeLabel1->setFont(mFontCyan);
    mTimeLabel2 = new fcn::Label();
    mTime->add(mTimeLabel1, 5, 5);	
    mTime->add(mTimeLabel2, 22, 20);

	
    mGoldFootsteps->add(mGoldFootstepsInfo2, 5, 0);
    mGoldFootsteps->add(mGoldFootstepsInfo1, 5, 5);
	
    mMenuListModel = new StringListModel();
    mMenuListModel->add("Items");
    mMenuListModel->add("Status");
    mMenuListModel->add("Skills");
    mMenuListModel->add("Magic");
    mMenuListModel->add("About");
    mMenuListModel->add("");
    mMenuListModel->add("Quit");
	
    mMenuList = new FFListBox();
    mMenuList->setActionEventId("menu");
    mMenuList->addActionListener(this);	
    mMenuList->setListModel(mMenuListModel);
    mMenu->add(mMenuList, 5, 5);
    mMenuList->setSelected(0);
    mMenuList->requestFocus();

    initStatus();
    initAbout();
    initItems();
    initMagicSkills();
}
Beispiel #9
0
static void Item$initItems()
{
    BaseItems::initItems();
	
	_Item$initItems();
}
Beispiel #10
0
ColorGrid::ColorGrid(QWidget *parent) :
    QScrollArea(parent),
    mLayout(0)
{
    initItems();
}
void Item$initItems() {
	_Item$initItems();
	
	LeftHandItem = ItemInstance(Item::items[5]); // Enter desired item/block id between these brackets
	// TODO: Find a better place for this and make it changeable
}
Beispiel #12
0
void Item$initItems()
{
	mechanics->initItems();

	_Item$initItems();
}