home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD2.mdf
/
c
/
worldmap
/
demo
/
demo.c
next >
Wrap
Text File
|
1986-01-21
|
2KB
|
75 lines
/* demo - fixed demonstration program for The World Digitized.
Display of Alaska and environs.
Copyright 1986 John B. Allison */
/* These arrays are made external not for communication but because
the Lattice C compiler does not permit the initialization of auto
(local) agregate (array or structure) variables */
float llx[] = { /* lower left corner x (longitude) */
-246.0, -192.7, -178.4, -175.7, -172.6, -168.4, -164.1 },
lly[] = { /* lower left corner y (latitude) */
-2.90, 0.967, 1.23, 1.34, 1.47, 1.52, 1.54 },
urx[] = { /* upper right corner x (longitude) */
246.0, -117.5, -139.8, -147.9, -155.8, -160.0, -160.8 },
ury[] = { /* upper right corner y (latitude) */
2.90, 1.85, 1.69, 1.67, 1.66, 1.62, 1.58 };
main(){
int ix, mode = 1, color = 0, dev = 1;
float aspect;
char c, getch();
printf(" The World Digitized\n");
printf(" 166 Shady Lane\n");
printf(" Apollo, PA 15613\n");
setopt(); /* Read and set graphics and printer
from option file (demo.opt). */
initgraphics(&mode); /* initialize Halo Graphics */
setworld(&llx[0], &lly[0], &urx[0], &ury[0]);
intro(); /* display introduction */
displayd(); /* Display .mp2 file. */
for(ix = 1; ix < 7; ix++){
prompt("Zoom?");
while((c=getch()) == 'P' ||
c == 'p'){ /* Wait on user response. */
dev = 1; /* Optionally print. */
gprint();
}
if(c == 27){ /* Escape */
closegraphics();
exit();
}
initgraphics(&mode); /* Delete display and zoom */
setworld(&llx[ix], &lly[ix], &urx[ix], &ury[ix]);
grid(); /* Display lat/long grid */
displayd(); /* Display .mp2 file. */
}
prompt("Fini");
while((c=getch()) == 'P' ||
c == 'p'){ /* Wait on user response. */
dev = 1; /* Optionally print. */
prompt(" ");
gprint();
prompt("Fini");
}
closegraphics();
}