Skip to content

Instantly share code, notes, and snippets.

@nnnik
Created October 21, 2015 13:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nnnik/a1677b25fc98ecec28ec to your computer and use it in GitHub Desktop.
Save nnnik/a1677b25fc98ecec28ec to your computer and use it in GitHub Desktop.
#define Parameter_Count 2
loeschen();
groesse( 10,10);
farben(0xFFFFFF);
flaeche(0xFFFFFF) ;
formen("s");
char *FormNames[] = {"c\0","*\0","+\0","d\0","s\0","tld\0","tlu\0","trd\0","tru\0","|\0","-\0","/\0","\\\0"};
int Parameter [Parameter_Count];
int BeforeLeave [Parameter_Count];
int Data[] = {
0 ,0x0,
2 ,4,
43 ,0,1,10,11,20,21,30,31,40,41,50,51,60,61,70,71,80,81,90,72,63,54,45,36,27,18,9,19,28,29,38,39,48,49,58,59,68,69,78,79,88,89,98,99
,5,
6 ,91,82,73,64,55,46,37
,8,
6 ,62,53,44,35,26,17,8};
int state=0,ParamNr;
int i = 0;
for(;i<(sizeof(Data)/sizeof(int));i++)
{
if (state % 2 == 0 )
BeforeLeave[ParamNr=state/2] = Data[i];
else
Parameter[ParamNr=(state-1)/2] = Data[i];
if (state == Parameter_Count*2+1)
{
farbe(Parameter[ParamNr],Parameter[ParamNr-2]);
form( Parameter[ParamNr],FormNames[Parameter[ParamNr-1]]);
while(BeforeLeave[(state-(state % 2))/2]==0)
state -=2;
BeforeLeave[(state-(state % 2))/2]--;
}
else
state++;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment