3 * took out functions declarations from include/3d.h
4 * which are implemented in 3d/interp.c
12 //#include "vecmat.h" //the vector/matrix library
19 //gives the interpreter an array of points to use
20 void g3_set_interp_points(g3s_point *pointlist);
22 //calls the object interpreter to render an object. The object renderer
23 //is really a seperate pipeline. returns true if drew
24 bool g3_draw_polygon_model(void *model_ptr,grs_bitmap **model_bitmaps,vms_angvec *anim_angles,fix light,fix *glow_values);
26 //init code for bitmap models
27 void g3_init_polygon_model(void *model_ptr);
29 //un-initialize, i.e., convert color entries back to RGB15
30 void g3_uninit_polygon_model(void *model_ptr);
32 //alternate interpreter for morphing object
33 bool g3_draw_morphing_model(void *model_ptr,grs_bitmap **model_bitmaps,vms_angvec *anim_angles,fix light,vms_vector *new_points);
35 //this remaps the 15bpp colors for the models into a new palette. It should
36 //be called whenever the palette changes
37 void g3_remap_interp_colors(void);
39 #ifdef WORDS_BIGENDIAN
40 // routine to convert little to big endian in polygon model data
41 void swap_polygon_model_data(ubyte *data);
42 //routines to convert little to big endian in vectors
43 void vms_vector_swap(vms_vector *v);
44 void vms_angvec_swap(vms_angvec *v);
47 #ifdef WORDS_NEED_ALIGNMENT
49 * A chunk struct (as used for alignment) contains all relevant data
50 * concerning a piece of data that may need to be aligned.
51 * To align it, we need to copy it to an aligned position,
52 * and update all pointers to it.
53 * (Those pointers are actually offsets
54 * relative to start of model_data) to it.
56 typedef struct chunk {
57 ubyte *old_base; // where the offset sets off from (relative to beginning of model_data)
58 ubyte *new_base; // where the base is in the aligned structure
59 short offset; // how much to add to base to get the address of the offset
60 short correction; // how much the value of the offset must be shifted for alignment
62 #define MAX_CHUNKS 100 // increase if insufficent
64 * finds what chunks the data points to, adds them to the chunk_list,
65 * and returns the length of the current chunk
67 int get_chunks(ubyte *data, ubyte *new_data, chunk *list, int *no);
68 #endif //def WORDS_NEED_ALIGNMENT