Example #1
0
 public override void OnLoad(PluginAssemblyPointer ptr)
 {
     base.OnLoad(ptr);
     PluginHost.AddInstructionWithDefaultCreator <DefineVarFLInstruction>(
         "def",
         "DV",
         "Defines a variable in the local scope and assigns a value to it"
         );
     PluginHost.AddInstructionWithDefaultCreator <DefineGlobalVarFLInstruction>(
         "gdef",
         "DV",
         "Defines a variable in global scope and assigns a value to it"
         );
     PluginHost.AddInstructionWithDefaultCreator <DecrementVarFLInstruction>(
         "dec",
         "D|DV|DD",
         "Decrements a variable by 1 if no arguments specified."
         );
     PluginHost.AddInstructionWithDefaultCreator <IncrementVarFLInstruction>(
         "inc",
         "D|DV|DD",
         "Increments a variable by 1 if no arguments specified."
         );
     PluginHost.AddInstructionWithDefaultCreator <MultiplyVarFLInstruction>(
         "multiply",
         "DV|DD",
         "Multiplies a variable by the arguments Specified."
         );
     PluginHost.AddInstructionWithDefaultCreator <DivideVarFLInstruction>(
         "divide",
         "DV|DD",
         "Divides a variable by the arguments Specified."
         );
     PluginHost.AddInstructionWithDefaultCreator <BranchLessOrEqualFLInstruction>(
         "ble",
         "DVX|VVX|DDX",
         "Branches to the Specified function or script when firstparameter <= secondparameter"
         );
     PluginHost.AddInstructionWithDefaultCreator <BranchGreaterOrEqualFLInstruction>(
         "bge",
         "DVX|VVX|DDX",
         "Branches to the Specified function or script when firstparameter >= secondparameter"
         );
     PluginHost.AddInstructionWithDefaultCreator <BranchLessThanFLInstruction>(
         "blt",
         "DVX|VVX|DDX",
         "Branches to the Specified function or script when firstparameter < secondparameter"
         );
     PluginHost.AddInstructionWithDefaultCreator <BranchGreaterThanFLInstruction>(
         "bgt",
         "DVX|VVX|DDX",
         "Branches to the Specified function or script when firstparameter > secondparameter"
         );
 }
        public override void OnLoad(PluginAssemblyPointer ptr)
        {
            base.OnLoad(ptr);
            PluginHost.AddInstructionWithDefaultCreator <JumpFLInstruction>(
                "jmp",
                "X",
                "Jumps to a Script or Function and returns. The active channels and buffer will not be cleared"
                );
            PluginHost.AddInstructionWithDefaultCreator <SetActiveFLInstruction>(
                "setactive",
                "E|EV|EVV|EVVV|EVVVV|VVVV|VVV|VV|V",
                "Sets the active buffer and active channel states."
                );
            PluginHost.AddInstructionWithDefaultCreator <RandomFLInstruction>(
                "rnd",
                "|B",
                "Writes random values to all active channels of the active buffer"
                );
            PluginHost.AddInstructionWithDefaultCreator <URandomFLInstruction>(
                "urnd",
                "|B",
                "Writes random values to all active channels of the active buffer, the channels of a pixel will have the same color(grayscale)"
                );

            PluginHost.AddInstructionWithDefaultCreator <PrintLineFLInstruction>(
                "print",
                "A|AA|AAA|AAAA|AAAAA|AAAAAA|AAAAAAA|AAAAAAAA|AAAAAAAAA|AAAAAAAAAA|AAAAAAAAAAA|AAAAAAAAAAAA",
                "Prints text or all kinds of variables to the console."
                );
            PluginHost.AddInstructionWithDefaultCreator <CPUArrangeFLInstruction>(
                "arrange",
                "V|VV|VVV|VVVV",
                "Swaps the channels based on the arguments provided"
                );
            PluginHost.AddInstructionWithDefaultCreator <ArraySetFLInstruction>(
                "arrset",
                "CVV",
                "sets the specified value at the specified index."
                );
        }