home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1996 December / PCWKCD1296.iso / sharewar / quake106 / utils / modelgen / modelgen.h < prev    next >
C/C++ Source or Header  |  1996-09-12  |  2KB  |  114 lines

  1. //
  2. // modelgen.h: header file for model generation program
  3. //
  4.  
  5. // *********************************************************
  6. // * This file must be identical in the modelgen directory *
  7. // * and in the Quake directory, because it's used to      *
  8. // * pass data from one to the other via model files.      *
  9. // *********************************************************
  10.  
  11. #ifdef INCLUDELIBS
  12.  
  13. #include <stdlib.h>
  14. #include <stdio.h>
  15. #include <math.h>
  16. #include <string.h>
  17.  
  18. #include "cmdlib.h"
  19. #include "scriplib.h"
  20. #include "mathlib.h"
  21. #include "trilib.h"
  22. #include "lbmlib.h"
  23.  
  24. #endif
  25.  
  26. #define ALIAS_VERSION    6
  27.  
  28. #define ALIAS_ONSEAM                0x0020
  29.  
  30. // must match definition in spritegn.h
  31. #ifndef SYNCTYPE_T
  32. #define SYNCTYPE_T
  33. typedef enum {ST_SYNC=0, ST_RAND } synctype_t;
  34. #endif
  35.  
  36. typedef enum { ALIAS_SINGLE=0, ALIAS_GROUP } aliasframetype_t;
  37.  
  38. typedef enum { ALIAS_SKIN_SINGLE=0, ALIAS_SKIN_GROUP } aliasskintype_t;
  39.  
  40. typedef struct {
  41.     int            ident;
  42.     int            version;
  43.     vec3_t        scale;
  44.     vec3_t        scale_origin;
  45.     float        boundingradius;
  46.     vec3_t        eyeposition;
  47.     int            numskins;
  48.     int            skinwidth;
  49.     int            skinheight;
  50.     int            numverts;
  51.     int            numtris;
  52.     int            numframes;
  53.     synctype_t    synctype;
  54.     int            flags;
  55.     float        size;
  56. } mdl_t;
  57.  
  58. // TODO: could be shorts
  59.  
  60. typedef struct {
  61.     int        onseam;
  62.     int        s;
  63.     int        t;
  64. } stvert_t;
  65.  
  66. typedef struct dtriangle_s {
  67.     int                    facesfront;
  68.     int                    vertindex[3];
  69. } dtriangle_t;
  70.  
  71. #define DT_FACES_FRONT                0x0010
  72.  
  73.  
  74. typedef struct {
  75.     byte    v[3];
  76.     byte    lightnormalindex;
  77. } trivertx_t;
  78.  
  79. typedef struct {
  80.     trivertx_t    bboxmin;    // lightnormal isn't used
  81.     trivertx_t    bboxmax;    // lightnormal isn't used
  82.     char        name[16];    // frame name from grabbing
  83. } daliasframe_t;
  84.  
  85. typedef struct {
  86.     int            numframes;
  87.     trivertx_t    bboxmin;    // lightnormal isn't used
  88.     trivertx_t    bboxmax;    // lightnormal isn't used
  89. } daliasgroup_t;
  90.  
  91. typedef struct {
  92.     int            numskins;
  93. } daliasskingroup_t;
  94.  
  95. typedef struct {
  96.     float    interval;
  97. } daliasinterval_t;
  98.  
  99. typedef struct {
  100.     float    interval;
  101. } daliasskininterval_t;
  102.  
  103. typedef struct {
  104.     aliasframetype_t    type;
  105. } daliasframetype_t;
  106.  
  107. typedef struct {
  108.     aliasskintype_t    type;
  109. } daliasskintype_t;
  110.  
  111. #define IDPOLYHEADER    (('O'<<24)+('P'<<16)+('D'<<8)+'I')
  112.                                                         // little-endian "IDPO"
  113.  
  114.