Mercurial > otakunoraifu
comparison system/visarc.cc @ 65:4416cfac86ae
Convert EUC-JP files to UTF8
author | Thibaut Girka <thib@sitedethib.com> |
---|---|
date | Fri, 26 Nov 2010 10:53:15 +0100 |
parents | 15a18fbe6f21 |
children |
comparison
equal
deleted
inserted
replaced
64:045ca45f9610 | 65:4416cfac86ae |
---|---|
1 #define CMDNAME "visarc" | 1 #define CMDNAME "visarc" |
2 #define VERSION "1.00" | 2 #define VERSION "1.00" |
3 | 3 |
4 /***************************************** | 4 /***************************************** |
5 ** Visual Arts の圧縮書庫ファイルを | 5 ** Visual Arts х軒後昆<ゃ |
6 ** 展開する | 6 ** 絮 |
7 ** | 7 ** |
8 ** usage : visarc x <arcfile> <file> [<file> ...] | 8 ** usage : visarc x <arcfile> <file> [<file> ...] |
9 ** visarc l <arcfile> | 9 ** visarc l <arcfile> |
10 ** visarc g <arcfile> <graphic file> | 10 ** visarc g <arcfile> <graphic file> |
11 ** visarc m <arcfile> <mask file> | 11 ** visarc m <arcfile> <mask file> |
237 delete conv; | 237 delete conv; |
238 return; | 238 return; |
239 } | 239 } |
240 if (! masked) { | 240 if (! masked) { |
241 for (int i = 0; i < conv->Width() * conv->Height(); i++) { | 241 for (int i = 0; i < conv->Width() * conv->Height(); i++) { |
242 data[4*i+3] = 0xff; // 不透明度を最大にする | 242 data[4*i+3] = 0xff; // 筝綺紊с |
243 } | 243 } |
244 } | 244 } |
245 if (outpath == NULL) ChangeExt(path,".png", buf); // path をつくる | 245 if (outpath == NULL) ChangeExt(path,".png", buf); // path ゃ |
246 else fname = outpath; | 246 else fname = outpath; |
247 FILE* out = fopen(fname, "wb"); // ファイルを開く | 247 FILE* out = fopen(fname, "wb"); // <ゃ |
248 if (out == NULL) { | 248 if (out == NULL) { |
249 fprintf(stderr, "Cannot open raw file : %s\n",buf); | 249 fprintf(stderr, "Cannot open raw file : %s\n",buf); |
250 delete conv; | 250 delete conv; |
251 return; | 251 return; |
252 } | 252 } |
265 } | 265 } |
266 if (strlen(argv[1]) != 1) { | 266 if (strlen(argv[1]) != 1) { |
267 usage(); return -1; | 267 usage(); return -1; |
268 } | 268 } |
269 for (i=2; i<argc; i++) { | 269 for (i=2; i<argc; i++) { |
270 /* option を削る */ | 270 /* option */ |
271 argc--; | 271 argc--; |
272 int j; for (j=i; j<argc; j++) argv[j] = argv[j+1]; | 272 int j; for (j=i; j<argc; j++) argv[j] = argv[j+1]; |
273 } | 273 } |
274 switch(argv[1][0]) { | 274 switch(argv[1][0]) { |
275 case 'x': case 'X': | 275 case 'x': case 'X': |