⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 3dsftk.h

📁 游戏编程精华02-含有几十个游戏编程例子
💻 H
📖 第 1 页 / 共 5 页
字号:
/* Priv */    C_CONESEGS = 0xC661,
/* Priv */    C_NGPARMS = 0xC670,
/* Priv */    C_PTHLEVEL = 0xC680,
/* Priv */    C_MSCSYM = 0xC690,
/* Priv */    C_MFTSYM = 0xC6A0,
/* Priv */    C_MTTSYM = 0xC6B0,
/* Priv */    C_SMOOTHING = 0xC6C0,
/* Priv */    C_MODICOUNT = 0xC6D0,
/* Priv */    C_FONTSEL = 0xC6E0,
/* Priv */    C_TESS_TYPE = 0xC6f0,
/* Priv */    C_TESS_TENSION = 0xC6f1,

/* Priv */    C_SEG_START = 0xC700,
/* Priv */    C_SEG_END = 0xC705,
/* Priv */    C_CURTIME = 0xC710,
/* Priv */    C_ANIMLENGTH = 0xC715,
/* Priv */    C_PV_FROM = 0xC720,
/* Priv */    C_PV_TO = 0xC725,
/* Priv */    C_PV_DOFNUM = 0xC730,
/* Priv */    C_PV_RNG = 0xC735,
/* Priv */    C_PV_NTH = 0xC740,
/* Priv */    C_PV_TYPE = 0xC745,
/* Priv */    C_PV_METHOD = 0xC750,
/* Priv */    C_PV_FPS = 0xC755,
/* Priv */    C_VTR_FRAMES = 0xC765,
/* Priv */    C_VTR_HDTL = 0xC770,
/* Priv */    C_VTR_HD = 0xC771,
/* Priv */    C_VTR_TL = 0xC772,
/* Priv */    C_VTR_IN = 0xC775,
/* Priv */    C_VTR_PK = 0xC780,
/* Priv */    C_VTR_SH = 0xC785,

/* Priv */ /* Material chunks */

/* Priv */    C_WORK_MTLS = 0xC790,	  /* Old-style -- now ignored */
/* Priv */    C_WORK_MTLS_2 = 0xC792, /* Old-style -- now ignored */
/* Priv */    C_WORK_MTLS_3 = 0xC793, /* Old-style -- now ignored */
/* Priv */    C_WORK_MTLS_4 = 0xC794, /* Old-style -- now ignored */
/* Priv */    C_WORK_MTLS_5 = 0xCB00, /* Old-style -- now ignored */
/* Priv */    C_WORK_MTLS_6 = 0xCB01, /* Old-style -- now ignored */
/* Priv */    C_WORK_MTLS_7 = 0xCB02, /* Old-style -- now ignored */
/* Priv */    C_WORK_MTLS_8 = 0xCB03, /* Old-style -- now ignored */
/* Priv */    C_WORKMTL = 0xCB04,
/* Priv */    C_SXP_TEXT_DATA = 0xCB10,
/* Priv */    C_SXP_TEXT2_DATA = 0xCB20,
/* Priv */    C_SXP_OPAC_DATA = 0xCB11,
/* Priv */    C_SXP_BUMP_DATA = 0xCB12,
/* Priv */    C_SXP_SPEC_DATA = 0xCB24,
/* Priv */    C_SXP_SHIN_DATA = 0xCB13,
/* Priv */    C_SXP_SELFI_DATA = 0xCB28,
/* Priv */    C_SXP_TEXT_MASKDATA = 0xCB30,
/* Priv */    C_SXP_TEXT2_MASKDATA = 0xCB32,
/* Priv */    C_SXP_OPAC_MASKDATA = 0xCB34,
/* Priv */    C_SXP_BUMP_MASKDATA = 0xCB36,
/* Priv */    C_SXP_SPEC_MASKDATA = 0xCB38,
/* Priv */    C_SXP_SHIN_MASKDATA = 0xCB3A,
/* Priv */    C_SXP_SELFI_MASKDATA = 0xC3C,
/* Priv */    C_SXP_REFL_MASKDATA = 0xCB3E,

/* Priv */    C_BGTYPE = 0xC7A1,
/* Priv */    C_MEDTILE = 0xC7B0,

/* Priv */ /* Contrast */

/* Priv */    C_LO_CONTRAST = 0xC7D0,
/* Priv */    C_HI_CONTRAST = 0xC7D1,

