/[projet1]/public/pc/tools/osdk/main/pictconv/sources/pictconv.cpp
Defence Force logotype

Diff of /public/pc/tools/osdk/main/pictconv/sources/pictconv.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1259 by Jylam, Tue May 6 21:15:53 2014 UTC revision 1260 by dbug, Sat Feb 14 20:26:49 2015 UTC
# Line 48  int __cdecl main(int argc,char *argv[]) Line 48  int __cdecl main(int argc,char *argv[])
48      #endif      #endif
49      "\r\n"      "\r\n"
50      "Author:\r\n"      "Author:\r\n"
51      "  (c) 2002-2013 Pointier Mickael \r\n"      "  (c) 2002-2015 Pointier Mickael \r\n"
52      "\r\n"      "\r\n"
53      "Usage:\r\n"      "Usage:\r\n"
54      "  {ApplicationName} [switches] <source picture> <destination file>\r\n"      "  {ApplicationName} [switches] <source picture> <destination file>\r\n"
# Line 68  int __cdecl main(int argc,char *argv[]) Line 68  int __cdecl main(int argc,char *argv[])
68      "         -f4 => RB conversion\r\n"      "         -f4 => RB conversion\r\n"
69      "         -f5 => CHAR generator\r\n"      "         -f5 => CHAR generator\r\n"
70      "         -f6 => Sam method (Img2Oric)\r\n"      "         -f6 => Sam method (Img2Oric)\r\n"
71        "         -f7 => AIC encoding\r\n"
72      "       -Atari ST:\r\n"      "       -Atari ST:\r\n"
73      "         -f0 => Single palette format [default]\r\n"      "         -f0 => Single palette format [default]\r\n"
74      "         -f1 => Multi palette format\r\n"      "         -f1 => Multi palette format\r\n"
# Line 83  int __cdecl main(int argc,char *argv[]) Line 84  int __cdecl main(int argc,char *argv[])
84      "       -d2 => ordered dither\r\n"      "       -d2 => ordered dither\r\n"
85      "       -d3 => riemersma\r\n"      "       -d3 => riemersma\r\n"
86      "\r\n"      "\r\n"
87        " -an   Alpha mode\r\n"
88        "       -a0 => no transparency [default]\r\n"
89        "       -a1 => encode alpha as zeroes\r\n"
90        "\r\n"
91      " -on   Output file format\r\n"      " -on   Output file format\r\n"
92      "       -o0 => TAP (with a header that load in 0xa000)\r\n"      "       -o0 => TAP (with a header that load in 0xa000)\r\n"
93      "       -o1 => TAP (with a BASIC program that switch to HIRES then load)\r\n"      "       -o1 => TAP (with a BASIC program that switch to HIRES then load)\r\n"
# Line 139  int __cdecl main(int argc,char *argv[]) Line 144  int __cdecl main(int argc,char *argv[])
144    int switchDither=0;    int switchDither=0;
145    int switchPalette=0;          // Default 0=automatically generate the palette    int switchPalette=0;          // Default 0=automatically generate the palette
146    int switchBlock=0;            // Default 0=no block mode (full picture)    int switchBlock=0;            // Default 0=no block mode (full picture)
147      int switchAlpha=0;            // Default 0=no transparency
148    
149    ArgumentParser argumentParser(argc,argv);    ArgumentParser argumentParser(argc,argv);
150    
# Line 165  int __cdecl main(int argc,char *argv[]) Line 171  int __cdecl main(int argc,char *argv[])
171        switchBlock=argumentParser.GetIntegerValue(0);        switchBlock=argumentParser.GetIntegerValue(0);
172      }      }
173      else      else
174        if (argumentParser.IsSwitch("-a"))
175        {
176          //alpha mode: [-a]
177          //        0 => No transparency
178          //        1 => Encode full transparent alpha as holes saved as zeroes. Or something like that at least.
179          switchAlpha=argumentParser.GetIntegerValue(0);
180        }
181        else
182      if (argumentParser.IsSwitch("-p"))      if (argumentParser.IsSwitch("-p"))
183      {      {
184        //format: [-m]        //format: [-m]
# Line 309  int __cdecl main(int argc,char *argv[]) Line 323  int __cdecl main(int argc,char *argv[])
323      ShowError("Invalid palette mode (-p) for the selected machine (-m)");      ShowError("Invalid palette mode (-p) for the selected machine (-m)");
324    }    }
325    
326      if (!Hires.SetTransparencyMode(switchAlpha))
327      {
328        ShowError("Invalid alpha mode (-a) for the selected machine (-m)");
329      }
330      
331    
332    //    //
333    // Copy last parameters    // Copy last parameters
334    //    //

Legend:
Removed from v.1259  
changed lines
  Added in v.1260

  ViewVC Help
Powered by ViewVC 1.1.26