home *** CD-ROM | disk | FTP | other *** search
/ Stars of Shareware: Raytrace & Morphing / SOS-RAYTRACE.ISO / programm / source / povsrc22 / machine / inmos / inmoscon.h < prev   
Encoding:
Text File  |  1994-05-01  |  9.6 KB  |  153 lines

  1. /****************************************************************************/
  2. /*                   inmoscon.h                                             */
  3. /*                                                                          */
  4. /*  This file contains the Inmos Transputer specific defines.               */
  5. /*  Rename to config.h when compiling for Inmos B004 and compatibles.       */
  6. /*  Provided by Parham Data Products for use on the 8401 card.              */
  7. /*  For more info please contact :                                          */
  8. /*                                                                          */
  9. /*        Wayne Parham [President, Parham Data]                             */
  10. /*        Phone: (918) 663-2131                                             */
  11. /*        Internet: 74224.2176@compuserve.com                               */
  12. /*        Compuserve: 74224,2176                                            */
  13. /*                                                                          */
  14. /*  Based on core from Persistence of Vision Raytracer                      */
  15. /*  Copyright 1993 Persistence of Vision Team                               */
  16. /*  ----------------------------------------------------------------------  */
  17. /*  Copying, distribution and legal info is in the file povlegal.doc which  */
  18. /*  should be distributed with this file. If povlegal.doc is not available  */
  19. /*  or for more info please contact:                                        */
  20. /*                                                                          */
  21. /*       Chris Young  [POV-Team Leader]                                     */
  22. /*       CIS: 76702,1655  Internet: 76702.1655@compuserve.com               */
  23. /*                                                                          */
  24. /* This program is based on the popular DKB raytracer version 2.12.         */
  25. /* DKBTrace was originally written by David K. Buck.                        */
  26. /* DKBTrace Ver 2.0-2.12 were written by David K. Buck & Aaron A. Collins.  */
  27. /*                                                                          */
  28. /****************************************************************************/
  29. /*                                                                          */
  30. /*                                                                          */
  31. /* The following constants are needed by various POV modules.  Each has     */
  32. /* a default (shown below) which is will be defined in frame.h if you don't */
  33. /* define them here.                                                        */
  34. /*                                                                          */
  35. /* #define EPSILON 1.0e-10               - a small value used for POLY      */
  36. /* #define FILE_NAME_LENGTH 150          - default file name length         */
  37. /* #define HUGE_VAL 1.0e+17              - a really big number              */
  38. /* #define DBL_FORMAT_STRING "%lf"       - the string for scanfs of doubles */
  39. /* #define DEFAULT_OUTPUT_FORMAT  'd'    - the default +f format            */
  40. /* #define RED_RAW_FILE_EXTENSION ".red" - for +fr, extension for red file  */
  41. /* #define GREEN_RAW_FILE_EXTENSION ".grn"  - ditto for the green file      */
  42. /* #define BLUE_RAW_FILE_EXTENSION ".blu"   - ditto again for the blue file */
  43. /* #define FILENAME_SEPARATOR "/"        - The/path/seperation/char         */
  44. /* #define CASE_SENSITIVE_DEFAULT 2     - controls 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. /*                                                                          */
  49. /* These routines are required by POV to compute trace times.  The defaults */
  50. /* shown below are defined in most versions of C.  You may redefine them if */
  51. /* your compiler doesn't support these.  If time is completely unsupported  */
  52. /* define them as 0.                                                        */
  53. /*                                                                          */
  54. /* #define START_TIME time(&tstart);                                        */
  55. /* #define STOP_TIME  time(&tstop);                                         */
  56. /* #define TIME_ELAPSED difftime (tstop, tstart);                           */
  57. /*                                                                          */
  58. /* Note difftime can be replaced with #define TIME_ELAPSED (tstop - tstart);*/ 
  59. /* in some cases.                                                           */
  60. /*                                                                          */
  61. /* These are optional routines that POV calls.  You may define them         */
  62. /* or if undefined they will be defined as empty in frame.h.                */
  63. /*                                                                          */
  64. /* #define STARTUP_POVRAY              - first executable statement of main */
  65. /*                                       (useful for initialization)        */
  66. /* #define PRINT_OTHER_CREDITS         - used for people who extend         */
  67. /*                                       the machine specific modules       */
  68. /* #define TEST_ABORT                  - code to test for ^C or abort       */
  69. /*                                       (called on each pixel)             */
  70. /* #define FINISH_POVRAY               - last statement before exiting      */
  71. /* #define COOPERATE                   - called for multi-tasking           */
  72. /* #define COMPILER_VER .compilername  - compiler name and version          */
  73. /* #define CONFIG_MATH                 - useful for machine specific math   */
  74. /* #define DBL double                  - floating point precision           */
  75. /* #define ACOS acos                   - arc cosine of DBL                  */
  76. /* #define SQRT sqrt                   - square root of DBL                 */
  77. /* #define POW pow                     - x to the y power - x, y DBL        */
  78. /* #define COS cos                     - cosine of DBL                      */
  79. /* #define SIN sin                     - sine of DBL                        */
  80. /* #define labs(x) (long) ((x<0)?-x:x) - absolute value of long integer x   */
  81. /* #define max (x,y) ((x<y)?y:x)       - greater of x and y                 */
  82. /*                                                                          */
  83. /* On some systems "sprintf" returns the string rather than the length      */
  84. /* of the string.  If the string is returned, define the following:         */
  85. /*                                                                          */
  86. /* #define STRLN(x) strlen(x)          - string length                      */
  87. /*                                                                          */
  88. /* #define setvbuf(w,x,y,z)            - some systems don't understand      */
  89. /*                                       setvbuf.  If not, just define      */
  90. /*                                       it away  -  it's not critical      */
  91. /*                                       to  the raytracer.   It  just      */
  92. /*                                       buffers disk accesses.             */
  93. /*                                                                          */
  94. /* This macro controls prototyping and is required by POV.  Choose one      */
  95. /* of the two options below or if left undefined it will default to ANSI    */
  96. /* in frame.h                                                               */
  97. /*                                                                          */
  98. /* #define PARAMS (x) x                  - do ANSI prototyping              */
  99. /* #define PARAMS (x) ()                 - do K&R non-ANSI prototyping      */
  100. /*                                                                          */
  101. /* These allow command line vs non-command line versions and alternate      */
  102. /* main routines.  Normally they should be undefined.                       */
  103. /*                                                                          */
  104. /* #define ALTMAIN 1                                                        */
  105. /* #define NOCMDLINE 1                                                      */
  106. /*                                                                          */
  107. /****************************************************************************/
  108.  
  109. #include <stdarg.h>
  110. #include <stdlib.h>
  111.  
  112. #define RED_RAW_FILE_EXTENSION   ".r8"  /* PICLAB's "RAW" file format */
  113. #define GREEN_RAW_FILE_EXTENSION ".g8"  /* PICLAB's "RAW" file format */
  114. #define BLUE_RAW_FILE_EXTENSION  ".b8"  /* PICLAB's "RAW" file format */
  115.  
  116. #define FILENAME_SEPARATOR "\\"         /* DOS file structure uses \  */
  117.  
  118. #define DEFAULT_OUTPUT_FORMAT   't'
  119.  
  120. #define TEST_ABORT if (Options & EXITENABLE) if (kbhit()) { Stop_Flag = TRUE; getch(); }
  121.  
  122. #define PRINT_CREDITS Print_Credits();
  123.  
  124. #define COMPILER_VER ".93.1a for Inmos T800"
  125.  
  126. #define MAX_TRACE_LEVEL 5
  127.  
  128. #define STARTUP_POVRAY Config_Transputer_RAM();
  129.  
  130. #define TIME_ELAPSED (tstop - tstart);
  131.  
  132. #define setvbuf(w,x,y,z)
  133.  
  134. /* Defines for machine-specific PaletteOption settings                      */
  135.  
  136. #define NORMAL    '0'
  137. #define GREY      'G'
  138. #define HSV       '0'
  139. #define P_332     '3'
  140. #define HICOLOR   'H'           /* 16 bits/pixel "high" color */
  141. #define FULLCOLOR 'T'           /* 24 bits/pixel "true" color */
  142.  
  143. #ifndef READ_ENV_VAR_BEFORE 
  144. #define READ_ENV_VAR_BEFORE if ((Option_String_Ptr = getenv("POVRAYOPT")) != NULL) read_options(Option_String_Ptr);
  145. #endif
  146. #ifndef READ_ENV_VAR_AFTER
  147. #define READ_ENV_VAR_AFTER     
  148. #endif
  149.  
  150. void Config_Transputer_RAM(void);
  151. void Print_Credits(void);
  152.  
  153.