Advertisement
Guest User

Untitled

a guest
May 23rd, 2017
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 2.58 KB | None | 0 0
  1. //today i have to complete whole map :)
  2. #include<iostream.h>
  3. #include<conio.h>
  4. #include<graphics.h>
  5. #include<time.h>
  6. #include<dos.h>
  7. #include<stdio.h>
  8.  
  9. #define MINX 0
  10. #define MAXX 640
  11. #define MINY 0
  12. #define MAXY 480
  13.  
  14. int Map();
  15.  
  16. int Map() {
  17.  
  18. //Waterbodies code
  19. setbkcolor(1);
  20. setfillstyle(10,9);
  21. bar(MINX,MINY,MAXX,MAXY);
  22.  
  23. //Havana Island Rectangle Code
  24. int LeftHavana = 75;
  25. int TopHavana = 50;
  26. int RightHavana= 580;
  27. int BottomHavana= 150;
  28. setfillstyle(1,2);
  29. bar(LeftHavana, TopHavana, RightHavana, BottomHavana);
  30.  
  31. //Starfish Island Circle code
  32. int StarfishX = 320;
  33. int StarfishY = 250;
  34. int StarfishRadius = 50;
  35. setcolor(2);
  36. circle(StarfishX, StarfishY, StarfishRadius);
  37. floodfill(320,250,2);
  38.  
  39. //VC Island Circle Code
  40. int LeftVC = 75;
  41. int TopVC = 400;
  42. int RightVC= 580;
  43. int BottomVC= 470;
  44. bar(LeftVC, TopVC, RightVC, BottomVC);
  45.  
  46. //Island connecting Highways
  47. //Havana-Starfish Highway (HS)
  48. setfillstyle(1,8);
  49. int LeftHS = 320;
  50. int TopHS = 150;
  51. int RightHS = 330;
  52. int BottomHS = 200;
  53. bar(LeftHS,TopHS,RightHS,BottomHS);
  54. //Starfish-VC Haighway (SV)
  55. int LeftSV = 320;
  56. int TopSV =  300;
  57. int RightSV = 330;
  58. int BottomSV = 400;
  59. bar(LeftSV,TopSV,RightSV,BottomSV);
  60. //Left Havana-VC Highway (LHV)
  61. int LeftLHV = 150;
  62. int TopLHV = 150;
  63. int RightLHV = 160;
  64. int BottomLHV = 400;
  65. bar(LeftLHV,TopLHV,RightLHV,BottomLHV);
  66. //Right Havana-VC Highway (RHV)
  67. int LeftRHV = 540;
  68. int TopRHV = 150;
  69. int RightRHV = 550;
  70. int BottomRHV = 400;
  71. bar(LeftRHV,TopRHV,RightRHV,BottomRHV);
  72.  
  73. //Internal Highways
  74. //Starfish Highway (S)
  75. int LeftS = 320;
  76. int TopS = 200;
  77. int RightS = 330;
  78. int BottomS = 300;
  79. bar(LeftS,TopS,RightS,BottomS);
  80. //Vice City Horizontal-Top Highway (VCHT)
  81. int LeftVCHT = 100;
  82. int TopVCHT = 420;
  83. int RightVCHT = 570;
  84. int BottomVCHT = 410;
  85. bar(LeftVCHT,TopVCHT,RightVCHT,BottomVCHT);
  86. //Vice City Vertical-Left Highway (VCVL)
  87. int LeftVCVL =100;
  88. int TopVCVL = 420;
  89. int RightVCVL =110;
  90. int BottomVCVL =450;
  91. bar(LeftVCVL,TopVCVL,RightVCVL,BottomVCVL);
  92. //Vice City Vertical - Right Haighway (VCVR)
  93. int LeftVCVR=560;
  94. int TopVCVR=410;
  95. int RightVCVR=570;
  96. int BottomVCVR=450;
  97. bar(LeftVCVR,TopVCVR,RightVCVR,BottomVCVR);
  98.  
  99. return 0;
  100. }
  101. /*int IngameTime(int start);
  102.  
  103. int IngameTime(int start){
  104.     clock_t end;
  105.     clrscr();
  106.     end=clock();
  107.     int X,Y;
  108.     X=20;
  109.     Y=2;
  110.     outtextxy(X,Y,(end-start));
  111.     return 0;
  112.     }
  113. */
  114. void main() {
  115.  
  116. int gd = DETECT, gm;
  117. initgraph(&gd, &gm, "C:\\TC\\bgi");
  118.  
  119. //int GameMode=1;
  120.  
  121. //clock_t start, end;
  122.  
  123. /*
  124. while (GameMode==1); {
  125.     start = clock();
  126.     IngameTime(start);
  127.     delay(1000);
  128.     }
  129. */
  130. Map();
  131. getch();
  132. closegraph();
  133. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement