source: golgotha/src/golg/path.hh @ 80

Last change on this file since 80 was 80, checked in by Sam Hocevar, 12 years ago
  • Adding the Golgotha source code. Not sure what's going to be interesting in there, but since it's all public domain, there's certainly stuff to pick up.
File size: 1.5 KB
Line 
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
16class g1_saver_class;
17class 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
21class g1_path_class;
22
23typedef g1_path_class *g1_path_handle;
24
25class g1_path_manager_class
26{
27public:
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
46extern g1_path_manager_class g1_path_manager;
47
48#endif
Note: See TracBrowser for help on using the repository browser.