Esempio n. 1
0
void editQuestPrompt(void)
{
  char numbStrn[256] = "\0";


  _outtext("\n");

  while (TRUE)
  {
    displayColorString("\n&+cEdit which mob's quest info (&+C? for list&n&+c): ");

    getStrn(numbStrn, 8, 1, 7, '°', numbStrn, FALSE, FALSE);

    if (!strcmp(numbStrn, "?"))
    {
      displayQuestList();

      strcpy(numbStrn, "\0");
    }
    else break;
  }

  _setbkcolor(0);

  if (strlen(numbStrn))
  {
    editQuestStrn(numbStrn);
  }
  else _outtext("\n\n");
}
Esempio n. 2
0
void progressshowtarget()
{
	int							i;
	YG_PARTITION_INFO			*pDiskInfo = g_pCurFixDiskInfo;
	char						szdriveletter,szsel[80];
	DWORD						dwStart;

	if(g_btCurFun == DELETEPARTITION)
	{
		for(i=0;i<g_delparinfo.nselpar;i++)
		{
			pDiskInfo = pDiskInfo->pNext;
		}
		g_pDiskInfo   = pDiskInfo;
		szdriveletter = pDiskInfo->DriveLetter;
		dwStart 	  = pDiskInfo->dwStartSector;
		if(pDiskInfo->DriveLetter < 0x40) szdriveletter = '*';
		if(pDiskInfo->bLogic) dwStart += 0x3f;
	   	sprintf(szsel,PARDELSELPAR,szdriveletter,
	   		dwStart,pDiskInfo->dwStartSector+pDiskInfo->dwPartSize-1);

		_settextposition(6, 4);          
		_outtext("Partition:");

		_settextposition(6, 15);          
		_outtext(szsel);
	}
	else
	{
		_settextposition(6, 4);          
	   	sprintf(szsel,DISKSELINFO,g_deldiskinfo.nSelDisk-DISKBASE+1,
	   		g_deldiskinfo.dwCylinders,g_deldiskinfo.dwHeads,g_deldiskinfo.dwSecPerTrack);
		_outtext(szsel);
    }
}
Esempio n. 3
0
void createEditExit(const char *args)
{
  long returnVal, val;


  if (!strlen(args))
  {
    returnVal = createRoomExit(currentRoom, USER_CHOICE);
  }
  else
  {
    val = getDirfromKeyword(args);
    if (val == NO_EXIT)
    {
      _outtext("\nCreate and edit which exit?\n\n");
      return;
    }

    returnVal = createRoomExit(currentRoom, val);
  }

  if (returnVal == NO_EXIT)
  {
    return;
  }

  if ((returnVal < 0) || (returnVal >= NUMB_EXITS))
  {
    _outtext("\nBig time error in createEditExit() - notify the author\n\n");
    return;
  }

  editExit(currentRoom, &currentRoom->exits[returnVal], exitnames[returnVal],
           TRUE);
}
/* Gibt Status aus*/
void Status(char *text)
{
  _settextposition(5,53);
  _outtext("                          ");
  _settextposition(5,53);
  _outtext(text);
  strcpy(status_str,text);
}
/* Gibt Meldung aus */
void Meldung(char *text)
{
  _settextposition(6,12);
  _outtext("                                                                 ");
  _settextposition(6,12);
  _outtext(text);
  strcpy(meldung_str,text);
}
/* Koordinaten ausgeben */
void Koordinaten(short xrad_mm,short zpos_mm)
{
   char buf_x[35],buf_y[35];

   sprintf(buf_x,"%+06.2f mm",(float)(xrad_mm*2)/100.0F);
   sprintf(buf_y,"%+06.2f mm",(float)zpos_mm/100.0F);
   _settextposition(2,10);
   _outtext(buf_x);
   _settextposition(3,10);
   _outtext(buf_y);
}
void DemoText(void)
{
  time_t t1,t2,t3;

  _settextposition(11,1);
  _outtext("EMCO-Simulator / CNC-Projekt der St�dtischen Technischen Schule Eupen 1991/92");
  t1=time(&t3);
  t2=time(&t3);
  while ((t2-t1)<10) t2=time(&t3);
  _settextposition(11,1);
  _outtext("                                                                             ");
}
Esempio n. 8
0
int
bwx_message( char *m )
   {

#if DEBUG
   _outtext( "<MES>" );
#endif

   _outtext( m );

   return TRUE;

   }
