[BACK]Return to map.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / games / phantasia

File: [cvs.NetBSD.org] / src / games / phantasia / map.c (download)

Revision 1.2, Fri Mar 24 03:58:58 1995 UTC (19 years, 7 months ago) by cgd
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base4, yamt-pf42-base3, yamt-pf42-base2, yamt-pf42-base, yamt-pf42, yamt-pagecache-tag8, yamt-pagecache-base9, yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, yamt-pagecache-base5, yamt-pagecache-base4, yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, yamt-pagecache, wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, wrstuden-revivesa-base-1, wrstuden-revivesa-base, wrstuden-revivesa, wrstuden-fixsa-newbase, wrstuden-fixsa-base-1, wrstuden-fixsa-base, wrstuden-fixsa, wrstuden-devbsize-base, wrstuden-devbsize-19991221, wrstuden-devbsize, tls-maxphys-base, tls-maxphys, tls-earlyentropy-base, tls-earlyentropy, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3, riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, netbsd-7-base, netbsd-7, netbsd-6-base, netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-1, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, netbsd-6, netbsd-5-base, netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE, netbsd-5-2, netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-1, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, netbsd-5, netbsd-4-base, netbsd-4-0-RELEASE, netbsd-4-0-RC5, netbsd-4-0-RC4, netbsd-4-0-RC3, netbsd-4-0-RC2, netbsd-4-0-RC1, netbsd-4-0-1-RELEASE, netbsd-4-0, netbsd-4, netbsd-3-base, netbsd-3-1-RELEASE, netbsd-3-1-RC4, netbsd-3-1-RC3, netbsd-3-1-RC2, netbsd-3-1-RC1, netbsd-3-1-1-RELEASE, netbsd-3-1, netbsd-3-0-RELEASE, netbsd-3-0-RC6, netbsd-3-0-RC5, netbsd-3-0-RC4, netbsd-3-0-RC3, netbsd-3-0-RC2, netbsd-3-0-RC1, netbsd-3-0-3-RELEASE, netbsd-3-0-2-RELEASE, netbsd-3-0-1-RELEASE, netbsd-3-0, netbsd-3, netbsd-2-base, netbsd-2-1-RELEASE, netbsd-2-1-RC6, netbsd-2-1-RC5, netbsd-2-1-RC4, netbsd-2-1-RC3, netbsd-2-1-RC2, netbsd-2-1-RC1, netbsd-2-1, netbsd-2-0-base, netbsd-2-0-RELEASE, netbsd-2-0-RC5, netbsd-2-0-RC4, netbsd-2-0-RC3, netbsd-2-0-RC2, netbsd-2-0-RC1, netbsd-2-0-3-RELEASE, netbsd-2-0-2-RELEASE, netbsd-2-0-1-RELEASE, netbsd-2-0, netbsd-2, netbsd-1-6-base, netbsd-1-6-RELEASE, netbsd-1-6-RC3, netbsd-1-6-RC2, netbsd-1-6-RC1, netbsd-1-6-PATCH002-RELEASE, netbsd-1-6-PATCH002-RC4, netbsd-1-6-PATCH002-RC3, netbsd-1-6-PATCH002-RC2, netbsd-1-6-PATCH002-RC1, netbsd-1-6-PATCH002, netbsd-1-6-PATCH001-RELEASE, netbsd-1-6-PATCH001-RC3, netbsd-1-6-PATCH001-RC2, netbsd-1-6-PATCH001-RC1, netbsd-1-6-PATCH001, netbsd-1-6, netbsd-1-5-base, netbsd-1-5-RELEASE, netbsd-1-5-PATCH003, netbsd-1-5-PATCH002, netbsd-1-5-PATCH001, netbsd-1-5-BETA2, netbsd-1-5-BETA, netbsd-1-5-ALPHA2, netbsd-1-5, netbsd-1-4-base, netbsd-1-4-RELEASE, netbsd-1-4-PATCH003, netbsd-1-4-PATCH002, netbsd-1-4-PATCH001, netbsd-1-4, netbsd-1-3-base, netbsd-1-3-RELEASE, netbsd-1-3-PATCH003-CANDIDATE2, netbsd-1-3-PATCH003-CANDIDATE1, netbsd-1-3-PATCH003-CANDIDATE0, netbsd-1-3-PATCH003, netbsd-1-3-PATCH002, netbsd-1-3-PATCH001, netbsd-1-3-BETA, netbsd-1-3, netbsd-1-2-base, netbsd-1-2-RELEASE, netbsd-1-2-PATCH001, netbsd-1-2-BETA, netbsd-1-2, netbsd-1-1-base, netbsd-1-1-RELEASE, netbsd-1-1-PATCH001, netbsd-1-1, mjf-devfs2-base, mjf-devfs2, minoura-xpg4dl-base, minoura-xpg4dl, matt-premerge-20091211, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus, matt-nb5-pq3-base, matt-nb5-pq3, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-premerge-20091211, matt-nb5-mips64-k15, matt-nb5-mips64, matt-nb4-mips64-k7-u2a-k9b, matt-mips64-premerge-20101231, matt-mips64-base2, matt-mips64-base, matt-mips64, matt-armv6-prevmlocking, matt-armv6-nbase, matt-armv6-base, matt-armv6, keiichi-mipv6-base, keiichi-mipv6, jym-xensuspend-nbase, jym-xensuspend-base, jym-xensuspend, hpcarm-cleanup-nbase, hpcarm-cleanup-base, hpcarm-cleanup, fvdl_fs64_base, curses-v3-base, curses-v3, cube-autoconf-base, cube-autoconf, comdex-fall-1999-base, comdex-fall-1999, cherry-xenmp-base, cherry-xenmp, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2, agc-symver-base, agc-symver, abandoned-netbsd-4-base, abandoned-netbsd-4, HEAD
Changes since 1.1: +2 -0 lines

