00001
00002
00003 #include "osl/effect_util/effectUtil.h"
00004 #include "osl/record/csaRecord.h"
00005 #include "osl/record/csa.h"
00006 #include <iostream>
00007
00008 using namespace osl;
00009 Position target(5,8);
00010
00011 int main(int argc, char **argv)
00012 {
00013 const char *program_name = argv[0];
00014 bool error_flag = false;
00015 bool verbose = false;
00016
00017
00018 extern int optind;
00019 char c;
00020 while ((c = getopt(argc, argv, "vh")) != EOF)
00021 {
00022 switch(c)
00023 {
00024 case 'v': verbose = true;
00025 break;
00026 default: error_flag = true;
00027 }
00028 }
00029 argc -= optind;
00030 argv += optind;
00031
00032 if (error_flag)
00033 return 1;
00034
00035 nice(20);
00036
00037
00038 for (int i=0; i<argc; ++i)
00039 {
00040 CsaFile file(argv [i]);
00041 NumEffectState state(file.getInitialState());
00042 PieceVector v;
00043 EffectUtil::findEffect(BLACK, state, target, v);
00044 std::cout << v;
00045 }
00046 }
00047
00048
00049
00050
00051
00052