2 * Copyright (C) Volition, Inc. 1999. All rights reserved.
4 * All source code herein is the property of Volition, Inc. You may not sell
5 * or otherwise commercially exploit the source or things you created based on
15 #error This should only be used internally by the model library. See John if you think you need to include this elsewhere.
19 #define OP_DEFPOINTS 1
25 // change header for freespace2
26 //#define FREESPACE1_FORMAT
27 #define FREESPACE2_FORMAT
28 #if defined( FREESPACE1_FORMAT )
29 #elif defined ( FREESPACE2_FORMAT )
31 #error Neither FREESPACE1_FORMAT or FREESPACE2_FORMAT defined
35 #if defined( FREESPACE1_FORMAT )
36 #define ID_OHDR 'RDHO' // POF file header
37 #define ID_SOBJ 'JBOS' // Subobject header
39 #define ID_OHDR '2RDH' // POF file header
40 #define ID_SOBJ '2JBO' // Subobject header
42 #define ID_TXTR 'RTXT' // Texture filename list
43 #define ID_INFO 'FNIP' // POF file information, like command line, etc
44 #define ID_GRID 'DIRG' // Grid information
45 #define ID_SPCL 'LCPS' // Special object -- like a gun, missile, docking point, etc.
46 #define ID_PATH 'HTAP' // A spline based path
47 #define ID_GPNT 'TNPG' // gun points
48 #define ID_MPNT 'TNPM' // missile points
49 #define ID_DOCK 'KCOD' // docking points
50 #define ID_TGUN 'NUGT' // turret gun points
51 #define ID_TMIS 'SIMT' // turret missile points
52 #define ID_FUEL 'LEUF' // thruster points
53 #define ID_SHLD 'DLHS' // shield definition
54 #define ID_EYE ' EYE' // eye information
55 #define ID_INSG 'GSNI' // insignia information
56 #define ID_ACEN 'NECA' // autocentering information
58 #define uw(p) (*((uint *) (p)))
59 #define w(p) (*((int *) (p)))
60 #define wp(p) ((int *) (p))
61 #define vp(p) ((vector *) (p))
62 #define fl(p) (*((float *) (p)))
64 extern int model_interp(matrix * orient, ubyte * data, polymodel * pm );
66 // Creates the octants for a given polygon model
67 void model_octant_create( polymodel * pm );
69 // frees the memory the octants use for a given polygon model
70 void model_octant_free( polymodel * pm );
72 void model_calc_bound_box( vector *box, vector *big_mn, vector *big_mx);
74 void interp_clear_instance();
76 #define MAX_POLYGON_VECS 1100 //6500 (7x)
77 #define MAX_POLYGON_NORMS 2800 //6500 (3x)
79 extern vector *Interp_verts[MAX_POLYGON_VECS];