| version 1.1 | | version 1.2 |
|---|
| | |
| * Include file for functions which need to access segment data structure. | | * Include file for functions which need to access segment data structure. |
| * | | * |
| * $Log$ | | * $Log$ |
| * Revision 1.1 1999/06/14 22:13:07 donut | | * Revision 1.2 2003/03/09 06:41:01 donut |
| * Initial revision | | * change byte typedef to sbyte to avoid conflict with win32 byte which is unsigned |
| | | * |
| | | * Revision 1.1.1.1 1999/06/14 22:13:07 donut |
| | | * Import of d1x 1.37 source. |
| * | | * |
| * Revision 2.1 1995/03/20 18:15:22 john | | * Revision 2.1 1995/03/20 18:15:22 john |
| * Added code to not store the normals in the segment structure. | | * Added code to not store the normals in the segment structure. |
| | |
| | | |
| #ifdef COMPACT_SEGS | | #ifdef COMPACT_SEGS |
| typedef struct side { | | typedef struct side { |
| byte type; // replaces num_faces and tri_edge, 1 = quad, 2 = 0:2 triangulation, 3 = 1:3 triangulation | | sbyte type; // replaces num_faces and tri_edge, 1 = quad, 2 = 0:2 triangulation, 3 = 1:3 triangulation |
| ubyte pad; //keep us longword alligned | | ubyte pad; //keep us longword alligned |
| short wall_num; | | short wall_num; |
| short tmap_num; | | short tmap_num; |
| | |
| } __pack__ side; | | } __pack__ side; |
| #else | | #else |
| typedef struct side { | | typedef struct side { |
| byte type; // replaces num_faces and tri_edge, 1 = quad, 2 = 0:2 triangulation, 3 = 1:3 triangulation | | sbyte type; // replaces num_faces and tri_edge, 1 = quad, 2 = 0:2 triangulation, 3 = 1:3 triangulation |
| ubyte pad; //keep us longword alligned | | ubyte pad; //keep us longword alligned |
| short wall_num; | | short wall_num; |
| short tmap_num; | | short tmap_num; |
| | |
| #endif | | #endif |
| short objects; // pointer to objects in this segment | | short objects; // pointer to objects in this segment |
| ubyte special; // special property of a segment (such as damaging, trigger, etc.) | | ubyte special; // special property of a segment (such as damaging, trigger, etc.) |
| byte matcen_num; // which center segment is associated with. | | sbyte matcen_num; // which center segment is associated with. |
| short value; | | short value; |
| fix static_light; //average static light in segment | | fix static_light; //average static light in segment |
| #ifndef EDITOR | | #ifndef EDITOR |
| | |
| extern int Num_segments; | | extern int Num_segments; |
| extern int Num_vertices; | | extern int Num_vertices; |
| | | |
| extern byte Side_to_verts[MAX_SIDES_PER_SEGMENT][4]; // Side_to_verts[my_side] is list of vertices forming side my_side. | | extern sbyte Side_to_verts[MAX_SIDES_PER_SEGMENT][4]; // Side_to_verts[my_side] is list of vertices forming side my_side. |
| extern int Side_to_verts_int[MAX_SIDES_PER_SEGMENT][4]; // Side_to_verts[my_side] is list of vertices forming side my_side. | | extern int Side_to_verts_int[MAX_SIDES_PER_SEGMENT][4]; // Side_to_verts[my_side] is list of vertices forming side my_side. |
| extern char Side_opposite[]; // Side_opposite[my_side] returns side opposite cube from my_side. | | extern char Side_opposite[]; // Side_opposite[my_side] returns side opposite cube from my_side. |
| | | |