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 G1_PATH_HH
|
---|
10 | #define G1_PATH_HH
|
---|
11 |
|
---|
12 | #include "arch.hh"
|
---|
13 | #include "math/num_type.hh"
|
---|
14 | #include "memory/growarry.hh"
|
---|
15 |
|
---|
16 | class g1_saver_class;
|
---|
17 | class g1_loader_class;
|
---|
18 |
|
---|
19 | // this is defined internally in path.cc, you don't need to know the details, use
|
---|
20 | // the path manager to find out info about your path
|
---|
21 | class g1_path_class;
|
---|
22 |
|
---|
23 | typedef g1_path_class *g1_path_handle;
|
---|
24 |
|
---|
25 | class g1_path_manager_class
|
---|
26 | {
|
---|
27 | public:
|
---|
28 | g1_path_handle alloc_path(w32 t_positions,
|
---|
29 | i4_float *positions);
|
---|
30 |
|
---|
31 | void get_position(g1_path_handle path, i4_float &x, i4_float &y);
|
---|
32 | i4_bool get_nth_position(g1_path_handle path, int n, i4_float &x, i4_float &y);
|
---|
33 |
|
---|
34 | // advance_path automatically frees the path after the last
|
---|
35 | // reference gets to the end of it
|
---|
36 | g1_path_handle advance_path(g1_path_handle path);
|
---|
37 |
|
---|
38 | i4_bool is_last_path_point(g1_path_handle path);
|
---|
39 |
|
---|
40 | void free_path(g1_path_handle &path);
|
---|
41 |
|
---|
42 | void save(g1_saver_class *fp, g1_path_handle path);
|
---|
43 | g1_path_handle load(g1_loader_class *fp);
|
---|
44 | };
|
---|
45 |
|
---|
46 | extern g1_path_manager_class g1_path_manager;
|
---|
47 |
|
---|
48 | #endif
|
---|