Commit | Line | Data |
---|---|---|
b3afadef KB |
1 | /* |
2 | * main.c | |
3 | * | |
4 | * This source herein may be modified and/or distributed by anybody who | |
5 | * so desires, with the following restrictions: | |
6 | * 1.) No portion of this notice shall be removed. | |
7 | * 2.) Credit shall not be taken for the creation of this source. | |
8 | * 3.) This code is not to be traded, sold, or used for personal | |
9 | * gain or profit. | |
10 | * | |
11 | */ | |
12 | ||
13 | #ifndef lint | |
14 | static char sccsid[] = "@(#)main.c 5.1 (Berkeley) %G%"; | |
15 | #endif /* not lint */ | |
16 | ||
17 | #include "rogue.h" | |
18 | ||
19 | extern short party_room; | |
20 | ||
21 | main(argc, argv) | |
22 | int argc; | |
23 | char *argv[]; | |
24 | { | |
25 | if (init(argc, argv)) { /* restored game */ | |
26 | goto PL; | |
27 | } | |
28 | ||
29 | for (;;) { | |
30 | clear_level(); | |
31 | make_level(); | |
32 | put_objects(); | |
33 | put_stairs(); | |
34 | add_traps(); | |
35 | put_mons(); | |
36 | put_player(party_room); | |
37 | print_stats(STAT_ALL); | |
38 | PL: | |
39 | play_level(); | |
40 | free_stuff(&level_objects); | |
41 | free_stuff(&level_monsters); | |
42 | } | |
43 | } |