home *** CD-ROM | disk | FTP | other *** search
- /* intro - Display the introduction to demo.
-
- Copyright 1986 John B. Allison */
-
- struct { /* To draw latitude lines in Mercator projection */
- float mercaty; /* the Mercator y value of this latitude */
- char *degree; /* this latitude in degrees */
- } lat[] = {
- -2.43623, "-80",
- -1.31697, "-60",
- -0.76291, "-40",
- -0.35634, "-20",
- 0.0, " 0",
- 0.35634, " 20",
- 0.76291, " 40",
- 1.31697, " 60",
- 2.43623, " 80"
- };
-
- intro(){
-
- #define LEFT -200 /* left limit of screen */
- #define RIGHT 200 /* right limit of screen */
- #define INC 20 /* increment of lines across screen */
- #define BOTTEXT -2.2 /* degree markings on bottom */
- #define SIDETEXT (RIGHT-12) /* degree markings on side */
-
- float x, y, ytop, ybot, ybottext;
- int i, height, width, path = 0, mode = 0;
- char tstring[10];
-
-
-
- /* Output marquee */
-
- height = width = 2;
- x = -50.0;
- y = 1.5;
- settext(&height, &width, &path, &mode);
- movtcurabs(&x, &y);
- text("Alaska Demo");
-
- height = width = 3;
- x = -150.0;
- y = 0.35;
- settext(&height, &width, &path, &mode);
- movtcurabs(&x, &y);
- text("The World Digitized");
-
- height = width = 1;
- x = 60.0;
- y = 0.12;
- settext(&height, &width, &path, &mode);
- movtcurabs(&x, &y);
- text("166 Shady Lane");
-
- y = -0.25;
- movtcurabs(&x, &y);
- text("Apollo, PA 15613.");
-
- x = -160.0;
- y = -0.60;
- settext(&height, &width, &path, &mode);
- movtcurabs(&x, &y);
- text("Enter \"P\" at any time to print.");
-
- y = -1.10;
- movtcurabs(&x, &y);
- text("Escape to exit.");
-
- y = -1.60;
- movtcurabs(&x, &y);
- text("Strike any other key to zoom.");
-
-
- /* draw lines of longitude */
-
- ytop = 2.92;
- ybot = -2.92;
- ybottext = BOTTEXT;
-
- for(i = LEFT; i <= RIGHT; i += INC){
- x = i;
- movabs(&x, &ytop);
- lnabs(&x, &ybot);
-
- sprintf(tstring, "%d", i);
- x -= 6;
- movtcurabs(&x, &ybottext);
- text(tstring);
- }
-
- /* draw lines of latitude. */
-
- for(i = 0; i <= 9; i++){
- y = lat[i].mercaty;
- x = LEFT;
- movabs(&x, &y);
- x = RIGHT;
- lnabs(&x, &y);
-
- x = SIDETEXT;
- movtcurabs(&x, &y);
- text(lat[i].degree);
- }
- }