/* Priv */ /* 3d frozen display */

/* Priv */    C_FROZ_DISPLAY = 0xC7E0,

/* Priv */ /* Booleans */
/* Priv */    C_BOOLWELD = 0xc7f0,
/* Priv */    C_BOOLTYPE = 0xc7f1,

/* Priv */    C_ANG_THRESH = 0xC900,
/* Priv */    C_SS_THRESH = 0xC901,
/* Priv */    C_TEXTURE_BLUR_DEFAULT = 0xC903,

/* Priv */    C_MAPDRAWER = 0xCA00,
/* Priv */    C_MAPDRAWER1 = 0xCA01,
/* Priv */    C_MAPDRAWER2 = 0xCA02,
/* Priv */    C_MAPDRAWER3 = 0xCA03,
/* Priv */    C_MAPDRAWER4 = 0xCA04,
/* Priv */    C_MAPDRAWER5 = 0xCA05,
/* Priv */    C_MAPDRAWER6 = 0xCA06,
/* Priv */    C_MAPDRAWER7 = 0xCA07,
/* Priv */    C_MAPDRAWER8 = 0xCA08,
/* Priv */    C_MAPDRAWER9 = 0xCA09,
/* Priv */    C_MAPDRAWER_ENTRY = 0xCA10,

/* Priv */ /* system options */
/* Priv */    C_BACKUP_FILE = 0xCA20,
/* Priv */    C_DITHER_256 = 0xCA21,
/* Priv */    C_SAVE_LAST = 0xCA22,
/* Priv */    C_USE_ALPHA = 0xCA23,
/* Priv */    C_TGA_DEPTH = 0xCA24,
/* Priv */    C_REND_FIELDS = 0xCA25,
/* Priv */    C_REFLIP = 0xCA26,
/* Priv */    C_SEL_ITEMTOG = 0xCA27,
/* Priv */    C_SEL_RESET = 0xCA28,
/* Priv */    C_STICKY_KEYINF = 0xCA29,
/* Priv */    C_WELD_THRESHOLD = 0xCA2A,
/* Priv */    C_ZCLIP_POINT = 0xCA2B,
/* Priv */    C_ALPHA_SPLIT = 0xCA2C,
/* Priv */    C_KF_SHOW_BACKFACE = 0xCA30,
/* Priv */    C_OPTIMIZE_LOFT = 0xCA40,
/* Priv */    C_TENS_DEFAULT = 0xCA42,
/* Priv */    C_CONT_DEFAULT = 0xCA44,
/* Priv */    C_BIAS_DEFAULT = 0xCA46,

/* Priv */    C_DXFNAME_SRC  = 0xCA50,
/* Priv */    C_AUTO_WELD  = 0xCA60,
/* Priv */    C_AUTO_UNIFY  = 0xCA70,
/* Priv */    C_AUTO_SMOOTH  = 0xCA80,
/* Priv */    C_DXF_SMOOTH_ANG  = 0xCA90,
/* Priv */    C_SMOOTH_ANG  = 0xCAA0,

/* Priv */ /* Special network-use chunks */

/* Priv */    C_NET_USE_VPOST = 0xCC00,
/* Priv */    C_NET_USE_GAMMA = 0xCC10,
/* Priv */    C_NET_FIELD_ORDER = 0xCC20,

/* Priv */    C_BLUR_FRAMES = 0xCD00,
/* Priv */    C_BLUR_SAMPLES = 0xCD10,
/* Priv */    C_BLUR_DUR = 0xCD20,
/* Priv */    C_HOT_METHOD = 0xCD30,
/* Priv */    C_HOT_CHECK = 0xCD40,
/* Priv */    C_PIXEL_SIZE = 0xCD50,
/* Priv */    C_DISP_GAMMA = 0xCD60,
/* Priv */    C_FBUF_GAMMA = 0xCD70,
/* Priv */    C_FILE_OUT_GAMMA = 0xCD80,
/* Priv */    C_FILE_IN_GAMMA = 0xCD82,
/* Priv */    C_GAMMA_CORRECT = 0xCD84,
/* Priv */    C_APPLY_DISP_GAMMA = 0xCD90  /* OBSOLETE */,
/* Priv */    C_APPLY_FBUF_GAMMA = 0xCDA0  /* OBSOLETE */,
/* Priv */    C_APPLY_FILE_GAMMA = 0xCDB0  /* OBSOLETE */,
/* Priv */    C_FORCE_WIRE = 0xCDC0,
/* Priv */    C_RAY_SHADOWS = 0xCDD0,
/* Priv */    C_MASTER_AMBIENT = 0xCDE0,
/* Priv */    C_SUPER_SAMPLE = 0xCDF0,
/* Priv */    C_OBJECT_MBLUR = 0xCE00,
/* Priv */    C_MBLUR_DITHER = 0xCE10,
/* Priv */    C_DITHER_24 = 0xCE20,
/* Priv */    C_SUPER_BLACK = 0xCE30,
/* Priv */    C_SAFE_FRAME = 0xCE40,
/* Priv */    C_VIEW_PRES_RATIO = 0xCE50,
/* Priv */    C_BGND_PRES_RATIO = 0xCE60,
/* Priv */    C_NTH_SERIAL_NUM = 0xCE70,

