home *** CD-ROM | disk | FTP | other *** search
/ PC PowerPlay 58 / pcpp58a.iso / extras / quake 3 source / Q3A_ToolSource.exe / Main / 3dslib.h < prev    next >
Encoding:
Text File  |  2001-01-02  |  2.8 KB  |  119 lines

  1. typedef struct
  2. {
  3.     float x, y, z;
  4. } _3DSPoint_t;
  5.  
  6. typedef struct
  7. {
  8.     short a, b, c;
  9.     short flags;
  10. } _3DSFace_t;
  11.  
  12. typedef struct
  13. {
  14.     float s, t;
  15. } _3DSTexVert_t;
  16.  
  17. typedef struct
  18. {
  19.     char name[100];
  20.     short numFaces;
  21.     short *pFaces;
  22. } _3DSMeshMaterialGroup_t;
  23.  
  24. typedef struct
  25. {
  26.     char name[80];
  27.  
  28.     char texture[100];
  29.     char specular[100];
  30.     char reflection[100];
  31.     char bump[100];
  32.     char opacity[100];
  33. } _3DSMaterial_t;
  34.  
  35. typedef struct
  36. {
  37.     short numFaces, numPoints, numTexVerts;
  38.     int numMeshMaterialGroups;
  39.  
  40.     _3DSPoint_t *pPoints;
  41.     _3DSFace_t    *pFaces;
  42.     _3DSTexVert_t *pTexVerts;
  43.  
  44.     _3DSMeshMaterialGroup_t *pMeshMaterialGroups;
  45. } _3DSTriObject_t;
  46.  
  47. typedef struct
  48. {
  49.     char name[100];
  50.  
  51.     int                 numTriObjects;
  52.     _3DSTriObject_t *pTriObjects;
  53. } _3DSNamedObject_t;
  54.  
  55. typedef struct
  56. {
  57.     int                    numNamedObjects;
  58.     int                    numMaterials;
  59.  
  60.     _3DSNamedObject_t    *pNamedObjects;
  61.     _3DSMaterial_t        *pMaterials;
  62.  
  63. } _3DSEditChunk_t;
  64.  
  65. typedef struct
  66. {
  67.     _3DSEditChunk_t editChunk;
  68. } _3DS_t;
  69.  
  70. #define _3DS_CHUNK_NULL                        0x0000
  71. #define _3DS_CHUNK_UNKNOWN0                    0x0001
  72. #define _3DS_CHUNK_M3D_VERSION                0x0002
  73. #define _3DS_CHUNK_M3D_KFVERSION            0x0005
  74. #define _3DS_CHUNK_COLOR_F                    0x0010
  75. #define _3DS_CHUNK_COLOR_24                    0x0011
  76. #define _3DS_CHUNK_LIN_COLOR_24                0x0012
  77. #define _3DS_CHUNK_LIN_COLOR_F                0x0013
  78. #define _3DS_CHUNK_INT_PERCENTAGE            0x0030
  79. #define _3DS_CHUNK_FLOAT_PERCENT            0x0031
  80. #define _3DS_CHUNK_MASTER_SCALE                0x0100
  81. #define _3DS_CHUNK_CHUNK_TYPE                0x0995
  82. #define _3DS_CHUNK_CHUNK_UNIQUE                0x0996
  83. #define _3DS_CHUNK_NOT_CHUNK                0x0997
  84. #define _3DS_CHUNK_CONTAINER                0x0998
  85. #define _3DS_CHUNK_IS_CHUNK                    0x0999
  86. #define _3DS_CHUNK_C_SXP_SELFI_MASKDATA        0x0c3c
  87.  
  88. #define _3DS_CHUNK_BITMAP                    0x1100
  89. #define _3DS_CHUNK_USE_BITMAP                0x1101
  90. #define _3DS_CHUNK_SOLID_BGND                0x1200
  91. #define _3DS_CHUNK_USE_SOLID_BGND            0x1201
  92.  
  93. #define _3DS_CHUNK_EDIT                        0x3d3d
  94. #define _3DS_CHUNK_MESH_VERSION                0x3d3e
  95.  
  96. #define _3DS_CHUNK_NAMED_OBJECT                0x4000
  97. #define _3DS_CHUNK_NAMED_TRI_OBJECT            0x4100
  98. #define _3DS_CHUNK_POINT_ARRAY                0x4110
  99. #define _3DS_CHUNK_POINT_FLAG_ARRAY            0x4111
  100. #define _3DS_CHUNK_FACE_ARRAY                0x4120
  101. #define _3DS_CHUNK_MSH_MAT_GROUP            0x4130
  102. #define _3DS_CHUNK_TEX_VERTS                0x4140
  103. #define _3DS_CHUNK_SMOOTH_GROUP                0x4150
  104. #define _3DS_CHUNK_MESH_MATRIX                0x4160
  105. #define _3DS_CHUNK_MAGIC                    0x4d4d
  106.  
  107. #define _3DS_CHUNK_MAT_NAME                    0xa000
  108. #define _3DS_CHUNK_TEXMAP                    0xa200
  109. #define _3DS_CHUNK_SPECMAP                    0xa204
  110. #define _3DS_CHUNK_OPACMAP                    0xa210
  111. #define _3DS_CHUNK_REFLMAP                    0xa220
  112. #define _3DS_CHUNK_BUMPMAP                    0xa230
  113. #define _3DS_CHUNK_MAT_MAPNAME                0xa300
  114. #define _3DS_CHUNK_MAT_LIST                    0xafff
  115.  
  116. #define _3DS_CHUNK_KEYFRAME_DATA            0xb000
  117.  
  118. void _3DS_LoadPolysets( const char *filename, polyset_t **ppPSET, int *numpsets, qboolean verbose );
  119.