ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/meta/meta2tga.c
(Generate patch)

Comparing ray/src/meta/meta2tga.c (file contents):
Revision 1.1 by greg, Sat Feb 22 02:07:26 2003 UTC vs.
Revision 1.4 by schorsch, Mon Oct 27 10:28:59 2003 UTC

# Line 5 | Line 5 | static const char      RCSid[] = "$Id$";
5   *  Program to convert meta-files to Targa 8-bit color-mapped format
6   */
7  
8 + #include  "copyright.h"
9  
10 < #define  MAXALLOC  5000
10 <
11 < #define  DXSIZE  400            /* default x resolution */
12 <
13 < #define  DYSIZE  400            /* default y resolution */
14 <
15 < #define  XCOM  "pexpand +vOCImsp -DP %s | psort +y"
16 <
17 <
18 <
19 <
10 > #include  "rtprocess.h"
11   #include  "meta.h"
21
12   #include  "plot.h"
23
13   #include  "rast.h"
25
14   #include  "targa.h"
15  
16 + #define  MAXALLOC  5000
17 + #define  DXSIZE  400            /* default x resolution */
18 + #define  DYSIZE  400            /* default y resolution */
19 + #define  XCOM  "pexpand +vOCImsp -DP %s | psort +y"
20  
21  
30
22   char  *progname;
23  
24   SCANBLOCK       outblock;
# Line 65 | Line 56 | char  **argv;
56  
57   {
58   FILE  *fp;
68 #ifdef  UNIX
69 FILE  *popen();
70 #endif
59   char  comargs[200], command[300];
60  
73 #ifdef  CPM
74 fixargs("meta2tga", &argc, &argv);
75 #endif
76
61    fout = stdout;
62   progname = *argv++;
63   argc--;
64  
65   condonly = FALSE;
82 #ifdef  CPM
83 conditioned = TRUE;
84 #else
66   conditioned = FALSE;
86 #endif
67  
68   while (argc && **argv == '-')  {
69      switch (*(*argv+1))  {
90 #ifdef  UNIX
70         case 'c':
71            condonly = TRUE;
72            break;
73         case 'r':
74            conditioned = TRUE;
75            break;
97 #endif
76         case 'm':
77            minwidth = atoi(*++argv);
78            argc--;
# Line 142 | Line 120 | char  **argv;
120         argc--;
121         }
122      sprintf(command, XCOM, comargs);
145 #ifdef  UNIX
123      if (condonly)
124         return(system(command));
125      else  {
# Line 153 | Line 130 | char  **argv;
130         if (lineno)
131            nextpage();
132         }
156 #endif
133      }
134  
135   return(0);
# Line 175 | Line 151 | thispage()             /* rewind current file */
151   initfile()              /* initialize this file */
152   {
153      static int  filenum = 0;
154 +    /*
155      static unsigned char  cmap[24] = {255,255,255, 255,152,0, 0,188,0, 0,0,255,
156                          179,179,0, 255,0,255, 0,200,200, 0,0,0};
157 +     */
158 +    static unsigned char  cmap[24] = {0,0,0, 0,0,255, 0,188,0, 255,152,0,
159 +                        0,200,200, 255,0,255, 179,179,0, 255,255,255};
160      struct hdStruct  thead;
161      register int  i;
162  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines