132689Sbostic /* 2*36704Sbostic * Copyright (c) 1988 The Regents of the University of California. 3*36704Sbostic * All rights reserved. 4*36704Sbostic * 5*36704Sbostic * This code is derived from software contributed to Berkeley by 6*36704Sbostic * Timothy C. Stoehr. 7*36704Sbostic * 8*36704Sbostic * Redistribution and use in source and binary forms are permitted 9*36704Sbostic * provided that the above copyright notice and this paragraph are 10*36704Sbostic * duplicated in all such forms and that any documentation, 11*36704Sbostic * advertising materials, and other materials related to such 12*36704Sbostic * distribution and use acknowledge that the software was developed 13*36704Sbostic * by the University of California, Berkeley. The name of the 14*36704Sbostic * University may not be used to endorse or promote products derived 15*36704Sbostic * from this software without specific prior written permission. 16*36704Sbostic * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 17*36704Sbostic * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 18*36704Sbostic * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 19*36704Sbostic */ 20*36704Sbostic 21*36704Sbostic #ifndef lint 22*36704Sbostic char copyright[] = 23*36704Sbostic "@(#) Copyright (c) 1988 The Regents of the University of California.\n\ 24*36704Sbostic All rights reserved.\n"; 25*36704Sbostic #endif /* not lint */ 26*36704Sbostic 27*36704Sbostic #ifndef lint 28*36704Sbostic static char sccsid[] = "@(#)main.c 5.2 (Berkeley) 02/07/89"; 29*36704Sbostic #endif /* not lint */ 30*36704Sbostic 31*36704Sbostic /* 3232689Sbostic * main.c 3332689Sbostic * 3432689Sbostic * This source herein may be modified and/or distributed by anybody who 3532689Sbostic * so desires, with the following restrictions: 3632689Sbostic * 1.) No portion of this notice shall be removed. 3732689Sbostic * 2.) Credit shall not be taken for the creation of this source. 3832689Sbostic * 3.) This code is not to be traded, sold, or used for personal 3932689Sbostic * gain or profit. 4032689Sbostic * 4132689Sbostic */ 4232689Sbostic 4332689Sbostic #include "rogue.h" 4432689Sbostic 4532689Sbostic extern short party_room; 4632689Sbostic 4732689Sbostic main(argc, argv) 4832689Sbostic int argc; 4932689Sbostic char *argv[]; 5032689Sbostic { 5132689Sbostic if (init(argc, argv)) { /* restored game */ 5232689Sbostic goto PL; 5332689Sbostic } 5432689Sbostic 5532689Sbostic for (;;) { 5632689Sbostic clear_level(); 5732689Sbostic make_level(); 5832689Sbostic put_objects(); 5932689Sbostic put_stairs(); 6032689Sbostic add_traps(); 6132689Sbostic put_mons(); 6232689Sbostic put_player(party_room); 6332689Sbostic print_stats(STAT_ALL); 6432689Sbostic PL: 6532689Sbostic play_level(); 6632689Sbostic free_stuff(&level_objects); 6732689Sbostic free_stuff(&level_monsters); 6832689Sbostic } 6932689Sbostic } 70