Annotation of quake1/modelgen.h, revision 1.1

1.1     ! root        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 "trilib.h"
        !            21: #include "lbmlib.h"
        !            22: #include "mathlib.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: // This mirrors trivert_t in trilib.h, is present so Quake knows how to
        !            74: // load this data
        !            75: 
        !            76: typedef struct {
        !            77:        byte    v[3];
        !            78:        byte    lightnormalindex;
        !            79: } trivertx_t;
        !            80: 
        !            81: typedef struct {
        !            82:        trivertx_t      bboxmin;        // lightnormal isn't used
        !            83:        trivertx_t      bboxmax;        // lightnormal isn't used
        !            84:        char            name[16];       // frame name from grabbing
        !            85: } daliasframe_t;
        !            86: 
        !            87: typedef struct {
        !            88:        int                     numframes;
        !            89:        trivertx_t      bboxmin;        // lightnormal isn't used
        !            90:        trivertx_t      bboxmax;        // lightnormal isn't used
        !            91: } daliasgroup_t;
        !            92: 
        !            93: typedef struct {
        !            94:        int                     numskins;
        !            95: } daliasskingroup_t;
        !            96: 
        !            97: typedef struct {
        !            98:        float   interval;
        !            99: } daliasinterval_t;
        !           100: 
        !           101: typedef struct {
        !           102:        float   interval;
        !           103: } daliasskininterval_t;
        !           104: 
        !           105: typedef struct {
        !           106:        aliasframetype_t        type;
        !           107: } daliasframetype_t;
        !           108: 
        !           109: typedef struct {
        !           110:        aliasskintype_t type;
        !           111: } daliasskintype_t;
        !           112: 
        !           113: #define IDPOLYHEADER   (('O'<<24)+('P'<<16)+('D'<<8)+'I')
        !           114:                                                                                                                // little-endian "IDPO"
        !           115: 

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.