xref: /csrg-svn/games/rogue/main.c (revision 60842)
132689Sbostic /*
2*60842Sbostic  * Copyright (c) 1988, 1993
3*60842Sbostic  *	The Regents of the University of California.  All rights reserved.
436704Sbostic  *
536704Sbostic  * This code is derived from software contributed to Berkeley by
636704Sbostic  * Timothy C. Stoehr.
736704Sbostic  *
842596Sbostic  * %sccs.include.redist.c%
936704Sbostic  */
1036704Sbostic 
1136704Sbostic #ifndef lint
12*60842Sbostic static char copyright[] =
13*60842Sbostic "@(#) Copyright (c) 1988, 1993\n\
14*60842Sbostic 	The Regents of the University of California.  All rights reserved.\n";
1536704Sbostic #endif /* not lint */
1636704Sbostic 
1736704Sbostic #ifndef lint
18*60842Sbostic static char sccsid[] = "@(#)main.c	8.1 (Berkeley) 05/31/93";
1936704Sbostic #endif /* not lint */
2036704Sbostic 
2136704Sbostic /*
2232689Sbostic  * main.c
2332689Sbostic  *
2432689Sbostic  * This source herein may be modified and/or distributed by anybody who
2532689Sbostic  * so desires, with the following restrictions:
2632689Sbostic  *    1.)  No portion of this notice shall be removed.
2732689Sbostic  *    2.)  Credit shall not be taken for the creation of this source.
2832689Sbostic  *    3.)  This code is not to be traded, sold, or used for personal
2932689Sbostic  *         gain or profit.
3032689Sbostic  *
3132689Sbostic  */
3232689Sbostic 
3332689Sbostic #include "rogue.h"
3432689Sbostic 
3532689Sbostic extern short party_room;
3632689Sbostic 
main(argc,argv)3732689Sbostic main(argc, argv)
3832689Sbostic int argc;
3932689Sbostic char *argv[];
4032689Sbostic {
4132689Sbostic 	if (init(argc, argv)) {		/* restored game */
4232689Sbostic 		goto PL;
4332689Sbostic 	}
4432689Sbostic 
4532689Sbostic 	for (;;) {
4632689Sbostic 		clear_level();
4732689Sbostic 		make_level();
4832689Sbostic 		put_objects();
4932689Sbostic 		put_stairs();
5032689Sbostic 		add_traps();
5132689Sbostic 		put_mons();
5232689Sbostic 		put_player(party_room);
5332689Sbostic 		print_stats(STAT_ALL);
5432689Sbostic PL:
5532689Sbostic 		play_level();
5632689Sbostic 		free_stuff(&level_objects);
5732689Sbostic 		free_stuff(&level_monsters);
5832689Sbostic 	}
5932689Sbostic }
60