home *** CD-ROM | disk | FTP | other *** search
/ Dream 41 / Amiga_Dream_41.iso / Amiga / Pro / 3d / ICoons1_0.lzh / icoons / source / globals.c < prev    next >
C/C++ Source or Header  |  1992-11-20  |  3KB  |  122 lines

  1. /* :ts=8 */
  2. /************************************************************************/
  3. /*                                                                      */
  4. /* Global variables. There's too many of these :(            */
  5. /*                                                                      */
  6. /************************************************************************/
  7. #include <stdio.h>
  8. #include <string.h>
  9.  
  10. #include "general.h"
  11. #include "globals.h"
  12.  
  13.     /* Delay before drawing splines when modifying:        */
  14. unsigned long    Delay_Draw_Seconds    = 1;
  15. unsigned long    Delay_Draw_Micros    = 0;
  16.  
  17.     /* Flag set to TRUE when quitting program:        */
  18. Boolean_T    Quit_Flag         = FALSE;
  19.  
  20.     /* Flag set to non-zero when redraw wanted:        */
  21. long        Redraw_Mask         = 0;
  22.  
  23.     /* Current perspective view rotation vector (degrees):    */
  24. Vector_T    Rotation_Vector        = { 0.0, 0.0, 0.0 };
  25.  
  26.     /* Current position of origin:                */
  27. Vector_T    Origin            = { 0.0, 0.0, 0.0 };
  28.  
  29.     /* Current 'state' of program:                */
  30. State_T        State;
  31.  
  32.     /* The current view rotation matrix:            */
  33. Matrix_T    M_Rotation    = {
  34.                 1.0,    0.0,    0.0,
  35.                 0.0,    1.0,    0.0,
  36.                 0.0,    0.0,    1.0
  37.             };
  38.  
  39.     /* The inverse of M_Rotation:                 */
  40. Matrix_T    M_InvRotation    = {    
  41.                 1.0,    0.0,    0.0,
  42.                 0.0,    1.0,    0.0,
  43.                 0.0,    0.0,    1.0
  44.             };
  45.  
  46.     /* Array containing points:                */
  47. Point_T        Points[Max_Nbr_Points];
  48.  
  49.     /* Array containing saved points:            */
  50. Point_T        Saved_Points[Max_Nbr_Points];
  51.  
  52.     /* Array containing splines:                */
  53. Spline_T    *Splines    = NULL;
  54.  
  55.     /* TRUE if in group mode:                        */
  56. Boolean_T    Group_Mode        = FALSE;
  57.  
  58.     /* TRUE if some points are hidden:                 */
  59. Boolean_T    Points_Hidden        = FALSE;
  60.  
  61.     /* Current selected view, knot, spline & point:        */
  62. short        Select_View_Id        = -1;
  63. Knot_T        *Select_Knot        = NULL;
  64. Spline_T    *Select_Spline        = NULL;
  65. short        Select_Point_Id        = -1;
  66.  
  67.     /* Current world position:                */
  68. Vector_T    Current_Pos        = { 0.0, 0.0, 0.0 };
  69.  
  70.     /* Mask defining what to be drawn:            */
  71. long        What_Mask        = What_All;
  72.  
  73.     /* Resolution when drawing splines:            */
  74. short        Spline_Resolution        = 4;
  75.  
  76.     /* Resolution when tesselating patches:            */
  77. short        Patch_Resolution        = 4;
  78.  
  79.     /* True if SIPP should use backface culling:         */
  80. Boolean_T    Backface_Culling        = FALSE;
  81.  
  82. #ifdef NTSC
  83.     /* Width & Height of screen:                */
  84. short        Screen_Width         = 640;
  85. short       Screen_Height        = 200;
  86.  
  87.     /* Current aspect ratio of screen:            */
  88. double        Aspect_Ratio        = 2.36;
  89.  
  90. #else
  91.  
  92.     /* Width & Height of screen:                */
  93. short        Screen_Width         = 640;
  94. short       Screen_Height        = 256;
  95.  
  96.     /* Current aspect ratio of screen:            */
  97. double        Aspect_Ratio        = 2.0; /* 1.82; */
  98.  
  99. #endif
  100.  
  101.     /* Current scale factors:                */
  102. double        X_Scale_Factor;
  103. double        Y_Scale_Factor;
  104.  
  105.     /* Current max select distance:                */
  106. double        Max_Dist;
  107.  
  108.     /* World coordinate of point in center of views:    */
  109. Vector_T     Offset;
  110.  
  111.     /* Size of grid:                    */
  112. double        Grid_Size         = 20.0;
  113.  
  114.     /* Should grid be shown?                */
  115. Boolean_T    Grid_Active         = FALSE;
  116.  
  117.     /* Should we snap to the grid?                */
  118. Boolean_T      Grid_Snap_Active     = FALSE;
  119.  
  120.     /* Rendering mode:                    */
  121. Rendering_Mode_T Rendering_Mode        = RM_Gouraud;
  122.