/* Priv */    /* Video Post */
/* Priv */    VPDATA = 0xd000,

/* Priv */    P_QUEUE_ENTRY = 0xd100,
/* Priv */    P_QUEUE_IMAGE = 0xd110,
/* Priv */    P_QUEUE_USEIGAMMA = 0xd114,
/* Priv */    P_QUEUE_PROC = 0xd120,
/* Priv */    P_QUEUE_SOLID = 0xd130,
/* Priv */    P_QUEUE_GRADIENT = 0xd140,
/* Priv */    P_QUEUE_KF = 0xd150,
/* Priv */    P_QUEUE_MOTBLUR = 0xd152,
/* Priv */    P_QUEUE_MB_REPEAT = 0xd153,
/* Priv */    P_QUEUE_NONE = 0xd160,

/* Priv */    P_QUEUE_RESIZE = 0xd180,
/* Priv */    P_QUEUE_OFFSET = 0xd185,
/* Priv */    P_QUEUE_ALIGN = 0xd190,

/* Priv */    P_CUSTOM_SIZE = 0xd1a0,

/* Priv */    P_ALPH_NONE = 0xd210,
/* Priv */    P_ALPH_PSEUDO = 0xd220	/* Old chunk */,
/* Priv */    P_ALPH_OP_PSEUDO = 0xd221	/* Old chunk */,
/* Priv */    P_ALPH_BLUR = 0xd222		/* Replaces pseudo */,
/* Priv */    P_ALPH_PCOL = 0xd225,
/* Priv */    P_ALPH_C0 = 0xd230,
/* Priv */    P_ALPH_OP_KEY = 0xd231,
/* Priv */    P_ALPH_KCOL = 0xd235,
/* Priv */    P_ALPH_OP_NOCONV = 0xd238,
/* Priv */    P_ALPH_IMAGE = 0xd240,
/* Priv */    P_ALPH_ALPHA = 0xd250,
/* Priv */    P_ALPH_QUES = 0xd260,
/* Priv */    P_ALPH_QUEIMG = 0xd265,
/* Priv */    P_ALPH_CUTOFF = 0xd270,
/* Priv */    P_ALPHANEG = 0xd280,

/* Priv */    P_TRAN_NONE = 0xd300,
/* Priv */    P_TRAN_IMAGE = 0xd310,
/* Priv */    P_TRAN_FRAMES = 0xd312,
/* Priv */    P_TRAN_FADEIN = 0xd320,
/* Priv */    P_TRAN_FADEOUT = 0xd330,
/* Priv */    P_TRANNEG = 0xd340,

/* Priv */    P_RANGES = 0xd400,

/* Priv */    P_PROC_DATA = 0xd500

/* Priv */ } chunktag3ds;


/* Priv */ /* chunk3ds - Internal database representation of file information */
/* Priv */ typedef struct chunk3ds {
/* Priv */    chunktag3ds tag;           /* Type of chunk */
/* Priv */    ulong3ds     size;         /* Number of bytes used by chunk */
/* Priv */    ulong3ds     position;     /* Offset in source file */
/* Priv */    void        *data;         /* Memory copy of file data */
/* Priv */    struct chunk3ds *sibling;  /* Next chunk in database */
/* Priv */    struct chunk3ds *children; /* Chunks contained within this chunk */
/* Priv */    ubyte3ds readindex;        /* Index of source file in file table */
/* Priv */    ubyte3ds writeindex;       /* Index of destination file in file table */
/* Priv */ } chunk3ds;

/* Priv */ /* chunklistentry3ds - Cross reference between name and chunk */
/* Priv */ typedef struct {
/* Priv */    char3ds *name;                  /* Chunk Name list */
/* Priv */    chunk3ds *chunk;                /* Corresponding Pos */
/* Priv */ } chunklistentry3ds;

/* Priv */ /* chunklist3ds - List of cross references */
/* Priv */ typedef struct 
/* Priv */ {
/* Priv */    ulong3ds count; /* Number of entries in list */
/* Priv */    chunklistentry3ds *list; /* Contents of list */
/* Priv */ } chunklist3ds;


/* namelistentry3ds - Name of database object */
typedef struct 
{
   char3ds *name; /* Name of object */
} namelistentry3ds;

/* namelist3ds - List of database object names */
typedef struct
{
   ulong3ds count;          /*--- How many entries are in list */
   ulong3ds spaces;         /*--- How much space for entries */
   namelistentry3ds *list;  /*--- char ** to access pointers */
} namelist3ds;


/* Priv */ /* filestate3ds - Read/write state of a file */
/* Priv */ typedef enum 
/* Priv */ {
/* Priv */    StateNotKnown = 0, /* No state determined yet, file not open */
/* Priv */    ReadFromFile = 1,  /* Open for read */
/* Priv */    WriteToFile = 2,   /* Open for write */
/* Priv */    ReadWriteFile = 3  /* Open for read and write, not used by toolkit */
/* Priv */ } filestate3ds;

/* file3ds - Handle to 3D Studio files */
typedef struct
{
   FILE *file;         /* stdio file pointer */
   char3ds *filename;  /* name of file */
   filestate3ds state; /* file open state */
   ubyte3ds index;     /* Position of pointer in the FileContextList, if the
                          index eq InvalidFileContext3ds, then it is not in the
                          list */
   void *buffer;       /* Buffered I/O buffer */
   ulong3ds buffersize;
   byte3ds istempfile; /* True3ds if file is a temp file */
} file3ds;

/* Priv */ /* dbtype3ds - Database type settings */
/* Priv */ typedef enum
/* Priv */ {
/* Priv */    Unknown3DS,      /* Database has not be created yet */
/* Priv */    MeshFile,     /* 3D Studio .3DS file */
/* Priv */    ProjectFile,  /* 3D STudio .PRJ file */
/* Priv */    MaterialFile  /* 3D Studio .MLI file */
/* Priv */ } dbtype3ds;

/* database3ds - File database */
typedef struct
{
   chunk3ds *topchunk; /* top chunk in the file */
   byte3ds objlistdirty; /* If true, than *objlist needs to be recreated */
   byte3ds matlistdirty;
   byte3ds nodelistdirty;
   chunklist3ds *objlist; /* Quick Cross references between names and database chunks */
   chunklist3ds *matlist;
   chunklist3ds *nodelist;
} database3ds;
typedef enum
{
   NoView3ds,
   TopView3ds,
   BottomView3ds,
   LeftView3ds,
   RightView3ds,
   FrontView3ds,
   BackView3ds,
   UserView3ds,
   CameraView3ds,
   SpotlightView3ds
} viewtype3ds;

typedef struct
{
   ushort3ds xpos;
   ushort3ds ypos;
   ushort3ds width;
   ushort3ds height;
} viewsize3ds;

/* Used to describe top, bottom, left, right, front and back views */
typedef struct
{
   point3ds center; /* Center of orthagonal view */
   float3ds zoom; /* View zoom factor */
} orthoview3ds;

/* Used to describe user views */
typedef struct
{
   point3ds center; /* Center of user view */
   float3ds zoom; /* View zoom factor */
   float3ds horang; /* Horizontal angle of view */
   float3ds verang; /* Veritical angle of view */
} userview3ds;

/* Used to describe camera views */
typedef struct
{
   char3ds name[11]; /* Name of the camera used in the view */
} cameraview3ds;

/* Viewport structure details the kind of view in a viewport */
typedef struct
{
   viewtype3ds type; /* top, bottom, left, right, front, back, user and camera */
   viewsize3ds size; /* Size of the viewport */
   orthoview3ds ortho; /* used for top, bottom, left, right, front, and back views */
   userview3ds user; /* Used for user views */
   cameraview3ds camera; /* Used for camera views */
} viewport3ds;
typedef enum 
{
   UseShadowMap,
   UseRayTraceShadow
} shadowstyle3ds;

typedef struct { /* global shadow settings */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -