Пример #1
0
//
// Super_MainText
//
void Super_MainText(void)
{ 
	main_text = InitTextBox(10, 200, 400, 480);
	SetTextMode(main_text, TEXT_NONE);
	SetTextColor(main_text, 0, 255, 0);
	Printf(main_text, "** DEBUG TEXT\n");


	// Now prepare the score text- upper left
	score_text = InitTextBox(10, 300, 10, 200);
	SetTextMode(score_text, TEXT_NONE);
	SetTextColor(score_text, 0, 255, 0);

	// Build the help screen text --
	help_text = InitTextBox(230, 500, 180, 370);
	SetTextMode(help_text, TEXT_NONE);
	SetTextColor(help_text, 255, 255, 255);

	//
	// Build the help text here
	//
	Printf(help_text, "[ESC] - Main Screen\n\n");
	Printf(help_text, "[P] - Pause\n\n");
	Printf(help_text, "[Q] - Quit\n\n");
	Printf(help_text, "[TAB] - First/Third View Mode\n\n");
	Printf(help_text, "[ARROW KEYS] - Turn\n\n");
	Printf(help_text, "[SPACE] - Fire\n\n");
	Printf(help_text, "[S,F,R MOUSE] - Adjust View\n");
	Printf(help_text, "[F1] - Full Screen\n\n");

	//
	// Intro text
	//
	intro_text = InitTextBox(340, 630, 340, 430);
	SetTextMode(intro_text, TEXT_NONE);
	SetTextColor(intro_text, 255, 255, 255);

	_tmp_str = intro_str;

	//
	// network_text
	//
	network_text = InitTextBox(340, 630, 340, 430);
	SetTextMode(network_text, TEXT_NONE);
	SetTextColor(network_text, 255, 255, 255);

} // end of the function
SVG_PLOTTER::SVG_PLOTTER()
{
    m_graphics_changed = true;
    SetTextMode( PLOTTEXTMODE_STROKE );
    m_fillMode = NO_FILL;               // or FILLED_SHAPE or FILLED_WITH_BG_BODYCOLOR
    m_pen_rgb_color = 0;                // current color value (black)
    m_brush_rgb_color = 0;              // current color value (black)
}
Пример #3
0
void MAS::RadioButton::MsgInitSkin() {
   Button::MsgInitSkin();
   for (int i=0; i<4; i++) {
      if (GetFontColor(i) == Color::transparent) SetFontColor(skin->fcol[Skin::INFO_RADIO][i], skin->scol[Skin::INFO_RADIO][i], i);
      if (GetFontIndex(i) == -1) SetFont(skin->fnt[Skin::INFO_RADIO][i], i);
   }
   if (GetTextMode() == Color::transparent) SetTextMode(skin->c_face);
   if (GetBitmapIndex() == Skin::BUTTON) SetBitmap(Skin::RADIO);
   SetFlag(D_TOGGLE);
   ClearFlag(D_SPINNER | D_AUTOSIZE);
}
Пример #4
0
void MAS::HyperText::MsgInitSkin() {
    for (int i=0; i<4; i++) {
        if (GetFontColor(i) == Color::transparent) SetFontColor(skin->fcol[Skin::INFO_HYPER][i], skin->scol[Skin::INFO_HYPER][i], i);
        if (GetFontIndex(i) == -1) SetFont(skin->fnt[Skin::INFO_HYPER][i], i);
    }
    if (GetTextMode() == Color::transparent) SetTextMode(skin->c_face);
    SetFlag(D_AUTOSIZE);
    UpdateSize();
    ClearFlag(D_TOGGLE | D_SPINNER);
    Button::MsgInitSkin();
}
Пример #5
0
void main(void) 
{ 
   T_PVS l_pvsBackGround; 

   InitializeEngFontBuf();         // initial english font system 
   LoadEngFont("ENGLISH.FNT"); 

   l_pvsBackGround=InitializeVS(); // initialize virtual background screen. 
   ClearVS(l_pvsBackGround);       // clear virtual background screen. 

   SetMode13h(); 
   SetPalette( "DEFAULT.PAL" ); 
   if( LoadPCX(l_pvsBackGround,"P001.PCX")==0 ) 
Printf( g_pVRAM,10,20,"Error" ); 
   else 
PutVS( g_pVRAM,l_pvsBackGround ); 
   Printf( g_pVRAM,10,20,"Lee kang-yong." ); 
   getch(); 
   SetTextMode(); 

   RemoveEngFontBuf();             // uninstall english font system 
   RemoveVS(l_pvsBackGround);      // remove virtual background screen. 
   return; 
} 
Пример #6
0
// Set single codepage
void ExtTextCtrl::SetSingleCodepage(bool bSingleCodepage)
{
   m_SingleCodepage = bSingleCodepage;
   SetTextMode();
}
Пример #7
0
// Set plaintext mode
void ExtTextCtrl::SetPlainText(bool bPlainText)
{
   m_PlainText = bPlainText;
   SetTextMode();
}
Пример #8
0
void menu_option(unsigned char number)
{
  FILE *savefile;
  FILE *optionfile;
  char filename[12], savepos;
  char oldinv; //holds options.inverted when entering setup
  int move_count;
  struct postype pos, newpos;

  switch (number)
  {
	case 100: //avcount=avtotal/avcount;
				 if (g_path.move[0].f>0)
					showstats(nodes,g_seconds,g_depth,g_path); break;
	case 101: rival_help(70); break;
	case 119: rival_help(19); break;
	case 120: options.chessset++; if (options.chessset==3) options.chessset=0; break;
	case 109: options.whiteplayer=USER;
				 options.blackplayer=USER;
				 if (game.movenum>1)
				 {
					 game.movenum=game.movenum-1;
					 pos=game.firstpos;
					 for (move_count=1; move_count<=game.movenum; move_count++)
					 {
						  alter(&pos,game.previous_moves[move_count],&newpos);
						  pos=newpos;
					 }
					 current=newpos;
				 } else
				 {
					 game.movenum=0;
					 current=game.firstpos;
				 }
				 movepointer=game.movenum;
				 no_more_openings=FALSE;
				 break;
	case 110: if (game.lastmove==0)
				 {
					 current=game.firstpos;
				 } else
				 {
					 pos=game.firstpos;
					 for (move_count=1; move_count<=game.lastmove; move_count++)
					 {
						 alter(&pos, game.previous_moves[move_count], &newpos);
						 pos=newpos;
					 }
					 current=newpos;
				 }
				 game.movenum=game.lastmove;
				 movepointer=game.movenum;
				 break;
	case 111: current=game.firstpos; game.movenum=0;
				 movepointer=game.movenum;
				 no_more_openings=FALSE;
				 options.whiteplayer=USER;
				 options.blackplayer=USER;
				 break;
	case 112: if ((savepos=get_savepos('w'))!=0)
				 {
					 strcpy(filename,"RIVAL\0");
					 if (savepos<10)
					 {
						 filename[5]=savepos+48;
						 filename[6]='\0';
					 } else
					 {
						 filename[5]=savepos/10+48;
						 filename[6]=savepos%10+48;
						 filename[7]='\0';
					 }
					 strcat(filename,".SAV");
					 if (confirmation("SAVE GAME"))
					 {
						 savefile=fopen(filename,"w");
						 if (savefile!=NULL)
						 {
							  savefiledata(savefile);
						 } else // if savefile!=NULL
						 {
							  printf("ERROR! SAVE FAILED");
						 }
						 fclose(savefile);
					 } // if confirmation
				 }
				 break;
	case 113: if ((savepos=get_savepos('r'))!=0)
		  {
		     strcpy(filename,"RIVAL\0");
		     if (savepos<10)
		     {
			filename[5]=savepos+48;
			filename[6]='\0';
		     } else
		     {
			filename[5]=savepos/10+48;
			filename[6]=savepos%10+48;
			filename[7]='\0';
		     }
		     strcat(filename, ".SAV");
		     if (((savefile=fopen(filename,"r"))!=NULL) && (confirmation("LOAD GAME")))
		     {
			readfiledata(savefile);
			if (game.movenum==0)
			{
			   current=game.firstpos;
			   movepointer=0;
			} else
			{
			   pos=game.firstpos;
			   for (move_count=1; move_count<=game.movenum; move_count++)
			   {
			     alter(&pos, game.previous_moves[move_count], &newpos);
			     pos=newpos;
			   }
			   current=newpos;
			}
			FLAGnewstart=1;
			movepointer=game.movenum;
		     } //movepointer=game.movenum;
		     fclose(savefile);
		  }
		  break;
	case 107: variant_select(); break;
	case 106: time_select(); break;
	case 127: options.deep_thought=!options.deep_thought; break;
	case 133: break;
	case 118: options.library=!options.library; break;
	case 108: if (game.movenum<game.lastmove)
				 {
					 game.movenum=game.movenum+1;
					 pos=current;
					 alter(&pos,game.previous_moves[game.movenum],&current);
				 }
				 movepointer=game.movenum;
				 break;
	case 103: oldinv=options.inverted;
		  options.inverted=0;
		  enter_setup();
		  options.inverted=oldinv;
		  break;
	case 117: options.analysis=!options.analysis; break;
	case 102: options.inverted=!options.inverted; break;
	case 104: options.whiteplayer=!options.whiteplayer;
				 if (options.whiteplayer==PROGRAM)
					  if (current.mvr=='w')
						  FLAGnewstart=1;
				 break;
	case 105: options.blackplayer=!options.blackplayer;
				 if (options.blackplayer==PROGRAM)
					  if (current.mvr=='b')
						  FLAGnewstart=1;
				 break;
	case 114: if (confirmation("NEW GAME")) initialise(startbrd); no_more_openings=FALSE; break;
	case 115: iconmenu=1; break;
	case 116: iconmenu=0; break;
	case 129: switch (options.sensitivity)
				 {
					 case LOWSENS : options.sensitivity=MEDSENS; break;
					 case MEDSENS : options.sensitivity=HISENS; break;
					 case  HISENS : options.sensitivity=LOWSENS; break;
				 }
				 break;
	case 124: options=doptions; break;
	case 125: optionfile=fopen("options.riv","w");
				 fwrite(&options, sizeof(struct optiontype), 1, optionfile);
				 fclose(optionfile);
				 break;
	case 121: if (options.so<7) options.so+=1; else options.so=0; break;
	case 122: if (options.wo<35) options.wo+=5; else options.wo=0;
				 if (options.wo==options.bo) if (options.wo<35) options.wo+=5; else options.wo=0;
				 break;
	case 123: if (options.bo<35) options.bo+=5; else options.bo=0;
				 if (options.wo==options.bo) if (options.bo<35) options.bo+=5; else options.bo=0;
				 break;
	case 128: solvey(); break;
	case 130: break;
	case 148: options.game=0; break;
	case 126: options.pieceslide=!options.pieceslide; break;
	case 131: if (confirmation("QUIT RIVAL"))
				 {
					 SetTextMode();
					 printf("See you later!");
					 quit=1;
				 }
				 break;
	case 200: if (movepointer>0) movepointer--; break;
	case 201: if (movepointer<game.movenum) movepointer++; break;
	default: break;
  }
}