Hi,
alsoo bei diesem quellcode:
OMITEM(0,0); //POSITION 0 -> POS1 -> POSe -> HMPOS0
OPOS0:
TST = getch();
if ((TST==224) || (TST==0))
{
TST = getch();
switch(TST)
{
case 80: //Pfeil nach unten
OMITEM(1,0);
goto OPOS1;
break;
case 13: //Enter taste
OMITEM(0,1);
goto OPOS0;
break;
case 114: //R Taste
goto POS0;
break;
default: //default
OMITEM(0,0);
goto OPOS0;
break;
}
}
OPOS1: //POSITION 1 -> POS0 -> POS2 -> POS1e -> HMPOS0
TST = getch();
if ((TST==224) || (TST==0))
{
TST = getch();
switch(TST)
{
case 72: //Pfeil nach oben
OMITEM(0,0);
goto OPOS0;
break;
case 80:
OMITEM(2,0);
goto OPOS2;
break;
case 13:
OMITEM(1,1);
goto OPOS1;
break;
case 114:
goto POS0;
break;
default:
OMITEM(1,0);
goto POS1;
break;
}
}
OPOS2:
TST = getch();
if ((TST==224) || (TST==0))
{
TST = getch();
switch(TST)
{
case 72:
OMITEM(1,0);
goto OPOS1;
break;
case 80:
OMITEM(3,0);
goto OPOS3;
break;
case 13:
OMITEM(2,1);
goto OPOS2;
break;
case 114:
goto POS0;
break;
default:
OMITEM(2,0);
goto OPOS2;
break;
}
}
OPOS3:
TST = getch();
if ((TST==224) || (TST==0))
{
TST = getch();
switch(TST)
{
case 72:
OMITEM(2,0);
goto OPOS2;
break;
case 13:
OMITEM(3,1);
goto OPOS3;
break;
case 114:
goto POS0;
break;
default:
OMITEM(3,0);
goto OPOS3;
break;
}
}
und jetzt klappt das nicht beim ersten einlesen der taste. Erst muss ich 'O' und dann Enter drücken... aber nürgenswo sehe ich das da irgendwo 'cin >> TST;'ist.auch in den funktionen nicht:
void OMITEM(int pos, int act)
{
if(pos == 0 && act == 0)
{
system("cls");
DAT1(NO_ACTIVE);
DAT2(NO_ACTIVE);
DAT3(NO_ACTIVE);
DAT4(NO_ACTIVE);
DAT5(NO_ACTIVE);
DAT6(E_ACTIVE);
color(weiss, blau);
PANEL();
cout <<endl;
color(weiss, blaugruen);
OPTWND();
cout << BANN::SEN;
CWI(1);
SCXI(0);
ZDXI(0);
STCRL(0);
color(weiss, blaugruen);
cout <<endl;
OPTPAN();
cout <<endl;
CLSWND();
//weiter code
woran kann das liegen ?auch vorher ist nirgendwso ein fehler zu entdecken !
int main()
{
system("color 9F");
unsigned char TST = _kbhit();
begin:
_NXT_(0,0);
POS0: //POSITION 0
//from pos0 to: pos1, pos5, pos0o
color(blau,blau);
cin >> TST; //input
_NXT_(0,0);
if(TST == 'a' || TST == 'A')
{
_NXT_(5,0);
cin >> TST;
if(TST == 'a' || TST == 'A'){_NXT_(4,0); goto POS4;}
else if(TST == 'o' || TST == 'O'){_NXT_(5,1); OMITEM(0,0); goto POS5;}
else if(TST == 'd' || TST == 'D'){_NXT_(0,0); goto POS0;}
}
else if(TST == 'o' || TST == 'O')
{
_NXT_(0,1); goto POS0;
}
else if(TST == 'd' || TST == 'D')
{
_NXT_(1,0);
cin >> TST;
if(TST == 'a' || TST == 'A'){_NXT_(0,0); goto POS0;}
else if(TST == 'o' || TST == 'O'){_NXT_(1,1); goto POS1;}
else if(TST == 'd' || TST == 'D'){_NXT_(2,0); goto POS2;}
}
POS1:
cin >> TST; //input
if(TST == 'a' || TST == 'A')
{
_NXT_(0,0);
cin >> TST;
if(TST == 'a' || TST == 'A'){_NXT_(5,0); goto POS4;}
else if(TST == 'o' || TST == 'O'){_NXT_(0,1); goto POS0;}
else if(TST == 'd' || TST == 'D'){_NXT_(2,0); goto POS2;}
}
else if(TST == 'o' || TST == 'O')
{
_NXT_(1,1); goto POS1;
}
else if(TST == 'd' || TST == 'D')
{
_NXT_(2,0);
cin >> TST;
if(TST == 'a' || TST == 'A'){_NXT_(1,0); goto POS1;}
else if(TST == 'o' || TST == 'O'){_NXT_(2,1); goto POS2;}
else if(TST == 'd' || TST == 'D'){_NXT_(3,0); goto POS3;}
}
POS2:
cin >> TST; //input
if(TST == 'a' || TST == 'A')
{
_NXT_(1,0);
cin >> TST;
if(TST == 'a' || TST == 'A'){_NXT_(0,0); goto POS0;}
else if(TST == 'o' || TST == 'O'){_NXT_(1,1); goto POS1;}
else if(TST == 'd' || TST == 'D'){_NXT_(3,0); goto POS3;}
}
else if(TST == 'o' || TST == 'O')
{
_NXT_(2,1); goto POS2;
}
else if(TST == 'd' || TST == 'D')
{
_NXT_(3,0);
cin >> TST;
if(TST == 'a' || TST == 'A'){_NXT_(2,0); goto POS2;}
else if(TST == 'o' || TST == 'O'){_NXT_(3,1); goto POS3;}
else if(TST == 'd' || TST == 'D'){_NXT_(4,0); goto POS4;}
}
POS3:
cin >> TST; //input
if(TST == 'a' || TST == 'A')
{
_NXT_(2,0);
cin >> TST;
if(TST == 'a' || TST == 'A'){_NXT_(1,0); goto POS1;}
else if(TST == 'o' || TST == 'O'){_NXT_(2,1); goto POS2;}
else if(TST == 'd' || TST == 'D'){_NXT_(3,0); goto POS3;}
}
else if(TST == 'o' || TST == 'O')
{
_NXT_(3,1); goto POS3;
}
else if(TST == 'd' || TST == 'D')
{
_NXT_(4,0);
cin >> TST;
if(TST == 'a' || TST == 'A'){_NXT_(3,0); goto POS3;}
else if(TST == 'o' || TST == 'O'){_NXT_(4,1); goto POS4;}
else if(TST == 'd' || TST == 'D'){_NXT_(5,0); goto POS5;}
}
POS4:
cin >> TST; //input
if(TST == 'a' || TST == 'A')
{
_NXT_(3,0);
cin >> TST;
if(TST == 'a' || TST == 'A'){_NXT_(2,0); goto POS2;}
else if(TST == 'o' || TST == 'O'){_NXT_(3,1); goto POS3;}
else if(TST == 'd' || TST == 'D'){_NXT_(4,0); goto POS4;}
}
else if(TST == 'o' || TST == 'O')
{
_NXT_(4,1); goto POS4;
}
else if(TST == 'd' || TST == 'D')
{
_NXT_(5,0);
cin >> TST;
if(TST == 'a' || TST == 'A'){_NXT_(4,0); goto POS4;}
else if(TST == 'o' || TST == 'O'){_NXT_(5,1); OMITEM(0,0); goto POS5;}
else if(TST == 'd' || TST == 'D'){_NXT_(0,0); goto POS0;}
}
POS5:
cin >> TST; //input
if(TST == 'a' || TST == 'A')
{
_NXT_(4,0);
cin >> TST;
if(TST == 'a' || TST == 'A'){_NXT_(3,0); goto POS3;}
else if(TST == 'o' || TST == 'O'){_NXT_(4,1); goto POS4;}
else if(TST == 'd' || TST == 'D'){_NXT_(5,0); goto POS5;}
}
else if(TST == 'o' || TST == 'O')
{
//
//
//hier ist der teil mit dem einlesen der Tasten !!!!
//
//
else if(TST == 'd' || TST == 'D')
{
_NXT_(0,0);
cin >> TST;
if(TST == 'a' || TST == 'A'){_NXT_(5,0); goto POS5;}
else if(TST == 'o' || TST == 'O'){_NXT_(0,1); goto POS0;}
else if(TST == 'd' || TST == 'D'){_NXT_(1,0); goto POS1;}
}
goto begin;
return 0;
}
alsoo...Ich hoffe jemand hat lust den quellcode zu durchsuchen... ich habs schon mehr mals versucht
Danke im Vorraus
MFG
TOMEK