rcs id conventions

/*	$NetBSD: map.c,v 1.2 1995/03/24 03:58:58 cgd Exp $	*/

#define	minusminus	plusplus
#define	minusplus	plusminus

main()
{
    /* Set up */

    openpl();
    space(-1400, -1000, 1200, 1200);

    /* Big box */

    move(-1400, -1000);
    cont(-1400, 1000);
    cont(600, 1000);
    cont(600, -1000);
    cont(-1400, -1000);

    /* Grid -- horizontal lines every 200 */

    linemod("dotted");
    line(600, -800, -1400, -800);
    line(-1400, -600, 600, -600);
    line(600, -400, -1400, -400);
    line(-1400, -200, 600, -200);
    linemod("solid");
    line(600, 0, -1400, 0);
    linemod("dotted");
    line(-1400, 200, 600, 200);
    line(600, 400, -1400, 400);
    line(-1400, 600, 600, 600);
    line(600, 800, -1400, 800);

    /* Grid -- vertical lines every 200 */

    line(-1200, 1000, -1200, -1000);
    line(-1000, 1000, -1000, -1000);
    line(-800, 1000, -800, -1000);
    line(-600, 1000, -600, -1000);
    linemod("solid");
    line(-400, 1000, -400, -1000);
    linemod("dotted");
    line(-200, 1000, -200, -1000);
    line(0, 1000, 0, -1000);
    line(200, 1000, 200, -1000);
    line(400, 1000, 400, -1000);

    /* Circles radius +250 on "center" */

    linemod("solid");
    circle(-400, 0, 250);
    circle(-400, 0, 500);
    circle(-400, 0, 750);
    circle(-400, 0, 1000);

    /* A few labels */

    move(-670, 1075);
    label("- THE PHANTASIA UNIVERSE -");
    line(-630, 1045, -115, 1045);
    move(-360, 80);
    label("Lorien");
    move(-385, -100);
    label("Ithilien");
    move(-560, 80);
    label("Rohan");
    move(-580, -100);
    label("Anorien");
    plusplus("Rovanion", -250, 320);
    plusplus("The Iron Hills", -100, 560);
    plusplus("Rhun", 250, 570);
    minusplus("Dunland", -700, 160);
    minusplus("Eriador", -920, 300);
    minusplus("The Northern Waste", -1240, 320);
    minusminus("Gondor", -720, -180);
    minusminus("South Gondor", -940, -270);
    minusminus("Far Harad", -1100, -500);
    plusminus("Mordor", -180, -300);
    plusminus("Khand", 0, -500);
    plusminus("Near Harad", 40, -780);
    move(340, 900);
    label("The Moors");
    move(300, 840);
    label("Adventurous");
    move(340, -840);
    label("The Moors");
    move(300, -900);
    label("Adventurous");
    move(-1340, 900);
    label("The Moors");
    move(-1340, 840);
    label("Adventurous");
    move(-1340, -840);
    label("The Moors");
    move(-1340, -900);
    label("Adventurous");
    move(700, 1000);
    label("OUTER CIRCLES:");
    line(690, 970, 1000, 970);
    move(700, 900);
    label("> 9:  The Outer Waste");
    move(700, 800);
    label("> 20: The Dead Marshes");
    move(700, 700);
    label("> 35: Kennaquhair");
    move(700, 600);
    label("> 55: Morannon");
    move(700, 300);
    label("(0,0): The Lord's Chamber");

    move(700, -400);
    label("Grid squares are 100 x 100");
    move(700, -800);
    label("Created by Ted Estes");
    move(700, -860);
    label("Plotted by Chris Robertson");
    move(700, -920);
    label(" c  1985");
    circle(723, -923, 20);

    /* Close down */

    move(-1380, 1180);
    closepl();
    exit(0);
}

plusplus(s, x, y)	/* draw strings in plus plus quadrant */
char	*s;
int	x, y;
{
char	s1[2];

    while (*s)
	{
	move(x, y);
	s1[0] = *s++;
	s1[1] = '\0';
	label(s1);
	x += 25;
	y -= 30;
	}
}

plusminus(s, x, y)	/* draw strings in plus minus quadrant */
char	*s;
int	x, y;
{
char	s1[2];

    while (*s)
	{
	move(x, y);
	s1[0] = *s++;
	s1[1] = '\0';
	label(s1);
	x += 25;
	y += 30;
	}
}