예제 #1
0
void Accion (struct TipoMensaje *p) {
	int Boton,Vert,Horiz,c;

	p->Boton = mouse.Estado (&p->X, &p->Y);
	getch1(&p->Llave);

	while (p->Boton == 0 &&  p->Llave == 0) {
		p->Boton = mouse.Estado (&p->X, &p->Y);
		getch1(&p->Llave);
	}
	if (p->Boton != 0)
		p->Tipo = Boton;
	else p->Tipo = 4;
}
예제 #2
0
파일: tocken.c 프로젝트: SpongebBob/cppl0
void init_tocken()
{
    char inf[256];
    symnumber['+'] = PLUS;
    symnumber['-'] = MINUS;
    symnumber['*'] = MULT;
    symnumber['/'] = DIV;
    symnumber[','] = COMMA;
    symnumber['.'] = PERIOD;
    symnumber[';'] = SEM;
    symnumber[':'] = COLON;
    symnumber['['] = LBP;
    symnumber[']'] = RBP;
    symnumber['('] = LP;
    symnumber[')'] = RP;
    symnumber['='] = EQ;

    scanf("%s",inf);
    fin = fopen(inf,"r");
    while (fin==NULL)
    {
        //until it is ok
        printf("Please input source file name!\n");
        scanf("%s",inf);
        fin = fopen(inf,"r");
    }
    getch1();
}
예제 #3
0
void intro() { 
  uint* p;
  uchar s;

  // Выводим заставку
  SET_COLOR(COLOR_BLACK);
  unmlz((uchar*)0x9000, imgTitle);
  unmlz((uchar*)0x4800, imgTitle_colors);
  colorizer_rand();    

  // Выводим заставку
  p = music;
  while(1) {
    s = *p; ++p;
    if(s==0) { while(!getch1(1)); break; }
    if(getch1(1)) break;
    sound(s, *p); ++p;
    rand();
  }
}
예제 #4
0
char bioskey_() {
  return getch1(1);
}
예제 #5
0
char getch_() {
  return getch1(0);
}
예제 #6
0
파일: tocken.c 프로젝트: SpongebBob/cppl0
int getsym()
{
    int  k;
    t = 0;
    while (isspace(ch))
        getch1();
    if(ch == EOF)
        return -1;
    if (isalpha(ch))
    {
        getch1();
        while (isalnum(ch))
        {
            getch1();
        }
        k = searchident();
        //	printf("%s %d\n",sym,k);
        if (k == 0)
            symtype = T_IDENT;
        else
            symtype = k;
    }
    else if (isdigit(ch))
    {
        num = c2i(ch);
        getch1();
        while (isdigit(ch))
        {
            num = num * 10 + c2i(ch);
            getch1();
        }
        symtype = T_CONST;
    }
    else if (ch =='\'')
    {
        getch1();
        num = ch;
        getch1();
        if (ch !='\'')// missing '
            my_error(1);
        getch1();
        symtype = T_CHAR;
    }
    else if (ch == '\"')
    {
        getch1();
        while(iss(ch))
            getch2();
        if(!(ch =='\"'))
            my_error(2);	// missing "
        symtype = T_STRING;
        getch1();
    }
    else if(ch == ':')
    {
        getch1();
        if(ch == '=')
        {
            symtype = BECOME;
            getch1();
        }
        else
            symtype = COLON;
    }
    else if (ch == '<')
    {
        getch1();
        if(ch == '>')
        {
            symtype = NEQ;
            getch1(); 
        }
        else if( ch =='=')
        {
            symtype = SMOE;
            getch1();
        }
        else
            symtype = SMO;
    }
    else if (ch == '>')
    {
        getch1();
        if(ch == '=')
        {
            symtype = BIGE;
            getch1();
        }
        else
            symtype = BIG;
    }
    else
    {
        symtype = symnumber[ch];
        getch1();
    }
    //	printf("%s\n",sym);
    return 0;
}