Ejemplo n.º 1
0
 public FLC2TexUnpacker(FLDataContainer container) : this(
         container.Instance,
         container.InstructionSet,
         container.BufferCreator
         )
 {
 }
Ejemplo n.º 2
0
 internal FLRunEndpoint(HTTPSettings httpSettings, FLDataContainer container, FLRunSettings settings)
 {
     Container     = container;
     HttpSettings  = httpSettings;
     Settings      = settings;
     NextRateClear = DateTime.Now + TimeSpan.FromSeconds(Settings.RateLimitIntervalSeconds);
 }
Ejemplo n.º 3
0
 public FL(
     Func <FLDebuggerSettings> settings, FLDataContainer container, Func <Color> errorColor,
     Func <Color> successColor)
 {
     Settings     = settings;
     FLContainer  = container;
     ErrorColor   = errorColor;
     SuccessColor = successColor;
 }
Ejemplo n.º 4
0
        public static void Startup(string[] args)
        {
            OverrideSettingsFromArguments(ParseStartupArguments(args));


            if (loaderForm == null || loaderForm.IsDisposed)
            {
                loaderForm = new Loader(new Task(() => TaskBasedStartup(args)));
            }

            if (loaderForm.ShowDialog() == DialogResult.Cancel)
            {
                PluginManager.OnLog -= PluginManagerLoadLog;
                return;
            }

            if (FlContainer == null)
            {
                FlContainer = new FLDataContainer();
            }

            ResourceManager.AddUnpacker(new FL2FLCUnpacker(FlContainer));
            ResourceManager.AddUnpacker(new FL2TexUnpacker(FlContainer));
            ResourceManager.AddUnpacker(new FLC2TexUnpacker(FlContainer));
            ResourceManager.AddUnpacker(new FLRESUnpacker());


            PluginManager.OnLog -= PluginManagerLoadLog;
            mainForm             = GetRequestedForm();
            if (mainForm is FLScriptEditor ed)
            {
                LoadPlugins(ed);
            }

            PrepareForRun();
            RunForm(mainForm);
        }
Ejemplo n.º 5
0
        public static void InitializeFL(bool noDialogs, FLProgramCheckType checkType)
        {
            NoDialogs = noDialogs;
            int maxTasks = 6;

            Logger.Log(LogType.Log, "Initializing FS", 1);
            PrepareFileSystem();

            SetProgress("Initializing Logging System", 0, 1, maxTasks);
            Debug.DefaultInitialization();

            SetProgress("Initializing Resource System", 0, 2, maxTasks);
            InitializeResourceSystem();

            SetProgress("Initializing Plugin System", 0, 3, maxTasks);
            InitializePluginSystem();

            PluginManager.LoadPlugins(Host);

            SetProgress("Running Custom Actions", 0, 4, maxTasks);
            CustomStartupActions?.Invoke();

            SetProgress("Initializing FL", 0, 5, maxTasks);
            Container = InitializeCLKernels("resources/kernel");

            FLProgramCheckBuilder builder =
                FLProgramCheckBuilder.CreateDefaultCheckBuilder(
                    Container.InstructionSet,
                    Container.BufferCreator,
                    checkType
                    );

            Container.SetCheckBuilder(builder);

            SetProgress("Finished", 0, 6, maxTasks);
        }
Ejemplo n.º 6
0
 public static FLProgram Initialize(this SerializableFLProgram program, FLDataContainer dataContainer)
 {
     return(Initialize(program, dataContainer.Instance, dataContainer.InstructionSet));
 }
Ejemplo n.º 7
0
 internal FLInstructionsEndpoint(FLDataContainer container, HTTPSettings settings)
 {
     Container = container;
     Settings  = settings;
 }
Ejemplo n.º 8
0
 public static void StartContainer(
     FLDataContainer container, FLProgram program, int width, int height, int depth)
 {
     Start(container.Instance, program, width, height, depth);
 }