Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //today i have to complete VicePort
- #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 VicePort();
- //----------------------------------------------------------->>
- //
- 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 = 380;
- 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 = 325;
- int BottomHS = 200;
- bar(LeftHS,TopHS,RightHS,BottomHS);
- //Starfish-VC Haighway (SV)
- int LeftSV = 320;
- int TopSV = 300;
- int RightSV = 325;
- int BottomSV = 400;
- bar(LeftSV,TopSV,RightSV,BottomSV);
- //Left Havana-VC Highway (LHV)
- int LeftLHV = 150;
- int TopLHV = 150;
- int RightLHV = 155;
- int BottomLHV = 400;
- bar(LeftLHV,TopLHV,RightLHV,BottomLHV);
- //Right Havana-VC Highway (RHV)
- int LeftRHV = 540;
- int TopRHV = 150;
- int RightRHV = 545;
- int BottomRHV = 400;
- bar(LeftRHV,TopRHV,RightRHV,BottomRHV);
- //Internal Highways
- //Starfish Highway (S)
- int LeftS = 320;
- int TopS = 200;
- int RightS = 325;
- int BottomS = 300;
- bar(LeftS,TopS,RightS,BottomS);
- //Vice City Horizontal-Top Highway (VCHT)
- int LeftVCHT = 100;
- int TopVCHT = 400;
- int RightVCHT = 565;
- int BottomVCHT = 395;
- bar(LeftVCHT,TopVCHT,RightVCHT,BottomVCHT);
- //Vice City Vertical-Left Highway (VCVL)
- int LeftVCVL =100;
- int TopVCVL = 400;
- int RightVCVL =105;
- int BottomVCVL =450;
- bar(LeftVCVL,TopVCVL,RightVCVL,BottomVCVL);
- //Vice City Vertical - Right Haighway (VCVR)
- int LeftVCVR=560;
- int TopVCVR=400;
- int RightVCVR=565;
- int BottomVCVR=450;
- bar(LeftVCVR,TopVCVR,RightVCVR,BottomVCVR);
- //Vice City Horizontal-Bottom Highway (VCHB)
- int LeftVCHB=100;
- int TopVCHB= 450;
- int RightVCHB=565;
- int BottomVCHB=455;
- bar(LeftVCHB,TopVCHB,RightVCHB,BottomVCHB);
- //Havana Highway
- //Havana Horizontal-top highway (hht)
- int lefthht=100;
- int tophht=70;
- int righthht=565;
- int bottomhht=65;
- bar(lefthht,tophht,righthht,bottomhht);
- //havana horizontal-bottom highway(hhb)
- int lefthhb=105;
- int tophhb=130;
- int righthhb=560;
- int bottomhhb=125;
- bar(lefthhb,tophhb,righthhb,bottomhhb);
- //havana vertical-left highway (hvl)
- int lefthvl=100;
- int tophvl=70;
- int righthvl=105;
- int bottomhvl=130;
- bar(lefthvl,tophvl,righthvl,bottomhvl);
- //havana vertical-right highway (hvr)
- int lefthvr=560;
- int tophvr=65;
- int righthvr=565;
- int bottomhvr=130;
- bar(lefthvr,tophvr,righthvr,bottomhvr);
- //main connecting roads
- //havana vertical-centre road(hvcr)
- int lefthvcr=320;
- int tophvcr=70;
- int righthvcr=325;
- int bottomhvcr=130;
- bar(lefthvcr,tophvcr,righthvcr,bottomhvcr);
- //havana vertical-left road (hvlr)
- int lefthvlr=213;
- int tophvlr=70;
- int righthvlr=218;
- int bottomhvlr=130;
- bar(lefthvlr,tophvlr,righthvlr,bottomhvlr);
- //havana vertical-right road (hvrr)
- int lefthvrr=442;
- int tophvrr=70;
- int righthvrr=447;
- int bottomhvrr=130;
- bar(lefthvrr,tophvrr,righthvrr,bottomhvrr);
- //havana small roads
- //havana road connecting to starfish haighway (hcsh)
- int lefthcsh=320;
- int tophcsh=130;
- int righthcsh=325;
- int bottomhcsh=150;
- bar(lefthcsh,tophcsh,righthcsh,bottomhcsh);
- //havana left road connecting VC highway (hlcv)
- bar(150,130,155,150);
- //havana right road connecting VC highway
- bar(540,130,545,150);
- //VC main roads
- bar(442,400,447,450);
- bar(213,400,218,450);
- //Places Name on map
- setcolor(6);
- outtextxy(270,250,"Starfish Island");
- outtextxy(130,420,"Washington");
- outtextxy(280,420,"Ocean Beach");
- outtextxy(490,420,"Vice Point");
- outtextxy(130,95,"Vice Port");
- outtextxy(280,95,"Little Haiti");
- outtextxy(490,95,"Downtown");
- setcolor(5);
- settextstyle(3, HORIZ_DIR, 4);
- outtextxy(280,10,"MAP");
- return 0;
- }
- int Viceport() {
- //water body
- setbkcolor(1);
- setfillstyle(10,9);
- bar(MINX,MINY,MAXX,MAXY);
- //terrain
- setfillstyle(1,2);
- bar(100,28,640,420);
- //roads
- //horizontal bottom road
- setfillstyle(1,8);
- bar(150,360,640,390);
- 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(); ------> for now
- Viceport();
- getch();
- closegraph();
- }
Add Comment
Please, Sign In to add comment