DataMuseum.dk

Presents historical artifacts from the history of:

Commodore CBM-900

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about Commodore CBM-900

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download

⟦108faa6f6⟧ TextFile

    Length: 1056 (0x420)
    Types: TextFile
    Notes: UNIX file
    Names: »schicken.c«

Derivation

└─⟦f27320a65⟧ Bits:30001972 Commodore 900 hard disk image with partial source code
    └─⟦926b8033d⟧ UNIX V7 Filesystem
        └─ ⟦this⟧ »u/demo/slide/schicken.c« 

TextFile

#define XMAX 1024
#define YMAX 800
#define Y 40
#define SCALEY (YMAX/128)
#define SCALEX (YMAX/128)
#define XOFF 312
#define YOFF 170
short c1[] =  {

	37, Y+17, 31, Y+18, 26, Y+17, 21, Y+14, 17, Y+10, 14, Y+4,14,Y,
	14, Y-4, 17,Y-10, 21, Y-14, 26, Y-17,31,Y-18,37,Y-17,
	37, Y-30, 30,Y-31,24,Y-30,16,Y-27,9,Y-21,5,Y-16,2,Y-10,1,Y-3,1,Y+3,
	2,Y+10,5,Y+16,9,Y+21,16,Y+27,24,Y+30,30,Y+31,37,Y+30,37,Y+17};
	
short c2[] = {

	38,Y+16,62,Y+16,53,Y+2,38,Y+2,38,Y+16 };

short c3[] = {
	38,Y-16,62,Y-16,53,Y-2,38,Y-2,38,Y-16 };

struct DRAW {
	short np;
	short *sp;
	};
struct DRAW allv[] = {sizeof(c1)/4,c1, sizeof(c2)/4, c2,
			sizeof(c3)/4,c3};
#define MAXD 3
chicken()
{
	short i;
	short n,*nx,x,y,lx,ly;
	for(i = 0; i< MAXD; i++)
	{
		n = allv[i].np - 1;
		nx = allv[i].sp;
		lx = scalex(*nx++); ly = scaley(*nx++);
		fspark(lx,ly);
		while(n--) {
			x = scalex(*nx++);
			y = scaley(*nx++);
			fline(lx,ly,x,y);
			lx = x; ly = y;
		}
		offspark();
	}
}
scalex(x)
short x;
{
	return(x * SCALEX + XOFF);
}
scaley(y)
short y;
{
	return(y * SCALEY + YOFF);
}