1 | /********************************************************************** <BR>
|
---|
2 | This file is part of Crack dot Com's free source code release of
|
---|
3 | Golgotha. <a href="http://www.crack.com/golgotha_release"> <BR> for
|
---|
4 | information about compiling & licensing issues visit this URL</a>
|
---|
5 | <PRE> If that doesn't help, contact Jonathan Clark at
|
---|
6 | golgotha_source@usa.net (Subject should have "GOLG" in it)
|
---|
7 | ***********************************************************************/
|
---|
8 |
|
---|
9 | #ifndef CRITICAL_MAP_HH
|
---|
10 | #define CRITICAL_MAP_HH
|
---|
11 |
|
---|
12 | #include "arch.hh"
|
---|
13 | #include "critical_graph.hh"
|
---|
14 |
|
---|
15 | class g1_map_class;
|
---|
16 |
|
---|
17 | class g1_critical_map_maker_class
|
---|
18 | {
|
---|
19 | protected:
|
---|
20 | g1_map_class *map;
|
---|
21 | g1_critical_graph_class *critical;
|
---|
22 |
|
---|
23 | enum { queue_length=22500 };
|
---|
24 | w32 cnx[queue_length], cny[queue_length];
|
---|
25 | g1_graph_node crit[queue_length];
|
---|
26 | w32 head,tail;
|
---|
27 |
|
---|
28 | void clear_queue() { head = tail = 0; }
|
---|
29 |
|
---|
30 | // critical map accessors
|
---|
31 | i4_bool critical_full(w16 x, w16 y, g1_graph_node crit);
|
---|
32 | void set_critical(w16 x, w16 y, g1_graph_node critical);
|
---|
33 |
|
---|
34 | i4_bool add_critical(w32 x,w32 y,w8 d, g1_graph_node critical);
|
---|
35 | i4_bool get_next_critical(w32 &x,w32 &y, g1_graph_node &critical);
|
---|
36 |
|
---|
37 | i4_bool make_critical_map();
|
---|
38 | i4_bool make_critical_graph();
|
---|
39 |
|
---|
40 | void clear_critical_map();
|
---|
41 | public:
|
---|
42 | w8 grade, tofrom;
|
---|
43 | g1_graph_node get_critical(w16 x, w16 y, int n=0);
|
---|
44 |
|
---|
45 | // returns false if canceled by user
|
---|
46 | i4_bool make_criticals(g1_map_class *_map, g1_critical_graph_class *_graph);
|
---|
47 | g1_critical_map_maker_class()
|
---|
48 | : map(0), critical(0) {}
|
---|
49 | };
|
---|
50 |
|
---|
51 | #endif
|
---|
52 |
|
---|
53 | //{{{ Emacs Locals
|
---|
54 | // Local Variables:
|
---|
55 | // folded-file: t
|
---|
56 | // End:
|
---|
57 | //}}}
|
---|
58 |
|
---|