Ejemplo n.º 1
0
bool DocumentChecker::checkDocument(ScribusDoc *currDoc)
{
    struct CheckerPrefs checkerSettings;
    checkerSettings=currDoc->checkerProfiles()[currDoc->curCheckProfile()];
    currDoc->pageErrors.clear();
    currDoc->docItemErrors.clear();
    currDoc->masterItemErrors.clear();
    currDoc->docLayerErrors.clear();

    checkPages(currDoc, checkerSettings);
    checkLayers(currDoc, checkerSettings);
    //update all marks references and check if that changes anything in doc
    currDoc->setNotesChanged(currDoc->updateMarks(true));

    checkItems(currDoc, checkerSettings);

    return (currDoc->hasPreflightErrors());
}
Ejemplo n.º 2
0
LRESULT DownloadPage::onInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
{
	PropPage::translate((HWND)(*this), texts);
	PropPage::read((HWND)*this, items, 0, 0);
	PropPage::read((HWND)*this, items, optionItems, GetDlgItem(IDC_OTHER_QUEUE_OPTIONS));

	setMinMax(IDC_INTERVAL_SPIN, 5, 9999);
	setMinMax(IDC_MATCH_SPIN, 1, 999);
	setMinMax(IDC_AUTO_SEARCH_LIMIT_SPIN, 1, 999);

	setMinMax(IDC_SEG_NUMBER_SPIN, 1, 10);
	setMinMax(IDC_SEARCH_SPIN, 5, 60);
	setMinMax(IDC_BEGIN_SPIN, 2, 100000);

	checkItems();

	// Do specialized reading here
	return TRUE;
}
Ejemplo n.º 3
0
LRESULT DownloadPage::onTick(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/) {
	checkItems();
	return 0;
}
Ejemplo n.º 4
0
/**
    Exécution des éléments
**/
void PlayState::loop(){
    /**
        Gestion des entrées claviers
    */

//    //! Pauser le jeu
//   if(sf::Keyboard::IsKeyPressed(sf::Keyboard::Return))pause();
//
//    //! Control du joueur 1
//    if (sf::Keyboard::IsKeyPressed(sf::Keyboard::M))m_playerOne->Jump();
//    m_playerOne->TurnUp(sf::Keyboard::IsKeyPressed(sf::Keyboard::Up));
//    m_playerOne->Turn(sf::Keyboard::IsKeyPressed(sf::Keyboard::Left),sf::Keyboard::IsKeyPressed(sf::Keyboard::Right));
//    if(sf::Keyboard::IsKeyPressed(sf::Keyboard::N))m_playerOne->Shoot();
//
//
//    //! Control du joueur 2
//    if (sf::Keyboard::IsKeyPressed(sf::Keyboard::G))m_playerTwo->Jump();
//    m_playerTwo->TurnUp(sf::Keyboard::IsKeyPressed(sf::Keyboard::W));
//    m_playerTwo->Turn(sf::Keyboard::IsKeyPressed(sf::Keyboard::A),sf::Keyboard::IsKeyPressed(sf::Keyboard::D));
//    if(sf::Keyboard::IsKeyPressed(sf::Keyboard::F))m_playerTwo->Shoot();

    if(!m_start){
        m_startCoutdown.Reset();
        m_start=true;
    }
    if(m_startCoutdown.GetElapsedTime()>4000){
        if (sf::Keyboard::IsKeyPressed(sf::Keyboard::Return))pause();

        if (sf::Keyboard::IsKeyPressed(sf::Keyboard::L))m_playerTwo->Degat(-40);
        if (sf::Keyboard::IsKeyPressed(sf::Keyboard::Numpad3))m_playerOne->Jump();
        if (sf::Keyboard::IsKeyPressed(sf::Keyboard::Numpad2))m_playerOne->Shoot();
        m_playerOne->TurnUp(sf::Keyboard::IsKeyPressed(sf::Keyboard::Up));
        m_playerOne->Turn(sf::Keyboard::IsKeyPressed(sf::Keyboard::Left),sf::Keyboard::IsKeyPressed(sf::Keyboard::Right));

        if (sf::Keyboard::IsKeyPressed(sf::Keyboard::G))m_playerTwo->Jump();
        if (sf::Keyboard::IsKeyPressed(sf::Keyboard::F))m_playerTwo->Shoot();
        m_playerTwo->TurnUp(sf::Keyboard::IsKeyPressed(sf::Keyboard::W));
        m_playerTwo->Turn(sf::Keyboard::IsKeyPressed(sf::Keyboard::A),sf::Keyboard::IsKeyPressed(sf::Keyboard::D));
//        const sf::Input &Input =m_gameEngine->m_app.GetInput();
//
//        //! Pauser le jeu
//       if(Input.IsKeyDown(sf::Key::Return))pause();
//
//        //! Control du joueur 1
//        if(Input.IsKeyDown(sf::Key::L))m_playerOne->Degat(-40);
//        if(Input.IsKeyDown(sf::Key::Numpad3))m_playerOne->Jump();
//        if(Input.IsKeyDown(sf::Key::Numpad2))m_playerOne->Shoot();
//        m_playerOne->TurnUp(Input.IsKeyDown(sf::Key::Up));
//        m_playerOne->Turn(Input.IsKeyDown(sf::Key::Left),Input.IsKeyDown(sf::Key::Right));
//
//
//        //! Control du joueur 2
//        if (Input.IsKeyDown(sf::Key::G))m_playerTwo->Jump();
//        m_playerTwo->TurnUp(Input.IsKeyDown(sf::Key::W));
//        m_playerTwo->Turn(Input.IsKeyDown(sf::Key::A),Input.IsKeyDown(sf::Key::D));
//        if(Input.IsKeyDown(sf::Key::F))m_playerTwo->Shoot();
    }
     else{
        if(m_coutdown.GetScale().x>2)m_scaleUp=false;
        if(m_coutdown.GetScale().x<1.2)m_scaleUp=true;

        if(m_scaleUp)m_coutdown.SetScale(m_coutdown.GetScale().x+0.002*m_gameEngine->m_app.GetFrameTime(),m_coutdown.GetScale().x+0.002*m_gameEngine->m_app.GetFrameTime());
        else m_coutdown.SetScale(m_coutdown.GetScale().x-0.002*m_gameEngine->m_app.GetFrameTime(),m_coutdown.GetScale().x-0.002*m_gameEngine->m_app.GetFrameTime());

        if(m_startCoutdown.GetElapsedTime()<=1000){
            m_coutdown.setAnimRow(0);
        }
        else if(m_startCoutdown.GetElapsedTime()<=2000){
            m_coutdown.setAnimRow(1);
        }
        else if(m_startCoutdown.GetElapsedTime()<=3000){
            m_coutdown.setAnimRow(2);
        }
        else{
            m_coutdown.setAnimRow(3);
        }
        m_coutdown.SetOrigin(GameConfig::g_imgManag["coutdown"].img.GetWidth()/2,(GameConfig::g_imgManag["coutdown"].img.GetHeight()/GameConfig::g_imgManag["coutdown"].nbrLine)*(1+m_coutdown.animRow()/2.f));
    }
    /**
        Gestion des personnages et objets
    */

 //! Déplacement du personnage 1
    movePlayer(*m_playerOne);

 //! Déplacement du personnage 2
    movePlayer(*m_playerTwo);
 //! Vérifie les items
    checkItems();

 //! Déplacement des objets
    moveObject();

 //! On vérifie si les personnages sont vivant
    if(m_playerOne->IsDead()){
        m_mapEntity->push_back(new GameAnim(GameConfig::g_imgManag["dead"].img,GameConfig::GameConfig::g_imgManag["dead"].nbrCollum,GameConfig::GameConfig::g_imgManag["dead"].nbrLine));
        m_mapEntity->back()->SetPosition(m_playerOne->GetPosition());
        m_mapEntity->back()->Move(0,9);
        m_mapEntity->back()->setDelay(35);
        m_playerOne->SetPosition(m_map->m_spawnLocationOne);
        m_gameMessage.AddMessage("Player 1 has been kill!");
    }
    if(m_playerTwo->IsDead()){
        m_mapEntity->push_back(new GameAnim(GameConfig::g_imgManag["dead"].img,GameConfig::GameConfig::g_imgManag["dead"].nbrCollum,GameConfig::GameConfig::g_imgManag["dead"].nbrLine));
        m_mapEntity->back()->SetPosition(m_playerTwo->GetPosition());
        m_mapEntity->back()->Move(0,8);
        m_mapEntity->back()->setDelay(35);
        m_mapEntity->back()->setAnimRow(1);
        m_playerTwo->SetPosition(m_map->m_spawnLocationTwo);
        m_gameMessage.AddMessage("Player 2 has been kill!");
    }

//! On vérifie si ils ont encore des vies
    if(m_playerOne->GetVie()<=0){
        m_gameEngine->m_gameState.at(3)->init();
        m_gameEngine->changeState(3);
    }
    if(m_playerTwo->GetVie()<=0){
        m_gameEngine->m_gameState.at(3)->stop();
        m_gameEngine->changeState(3);
    }
}