home *** CD-ROM | disk | FTP | other *** search
/ Stars of Shareware: Raytrace & Morphing / SOS-RAYTRACE.ISO / programm / raytrace / povnt20 / ntconf.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-10-13  |  7.1 KB  |  157 lines

  1. /****************************************************************************
  2. *                vaxconf.h
  3. *
  4. *  This header file contains all constants and types required to run under
  5. *  Under Windows NT
  6. *
  7. *  from Persistence of Vision Raytracer
  8. *  Copyright 1993 Persistence of Vision Team
  9. *   MODIFIED by Gilles Vollant (email : 100144,2636@compuserve.com)
  10. *---------------------------------------------------------------------------
  11. *  NOTICE: This source code file is provided so that users may experiment
  12. *  with enhancements to POV-Ray and to port the software to platforms other
  13. *  than those supported by the POV-Ray Team.  There are strict rules under
  14. *  which you are permitted to use this file.  The rules are in the file
  15. *  named POVLEGAL.DOC which should be distributed with this file. If
  16. *  POVLEGAL.DOC is not available or for more info please contact the POV-Ray
  17. *  Team Coordinator by leaving a message in CompuServe's Graphics Developer's
  18. *  Forum.  The latest version of POV-Ray may be found there as well.
  19. *
  20. * This program is based on the popular DKB raytracer version 2.12.
  21. * DKBTrace was originally written by David K. Buck.
  22. * DKBTrace Ver 2.0-2.12 were written by David K. Buck & Aaron A. Collins.
  23. *
  24. *****************************************************************************/
  25.  
  26. /* Below are several defines needed by the generic parts of POV.  You
  27. *   may redefine them as needed in this config.h file.
  28. *
  29. *   The following constants are needed by various POV modules.  Each has
  30. *   a default (shown below) which is will be defined in frame.h if you don't
  31. *   define them here.
  32. *
  33. *   #define EPSILON 1.0e-10               - a small value used for POLY
  34. *   #define FILE_NAME_LENGTH 150          - default file name length
  35. *   #define HUGE_VAL 1.0e+17              - a really big number
  36. *   #define DBL_FORMAT_STRING "%lf"       - the string to use for scanfs of doubles
  37. *   #define DEFAULT_OUTPUT_FORMAT  'd'    - the default +f format
  38. *   #define RED_RAW_FILE_EXTENSION ".red" - for +fr, this is the extension for the
  39. *                                           red file
  40. *   #define GREEN_RAW_FILE_EXTENSION ".grn"  - ditto for the green file
  41. *   #define BLUE_RAW_FILE_EXTENSION ".blu"   - ditto again for the blue file
  42. *   #define FILENAME_SEPARATOR "/"        - the character that separates names
  43. *                                           in a path.
  44. *   #define CASE_SENSITIVE_DEFAULT 2     - controls case sensitivity in DAT files
  45. *   #define READ_FILE_STRING "rb"        - special binary (raw, uncooked)
  46. *   #define WRITE_FILE_STRING "wb"         modes of fopen()
  47. *   #define APPEND_FILE_STRING "ab"
  48. *   #define NORMAL '0'                   - machine-specific PaletteOption settings
  49. *   #define GREY   'G'
  50. *
  51. *   These routines are required by POV to compute trace times.  The defaults
  52. *   shown below are defined in most versions of C.  You may redefine them if
  53. *   your compiler doesn't support these.  If time is completely unsupported
  54. *   define them as 0.
  55. *
  56. *   #define START_TIME time(&tstart);
  57. *   #define STOP_TIME  time(&tstop);
  58. *   #define TIME_ELAPSED difftime (tstop, tstart);
  59. *
  60. *   Note difftime can be replaced with: #define TIME_ELAPSED (tstop - tstart);
  61. *   in some cases.
  62. *
  63. *   These are optional routines that POV calls.  You may define them
  64. *   or if undefined they will be defined as empty in frame.h.
  65. *
  66. *   #define STARTUP_POVRAY             - first executable statement of main
  67. *                                           (useful for initialization)
  68. *   #define PRINT_OTHER_CREDITS           - used for people who extend the machine specific modules
  69. *                                           (put your own printf's here)
  70. *   #define TEST_ABORT                    - code to test for ^C or abort
  71. *                                           (called on each pixel)
  72. *   #define FINISH_POVRAY              - last statement before exiting normally
  73. *   #define COOPERATE                    - called for multi-tasking
  74. *
  75. *   These items are standard on some C compilers.  If they are not defined
  76. *   on your compiler or are called something different you may define your
  77. *   own or use the defaults supplied in frame.h as shown below.
  78. *
  79. *   #define DBL double                    - floating point precision
  80. *   #define ACOS acos                     - arc cosine of DBL
  81. *   #define SQRT sqrt                     - square root of DBL
  82. *   #define POW pow                       - x to the y power - x, y DBL
  83. *   #define COS cos                       - cosine of DBL
  84. *   #define SIN sin                       - sine of DBL
  85. *   #define labs(x) (long) ((x<0)?-x:x)   - Returns the absolute value of long integer x
  86. *   #define max (x,y) ((x<y)?y:x)         - greater of x and y
  87. *
  88. *   On some systems "sprintf" returns the string rather than the length
  89. *   of the string.  If the string is returned, define the following:
  90. *   #define STRLN(x) strlen(x)
  91. *
  92. *   #define setvbuf(w,x,y,z)              - some systems don't understand setvbuf.
  93. *                                           If not, just define it away - it's
  94. *                                           not critical to the raytracer.  It
  95. *                                           just buffers disk accesses.
  96. *   This macro controls prototyping and is required by POV.  Choose one
  97. *   of the two options below or if left undefined it will default to ANSI
  98. *   in frame.h
  99. *
  100. *   #define PARAMS (x) x                  - do ANSI prototyping
  101. *   #define PARAMS (x) ()                 - do K&R non-ANSI prototyping
  102. *
  103. *   These allow command line vs non-command line versions and alternate
  104. *   main routines.  Normally they should be undefined.  Define them 1 if needed.
  105. *   #define ALTMAIN 1
  106. *   #define NOCMDLINE 1
  107. ****************************************************/
  108.  
  109. #include <conio.h>
  110. #include <stdarg.h>
  111. #include <stdlib.h>
  112.  
  113. #ifdef _STDC_
  114. #define PARAMS(x) x
  115. #else
  116. #define PARAMS(x) ()
  117. #define volatile
  118. #endif
  119.  
  120. #define EPSILON 1.0e-5
  121.  
  122. /* Need prototypes for these standard routines */
  123. char *getenv PARAMS((char *name));
  124. //char *malloc PARAMS((int size));
  125. //void free PARAMS((void *));
  126.  
  127. #define RED_RAW_FILE_EXTENSION   ".r8"  /* PICLAB's "RAW" file format */
  128. #define GREEN_RAW_FILE_EXTENSION ".g8"  /* PICLAB's "RAW" file format */
  129. #define BLUE_RAW_FILE_EXTENSION  ".b8"  /* PICLAB's "RAW" file format */
  130.  
  131. #define MAIN_TYPE                 int
  132. #define FILENAME_SEPARATOR        "\\"         /* weird 'ol NT's like backslashes */
  133. #define DEFAULT_OUTPUT_FORMAT     't'
  134.  
  135.  
  136. #define TEST_ABORT if (Options & EXITENABLE) if (kbhit()) { Stop_Flag = TRUE; getch(); }
  137.  
  138. /* defines for machine-specific PaletteOption settings */
  139. #define NORMAL  '0'
  140. #define GREY    'G'
  141. #define HSV     '0'
  142. #define P_332   '3'
  143. #define HICOLOR 'H'             /* 16 bits/pixel "high" color */
  144. #define FULLCOLOR 'T'           /* 24 bits/pixel "true" color */
  145.  
  146. #ifndef READ_ENV_VAR_BEFORE 
  147. #define READ_ENV_VAR_BEFORE if ((Option_String_Ptr = getenv("POVRAYOPT")) != NULL) read_options(Option_String_Ptr);
  148. #endif
  149. #ifndef READ_ENV_VAR_AFTER
  150. #define READ_ENV_VAR_AFTER     
  151. #endif
  152.  
  153. #define COMPILER_VER ".ntmsc"
  154.  
  155.  
  156. #define WAIT_FOR_KEYPRESS getch();
  157.