basic: lemm
wasn't sure it would fit, blinks a bit more than optimal
This commit is contained in:
parent
6d17397b54
commit
9c0fe0c223
|
@ -1,5 +1,5 @@
|
|||
0REM&-/*/&,0./'+,.0'.0/0'-.*,'./,-!,0(*!-/'(#./()#-0)*!,/')!-.&'!/0&'&-/*.&,../',./0'/0./'01,.',-+-'-.*+#./()#-0)*
|
||||
1HGR:DEFFNP(X)=7*PEEK(2054+I*5+X)-224
|
||||
4FORI=0TO21:HCOLOR=FNP(0)/7:IFI=10THENHGR2
|
||||
5FORY=FNP(3)TOFNP(4)-1:HPLOTFNP(1),YTOFNP(2)-1,Y:NEXTY,I
|
||||
6P=NOTP:P=SQR(3):POKE49236+P,0:GOTO6
|
||||
1HGR:DEFFNP(X)=7*PEEK(2185+I*5+X)-224
|
||||
4HCOLOR=FNP(0)/7:FORY=FNP(3)TOFNP(4)-1:HPLOTFNP(1),YTOFNP(2)-1,Y:NEXTY:IFI=9THENHGR2
|
||||
7P=NOTP:POKE49236+P,0:IFI<21THENI=I+1
|
||||
8GOTO4
|
||||
9"&-/*/&,0./'+,.0'.0/0'-.*,'./,-!,0(*!-/'(#./()#-0)*!,/')!-.&'!/0&'&-/*.&,../',./0'/0./'01,.',-+-'-.*+#./()#-0)*
|
||||
|
|
|
@ -1,3 +1,13 @@
|
|||
6 91 104 70 104 ; body1
|
||||
6 84 111 98 104 ; body2
|
||||
7 77 83 98 111 ; foot1
|
||||
7 98 111 105 111 ; foot2
|
||||
7 91 97 70 83 ; arm1
|
||||
7 98 104 84 90 ; arm2
|
||||
1 84 111 56 69 ; hair1
|
||||
1 91 104 49 55 ; hair2
|
||||
3 98 104 56 62 ; forehead (common)
|
||||
3 91 111 63 69 ; nose (common)
|
||||
1 84 104 49 62 ; hair1 x1 x2 y1 y2
|
||||
1 91 97 42 48 ; hair2
|
||||
1 105 111 42 48 ; hair3
|
||||
|
@ -10,13 +20,3 @@
|
|||
7 91 97 70 76 ; neck
|
||||
3 98 104 56 62 ; forehead (common)
|
||||
3 91 111 63 69 ; nose (common)
|
||||
6 91 104 70 104 ; body1
|
||||
6 84 111 98 104 ; body2
|
||||
7 77 83 98 111 ; foot1
|
||||
7 98 111 105 111 ; foot2
|
||||
7 91 97 70 83 ; arm1
|
||||
7 98 104 84 90 ; arm2
|
||||
1 84 111 56 69 ; hair1
|
||||
1 91 104 49 55 ; hair2
|
||||
3 98 104 56 62 ; forehead (common)
|
||||
3 91 111 63 69 ; nose (common)
|
||||
|
|
|
@ -0,0 +1,37 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
|
||||
char buffer[1024];
|
||||
char *ptr;
|
||||
int color,x1,x2,y1,y2;
|
||||
char output[1024];
|
||||
int out_ptr=0;
|
||||
int add=' ';
|
||||
int scale=7;
|
||||
|
||||
if (argc>1) {
|
||||
add=atoi(argv[1]);
|
||||
}
|
||||
|
||||
while(1) {
|
||||
|
||||
ptr=fgets(buffer,1024,stdin);
|
||||
if (ptr==NULL) break;
|
||||
|
||||
sscanf(buffer,"%d %d %d %d %d",
|
||||
&color,&x1,&x2,&y1,&y2);
|
||||
|
||||
output[out_ptr]=color+add;
|
||||
output[out_ptr+1]=((x1+0)/scale)+add;
|
||||
output[out_ptr+2]=((x2+1)/scale)+add;
|
||||
output[out_ptr+3]=((y1+0)/scale)+add;
|
||||
output[out_ptr+4]=((y2+1)/scale)+add;
|
||||
out_ptr+=5;
|
||||
}
|
||||
output[out_ptr]=0;
|
||||
printf("%s\n",output);
|
||||
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue