home *** CD-ROM | disk | FTP | other *** search
/ DOS/V Power Report 1997 March / VPR9703A.ISO / VPR_DATA / DOGA / SOURCES / POLYEDIT.LZH / READER / _READER.H next >
C/C++ Source or Header  |  1996-03-12  |  2KB  |  90 lines

  1. /*
  2.         CGA共通規格ファイル入力関数群
  3.  
  4.                 Copyright T.Kobayashi
  5. */
  6.  
  7. #ifndef    MATRIX
  8. #include "matrix.h"
  9. #endif
  10.  
  11. #ifndef    COLOR
  12. #include "color.h"
  13. #endif
  14.  
  15. #ifndef TRUE
  16.     #define FALSE    0
  17.     #define TRUE    (!FALSE)
  18. #endif
  19.  
  20. #define MAXWORD            32        /*    1ワードの最長キャラクタ数    */
  21. #define F_NAME_LEN        128        /*    ファイル名の長さ            */
  22. #define MAX_FILE        64        /*    ファイル数の最大値            */
  23.  
  24. #define MAXGRAD            20        /*    グラデーションデータの最大    */
  25. #define MAXLIGHT        32        /*    光源の数の最大                */
  26.  
  27. /*    プリミティブのタイプ  */
  28. #define TYPE_POLY            0        /*    ビット0:シェディング        */
  29. #define TYPE_SHADE            1        /*    ビット1:UV座標            */
  30. #define TYPE_UVPOLY            2
  31. #define TYPE_UVSHADE        3
  32.  
  33. /*    アトリビュートのタイプ    */
  34. #define ATR_SIMPLE            0
  35. #define ATR_RGB                1
  36.  
  37. /*    マッピングのタイプ        */
  38. #define    MAP_NO                0
  39. #define MAP_COLOR            1
  40.  
  41. /*    光源のタイプ  */
  42. #define LIGHT_POINT        1        /*    点光源            */
  43. #define LIGHT_PAL        2        /*    平行光線        */
  44. #define LIGHT_SPOT        3        /*    スポットライト    */
  45.  
  46. /*    フレームのデータ属性    */
  47. #define    FRAME_END            0        /*    フレーム終了        */
  48. #define    FRAME_LIGHT_POINT    1        /*    点光源指定            */
  49. #define    FRAME_LIGHT_PAL        2        /*    平行光源指定        */
  50. #define    FRAME_LIGHT_SPOT    3        /*    スポット光源指定    */
  51. #define    FRAME_OBJ            16        /*    物体指定            */
  52.  
  53. /*    readinit.c    */
  54. #ifdef DYNAMIC
  55. extern    void    ReaderInit( void );
  56. #else
  57. #define    ReaderInit()    __ReaderInit(NULL)
  58. #endif
  59.  
  60. /*    reader.c    */
  61. extern    int        __ReaderInit( void* );
  62. extern    void    ReaderSetInterrupt( void* );
  63.  
  64. /* atrread.c */
  65. extern    int        AtrReadOpen( const char* );
  66. extern    int        AtrReadClose( void );
  67. extern    int        AtrReadNext( void );
  68. extern    void    AtrReadName( char* );
  69. extern    int        AtrReadColor( Color*, Color*, Color*, Color*, Color*, int* );
  70. extern    int        AtrReadTra( void );
  71. extern    int        AtrReadColorAll( Color data[9], int *);
  72. /*    col, amb, dif, spc, size, ref, tra, rfr, att */
  73. extern    int        AtrReadColorMap( char*, int[2][2], int[2][2], int[2][2] );
  74.  
  75. /* frmread.c */
  76. extern    int        FrmReadOpen( const char* );
  77. extern    int        FrmReadClose( void );
  78. extern    int        FrmReadObj( char *name, Matrix conv);
  79.  
  80. /* objread.c */
  81. extern    int        ObjReadOpen( const char* );
  82. extern    int        ObjReadName( char* );
  83. extern    int        ObjReadClose( void );
  84. extern    int        ObjReadPoly( char*, int* );
  85. extern    int        ObjReadVertex( float*, float*, float*, float*, float*, float*, float*, float* );
  86. extern    int        ObjReadVertexInt( int data[8] );
  87.  
  88. /* rscanner.c */
  89. extern    int        ReaderError(void);
  90.