Ejemplo n.º 1
0
/* Start playback of a playlist, checking for bookmark autoload, modified
 * playlists, etc., as required. Returns false if playback wasn't started,
 * or started via bookmark autoload, true otherwise.
 *
 * Pointers to both the full pathname and the separated parts needed to
 * avoid allocating yet another path buffer on the stack (and save some 
 * code; the caller typically needs to create the full pathname anyway)...
 */
bool ft_play_playlist(char* pathname, char* dirname, char* filename)
{
    if (global_settings.party_mode && audio_status()) 
    {
        splash(HZ, ID2P(LANG_PARTY_MODE));
        return false;
    }

    if (bookmark_autoload(pathname))
    {
        return false;
    }

    splash(0, ID2P(LANG_WAIT));

    /* about to create a new current playlist...
       allow user to cancel the operation */
    if (!warn_on_pl_erase())
        return false;

    if (playlist_create(dirname, filename) != -1)
    {
        if (global_settings.playlist_shuffle)
        {
            playlist_shuffle(current_tick, -1);
        }
        
        playlist_start(0, 0);
        return true;
    }
    
    return false;
}
Ejemplo n.º 2
0
/* helper function to remove a non-empty directory */
static int remove_dir(char* dirname, int len)
{
    int result = 0;
    DIR* dir;
    int dirlen = strlen(dirname);

    dir = opendir(dirname);
    if (!dir)
        return -1; /* open error */

    while(true)
    {
        struct dirent* entry;
        /* walk through the directory content */
        entry = readdir(dir);
        if (!entry)
            break;
        struct dirinfo info = dir_get_info(dir, entry);
        dirname[dirlen] ='\0';
        /* inform the user which dir we're deleting */
        splash(0, dirname);

        /* append name to current directory */
        snprintf(dirname+dirlen, len-dirlen, "/%s", entry->d_name);
        if (info.attribute & ATTR_DIRECTORY)
        {   /* remove a subdirectory */
            if (!strcmp((char *)entry->d_name, ".") ||
                !strcmp((char *)entry->d_name, ".."))
                continue; /* skip these */

            result = remove_dir(dirname, len); /* recursion */
            if (result)
                break; /* or better continue, delete what we can? */
        }
        else
        {   /* remove a file */
            draw_slider();
            result = remove(dirname);
        }
        if(ACTION_STD_CANCEL == get_action(CONTEXT_STD,TIMEOUT_NOBLOCK))
        {
            splash(HZ, ID2P(LANG_CANCEL));
            result = -1;
            break;
        }
    }
    closedir(dir);

    if (!result)
    {   /* remove the now empty directory */
        dirname[dirlen] = '\0'; /* terminate to original length */

        result = rmdir(dirname);
    }

    return result;
}
Ejemplo n.º 3
0
void levelMap::splash(int x, int y, int rec){
	if( x > 0 && x < (x_dim-1) && y > 0 && y < (y_dim-1) && rec > 0){
		if( Map[y][x].Floor != 0x128){
		     Map[y][x].Floor = 0x128;
		}

		 
			splash(x+1 , y+1 , rec-1 );
			splash(x , y+1 , rec-1 );
			splash(x-1 , y+1 , rec-1 );

			splash(x-1 , y , rec-1 );
			splash(x+1 , y , rec-1 );

			splash(x+1 , y-1 , rec-1 );
			splash(x , y-1 , rec-1 );
			splash(x-1 , y-1 , rec-1 );


	} else if ( x == 0 || x == (x_dim-1) || y == 0 || y == (y_dim-1) || rec == 0){

			if( Map[y][x].Floor != 0x128){
		     Map[y][x].Floor = 0x129;
		}
	}

}
Ejemplo n.º 4
0
bool settings_save_config(int options)
{
    char filename[MAX_PATH];
    char *folder, *namebase;
    switch (options)
    {
        case SETTINGS_SAVE_THEME:
            folder = THEME_DIR;
            namebase = "theme";
            break;
#ifdef HAVE_RECORDING
        case SETTINGS_SAVE_RECPRESETS:
            folder = RECPRESETS_DIR;
            namebase = "recording";
            break;
#endif
#if CONFIG_CODEC == SWCODEC
        case SETTINGS_SAVE_EQPRESET:
            folder = EQS_DIR;
            namebase = "eq";
            break;
#endif
        case SETTINGS_SAVE_SOUND:
            folder = ROCKBOX_DIR;
            namebase = "sound";
            break;
        default:
            folder = ROCKBOX_DIR;
            namebase = "config";
            break;
    }
    create_numbered_filename(filename, folder, namebase, ".cfg", 2
                             IF_CNFN_NUM_(, NULL));

    /* allow user to modify filename */
    while (true) {
        if (!kbd_input(filename, sizeof filename)) {
            break;
        }
        else {
            return false;
        }
    }

    if (settings_write_config(filename, options))
        splash(HZ, ID2P(LANG_SETTINGS_SAVED));
    else
        splash(HZ, ID2P(LANG_FAILED));
    return true;
}
Ejemplo n.º 5
0
int main(int argc, char **argv)
{
#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC)
    QCoreApplication::setAttribute(Qt::AA_X11InitThreads);
#endif
    Application a(argc, argv);
    QSplashScreen splash(QPixmap(":/icons/shotcut-logo-640.png"));
    splash.showMessage(QCoreApplication::translate("main", "Loading plugins..."), Qt::AlignHCenter | Qt::AlignBottom);
    splash.show();

    a.setProperty("system-style", a.style()->objectName());
    MainWindow::changeTheme(Settings.theme());

    a.mainWindow = &MAIN;
    a.mainWindow->show();
    a.mainWindow->setFullScreen(a.isFullScreen);
    splash.finish(a.mainWindow);

    if (!a.resourceArg.isEmpty())
        a.mainWindow->open(a.resourceArg);
    else
        a.mainWindow->open(a.mainWindow->untitledFileName());

    int result = a.exec();

    if (EXIT_RESTART == result) {
        qDebug() << "restarting app";
        QProcess* restart = new QProcess;
        restart->start(a.applicationFilePath(), QStringList());
        restart->waitForReadyRead();
        restart->waitForFinished(1000);
        result = EXIT_SUCCESS;
    }
    return result;
}
Ejemplo n.º 6
0
void 
usage(void)
{
  splash();
  printf("     fileop [-f X ]|[-l # -u #] [-s Y] [-e] [-b] [-w] [-d <dir>] [-t] [-v] [-h]\n");
  printf("\n");
  printf("     -f #      Force factor. X^3 files will be created and removed.\n");
  printf("     -l #      Lower limit on the value of the Force factor.\n");
  printf("     -u #      Upper limit on the value of the Force factor.\n");
  printf("     -s #      Optional. Sets filesize for the create/write. May use suffix 'K' or 'M'.\n");
  printf("     -e        Excel importable format.\n");
  printf("     -b        Output best case results.\n");
  printf("     -w        Output worst case results.\n");
  printf("     -d <dir>  Specify starting directory.\n");
  printf("     -U <dir>  Mount point to remount between tests.\n");
  printf("     -t        Verbose output option.\n");
  printf("     -v        Version information.\n");
  printf("     -h        Help text.\n");
  printf("\n");
  printf("     The structure of the file tree is:\n");
  printf("     X number of Level 1 directories, with X number of\n");
  printf("     level 2 directories, with X number of files in each\n");
  printf("     of the level 2 directories.\n");
  printf("\n");
  printf("     Example:  fileop 2\n");
  printf("\n");
  printf("             dir_1                        dir_2\n");
  printf("            /     \\                      /     \\ \n");
  printf("      sdir_1       sdir_2          sdir_1       sdir_2\n");
  printf("      /     \\     /     \\          /     \\      /     \\ \n");
  printf("   file_1 file_2 file_1 file_2   file_1 file_2 file_1 file_2\n");
  printf("\n");
  printf("   Each file will be created, and then Y bytes is written to the file.\n");
  printf("\n");
}
Ejemplo n.º 7
0
/* ------------------------------------------------------------------------*/
static bool write_bookmark(bool create_bookmark_file, const char *bookmark)
{
    bool ret=true;

    if (!bookmark)
    {
       ret = false; /* something didn't happen correctly, do nothing */
    }
    else
    {
        if (global_settings.usemrb)
            ret = add_bookmark(RECENT_BOOKMARK_FILE, bookmark, true);


        /* writing the bookmark */
        if (create_bookmark_file)
        {
            char* name = playlist_get_name(NULL, global_temp_buffer,
                                       sizeof(global_temp_buffer));
            if (generate_bookmark_file_name(name))
            {
                ret = ret & add_bookmark(global_bookmark_file_name, bookmark, false);
            }
            else
            {
                ret = false; /* generating bookmark file failed */
            }
        }
    }

    splash(HZ, ret ? ID2P(LANG_BOOKMARK_CREATE_SUCCESS)
           : ID2P(LANG_BOOKMARK_CREATE_FAILURE));

    return ret;
}
/**************************************************************************//**
*
* main
*
* @brief      main function
*
* @param      -
*
* @return     -
*
******************************************************************************/
void main(void)
{
  uint8_t data;

  // source ACLK with internal VLO clock
  BCSCTL3 |= LFXT1S_2;

  // Set DCO register value based on the selected input clock frequency
  BCSCTL1 = BCSCTL1_VAL;
  DCOCTL = DCOCTL_VAL;

  // set GPIO as UART pins - P1.1=UCA0RXD, P1.2=UCA0TXD
  P1SEL = BIT1 + BIT2 ;
  P1SEL2 = BIT1 + BIT2;

  // setup USCI UART registers
  UCA0CTL1 |= UCSSEL_2 + UCSWRST;
  UCA0BR0 = USCI_BR0_VAL;
  UCA0BR1 = USCI_BR1_VAL;
  UCA0MCTL = USCI_BRS_VAL;
  UCA0CTL1 &= ~UCSWRST;

  // do somekind of splash screen
  splash();

  while(1)
  {
    if(rcvByte(&data) == true)
    {
      // echo back the received data
      sendByte(data);
    }
  }
}
Ejemplo n.º 9
0
int main()
{
	int seed = 0;
	int state = SPLASH;
	while(1)
	{
		switch(state)
		{
		case SPLASH:
			seed = splash();
			state = GAME;
			break;
		case GAME:
			state = game(seed);
			break;
		case WIN:
			win();
			state = SPLASH;
			break;
		case LOSE:
			lose();
			state = SPLASH;
			break;
		}
	}
}
Ejemplo n.º 10
0
static int clear_start_directory(void)
{
    strcpy(global_settings.start_directory, "/");
    settings_save();
    splash(HZ, ID2P(LANG_RESET_DONE_CLEAR));
    return false;
}
Ejemplo n.º 11
0
bool check_rockboxdir(void)
{
    if(!dir_exists(ROCKBOX_DIR))
    {   /* No need to localise this message.
           If .rockbox is missing, it wouldn't work anyway */
        int i;
        FOR_NB_SCREENS(i)
            screens[i].clear_display();
        splash(HZ*2, "No .rockbox directory");
        FOR_NB_SCREENS(i)
            screens[i].clear_display();
        splash(HZ*2, "Installation incomplete");
        return false;
    }
    return true;
}
Ejemplo n.º 12
0
void showOSD(int argc, char **argv, QString message){
  //Setup the application
  QApplication App(argc, argv);
    LUtils::LoadTranslation(&App,"lumina-open");

  //Display the OSD
  QPixmap pix(":/icons/OSD.png");
  QLabel splash(0, Qt::Window | Qt::WindowStaysOnTopHint | Qt::X11BypassWindowManagerHint);
     splash.setWindowTitle("");
     splash.setStyleSheet("QLabel{background: black; color: white; font-weight: bold; font-size: 13pt; margin: 1ex;}");
     splash.setAlignment(Qt::AlignCenter);


  qDebug() << "Display OSD";
  splash.setText(message);
  //Make sure it is centered on the current screen
  QPoint center = App.desktop()->screenGeometry(QCursor::pos()).center();
  splash.move(center.x()-(splash.sizeHint().width()/2), center.y()-(splash.sizeHint().height()/2));
  splash.show();
  //qDebug() << " - show message";
  //qDebug() << " - loop";
  QDateTime end = QDateTime::currentDateTime().addMSecs(800);
  while(QDateTime::currentDateTime() < end){ App.processEvents(); }
  splash.hide();
}
Ejemplo n.º 13
0
int main(int argc, char *argv[])
{
    QApplication a(argc, argv);

    settings.setIniCodec("UTF-8");

    a.addLibraryPath(a.applicationDirPath() + "/lib/");

    int loc = QLocale::system().language();
    QString locale = settings.value("Preferences/lang").value<QString>();
    QTranslator translator;
    if(locale.isEmpty())
    {
        translator.load(a.applicationDirPath() + "/language/" + findLocaleN(loc, a.applicationDirPath()));
        a.installTranslator(&translator);
    }
    else
    {
        translator.load(a.applicationDirPath() + "/language/" + findLocaleS(locale, a.applicationDirPath()));
        a.installTranslator(&translator);
    }

    QPixmap pixmap(":icons/splash.png");
    QSplashScreen splash(pixmap, Qt::WindowStaysOnTopHint);
    splash.setMask(pixmap.mask());
    splash.show();


    Caesium w;
    QTimer::singleShot(400, &splash, SLOT(close()));
    QTimer::singleShot(400, &w, SLOT(show()));

    return a.exec();
}
Ejemplo n.º 14
0
Archivo: main.cpp Proyecto: everpan/ark
int main(int argc, char *argv[])
{
    BrowserApplication a(argc, argv);
    //MainWindow w;
    BrowserMainWindow w;
    QRect maxRect;
    {
        QDesktopWidget desktop;
        maxRect = desktop.availableGeometry();
        maxRect.adjust(50,50,-50,-50);
    }
    w.setGeometry(maxRect);

    qDebug() << QApplication::applicationDirPath() << QApplication::applicationFilePath();
    {
        QPixmap splashPixmap(QApplication::applicationDirPath() + "/comm/conf/pics/splash.png");
        QSplashScreen splash(splashPixmap);
        splash.show();

        enum {
            splashTime = 1500
        };
        QTimer timer;
        timer.start(splashTime);
        do {
            a.processEvents();
            splash.showMessage(QString("Loading Process: %1%").arg(timer.remainingTime()*100.0/splashTime),Qt::AlignBottom);
        } while(timer.remainingTime() > 1);

        splash.finish(&w);
    }
    w.show();
    a.processEvents();
    return a.exec();
}
Ejemplo n.º 15
0
int main(int argc, char *argv[])
{
    QApplication a(argc, argv);
    QTextCodec* code = QTextCodec::codecForName("UTF-8");
    QTextCodec::setCodecForLocale(code);

    QTranslator translator;
    if(clsUserFunction::getLanguage()==1)
    {

        translator.load(":/WDLR_ZH.qm");
       qDebug()<< a.installTranslator(&translator);
    }

    QPixmap pixmap(":/splashScreen.png");
    QSplashScreen splash(pixmap);
    splash.show();
    splash.setFont(QFont("楷体",12, QFont::Bold));
    splash.showMessage(QObject::tr("INITIALIZING WINDOW, PLEASE WAIT"),Qt::AlignBottom |Qt::AlignRight,QColor::fromRgb(240,81,51));
    a.processEvents();

    clsUserFunction::sleepMs(2000);

    MainWindow w;
    splash.finish(&w);
    w.showMaximized();


    return a.exec();
}
Ejemplo n.º 16
0
/*
    Test that a message box pops up in front of a QSplashScreen.
*/
void tst_MacGui::splashScreenModality()
{
    QPixmap pix(300, 300);
    QSplashScreen splash(pix);
    splash.show();

    QMessageBox box;
    //box.setWindowFlags(box.windowFlags() | Qt::WindowStaysOnTopHint);
    box.setText("accessible?");
    box.show();

    QSKIP("QTBUG-35169");

    // Find the "OK" button and schedule a press.
    QAccessibleInterface *interface = wn.find(QAccessible::Name, "OK", &box);
    QVERIFY(interface);
    const int delay = 1000;
    clickLater(interface, Qt::LeftButton, delay);

    // Show dialog and enter event loop.
    connect(wn.getWidget(interface), SIGNAL(clicked()), SLOT(exitLoopSlot()));
    const int timeout = 4;
    QTestEventLoop::instance().enterLoop(timeout);
    QVERIFY(QTestEventLoop::instance().timeout() == false);
}
Ejemplo n.º 17
0
void Game::run() {
	running = true;

	ResourceImage logo("windsdonLogo", "res/logo.png");
	ResourceImage splash("splash", "res/splash.png");

	font.loadFromFile("res/visitor1.ttf");

	logo.load();
	splash.load();

	intro = new Intro(&logo, &splash);

	renderer.addLayer("background");
	renderer.addLayer("game");
	renderer.addLayer("gui");

	renderer.addObject(intro, 0);

	Babel::addLanguage(*(new Language("lang/en.lang")));

	renderer.getWindow()->setTitle(Babel::get("game.name"));

	while (running) {
		loop();
	}

	Logger::getInstance().log("Execution terminated");
}
Ejemplo n.º 18
0
bool GUI::OnInit()
{
	wxImage::AddHandler(new wxPNGHandler());
	wxImage::AddHandler(new wxJPEGHandler());
	wxImage::AddHandler(new wxBMPHandler());

	// Load logo.
	wxBitmap bitmap(
		"..\\materials\\textures\\3d-city.bmp",
		wxBITMAP_TYPE_BMP);

	// Display splash screen.
	wxSplashScreen splash(
		bitmap, wxSPLASH_CENTRE_ON_SCREEN | wxSPLASH_NO_TIMEOUT,
		0, NULL, -1, wxDefaultPosition, wxSize(400, 300),
		wxSIMPLE_BORDER);

	// Create global objects.
	mCity = new City();
	mGraphics = new Graphics();

	// Create main window.
	mMain = new Main();
	mMain->Center();
	mMain->Show();
	mMain->Maximize();

	// Init resources (must be called after render window creation).
	Graphics::getSingleton().initResources();

	return wxApp::OnInit();
}
Ejemplo n.º 19
0
int ACE_TMAIN(int argc, ACE_TCHAR *argv[])
{
  // Initialize the application, consume any Qt arguments.
  ACE_Argv_Type_Converter conv(argc, argv);
  QApplication  application(conv.get_argc(), conv.get_ASCII_argv());
  QPixmap       splashImage(":/jpeg/splash.jpg");
  QSplashScreen splash(splashImage);
  splash.show();
  application.processEvents();

  // Initialize the service and consume the ACE+TAO+DDS arguments.
  TheParticipantFactoryWithArgs(argc, argv);
  application.processEvents();

  // Load the Tcp transport library as we know that we will be
  // using it.
  ACE_Service_Config::process_directive(
    ACE_TEXT("dynamic OpenDDS_Tcp Service_Object * ")
    ACE_TEXT("OpenDDS_Tcp:_make_TcpLoader()")
  );
  application.processEvents();

  // Process the command line arguments left after ACE and Qt have had a go.
  Monitor::Options options(argc, argv);
  application.processEvents();

  // Instantiate and display.
  Monitor::Viewer* viewer = new Monitor::Viewer(options);
  viewer->show();
  splash.finish(viewer);

  // Main GUI processing loop.
  return application.exec();
}
Ejemplo n.º 20
0
int main()
{
    GameState g;
    STATE current = INIT;

    while (true)
    {
        switch (current)
        {
        case INIT:
            splash();
        case MAIN:
            current = mainMenu();
            break;
        case PLAY:
            g.play();
        case GAME:
            current = g.update();
            break;
        case EXIT:
            fareTheWell();
            return 0;
        }
    }
}
Ejemplo n.º 21
0
void Game::update()
{
   m_character->update();
   for(int i=0; i<m_gameObjects; i++)
      m_myGameObjects[i]->collide(m_character);

   for(int i=0; i<m_gameObjects; i++)
      m_myGameObjects[i]->update();

   glClearColor(1.0, 1.0, 1.0, 0.0);
   glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);     // clear the screen