Esempio n. 9
0
void far customer_id()
{
int i,a_color;
long a_delay;



/* turn off cursor */
	my_input_regs.h.ah = 1;
	my_input_regs.x.cx = 0x2000;

	int86(0x10,&my_input_regs,&my_output_regs);


	_settextcolor(2);
	_settextposition(23,26);
	_outtext("Press Any Key...");


	for(a_color = 1 ; kbhit() == 0 ; a_color++)
	{
		if(a_color > 15)
			a_color = 1;


		_settextcolor(a_color);


	
		for(i = 0 ; i < 11 ; i++)
		{
			_settextposition(i + 7,26);
			_outtext(release_info[i]);
		}
	

		for(a_delay = 0L ; a_delay < 50000L ; a_delay = a_delay + 1L)
			;
	}




/* turn on cursor */
	my_input_regs.h.ah = 1;
	my_input_regs.h.ch = 6;
	my_input_regs.h.cl = 7;

	int86(0x10,&my_input_regs,&my_output_regs);
}
Esempio n. 10
0
void showchs(BIOS_DRIVE_PARAM *pDriveParam)
{
	char		str[40];
	DWORD 		dwHead,dwSector,dwCylinder;
	
	dwHead		= (((g_diskviewinfo.dwSelSec/pDriveParam->dwSecPerTrack)%pDriveParam->dwHeads)&0xff); 
	dwSector 	= ((g_diskviewinfo.dwSelSec % pDriveParam->dwSecPerTrack)+1)&0xff;
	dwCylinder	= (g_diskviewinfo.dwSelSec/pDriveParam->dwSecPerTrack)/pDriveParam->dwHeads; 
	
	sprintf(str, DISKCHS, dwCylinder,dwHead,dwSector);
   	_settextposition(24, 2); 
	_outtext(NULLSTRING);
   	_settextposition(24, 2); 
	_outtext(str);
}
Esempio n. 11
0
void main()
{
  _clearscreen(0);
  for (i=0; i<8; i++)
  {
    _settextcolor(i);
    _outtext("FARBTEST!\n");
  }
  _settextwindow(1,10,25,80);
  for (i=8; i<16; i++)
  {
    _settextcolor(i);
    _outtext("FARBTEST!\n");
  }
}
Esempio n. 12
0
char *createKeywordString(stringNode *strnNode, char *keyStrn)
{
  if (!keyStrn)
  {
    _outtext("\n\ncreateKeywordString(): got NULL ptr\n\n");
    return "error in createKeywordString~";
  }

  keyStrn[0] = '\0';

  while (strnNode)
  {
    strcat(keyStrn, strnNode->string);

    strnNode = strnNode->Next;

    if (strnNode) strcat(keyStrn, " ");
  }

  strcat(keyStrn, "~");

  lowstrn(keyStrn);

  return keyStrn;
}
Esempio n. 13
0
void deleteQuestUserPrompt(void)
{
  char numbStrn[32] = "\0";


  while (TRUE)
  {
    displayColorString("\n"
"&+cEnter number of mob type to delete quest info from (&+C? for list&n&+c): ");

    getStrn(numbStrn, 8, 1, 7, '°', numbStrn, FALSE, FALSE);

    if (!strcmp(numbStrn, "?"))
    {
      displayQuestList();

      strcpy(numbStrn, "\0");
    }
    else break;
  }

  _setbkcolor(0);

  if (strlen(numbStrn))
  {
    deleteQuestUser(numbStrn);
  }
  else _outtext("\n\n");
}
Esempio n. 14
0
void editObjTrapInfo(dikuObject *obj)
{
  usint ch;
  ulong oldAff = obj->trapAff;
  long oldDam = obj->trapDam, oldCharge = obj->trapCharge;


  displayEditObjTrapInfoMenu(obj);

  while (TRUE)
  {
    ch = toupper(getkey());

    if (checkMenuKey(ch, FALSE) == MENUKEY_ABORT)
    {
      obj->trapAff = oldAff;
      obj->trapDam = oldDam;
      obj->trapCharge = oldCharge;

      _outtext("\n\n");

      return;
    }

    if (interpEditObjTrapInfoMenu(ch, obj)) return;
  }
}
Esempio n. 15
0
void cwindow::onpagedown()
{       
	int		i, nmoverows = m_nmaxrows - m_nactiverow + m_nmaxrows;
	
	for(i = 0; i < nmoverows; i ++) //move to next page'end            
	{
		if(m_pitemactive->pnext == NULL) break;
		m_pitemactive = m_pitemactive->pnext;
	}   
	if(m_nactiverow + i <= m_nmaxrows)//this is last a page
	{          
		modifyattrib(m_npage, m_nactiverow + m_nrow1, 1 + m_ncol1, TEXTCOLOR, BKCOLOR, m_nmaxcols);
		m_nactiverow += i;
		modifyattrib(m_npage, m_nactiverow + m_nrow1, 1 + m_ncol1, SELCOLOR, WHITE, m_nmaxcols);
		return;
	}
	_settextwindow(m_nrow1 + 1, m_ncol1 + 1, m_nrow2 - 1, m_ncol2 - 1);
	_clearscreen(_GWINDOW);
	for(i = m_nmaxrows; i > 0; i --)//from next page'end to head outtext
	{   
		_settextposition(i, 2);
		_outtext(m_pitemactive->szitemtext);
		if(m_pitemactive->ppre != NULL) m_pitemactive = m_pitemactive->ppre;
	}                                 
	for(i = 0; i < m_nactiverow; i++) //modify pointer 
		m_pitemactive = m_pitemactive->pnext;
	modifyattrib(m_npage, m_nactiverow + m_nrow1, 1 + m_ncol1, SELCOLOR, WHITE, m_nmaxcols);
	_settextwindow(1, 1, g_SysInfo.nmaxrows, g_SysInfo.nmaxcols);
}
Esempio n. 16
0
void cwindow::onpageup()
{       
	int		i, nmoverows = m_nactiverow - 1 + m_nmaxrows;
	 
	for(i = 0; i < nmoverows; i ++) //move to pre page'head            
	{
		if(m_pitemactive->ppre == NULL) break;
		m_pitemactive = m_pitemactive->ppre;
	}   
	if(m_nactiverow - i == 1)//this is first page 
	{          
		modifyattrib(m_npage, m_nactiverow + m_nrow1, 1 + m_ncol1, TEXTCOLOR, BKCOLOR, m_nmaxcols);
		m_nactiverow = 1;
		modifyattrib(m_npage, m_nactiverow + m_nrow1, 1 + m_ncol1, SELCOLOR, WHITE, m_nmaxcols);
		return;
	}
	_settextwindow(m_nrow1 + 1, m_ncol1 + 1, m_nrow2 - 1, m_ncol2 - 1);
	_clearscreen(_GWINDOW);
	for(i = 1; i <= m_nmaxrows; i ++)//from pre page'head to end outtext 
	{   
		_settextposition(i, 2);
		_outtext(m_pitemactive->szitemtext);
		if(m_pitemactive->pnext != NULL) 
			m_pitemactive = m_pitemactive->pnext;
	}                                 
	for(i = 0; i <= m_nmaxrows - m_nactiverow; i++) //modify pointer 
		m_pitemactive = m_pitemactive->ppre;
	modifyattrib(m_npage, m_nactiverow + m_nrow1, 1 + m_ncol1, SELCOLOR, WHITE, m_nmaxcols);
	_settextwindow(1, 1, g_SysInfo.nmaxrows, g_SysInfo.nmaxcols);
}
Esempio n. 17
0
char scanKeyword(const char *userinput, stringNode *keywordListHead)
{
  char *keyword;


  if (!keywordListHead) return FALSE;

  keyword = new char[strlen(userinput) + 1];
  if (!keyword)
  {
    _outtext("\n\nscanKeyword(): couldn't alloc keyword\n\n");
    return FALSE;
  }

  strcpy(keyword, userinput);

  remLeadingSpaces(keyword);
  remTrailingSpaces(keyword);

  while (keywordListHead)
  {
    if (!strcmp(keyword, keywordListHead->string))
    {
      delete[] keyword;
      return TRUE;
    }

    keywordListHead = keywordListHead->Next;
  }

  delete[] keyword;

  return FALSE;
}
/* Ausgabe eines Zeichens */
void XLE_outchar(char c)
{
    char s[2]=" ";

    s[0]=c;
    _outtext(s);
}
void printchar(char c)
{
  char buf[2]={" "};

  buf[0]=c;
  _outtext(buf);
}
Esempio n. 20
0
void cwindow::writeitem(int nrow,char * szstr)
{
	_settextwindow(m_nrow1 + 1, m_ncol1 + 1, m_nrow2 - 1, m_ncol2 - 1);
	_settextposition(nrow, 2);
	_outtext(szstr);                 
	_settextwindow(1, 1, g_SysInfo.nmaxrows, g_SysInfo.nmaxcols);
}
Esempio n. 21
0
void editObjMisc(dikuObject *obj)
{
  usint ch;
  uchar oldType = obj->objType;
  long oldValues[NUMB_OBJ_VALS];
  objApplyRec oldApplies[NUMB_OBJ_APPLIES];

 // back up the old stuff

  memcpy(oldValues, obj->objValues, sizeof(long) * NUMB_OBJ_VALS);
  memcpy(oldApplies, obj->objApply, sizeof(objApplyRec) * NUMB_OBJ_APPLIES);

  displayEditObjMiscMenu(obj);

  while (TRUE)
  {
    ch = toupper(getkey());

    if (checkMenuKey(ch, FALSE) == MENUKEY_ABORT)
    {
      obj->objType = oldType;
      memcpy(obj->objValues, oldValues, sizeof(long) * NUMB_OBJ_VALS);
      memcpy(obj->objApply, oldApplies, sizeof(objApplyRec) * NUMB_OBJ_APPLIES);

      _outtext("\n\n");

      return;
    }

    if (interpEditObjMiscMenu(ch, obj)) return;
  }
}
Esempio n. 22
0
const void setExecCommandFile(const uchar command, const char *args)
{
  char args2[256], check[256];


  strcpy(args2, args);
  strcpy(check, args);

  if (command != SETCMD_SET) remTrailingSpaces(args2);
  else
  {
   // don't process SET MAINZONENAME command, cuz it screws up paths while
   // loading

    upstrn(check);
    if (strleft(check, VAR_MAINZONENAME_NAME)) return;
  }

  switch (command)
  {
    case SETCMD_SET     : setVarArgs(args2, FALSE, FALSE); break;
    case SETCMD_ALIAS   : addAliasArgs(args2, FALSE, FALSE, &aliasHead); break;
    case SETCMD_LIMIT   : setLimitArgsStartup(args2); break;
    case SETCMD_SETTEMP : setTemplateArgs(args2, FALSE, FALSE); break;
//    case SETCMD_RANDOM : setRandomArgs(args2); break;

    default : _outtext(
"\nsetExecCommand() - internal error (no match found for command in list)\n\n");
  }
}
void SUBZeileAusgabe(short ip,char yp)
{
   char buf[105];
   _settextposition(yp,1);
   sprintf(buf,"N%03d G:%sX:%sZ:%sF:%sH:%s�%s",ip,cncprg[ip].GM,
	 cncprg[ip].XI,cncprg[ip].ZK,cncprg[ip].FLKT,cncprg[ip].H,cncprg[ip].BEM);
   _outtext(buf);
}
Esempio n. 24
0
void deleteQuestUser(const char *args)
{
  dikuMob *mob;
  long numb;
  char strn[256];


  if (!strlen(args))
  {
    deleteQuestUserPrompt();
    return;
  }

  if (!strnumer(args))
  {
    displayColorString(
"&n\nError in input - specify vnum of mob to delete quest from.\n\n");
    return;
  }

  numb = atoi(args);

  mob = findMob(numb);
  if (!mob)
  {
    sprintf(strn, "\nMob type #%d not found.\n\n", numb);
    _outtext(strn);
    return;
  }

  if (!mob->questPtr)
  {
    sprintf(strn, "\nMob type #%d has no quest info.\n\n", numb);
    _outtext(strn);
    return;
  }

  deleteQuest(mob->questPtr);
  mob->questPtr = NULL;

  sprintf(strn, "\nMob type #%d's quest info deleted.\n\n", numb);
  _outtext(strn);

  madeChanges = TRUE;
}
Esempio n. 25
0
void editRoomCheck(void)
{
  usint ch;
  variable *oldVar = copyVarList(varHead), *vartemp;


  displayEditRoomCheckMenu();

  while (TRUE)
  {
    ch = toupper(getkey());

    if (checkMenuKey(ch, FALSE) == MENUKEY_ABORT)
    {
     // only fragment heap if necessary

      if (!compareVarLists(varHead, oldVar))
      {
        vartemp = varHead;
        varHead = oldVar;

        deleteVarList(vartemp);
      } else deleteVarList(oldVar);

      _outtext("\n\n");

      return;
    }

   // if interpEditRoomCheckMenu is TRUE, user has quit

    if (interpEditRoomCheckMenu(ch))
    {
      if (!compareVarLists(varHead, oldVar))
      {
        madeChanges = TRUE;
      }

      deleteVarList(oldVar);

      _outtext("\n\n");
      return;
    }
  }
}
void ZeileAusgabe(short ip)
{

   if (ip!=0) SUBZeileAusgabe(ip-1,23);
	 else {
		_settextposition(23,1);
		_outtext("                                                                     ");
	      }
   SYS_PushColor();
   _settextcolor(2);
   SUBZeileAusgabe(ip,24);
   SYS_PopColor();
   if (ip<max_line-2) SUBZeileAusgabe(ip+1,25);
      else {
	     _settextposition(25,1);
	     _outtext("                                                                     ");
	   }
}
Esempio n. 27
0
static void Press_any_key( void )
/*=============================*/

