Exemple #1
0
 static void go( string[] args )
 {
     packopts opts = new packopts();
       int argidx = 0;
       args.Select( a => arg(a, opts, args, argidx++) ).ToList();
       log(String.Format( str.header, str.title, str.byline ));
       var r = new packrat( opts );
       r.Loaded += (s, e) => log( str.loaded, e.Index, fmt(e.File) );
       r.Processed += (s, e) => log( str.proc, e.Index, fmt(e.File) );
       r.Packed += (s, e) => log( str.packed , e.Index, fmt(e.File) );
       r.pack();
 }
Exemple #2
0
 static string arg( string a, packopts opts, string[] args, int idx )
 {
     switch ( idx ) {
     case 0: opts.dest = a; break;
     case 1: opts.src = a; break;
     default:
       switch( a ) {
     case "-s": _silent = true; break;
     case "-nomips": opts.mipCount = 0; break;
     case "-4tap": opts.fourTap = true; break;
     case "-tx": opts.magnitude.Width = int.Parse( args[idx + 1] ); break;
     case "-ty": opts.magnitude.Height = int.Parse( args[idx + 1] ); break;
     case "-i": opts.mode = (InterpolationMode) Enum.Parse( opts.mode.GetType(), args[idx + 1], true ); break;
     default: break;
       }
       break;
       }
       _last = a;
       return a;
 }
Exemple #3
0
        Size _texSize; // texture size in pixels

        #endregion Fields

        #region Constructors

        public packrat( packopts opts )
        {
            _opts = opts;
        }