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
27 #define FREESPACE1_FORMAT
29 #define FREESPACE2_FORMAT
31 #if defined( FREESPACE1_FORMAT )
32 #elif defined ( FREESPACE2_FORMAT )
34 #error Neither FREESPACE1_FORMAT or FREESPACE2_FORMAT defined
38 #if defined( FREESPACE1_FORMAT )
39 #define ID_OHDR 0x5244484f // RDHO, POF file header
40 #define ID_SOBJ 0x4a424f53 // JBOS, Subobject header
42 #define ID_OHDR 0x32524448 // 2RDH, POF file header
43 #define ID_SOBJ 0x324a424f // 2JBO, Subobject header
45 #define ID_PSPO 0x4f505350 // OPSP, POF header ID
46 #define ID_TXTR 0x52545854 // RTXT, Texture filename list
47 #define ID_INFO 0x464e4950 // FNIP, POF file information, like command line, etc
48 #define ID_GRID 0x44495247 // DIRG, Grid information
49 #define ID_SPCL 0x4c435053 // LCPS, Special object -- like a gun, missile, docking point, etc.
50 #define ID_PATH 0x48544150 // HTAP, A spline based path
51 #define ID_GPNT 0x544e5047 // TNPG, gun points
52 #define ID_MPNT 0x544e504d // TNPM, missile points
53 #define ID_DOCK 0x4b434f44 // KCOD, docking points
54 #define ID_TGUN 0x4e554754 // NUGT, turret gun points
55 #define ID_TMIS 0x53494d54 // SIMT, turret missile points
56 #define ID_FUEL 0x4c455546 // LEUF, thruster points
57 #define ID_SHLD 0x444c4853 // DLHS, shield definition
58 #define ID_EYE 0x20455945 // ' EYE', eye information
59 #define ID_INSG 0x47534e49 // GSNI, insignia information
60 #define ID_ACEN 0x4e454341 // NECA, autocentering information
62 #define uw(p) (*((uint *) (p)))
63 #define w(p) (*((int *) (p)))
64 #define wp(p) ((int *) (p))
65 #define vp(p) ((vector *) (p))
66 #define fl(p) (*((float *) (p)))
68 extern int model_interp(matrix * orient, ubyte * data, polymodel * pm );
70 // Creates the octants for a given polygon model
71 void model_octant_create( polymodel * pm );
73 // frees the memory the octants use for a given polygon model
74 void model_octant_free( polymodel * pm );
76 void model_calc_bound_box( vector *box, vector *big_mn, vector *big_mx);
78 void interp_clear_instance();
80 #if SDL_BYTEORDER == SDL_BIG_ENDIAN
81 // Endian swapping stuff tigital
82 void swap_bsp_data( polymodel * pm, void *model_ptr );
85 #define MAX_POLYGON_VECS 1100 //6500 (7x)
86 #define MAX_POLYGON_NORMS 2800 //6500 (3x)
88 extern vector *Interp_verts[MAX_POLYGON_VECS];