/*  wait for keyboard input */
{
    _settextposition( VC.numtextrows, VC.numtextcols - 16 );
    _outtext( "Press any key..." );
    getch();
}
Esempio n. 28
0
main(int argc, char **argv)
{
     int color;
     char outtext_string[MAX_LINE_LENGTH];

     for (color=0; color<=15; color++)
     {
          _settextcolor(color);
          sprintf(outtext_string, "%s", BANNER);
          _outtext(outtext_string);
          _settextcolor(7);
          sprintf(outtext_string, "%s", COPYRIGHT);
          _outtext(outtext_string);
          sprintf(outtext_string, "\n");
          _outtext(outtext_string);
     }
     fprintf(stdout, "done.");
}
char Check_FlagTasten(void)
{
  char taste,endprg=0;
  char meldung_zwischen[80],
       status_zwischen[30];

  if (kbhit())
    {
      taste=(char)getch();
      while (kbhit()) getch();

      strcpy(meldung_zwischen,meldung_str);
      strcpy(status_zwischen,status_str);

      switch(taste)
      {
	case 'm':menue=0; break;
	case 'n':{
		   trace=1;
		   _settextposition(4,37);
		   _outtext("Ein");
		 }break;
	case 'f':{
		   trace=0;
		   _settextposition(4,37);
		   _outtext("Aus");
		 }break;
	case 's':{
		   Meldung("Programmfortsetzung mit 'A' - Abbruch der Simulation mit ESC");
		   Status("Pause");
		   do {
			taste=(char)getch();
			if (taste==27) endprg=1;
		      } while (taste!='a' && !endprg);
		   Meldung(meldung_zwischen);
		   Status(status_zwischen);
		 }
		 break;
	case 27: endprg=1;
      } /* von switch */
    } /* von if taste */

  return endprg;
}
void Ausg_Punkt(char nr,char maxbr,char *basisadr,char x,char y)
{
   char memstr[40];

   _settextposition(y,x);
   strcpy(memstr,basisadr+nr*maxbr);
   /* TM_Prot(); */
   _outtext(memstr);
   /* TM_Prot(); */
}