示例#1
0
//#define TEST_MAIN_02
void loop() {
	#if defined( TEST_MAIN_01 )
		smile(50,50,0);
		while(1);
	#endif

	#if defined( TEST_MAIN_02 )
		for(int col=0; col <= (MAX_MOUTH_COL-1); col++)
		{
			for(int row=0; row< mouthMaxRow[col]; row++)
			{
				set_mouth(col,row,50,50,50);
				pixel_show();
				//delay(400);
				clearPixels();
			}
			
		}
		clearPixels();
		pixel_show();
	
		while(1);
	#endif	
	
  // put your main code here, to run repeatedly:
  
//set_brightness(1);
// emo_content();
// delay(1000);
//loadingFade();
//while(1);

 process_mouth();
// delay(100);
}
示例#2
0
void initWork (int linesNum){
    int curX, curY;
    int green = BACKGROUND_GREEN | BACKGROUND_INTENSITY;
    smile ();
    system ("cls");
    for (curX = 5; curX < 75; curX++)
        for (curY = 2; curY < (6 + linesNum) ; curY++){
        PosColor (curX, curY, green);
        puts(" ");
        }
    for (curX = 5; curX < 75; curX++){
        PosColor (curX, 2, green);
        printf ("*");
        Sleep (10);
    }
    for (curY = 2; curY < (6 + linesNum); curY++){
        PosColor (74, curY, green);
        printf ("*");
        Sleep (10);
    }
    for (curX = 74; curX > 4; curX--){
        PosColor (curX, (5 + linesNum), green);
        printf ("*");
        Sleep (10);
    }
    for (curY = (5 + linesNum); curY > 1; curY--){
        PosColor (5, curY, green);
        printf ("*");
        Sleep (10);
    }
    charmaking (linesNum);
}
示例#3
0
void QTwitchChat::onEmotIconsLoaded()
{
    QNetworkReply *reply = qobject_cast< QNetworkReply * >( sender() );

    QJsonParseError parseError;
    QJsonDocument jsonDoc;

    jsonDoc = QJsonDocument::fromJson( reply->readAll(), &parseError );

    if( parseError.error == QJsonParseError::NoError )
    {
        if( jsonDoc.isObject() )
        {
            emotIcons_.clear();

            QJsonArray jsonEmotIcons = jsonDoc.object()[ "emoticons" ].toArray();

            foreach( const QJsonValue &value, jsonEmotIcons )
            {
                QJsonObject jsonEmotIcon = value.toObject();

                QChatSmile smile(   jsonEmotIcon[ "regex" ].toString(),
                                    jsonEmotIcon[ "url" ].toString(),
                                    jsonEmotIcon[ "width" ].toInt(),
                                    jsonEmotIcon[ "height" ].toInt() );
                //emotIcons_.append( smile );
                emotIcons_.insert( smile.name(), smile );
            }
            if( isShowSystemMessages() )
                emit newMessage( new QChatMessage( TWITCH_SERVICE, TWITCH_USER, "Smiles ready...", "", this ) );
        }
示例#4
0
文件: SSpectral.c 项目: dmt4/atomeye
int main (int argc, char *argv[])
{
    if (argc!=2)
    {
        printf ("Usage: %s 0 (conductivity), or 1 (viscosity)\n", argv[0]);
        return (1);
    }
    smile (atoi(argv[1]), stdout);
    return (0);
} /* end main() */
 void openFade()
 {
	 for(int i = 0; i < 60; i++)
	 {
		 for(int oeil = 0; oeil < EYEPIXELS*2; oeil++)
		 {
			 pixels.setPixelColor(oeil, pixels.Color(i,i,i));
		 }
		 pixels.show();
		 delay(20);
		 smile(i,i,i);
		 pixels.show();
	 }
	 delay(1000);
 }
示例#6
0
int main(void){
	smile();
	smile();
	smile();
	printf("\n");
	smile();smile();
	printf("\n");
	smile();
	printf("\n");
	return 0;
}