Okay, I've read your post Bubzy.
I wrote this code before your post, but I think it handles pretty much what you and darkcoder are saying about it being reusable.
class quest
{
public:
//activate quests
void communicate( int& s, int Q, char * pquest, char * pquestion1, char *pquestion2, char * panswers1, char * panswers2);
} quests;
void quest::communicate(int &s, int Q, char *pquest, char *pquestion1, char *pquestion2, char * panswers1, char * panswers2) {
//start
dbWait( 1000 );
start:
//display quest title
dbText ( 0, 15, pquest);
//display quest title
dbText ( 0, 45, pquestion1);
dbText ( 0, 60, pquestion2);
// move cursor
if (dbUpKey() ) {
s = 1;
}
if (dbDownKey() ) {
s = 2;
}
//display cursor
if ( s == 1 ) {
dbText( 160, 45, "*" );
}
if ( s == 2 ) {
dbText( 160, 60, "*" );
}
//sync
dbSync();
//quit or continue
if (!dbShiftKey())
goto start;
//display answers
if ( s == 1 )
dbText( 0, 45, panswers1 );
if ( s == 2 )
dbText( 0, 46, panswers2 );
dbSync();
dbWait( 1000 );
}
the stuff that starts with 'p' are pointers to C-style strings that I hard-coded earlier.