//clear the screen
    // Display the current score
   char string[40];
   sprintf(string, "Score:%d\n", m_score);
   sprintf(string, "Press P to Pause\n");
   RenderString(0, m_height-20, GLUT_BITMAP_TIMES_ROMAN_24, string);

   glMatrixMode(GL_MODELVIEW);
   glLoadIdentity();


   m_character->display();
   for(int i=0; i<m_gameObjects; i++)
      m_myGameObjects[i]->display();
   
   glFlush();


   if (!isRunning()) return splash();

}
Ejemplo n.º 22
0
void
usage(void)
{
    splash();
    printf("     fileop [-f X ]|[-l # -u #] [-s Y] [-t] [-v] [-e] [-b] -[w]\n");
    printf("\n");
    printf("     -f # Force factor. X^3 files will be created and removed.\n");
    printf("     -l # Lower limit on the value of the Force factor.\n");
    printf("     -u # Upper limit on the value of the Force factor.\n");
    printf("     -s # Optional. Sets filesize for the create/write.\n");
    printf("     -t # Verbose output option.\n");
    printf("     -v # Version information.\n");
    printf("     -e # Excel importable format.\n");
    printf("     -b Output best case results\n");
    printf("     -w Output worst case results\n");
    printf("\n");
    printf("     The structure of the file tree is:\n");
    printf("     X number of Level 1 directorys, with X number of\n");
    printf("     level 2 directories, with X number of files in each\n");
    printf("     of the level 2 directories.\n");
    printf("\n");
    printf("     Example:  fileop 2\n");
    printf("\n");
    printf("             dir_1                        dir_2\n");
    printf("            /     \\                      /     \\ \n");
    printf("      sdir_1       sdir_2          sdir_1       sdir_2\n");
    printf("      /     \\     /     \\          /     \\      /     \\ \n");
    printf("   file_1 file_2 file_1 file_2   file_1 file_2 file_1 file_2\n");
    printf("\n");
    printf("   Each file will be created, and then Y bytes is written to the file.\n");
    printf("\n");
}
Ejemplo n.º 23
0
void Game::ShowSplashScreen()
{
  SplashScreen splash("Resources\\images\\Splashscreen.png");
  splash.Show(m_mainWindow);
  // when you exit the splash screen you go in to title mode
  m_gameState = Game::eShowingTitle;
}
Ejemplo n.º 24
0
int codec_load_file(const char *plugin, struct codec_api *api)
{
    char msgbuf[80];
    int fd;
    int rc;
    
    /* zero out codec buffer to ensure a properly zeroed bss area */
    memset(codecbuf, 0, CODEC_SIZE);

    fd = open(plugin, O_RDONLY);
    if (fd < 0) {
        snprintf(msgbuf, sizeof(msgbuf)-1, "Couldn't load codec: %s", plugin);
        logf("Codec load error:%d", fd);
        splash(HZ*2, true, msgbuf);
        return fd;
    }
    
    rc = read(fd, &codecbuf[0], CODEC_SIZE);
    close(fd);
    if (rc <= 0) {
        logf("Codec read error");
        return CODEC_ERROR;
    }

    return codec_load_ram(codecbuf, (size_t)rc, NULL, 0, api);
}
Ejemplo n.º 25
0
int main(int argc, char *argv[])
{
    QString changeLang;

    QApplication a(argc, argv);

    // Check what directory our app is in
    QString appDir;
    if ( QFile::exists("/usr/local/bin/pc-firstboot") )
      appDir = "/usr/local/share/pcbsd";
    else
      appDir = QCoreApplication::applicationDirPath();

    QTranslator translator;
    QLocale mylocale;
    QString langCode = mylocale.name();

    if ( ! changeLang.isEmpty() )       
       langCode = changeLang;

    if ( QFile::exists(appDir + "/i18n/FirstBoot_" + langCode + ".qm" ) ) {
      translator.load( QString("FirstBoot_") + langCode, appDir + "/i18n/" );
      a.installTranslator(&translator);
      qDebug() << "Loaded Translation:" << appDir + "/i18n/FirstBoot_" + langCode + ".qm";
    } else if ( QFile::exists(appDir + "/i18n/FirstBoot_" + langCode.section("_", 0, 0) + ".qm" ) ) {
      translator.load( QString("FirstBoot_") + langCode.section("_", 0, 0), appDir + "/i18n/" );
      a.installTranslator(&translator);
      qDebug() << "Loaded Translation:" << appDir + "/i18n/FirstBoot_" + langCode.section("_", 0, 0) + ".qm";
    } else {
      qDebug() << "Could not find: " << appDir + "/i18n/FirstBoot_" + langCode + ".qm";
      langCode = "";
    }
    QTextCodec::setCodecForLocale( QTextCodec::codecForName("UTF-8") ); //Force Utf-8 compliance
    // Show our splash screen, so the user doesn't freak that that it takes a few seconds to show up
    QPixmap pixmap(":/PCBSD/images/pcbsdheader.png");
    QSplashScreen splash(pixmap);
    splash.show();


    Installer w;

    // Center the installer
    /*QRect dimensions = QApplication::desktop()->screenGeometry();
    int wid = dimensions.width();     // returns desktop width
    int hig = dimensions.height();    // returns desktop height
    QRect wizDimensions = w.geometry();
    int wizWid = wizDimensions.width(); // Wizard width
    int wizHig = wizDimensions.height(); // Wizard height
    qDebug() << "WizWid" << wizWid;
    qDebug() << "WizHig" << wizHig;
    w.setGeometry((wid/2) - (wizWid/2), (hig/2) - (wizHig/2), wizWid, wizHig);*/

    // Start the init
    w.initInstall();

    w.show();
    splash.finish(&w);
    
    return a.exec();
}
Ejemplo n.º 26
0
int main(int argc, char *argv[]) {
  LogManager &log_manager = LogManager::getInstance();
  WorldManager &world_manager = WorldManager::getInstance();
  world_manager.startUp();
  // Start up game manager.
  GameManager &game_manager = GameManager::getInstance();
  if (game_manager.startUp())  {
    log_manager.writeLog("Error starting game manager!");
    game_manager.shutDown();
    return 0;
  }

  // Set flush of logfile during development (when done, make false).
  log_manager.setFlush(true);

  // Show splash screen.
  splash();

  // Load game resources.
  loadResources();

  // Populate game world with some objects.
  populateWorld();
 
  // Enable player to pause game (press F10).
  new Pause;

  // Run game (this blocks until game loop is over).
  game_manager.run();
 
  // Shut everything down.
  game_manager.shutDown();
}
Ejemplo n.º 27
0
static int wpsscrn(void* param)
{
    int ret_val = GO_TO_PREVIOUS;
    (void)param;
    if (audio_status())
    {
        talk_shutup();
        ret_val = gui_wps_show();
    }
    else if ( global_status.resume_index != -1 )
    {
        DEBUGF("Resume index %X offset %lX\n",
               global_status.resume_index,
               (unsigned long)global_status.resume_offset);
        if (playlist_resume() != -1)
        {
            playlist_start(global_status.resume_index,
                global_status.resume_offset);
            ret_val = gui_wps_show();
        }
    }
    else
    {
        splash(HZ*2, ID2P(LANG_NOTHING_TO_RESUME));
    }
    return ret_val;
}
Ejemplo n.º 28
0
coordinate levelMap::levelGen(){
	//number_of_rooms =  new int(20);  //CHANGE TO ADD ROOMS
	x = new int[number_of_rooms];
	y = new int[number_of_rooms];

	//pick center of rooms
	for( int a = 0; a < number_of_rooms; a++){

		x[a] = (rand() % (x_dim - 6)) + 3;

		y[a] = (rand() % (x_dim - 6)) + 3;

	}
	//splash rooms
	for( int a = 0; a < number_of_rooms; a++){
	
		Map[y[a]][x[a]].Floor = 0x101;


	}
	for (int b = 0; b <number_of_rooms; b++){
		splash(x[b] , y[b], 5);
		
	}
	//connect rooms

		corridorLink(x[0], y[0], x[1], y[1]);
		for(int g = 1; g< number_of_rooms; g++){
			corridorLink(x[g-1], y[g-1], x[g], y[g]);
		}
		
		return( coordinate(x[0], y[0]) );

}
Ejemplo n.º 29
0
int main( int argc, char** argv )
{
	typedef std::auto_ptr<LinguisticaMainWindow> main_window_ptr;
	QApplication app(argc, argv);

	main_window_ptr main_window;
	
	{
		// splash screen image is linked into the Linguistica
		// executable (see linguistica.qrc)
		QSplashScreen splash(QPixmap(":/splash.png"));
		splash.show();

		main_window = main_window_ptr(new LinguisticaMainWindow(
					argc, argv, &app, NULL, 0));
		if (main_window->commandLineMode())
			// Don’t show main window; just exit.
			return 0;

		app.setMainWidget(main_window.get());
		splash.finish(main_window.get());
	}

	main_window->show();
	return app.exec();
}
Ejemplo n.º 30
0
static int wpsscrn(void* param)
{
    int ret_val = GO_TO_PREVIOUS;
    (void)param;
    push_current_activity(ACTIVITY_WPS);
    if (audio_status())
    {
        talk_shutup();
        ret_val = gui_wps_show();
    }
    else if ( global_status.resume_index != -1 )
    {
        DEBUGF("Resume index %X crc32 %lX offset %lX\n",
               global_status.resume_index,
               (unsigned long)global_status.resume_crc32,
               (unsigned long)global_status.resume_offset);
        if (playlist_resume() != -1)
        {
            playlist_resume_track(global_status.resume_index,
                global_status.resume_crc32,
                global_status.resume_elapsed,
                global_status.resume_offset);
            ret_val = gui_wps_show();
        }
    }
    else
    {
        splash(HZ*2, ID2P(LANG_NOTHING_TO_RESUME));
    }
    pop_current_activity();
    return ret_val;
}