Beispiel #1
0
main()
{
	int	a,b,c,x,y,rx,ry,rz,n=8,p1,p2;
	printf("Starting");
	testasm();
	outp(0x3c8,0);
	for(a=0;a<256;a++)
	{
		int	r=0,g=0,b=0;
		if(a&4) r+=30; 
		if(a&8) g+=30; 
		if(a&16) b+=30; 
		if(a&32) { r+=30; g+=30; }
		if(a&64) { g+=30; b+=30; }
		if(a&128) { b+=30; r+=30; }
		outp(0x3c9,r);
		outp(0x3c9,g);
		outp(0x3c9,b);
	}
	while(!kbhit())
	{
		initnewgroup();
		rz+=5; ry+=7; rz+=6;
		rx%=3600; ry%=3600; rz%=3600;
		cmatrix_yxz(rx,ry,rz,matrix);
		csetmatrix(matrix,0,0,4000);
		points2[0]=0; crotlist(points2,points);
		//cclipedges(edges2,edges,points2);
		points3[0]=0; cprojlist(points3,points2);
		cpolylist(polylist,polys,edges,points3);
		asm();
		cdrawpolylist(polylist);
		//cdrawpolylist(testlist);
		setborder(40);
		drawnewgroup();
		setborder(10);
		#if 0
		n=edges[0];
		for(a=2,b=0;b<n;b++)
		{
			p1=edges[a++];
			p2=edges[a++];
			a+=2;
			testline(points3[p1*6+2],points3[p1*6+3],points3[p2*6+2],points3[p2*6+3],63);
		}
		#endif
	}
	_asm mov ax,3
	_asm int 10h
	for(a=0;a<100;)
	{
		b=polylist[a++];
		c=polylist[a++];
		if(!b) break;
		printf("s:%i c:%i v:",b,c);
		for(x=0;x<b;x++)
		{
			printf("%i,%i ",polylist[a+0],polylist[a+1]);
			a+=2;
		}
		printf("\n");
	}
	printf("points2: %Fp\n",points2);
}
Beispiel #2
0
QStringList ABSHandler::getMakeDepends( const QString &package )
{
    QStringList retList;

    retList.clear();

    QDir absDir( "/var/abs" );
    absDir.setFilter( QDir::Dirs | QDir::NoDotAndDotDot | QDir::NoSymLinks );

    QString absSource( ABSHandler::getABSPath( package ) );

    if ( absSource.isEmpty() )
        return retList;

    if ( !absSource.endsWith( QChar( '/' ) ) )
        absSource.append( QChar( '/' ) );

    absSource.append( "PKGBUILD" );

    QFile fp( absSource );

    if ( !fp.open( QIODevice::ReadOnly | QIODevice::Text ) )
        return retList;

    QTextStream in( &fp );

    while ( !in.atEnd() ) {
        QString line = in.readLine();

        if ( !line.startsWith( "makedepends" ) )
            continue;

        QString testline( line );
        testline.remove( ' ' );

        while ( true ) {
            if ( line.contains( '(' ) )
                line = line.split( '(' ).at( 1 );

            foreach( const QString &rdep, line.split( QChar( '\'' ), QString::SkipEmptyParts ) ) {
                QString dep( rdep );

                if ( !dep.contains( ')' ) && !dep.contains( ' ' ) ) {
                    if ( dep.contains( '>' ) )
                        dep.truncate( dep.indexOf( '>' ) );

                    if ( dep.contains( '<' ) )
                        dep.truncate( dep.indexOf( '<' ) );

                    if ( dep.contains( '=' ) )
                        dep.truncate( dep.indexOf( '=' ) );

                    qDebug() << "Adding" << dep;

                    retList.append( dep );
                }
            }

            if ( testline.endsWith( ')' ) )
                break;

            line = in.readLine();

            testline = line;
            testline.remove( ' ' );
        }

        break;
    }

    fp.close();

    return retList;
}
Beispiel #3
0
main()
{
	int	a,b,c,x,y,rx,ry,rz,n=8,p1,p2,r,g,zpos=7000;
	testasm();
	//initnewgroup();
	outp(0x3c8,0);
	for(a=0;a<64;a++)
	{
		r=g=b=0;
		c=a&31;
		r=16+c;
		g=c*2;
		b=c;
		if(a&0x20) r+=20; g+=20; b+=20;
		/*
		if(a&0x01) { r+=40; }
		if(a&0x02) { g+=40; r+=40; b+=40; }
		if(a&0x04) { r+=0; }
		if(a&0x08) { g+=10; r+=10; b+=10; }
		if(a&0x10) { b+=40; }
		if(a&0x20) { g+=40; r+=40; b+=40; }
		if(a&0x40) { b+=0; }
		if(a&0x80) { g+=10; r+=10; b+=10; }
		r=r*4/6;
		g=g*4/6;
		b=b*4/6;
		*/
		if(r>63) r=63;
		if(g>63) g=63;
		if(b>63) b=63;
		r=g=b=0;
		outp(0x3c9,r);
		outp(0x3c9,g);
		outp(0x3c9,b);
	}
	for(a=0;a<256;a++) vram[a]=a;
	lightshift=8;
	rx=ry=rz=0;
	for(;;)
	{
		if(kbhit())
		{
			a=getch();
			if(a==27) break;
			if(a=='l') lightshift=2;
			if(a=='+') zpos+=200;
			if(a=='-') zpos-=200;
			if(a=='<') lightshift--;
			if(a=='>') lightshift++;
			if(a=='t') asmtestmode=1;
			if(a=='c') { if(zpos==3200) { lightshift=8; zpos=7000; } else { zpos=3200; lightshift=11; } }
			if(a=='8') ry-=16;
			if(a=='2') ry+=16;
			if(a=='4') rz-=16;
			if(a=='6') rz+=16;
		}
		asm();
		setborder(1);
		//rx+=16; ry+=9; rz+=7;
		rx+=32; ry+=8;
		rx%=3600; ry%=3600; rz%=3600;
		//if(rz==0) printf(".");
		/*
		a=0;
		while(polylist[a])
		{
			a+=polylist[a]*2+2;
		}
		polylist[a++]=4;
		polylist[a++]=19;
		polylist[a++]=160-60; polylist[a++]=100-40;
		polylist[a++]=160+60; polylist[a++]=100-40;
		polylist[a++]=160+60; polylist[a++]=100+40;
		polylist[a++]=160-60; polylist[a++]=100+40;
		polylist[a++]=0;
		*/
		cglenzinit();

		cmatrix_yxz(rx,ry,rz,matrix);
		csetmatrix(matrix,0,0,zpos);
		points2[0]=0; crotlist(points2,points);
		//cclipedges(edges2,edges,points2);
		points3[0]=0; cprojlist((long *)points3,points2);
		//cpolylist(polylist,polys,edges,points3);
		ceasypolylist(polylist,epolys,points3);

		cglenzpolylist(polylist);
/*
		cmatrix_yxz(rx,-450,900+ry,matrix);
		csetmatrix(matrix,0,0,zpos);
		points2[0]=0; crotlist(points2,points);
		//cclipedges(edges2,edges,points2);
		points3[0]=0; cprojlist((long *)points3,points2);
		//cpolylist(polylist,polys,edges,points3);
		ceasypolylist(polylist,epolys1,points3);

		cglenzpolylist(polylist);

		cmatrix_yxz(-rx,-450,900+ry,matrix);
		csetmatrix(matrix,0,0,zpos);
		points2[0]=0; crotlist(points2,points);
		//cclipedges(edges2,edges,points2);
		points3[0]=0; cprojlist((long *)points3,points2);
		//cpolylist(polylist,polys,edges,points3);
		ceasypolylist(polylist,epolys2,points3);

		cglenzpolylist(polylist);
*/

		cmatrix_yxz(-rx,-ry,-rz,matrix);
		csetmatrix(matrix,0,0,zpos);
		points2[0]=0; crotlist(points2,pointsb);
		//cclipedges(edges2,edges,points2);
		points3[0]=0; cprojlist((long *)points3,points2);
		//cpolylist(polylist,polys,edges,points3);
		ceasypolylist(polylist,epolysb,points3);
		
		cglenzpolylist(polylist);

//		//cmatrix_yxz(rx*2,-ry,rz*2,matrix);
//		//csetmatrix(matrix,0,0,zpos);
//		//points2[0]=0; crotlist(points2,cubepoints);
//		//points3[0]=0; cprojlist((long *)points3,points2);
//		//ceasypolylist(polylist,cubeepolys,points3);
		
		cglenzdone();
		//cdrawpolylist(polylist);
		//cdrawpolylist(testlist);
		//setborder(3);
		//drawnewgroup();
		#if 0
		n=edges[0];
		for(a=2,b=0;b<n;b++)
		{
			p1=edges[a++];
			p2=edges[a++];
			a+=2;
			testline(points3[p1*6+2],points3[p1*6+3],points3[p2*6+2],points3[p2*6+3],63);
		}
		#endif
	}
	_asm mov ax,3
	_asm int 10h
	#if 0
	for(a=0;a<100;)
	{
		b=polylist[a++];
		c=polylist[a++];
		if(!b) break;
		printf("s:%i c:%i v:",b,c);
		for(x=0;x<b;x++)
		{
			printf("%i,%i ",polylist[a+0],polylist[a+1]);
			a+=2;
		}
		printf("\n");
	}
	printf("points2: %Fp\n",points2);
	#endif
	printf("%i,%i,%i  Z:%i LS:%i \n",rx,ry,rz,zpos,lightshift);
}