Пример #1
0
        public Control Show_Info(sFile file)
        {
            switch (gameCode)
            {
                case "A5FE":
                    if (file.id >= 0x0001 && file.id <= 0x02CA)
                        return new Ani(pluginHost, gameCode, file.path).Show_Info();
                    else if (file.id >= 0x02CD && file.id <= 0x0765)
                    {
                        Bg bg = new Bg(pluginHost, file.path, file.id, file.name);
                        return bg.Get_Control();
                    }
                    break;
                case "A5FP":
                    if (file.id >= 0x0001 && file.id <= 0x04E7)
                        return new Ani(pluginHost, gameCode, file.path).Show_Info();
                    else if (file.id >= 0x04E8 && file.id <= 0x0B72)
                    {
                        Bg bg = new Bg(pluginHost, file.path, file.id, file.name);
                        return bg.Get_Control();
                    }
                    break;

                // Professor Layton and the Diabolical Box
                case "YLTS":
                    if (file.id >= 0x37 && file.id <= 0x408)
                        return new Ani(pluginHost, gameCode, file.path).Show_Info();
                    else if (file.id >= 0x409 && file.id <= 0x808)
                    {
                        Bg bg = new Bg(pluginHost, file.path, file.id, file.name);
                        return bg.Get_Control();
                    }
                    break;
                case "YLTE":
                    if (file.id >= 0x37 && file.id <= 0x412)
                        return new Ani(pluginHost, gameCode, file.path).Show_Info();
                    else if (file.id >= 0x413 && file.id <= 0x818)
                    {
                        Bg bg = new Bg(pluginHost, file.path, file.id, file.name);
                        return bg.Get_Control();
                    }
                    break;
                case "YLTP":
                    if (file.id >= 0x37 && file.id <= 0x408)
                        return new Ani(pluginHost, gameCode, file.path).Show_Info();
                    else if (file.id >= 0x409 && file.id <= 0x808)
                    {
                        Bg bg = new Bg(pluginHost, file.path, file.id, file.name);
                        return bg.Get_Control();
                    }
                    break;

                case "C2AJ":
                    if (file.id >= 0x35 && file.id <= 0xEF)
                        return new Ani(pluginHost, gameCode, file.path).Show_Info();
                    else if (file.id >= 0xF0 && file.id <= 0x193)
                    {
                        Bg bg = new Bg(pluginHost, file.path, file.id, file.name);
                        return bg.Get_Control();
                    }
                    break;
            }

            if (file.name.ToUpper().EndsWith(".TXT"))
                return new Text(pluginHost, gameCode, file.path).Show_Info(file.id);
            else if (file.name.ToUpper().EndsWith(".PLZ"))
                return new Control();
            else if (file.name.ToUpper().EndsWith(".GDS"))
                return new ScriptControl(GDS.Read(file.path));

            return new Control();
        }
Пример #2
0
        public Control Show_Info(sFile file)
        {
            switch (gameCode)
            {
            case "A5FE":
                if (file.id >= 0x0001 && file.id <= 0x02CA)
                {
                    return(new Ani(pluginHost, gameCode, file.path).Show_Info());
                }
                else if (file.id >= 0x02CD && file.id <= 0x0765)
                {
                    Bg bg = new Bg(pluginHost, file.path, file.id, file.name);
                    return(bg.Get_Control());
                }
                break;

            case "A5FP":
                if (file.id >= 0x0001 && file.id <= 0x04E7)
                {
                    return(new Ani(pluginHost, gameCode, file.path).Show_Info());
                }
                else if (file.id >= 0x04E8 && file.id <= 0x0B72)
                {
                    Bg bg = new Bg(pluginHost, file.path, file.id, file.name);
                    return(bg.Get_Control());
                }
                break;

            // Professor Layton and the Diabolical Box
            case "YLTS":
            case "YLTP":
            case "YLTH":
                if (file.id >= 0x37 && file.id <= 0x408)
                {
                    return(new Ani(pluginHost, gameCode, file.path).Show_Info());
                }
                else if (file.id >= 0x409 && file.id <= 0x808)
                {
                    Bg bg = new Bg(pluginHost, file.path, file.id, file.name);
                    return(bg.Get_Control());
                }
                break;

            case "YLTE":
                if (file.id >= 0x37 && file.id <= 0x412)
                {
                    return(new Ani(pluginHost, gameCode, file.path).Show_Info());
                }
                else if (file.id >= 0x413 && file.id <= 0x818)
                {
                    Bg bg = new Bg(pluginHost, file.path, file.id, file.name);
                    return(bg.Get_Control());
                }
                break;

            case "C2AJ":
                if (file.id >= 0x35 && file.id <= 0xEF)
                {
                    return(new Ani(pluginHost, gameCode, file.path).Show_Info());
                }
                else if (file.id >= 0xF0 && file.id <= 0x193)
                {
                    Bg bg = new Bg(pluginHost, file.path, file.id, file.name);
                    return(bg.Get_Control());
                }
                break;
            }

            if (file.name.ToUpper().EndsWith(".TXT"))
            {
                return(new Text(pluginHost, gameCode, file.path).Show_Info(file.id));
            }
            else if (file.name.ToUpper().EndsWith(".PLZ"))
            {
                return(new Control());
            }
            else if (file.name.ToUpper().EndsWith(".GDS"))
            {
                return(new ScriptControl(GDS.Read(file.path)));
            }

            return(new Control());
        }