home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 594b.lha / VectorLibrary / Cprg / vector.h < prev   
C/C++ Source or Header  |  1991-11-09  |  3KB  |  119 lines

  1. #ifndef EXEC_TYPES_H
  2.   #include <exec/types.h>
  3. #endif
  4. #ifndef INTUITION_INTUITION_H
  5.   #include <intuition/intuition.h>
  6. #endif
  7.  
  8. #define VBOB  -1
  9. #define VLIN   0
  10. #define END_1 -1
  11. #define END_2 -2
  12. #define LAB   -3
  13. #define DBF   -4
  14.  
  15.  
  16. struct NewVScreen
  17.   {
  18.    WORD LeftEdge,TopEdge,Width,Height;
  19.    WORD Depth;
  20.    BYTE DetailPen,BlockPen;
  21.    WORD ViewModes;
  22.    struct TextAttr *Font;
  23.    char *DefaultTitle;
  24.    WORD vw_Flags;
  25.    WORD vw_LeftEdge,vw_TopEdge,vw_Width,vw_Height;
  26.    WORD vw_Depth;
  27.   };
  28.  
  29. struct Joy
  30.   {
  31.    WORD Mov_Z,Border_Front,Border_Back;
  32.    WORD Rot_X,Rot_Y,Rot_Z;
  33.   };
  34.  
  35. struct Object
  36.   {
  37.    WORD *Point_Data;
  38.    WORD *Area_Data;
  39.    WORD *Move_Table;
  40.    WORD Flags;
  41.    WORD Pos_X,Pos_Y,Pos_Z;
  42.    WORD Rot_X,Rot_Y,Rot_Z;
  43.   };
  44.  
  45. struct ViewStruct
  46.   {
  47.    struct Screen *VScreen;
  48.    struct ViewPort *VViewPort;
  49.    struct RastPort *VRastPort;
  50.   };
  51.  
  52. struct BOB {
  53.    WORD  Width, Height;
  54.    char *Gfx_Data, *Msk_Data;
  55. };
  56.  
  57. struct BOBList {
  58.    WORD  Number;
  59.    struct BOB BOBs[BOB_NUM];
  60. };
  61.  
  62. struct VecBase {
  63.    LONG pad;
  64. };
  65.  
  66.  
  67. /* #pragma-Befehl bereitet Aztec-C 3.6 und früher Schwierigkeiten!! */
  68.  
  69. #ifdef LATTICE
  70. #pragma libcall VecBase SetVBI         1e 901
  71. #pragma libcall VecBase InitVBOBs      24 a98004
  72. #pragma libcall VecBase OpenVScreen    2a 901
  73. #pragma libcall VecBase CloseVScreen   30 0
  74. #pragma libcall VecBase UseJoy         36 9002
  75. #pragma libcall VecBase DoAnim         3c 901
  76. #pragma libcall VecBase RotateX        42 654321007
  77. #pragma libcall VecBase RotateY        48 654321007
  78. #pragma libcall VecBase RotateZ        4e 654321007
  79. #pragma libcall VecBase FreeVBOBs       54 0
  80. #pragma libcall VecBase AutoScaleOn    5a 001
  81. #pragma libcall VecBase AutoScaleOff   60 0
  82. #pragma libcall VecBase FreeJoy        66 0
  83. #pragma libcall VecBase SetColors      6c 9802
  84.  
  85. #ifndef NO_PROTOS
  86. long SetVBI (char *);
  87. long InitVBOBs (long, char *, struct BOBList *, long *);
  88. struct ViewStruct *OpenVScreen (struct NewVScreen *);
  89. long CloseVScreen (void);
  90. long UseJoy (long, struct Joy *);
  91. long DoAnim (long *);
  92. long RotateX (long, long, long, long, long, long, long);
  93. long RotateY (long, long, long, long, long, long, long);
  94. long RotateZ (long, long, long, long, long, long, long);
  95. long FreeVBOBs (void);
  96. long AutoScaleOn (long);
  97. long AutoScaleOff (void);
  98. long FreeJoy (void);
  99. long SetColors (struct ViewStruct*, short *);
  100. #endif
  101. #endif
  102.  
  103. #ifdef AZTEC_C
  104. #pragma amicall(VecBase, 0x1e, SetVBI(a1))
  105. #pragma amicall(VecBase, 0x24, InitVBOBs(d0,a0,a1,a2))
  106. #pragma amicall(VecBase, 0x2a, OpenVScreen(a1))
  107. #pragma amicall(VecBase, 0x30, CloseVScreen())
  108. #pragma amicall(VecBase, 0x36, UseJoy(d0,a1))
  109. #pragma amicall(VecBase, 0x3c, DoAnim(a1))
  110. #pragma amicall(VecBase, 0x42, RotateX(d0,d1,d2,d3,d4,d5,d6))
  111. #pragma amicall(VecBase, 0x48, RotateY(d0,d1,d2,d3,d4,d5,d6))
  112. #pragma amicall(VecBase, 0x4e, RotateZ(d0,d1,d2,d3,d4,d5,d6))
  113. #pragma amicall(VecBase, 0x54, FreeVBOBs())
  114. #pragma amicall(VecBase, 0x5a, AutoScaleOn(d0))
  115. #pragma amicall(VecBase, 0x60, AutoScaleOff())
  116. #pragma amicall(VecBase, 0x66, FreeJoy())
  117. #pragma amicall(VecBase, 0x6c, SetColors(a0,a1))
  118. #endif
  119.