source: golgotha/src/golg/load3d.hh

Last change on this file 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: 2.6 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//{{{ 3D File Loader
10//
11//  Not final version
12//
13//$Id: load3d.hh,v 1.18 1998/05/01 22:33:45 oliy Exp $
14
15#ifndef G1_LOAD3D_HH
16#define G1_LOAD3D_HH
17
18#include "memory/growheap.hh"
19#include "string/string.hh"
20#include "math/vector.hh"
21#include "obj3d.hh"
22
23class r1_texture_manager_class;
24class r1_render_api_class;
25
26class g1_quad_object_loader_class : public g1_base_object_loader_class
27{
28protected:
29  g1_quad_object_loader_class() : heap(0) {}
30public:
31  i4_grow_heap_class *heap;
32  r1_texture_manager_class *tman;
33  const i4_const_str *error_name;
34
35  g1_quad_object_loader_class(i4_grow_heap_class *_heap) : heap(_heap) {}
36
37  virtual g1_quad_object_class *allocate_object();
38
39  virtual void set_num_vertex(w16 num_vertex);
40
41  virtual void set_num_animations(w16 anims);
42  virtual void create_animation(w16 anim, const i4_const_str &name, w16 frames);
43
44  virtual void create_vertex(w16 anim, w16 frame, w16 index, const i4_3d_vector& v);
45  virtual void store_vertex_normal(w16 anim, w16 frame, w16 index, const i4_3d_vector& normal);
46
47  virtual void set_num_quads(w16 num_quads);
48  virtual void create_quad(w16 quad, int verts, w16 *ref, w32 flags);
49  virtual void store_texture_name(w32 quad, const i4_const_str &name);
50  virtual void store_texture_params(w32 quad, i4_float scale, i4_float *u, i4_float *v);
51  virtual void store_quad_normal(w16 quad, const i4_3d_vector& v);
52
53  virtual void set_num_mount_points(w16 num_mounts);
54  virtual void create_mount_point(w32 index, const i4_const_str &name, const i4_3d_vector &off);
55
56  virtual void set_num_texture_animations(w16 num_textures);
57  virtual void create_texture_animation(w32 index, w16 quad, w8 max_frames, w8 frames_x,
58                                        i4_float du, i4_float dv, i4_float speed);
59  virtual void create_texture_pan(w32 index, w16 quad,
60                                  i4_float du, i4_float dv, i4_float speed);
61
62  virtual void finish_object();
63
64  g1_quad_object_class *load(i4_loader_class *fp, const i4_const_str &_error_name,
65                             r1_texture_manager_class *_tman);
66};
67
68#endif
Note: See TracBrowser for help on using the repository browser.