roadkill/RKDEATH/D3.C

123 lines
2.5 KiB
C
Raw Permalink Blame History

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

/**
*** file: drhit.c
***
*** JFL 14 JUL 92
*** JFL 22 JUL 92
*** JFL 29 JUL 92
***/
#include <stdio.h>
#include <math.h>
#include "wtypes.h"
struct {
int16 sx;
int16 x[17];
int16 y[17];
} s[] = {
{31,
{171,162,176,163,178,169,162,176,162,176,162,176,163,178,170,170,170},
{176,138,138,176,176,137,149,149,160,160,170,170,183,183,184,184,184}}, /* 1 */
{59,
{131,106,122,130,148,114,113,126,120,134,125,140,141,141,141,141,141},
{193,164,155,199,191,159,179,167,182,177,189,184,196,196,196,196,196}}, /* 1 */
{81,
{144,115,127,159,171,120,128,135,121,140,143,132,150,153,160,170,136},
{204,179,165,206,193,172,186,169,182,195,178,178,201,185,191,202,189}}, /* 1 */
{90,
{119, 85, 90,146,152, 87,101,105, 95,116,119,110,131,131,125,153,142},
{208,191,177,207,194,182,194,181,191,199,184,191,203,189,194,202,193}}, /* 1 */
{89,
{140,108,108,175,175,119,119,130,130,141,141,152,163,152,163,163,163},
{211,203,193,203,192,203,193,203,193,203,193,203,203,193,193,193,193}}, /* 1 */
{90,
{130,104, 97,166,157,116,128,140,153,108,119,129,138,146,100,166,166},
{214,210,200,197,188,206,202,200,198,197,193,192,190,189,206,191,191}}, /* 1 */
{79,
{130,111, 99,158,146,104,119,128,138,149,111,120,133,140,152,152,152},
{218,221,213,194,186,217,214,210,205,199,208,202,195,191,190,190,190}}, /* 1 */
{57,
{407,403,387,427,411,392,408,413,420,395,402,407,418,418,418,418,418},
{206,210,204,178,169,208,202,194,187,196,188,180,173,173,173,173,173}}, /* 1 */
{29,
{389,396,382,396,382,389,396,396,396,382,382,382,388,388,388,388,388},
{211,211,206,170,170,211,200,189,179,200,189,179,170,170,170,170,170}}, /* 1 */
};
#define PTCNT 17
int
main()
{
int16 i,k,f,x,y,ox,oy,sx;
int16 q,online;
online=0;
for(i=0;i<16;i++)
{
f = 0;
if(i<4)
{
k = 4 - i;
f = 1;
}
else if(i<13)
{
k = i - 4;
}
else
{
k = 20 - i;
f = 1;
}
sx = s[k].sx;
ox = s[k].x[0];
oy = s[k].y[0];
#if 0
printf("\n\t;ik %d %d] f%d\n",i,k,f);
#endif
printf("\t;ROT %d\n",i);
printf("\t.WORD ");
for(q=1;q<PTCNT;q++)
{
x = s[k].x[q];
y = s[k].y[q];
if(f)
{
x = ox - x;
y = y - oy;
}
else
{
x = x - ox;
y = y - oy;
}
printf("%d,%d",x,y);
if(++online>=4)
{
if(q<(PTCNT-1))
printf("\n\t.WORD ");
else
printf("\n");
online=0;
}
else
{
printf(",");
}
} /* for */
}
} /* main() */
/* EOF */