Exemplo n.º 1
0
/**
*Method to show the rules.User can leave this screen by pressing any key
*/
void showRules(){
	startBuffer(70);
	setLineAlign(0);
	output("[ RULES ]\n\n");
	setLineAlign(-1);
	output("This a implementation of the famous two player game \"Connect Four\".\nSo you'll need a friend to play this game :) To win you simply have to\nconnect four of your chips in a row. This row can be horizontal,\nvertical or diagonal,it doesn't matter as long as there are no \"enemy\"\nchips between your chips.\nThe game will automatically end if one you won and take you to the\n\"Hall of Shame\"\n\n");
	setLineAlign(0);
	output("[ Press any key to return to main menu ]\n");
	flushBuffer();
	getch();
}
Exemplo n.º 2
0
void SoundEngine::sweepInputFile(const qint64 &audioLength, const QAudioFormat &format)
{
    emit reset();

    int channelCount=format.channelCount();
    QByteArray startBuffer(4410*channelCount,0);
    m_backingTrack->m_inputFile->seek(m_backingTrack->m_inputFile->headerLength());

        while(!m_backingTrack->m_inputFile->atEnd())
        {
            m_backingTrack->m_inputFile->read(startBuffer.data(),3528*channelCount);
            m_backingTrack->calculateLevel(startBuffer,3528*channelCount);
            emit drawingBackEnabled(m_backingTrack->m_level);
        }

    emit timeLinePosition(0);

}