Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //today i have to complete whole map :)
- #include<iostream.h>
- #include<conio.h>
- #include<graphics.h>
- #include<time.h>
- #include<dos.h>
- #include<stdio.h>
- #define MINX 0
- #define MAXX 640
- #define MINY 0
- #define MAXY 480
- int Map();
- int Map() {
- //Waterbodies code
- setbkcolor(1);
- setfillstyle(10,9);
- bar(MINX,MINY,MAXX,MAXY);
- //Havana Island Rectangle Code
- int LeftHavana = 75;
- int TopHavana = 50;
- int RightHavana= 580;
- int BottomHavana= 150;
- setfillstyle(1,2);
- bar(LeftHavana, TopHavana, RightHavana, BottomHavana);
- //Starfish Island Circle code
- int StarfishX = 320;
- int StarfishY = 250;
- int StarfishRadius = 50;
- setcolor(2);
- circle(StarfishX, StarfishY, StarfishRadius);
- floodfill(320,250,2);
- //VC Island Circle Code
- int LeftVC = 75;
- int TopVC = 400;
- int RightVC= 580;
- int BottomVC= 470;
- bar(LeftVC, TopVC, RightVC, BottomVC);
- //Island connecting Highways
- //Havana-Starfish Highway (HS)
- setfillstyle(1,8);
- int LeftHS = 320;
- int TopHS = 150;
- int RightHS = 330;
- int BottomHS = 200;
- bar(LeftHS,TopHS,RightHS,BottomHS);
- //Starfish-VC Haighway (SV)
- int LeftSV = 320;
- int TopSV = 300;
- int RightSV = 330;
- int BottomSV = 400;
- bar(LeftSV,TopSV,RightSV,BottomSV);
- //Left Havana-VC Highway (LHV)
- int LeftLHV = 150;
- int TopLHV = 150;
- int RightLHV = 160;
- int BottomLHV = 400;
- bar(LeftLHV,TopLHV,RightLHV,BottomLHV);
- //Right Havana-VC Highway (RHV)
- int LeftRHV = 540;
- int TopRHV = 150;
- int RightRHV = 550;
- int BottomRHV = 400;
- bar(LeftRHV,TopRHV,RightRHV,BottomRHV);
- //Internal Highways
- //Starfish Highway (S)
- int LeftS = 320;
- int TopS = 200;
- int RightS = 330;
- int BottomS = 300;
- bar(LeftS,TopS,RightS,BottomS);
- //Vice City Horizontal-Top Highway (VCHT)
- int LeftVCHT = 100;
- int TopVCHT = 420;
- int RightVCHT = 570;
- int BottomVCHT = 410;
- bar(LeftVCHT,TopVCHT,RightVCHT,BottomVCHT);
- //Vice City Vertical-Left Highway (VCVL)
- int LeftVCVL =100;
- int TopVCVL = 420;
- int RightVCVL =110;
- int BottomVCVL =450;
- bar(LeftVCVL,TopVCVL,RightVCVL,BottomVCVL);
- //Vice City Vertical - Right Haighway (VCVR)
- int LeftVCVR=560;
- int TopVCVR=410;
- int RightVCVR=570;
- int BottomVCVR=450;
- bar(LeftVCVR,TopVCVR,RightVCVR,BottomVCVR);
- return 0;
- }
- /*int IngameTime(int start);
- int IngameTime(int start){
- clock_t end;
- clrscr();
- end=clock();
- int X,Y;
- X=20;
- Y=2;
- outtextxy(X,Y,(end-start));
- return 0;
- }
- */
- void main() {
- int gd = DETECT, gm;
- initgraph(&gd, &gm, "C:\\TC\\bgi");
- //int GameMode=1;
- //clock_t start, end;
- /*
- while (GameMode==1); {
- start = clock();
- IngameTime(start);
- delay(1000);
- }
- */
- Map();
- getch();
- closegraph();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement