1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
|
#ifndef _projload_hpp
#define _projload_hpp 1
#include "chnkload.h"
#include "hmodel.h"
#ifdef __cplusplus
#include "hierchnk.hpp"
// project specifc structure contained in rif handle
struct Project_RifHandle {};
struct Object_ShapeNum_Pair
{
int sh_num;
Object_Chunk * ob;
};
struct Hierarchy_ID_Time_Pair
{
int id;
int time;
};
struct Hierarchy_Alternate_Shape_Set
{
char* shape_set_name;
int index;
int num_replaced_shapes;
int flags;
//terminator has 0 for name and replacement_shape
HIERARCHY_SHAPE_REPLACEMENT* replaced_shapes;
};
struct Hierarchy_Descriptor
{
// this is null if the sequence is a template
// or contains the name of the SECTION that it
// attachs to
SECTION * hierarchy_root;
char * hierarchy_name;
};
extern "C"
{
struct hierarchy_variant_data;
};
class Global_Hierarchy_Store
{
public:
// in a vain hope
Global_Hierarchy_Store (RIFFHANDLE h);
~Global_Hierarchy_Store();
void add_hierarchy (List <Object_ShapeNum_Pair *> & osnp_lst, Object_Hierarchy_Chunk * ohc);
void setup_alternate_shape_sets (List <Object_ShapeNum_Pair *> & osnp_lst, File_Chunk * fc);
List <Hierarchy_Descriptor *> hierarchy_list;
List<Hierarchy_Alternate_Shape_Set*> alternate_shape_set_list;
int num_shape_collections;
struct hierarchy_variant_data* shape_collections;
List<int> random_shape_colls;
RIFFHANDLE rif_hand;
char * riffname;
private:
int num_sounds;
HIERARCHY_SOUND* sound_array;
static List<Hierarchy_ID_Time_Pair*> time_list;
int get_time_from_sequence_id(int id);
void build_time_list(Object_Hierarchy_Chunk* ohc);
SECTION * build_hierarchy (Object_Hierarchy_Chunk * ohc,char* hierarchy_name);
void delete_section(SECTION *);
};
extern "C" {
#endif
#define LOAD_MORPH_SHAPES 1 // you can compile out the code that copies morph data
#define CL_SUPPORT_ALTTAB 1 // textures and surfaces loaded with CL_LoadImageOnce with LIO_RESTORABLE set will be added to ALT+TAB lists
#define CL_SUPPORT_FASTFILE 1 // AvP uses fastfiles (but if the gfx aren't in them, it'll try the actual files
#ifdef AVP_DEBUG_VERSION
#define CL_SUPPORTONLY_FASTFILE 0 // for release, milestones, CDs, demos, may want this to be non-zero
#else
//allow loading from outside of fastfiles to help with custom levels
#define CL_SUPPORTONLY_FASTFILE 0 // for release, milestones, CDs, demos, may want this to be non-zero
#endif
// project specific copy chunks flags
#define CCF_ENVIRONMENT 0x00000001
#define CCF_IMAGEGROUPSET 0x00000002
#define CCF_LOAD_AS_HIERARCHY_IF_EXISTS 0x00000004
#define CCF_DONT_INITIALISE_TEXTURES 0x00000008
extern void setup_shading_tables(void);
extern void SetUpRunTimeLights ();
// copies all shapes and objects etc
extern BOOL copy_chunks_from_environment(int flags);
// set the local_scale
extern void set_local_scale(RIFFHANDLE, int flags);
#define SetLocalScale(h,f) set_local_scale(h,f)
// copies all shapes and objects etc
extern BOOL copy_rif_data (RIFFHANDLE, int flags,int progress_start,int progress_interval);
#define CopyRIFData(h,f) copy_rif_data(h,f)
// this should return the next free main shape list position for loaded shapes; it may be called more than once
extern int load_precompiled_shapes();
#define LoadPrecompiledShapes() load_precompiled_shapes()
void avp_undo_rif_load(RIFFHANDLE h);
RIFFHANDLE avp_load_rif (const char * fname);
RIFFHANDLE avp_load_rif_non_env (const char * fname);
void DeallocateModules();
void EmptyHierarchyLibrary ();
void DeleteHierarchyLibraryEntry(RIFFHANDLE);
SECTION * GetHierarchyFromLibrary(const char * rif_name);
SECTION * GetNamedHierarchyFromLibrary(const char * rif_name, const char *);
HIERARCHY_SHAPE_REPLACEMENT* GetHierarchyAlternateShapeSetFromLibrary(const char* rif_name,const char* shape_set_name);
extern void save_preplaced_decals();
#ifdef __cplusplus
};
#endif
#endif
|