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_MODEL_DRAW_HH
|
---|
10 | #define G1_MODEL_DRAW_HH
|
---|
11 |
|
---|
12 | #include "arch.hh"
|
---|
13 |
|
---|
14 | class g1_object_class;
|
---|
15 | class g1_draw_context_class;
|
---|
16 | class g1_quad_object_class;
|
---|
17 |
|
---|
18 | struct g1_model_draw_parameters
|
---|
19 | {
|
---|
20 | enum
|
---|
21 | {
|
---|
22 | SUPPRESS_SPECIALS=1,
|
---|
23 | NO_LIGHTING=2 // draws object full-bright
|
---|
24 | };
|
---|
25 |
|
---|
26 | g1_quad_object_class *model;
|
---|
27 | g1_quad_object_class *shadow_model;
|
---|
28 | g1_quad_object_class *lod_model;
|
---|
29 |
|
---|
30 | w16 frame; // current animation frame
|
---|
31 | w16 animation; // current animation number in model
|
---|
32 | w32 flags; // drawing modifiers
|
---|
33 |
|
---|
34 | g1_model_draw_parameters()
|
---|
35 | {
|
---|
36 | model = 0;
|
---|
37 | shadow_model = 0;
|
---|
38 | lod_model = 0;
|
---|
39 | frame = 0;
|
---|
40 | animation = 0;
|
---|
41 | flags = 0;
|
---|
42 | }
|
---|
43 |
|
---|
44 | void setup(const char *model_name, char *shadow_model_name=0, char *lod_model_name=0);
|
---|
45 | void setup(w16 model_id, w16 shadow_model=0, w16 lod_model=0);
|
---|
46 | void setup(g1_quad_object_class *model,
|
---|
47 | g1_quad_object_class *shadow_model=0,
|
---|
48 | g1_quad_object_class *lod_model=0);
|
---|
49 |
|
---|
50 | float extent() const; // gets extents of model_id from model_draw
|
---|
51 | };
|
---|
52 |
|
---|
53 | void g1_model_draw(g1_object_class *_this,
|
---|
54 | g1_model_draw_parameters ¶ms,
|
---|
55 | g1_draw_context_class *context);
|
---|
56 |
|
---|
57 |
|
---|
58 | void g1_editor_model_draw(g1_object_class *_this,
|
---|
59 | g1_model_draw_parameters ¶ms,
|
---|
60 | g1_draw_context_class *context); // calls model draw if in edit mode
|
---|
61 |
|
---|
62 | #endif
|
---|