示例#1
0
        public static ScriptParser Create(GameInfo info)
        {
            ScriptParser parser;

            switch (info.Version)
            {
            case 0:
                parser = new ScriptParser0(info);
                break;

            case 3:
                parser = new ScriptParser3(info);
                break;

            case 4:
                parser = new ScriptParser4(info);
                break;

            case 5:
                parser = new ScriptParser5(info);
                break;

            case 6:
                parser = new ScriptParser6(info);
                break;

            case 7:
                parser = new ScriptParser7(info);
                break;

            case 8:
                parser = new ScriptParser8(info);
                break;

            default:
                throw new NotSupportedException(string.Format("SCUMM version {0} not supported.", info.Version));
            }
            parser.InitOpCodes();
            return(parser);
        }
示例#2
0
 public static ScriptParser Create(GameInfo info)
 {
     ScriptParser parser;
     switch (info.Version)
     {
         case 0:
             parser = new ScriptParser0(info);
             break;
         case 3:
             parser = new ScriptParser3(info);
             break;
         case 4:
             parser = new ScriptParser4(info);
             break;
         case 5:
             parser = new ScriptParser5(info);
             break;
         case 6:
             parser = new ScriptParser6(info);
             break;
         case 7:
             parser = new ScriptParser7(info);
             break;
         case 8:
             parser = new ScriptParser8(info);
             break;
         default:
             throw new NotSupportedException(string.Format("SCUMM version {0} not supported.", info.Version));
     }
     parser.InitOpCodes();
     return parser;
 }