Commit | Line | Data |
---|---|---|
fc3e88fd KB |
1 | /* |
2 | * Copyright (c) 1988 The Regents of the University of California. | |
3 | * All rights reserved. | |
4 | * | |
5 | * This code is derived from software contributed to Berkeley by | |
6 | * Timothy C. Stoehr. | |
7 | * | |
3b2381a2 | 8 | * %sccs.include.redist.c% |
fc3e88fd KB |
9 | */ |
10 | ||
11 | #ifndef lint | |
12 | char copyright[] = | |
13 | "@(#) Copyright (c) 1988 The Regents of the University of California.\n\ | |
14 | All rights reserved.\n"; | |
15 | #endif /* not lint */ | |
16 | ||
17 | #ifndef lint | |
3b2381a2 | 18 | static char sccsid[] = "@(#)main.c 5.3 (Berkeley) %G%"; |
fc3e88fd KB |
19 | #endif /* not lint */ |
20 | ||
b3afadef KB |
21 | /* |
22 | * main.c | |
23 | * | |
24 | * This source herein may be modified and/or distributed by anybody who | |
25 | * so desires, with the following restrictions: | |
26 | * 1.) No portion of this notice shall be removed. | |
27 | * 2.) Credit shall not be taken for the creation of this source. | |
28 | * 3.) This code is not to be traded, sold, or used for personal | |
29 | * gain or profit. | |
30 | * | |
31 | */ | |
32 | ||
b3afadef KB |
33 | #include "rogue.h" |
34 | ||
35 | extern short party_room; | |
36 | ||
37 | main(argc, argv) | |
38 | int argc; | |
39 | char *argv[]; | |
40 | { | |
41 | if (init(argc, argv)) { /* restored game */ | |
42 | goto PL; | |
43 | } | |
44 | ||
45 | for (;;) { | |
46 | clear_level(); | |
47 | make_level(); | |
48 | put_objects(); | |
49 | put_stairs(); | |
50 | add_traps(); | |
51 | put_mons(); | |
52 | put_player(party_room); | |
53 | print_stats(STAT_ALL); | |
54 | PL: | |
55 | play_level(); | |
56 | free_stuff(&level_objects); | |
57 | free_stuff(&level_monsters); | |
58 | } | |
59 | } |