CHESSSP.CPP
Upload User: huaxiafrp
Upload Date: 2020-03-05
Package Size: 1k
Code Size: 1k
Category:

Other Games

Development Platform:

C/C++

  1. #include <graphics.h>
  2. #include <stdlib.h>
  3. #include <stdio.h>
  4. #include <conio.h>
  5. #include <dos.h>
  6. #define C1 3
  7. #define C2 9
  8. #define C3 11
  9. #define C4 10
  10. #define C5 14
  11. void EnterGraphic(void){
  12.  int gdriver=0,gmode,errorcode;
  13. initgraph(&gdriver, &gmode, "bgi");
  14. errorcode = graphresult();
  15. if (errorcode != grOk){
  16.  printf("Graphics error: %sn", grapherrormsg(errorcode));
  17.  printf("Press any key to halt:");
  18.  getch();
  19.  exit(1);
  20.  }
  21. }
  22. void Splash(void){
  23. setfillstyle(10,C1);
  24. floodfill(1,1,1);
  25. setcolor(0);
  26. for(int i=0;i<950;i+=4){
  27. circle(-100,-100,i);
  28. }
  29. settextstyle(7,0,2);
  30. setcolor(C2);
  31. outtextxy(101,61,"Arrow Keys :");
  32. outtextxy(141,141,"Enter Key :");
  33. outtextxy(181,221,"Space Bar :");
  34. outtextxy(221,301,"Esc Key :");
  35. setcolor(C3);
  36. outtextxy(100,60,"Arrow Keys :");
  37. outtextxy(140,140,"Enter Key :");
  38. outtextxy(180,220,"Space Bar :");
  39. outtextxy(220,300,"Esc Key :");
  40. setcolor(C5);
  41. outtextxy(200,90,"Change Position");
  42. outtextxy(240,170,"Select");
  43. outtextxy(280,250,"Cancel Selection");
  44. outtextxy(320,330,"Quit");
  45. setcolor(C4);
  46. outtextxy(190,420,"Press any key to start . . .");
  47. getch();
  48. }
  49. void main(){
  50. EnterGraphic();
  51. Splash();
  52. }