Пример #1
0
 public static void VER()
 {
     MKL.Version("MKL Update - License.cs", "20.04.28");
     MKL.Lic("MKL Update - License.cs", "GNU General Public License 3");
 }
Пример #2
0
 /// <summary>
 /// Call this function to install the jxsrcca driver into JCR6
 /// That's all you need to do, as JCR6 will take care of the rest ALL BY ITSELF ;)
 /// </summary>
 public static void Init()
 {
     JCR6.CompDrivers["jxsrcca"] = new JCR6_jxsrcca(true);
     MKL.Lic("JCR6 - jcr6_jxsrcca.cs", "ZLib License");
     MKL.Version("JCR6 - jcr6_jxsrcca.cs", "19.11.16");
 }
Пример #3
0
 static public void Hello()
 {
     MKL.Version("Wendicka Project - Chunks and stuff.cs", "20.03.10");
     MKL.Lic("Wendicka Project - Chunks and stuff.cs", "ZLib License");
 }
Пример #4
0
 static public void Init()
 {
     MKL.Lic("Development Log - Command.cs", "GNU General Public License 3");
     MKL.Version("Development Log - Command.cs", "20.07.24");
     Commands["ANNOY"]        = Annoy;
     Commands["BYE"]          = Bye;
     Commands["SAY"]          = delegate(string yeah) { GUI.WriteLn(yeah, true); };
     Commands["F**K"]         = delegate { Annoy("Did your mother never teach you not to say such words?"); };
     Commands["YULERIA"]      = delegate { Annoy("Yuleria's rule of revenge:\nAn amateur kills people! A professional makes them suffer!"); };
     Commands["GLOBALCONFIG"] = GlobalConfig;
     Commands["USE"]          = delegate(string useme) { GUI.Use(useme); };
     Commands["SYSVARS"]      = delegate { if (CurrentProject == null)
                                           {
                                               GUI.WriteLn("No project!"); return;
                                           }
                                           foreach (string v in CurrentProject.Data.Vars())
                                           {
                                               GUI.WriteLn(v);
                                           }
     };
     Commands["VARS"] = delegate { if (CurrentProject == null)
                                   {
                                       GUI.WriteLn("No project!"); return;
                                   }
                                   foreach (string v in CurrentProject.Data.Vars())
                                   {
                                       if (qstr.Prefixed(v, "VAR."))
                                       {
                                           GUI.WriteLn(v);
                                       }
                                   }
     };
     Commands["LET"]    = LetVar;
     Commands["NEWTAG"] = NewTag;
     Commands["ADDTAG"] = NewTag;
     Commands["ADD"]    = AddEntry;
     Commands["GEN"]    = delegate { Export.Gen(); };
     Commands["ABOUT"]  = delegate {
         GUI.WriteLn($"This tool has been created and copyrighted by Jeroen P. Broks\nIs has been released under the terms of the GPL version 3\n\nCompiled on the next source files:\n\n{MKL.All()}");
     };
     Commands["CLH"]    = delegate { GUI.ClearHistory(); };
     Commands["CLS"]    = delegate { GUI.ClearConsole(); };
     Commands["PUSH"]   = delegate { GUI.WriteLn("Thanks to Ziggo I cannot push yet, but that comes later!"); };
     Commands["GO"]     = Go;
     Commands["UNLINK"] = Delete;
     Commands["DELETE"] = Delete;
     Commands["KILL"]   = Delete;
     Commands["RM"]     = Delete;
     Commands["REMOVE"] = Delete;
     Commands["DEL"]    = Delete;
     Commands["CREATE"] = Create;
     Commands["SAVE"]   = delegate { if (CurrentProject != null)
                                     {
                                         CurrentProject.SaveMe(); GUI.WriteLn("Saved!");
                                     }
                                     else
                                     {
                                         Annoy("No Project!");
                                     } };
     Commands["TAKE"] = Take;
     Commands["EDIT"] = delegate(string num) {
         if (CurrentProject == null)
         {
             Annoy("No Project!"); return;
         }
         var e = new dvEntry(CurrentProject, qstr.ToInt(num), true);
         if (e == null)
         {
             Annoy("Entry couldn't be accessed!"); return;
         }
         GUI.SetPrompt($"MODIFY {num} {e.Tag} {e.Pure}");
     };
     Commands["MODIFY"] = delegate(string str) {
         var args = str.Split(' ');
         if (CurrentProject == null)
         {
             Annoy("No Project!"); return;
         }
         if (args.Length < 3)
         {
             Annoy("Modify syntax error!"); return;
         }
         var num = qstr.ToInt(args[0]);
         var e   = new dvEntry(CurrentProject, num, true);
         if (e == null)
         {
             Annoy("Entry couldn't be accessed!"); return;
         }
         var tag = args[1].ToUpper();
         if (!CurrentProject.GotTag(tag))
         {
             Annoy($"There's no tag: {tag}"); return;
         }
         var sb = new System.Text.StringBuilder();
         e.Tag = tag;
         for (int i = 2; i < args.Length; ++i)
         {
             sb.Append($"{args[i]} ");
         }
         e.Pure = sb.ToString().Trim();
         GUI.UpdateEntries(CurrentProject.HighestRecordNumber - 200, CurrentProject.HighestRecordNumber);
     };
 }
Пример #5
0
        static public void Main(string[] AAppArgs)
        {
            AppArgs = AAppArgs;
            MKL.Version("Spam Programming Language - Spam.cs", "18.09.22");
            MKL.Lic("Spam Programming Language - Spam.cs", "GNU General Public License 3");
            if (AppArgs.Length < 1)
            {
                QOpen.Hello();
                qstr.Right("spam", 4); // Does nothing, I know, but MKL needs to to parse it all right :P
                Print("Spam Programming Language - version " + MKL.Newest);
                Print("Set up by Jeroen Broks");
                Print("Try to make programming code look like spam folks!");
                Print();
                Print("Usage: spam <program>[.spam]");
                return;
            }
            //ChangeDir(LaunchDir);


            Parse();
            while (curl < code.Length)
            {
                string cw = code[curl];
                Chat(curl + "> " + cw);
                if (!check)
                {
                    curl++;
                    check = labels.ContainsKey(cw) || itmap.map.ContainsKey(cw);
                }
                else if (labels.ContainsKey(cw))
                {
                    curl = labels[cw];
                }
                else if (qstr.Prefixed(cw, "$"))
                {
                    MaxString = qstr.ToInt(qstr.Right(cw, qstr.Len(cw) - 1));
                    //'Print maxstring
                    curl++;
                }
                else if (qstr.Prefixed(cw, "X"))
                {
                    if (last != "" && last != "CHECK")
                    {
                        int times = qstr.ToInt(qstr.Right(cw, qstr.Len(cw) - 1));
                        for (int i = 1; i < times; i++)
                        {
                            itmap.execute(last);
                        }
                    }
                    curl++;
                }
                else if (qstr.Suffixed(cw, "X"))
                {
                    if (last != "" && last != "CHECK")
                    {
                        int times = qstr.ToInt(qstr.Left(cw, qstr.Len(cw) - 1));
                        for (int i = 1; i < times; i++)
                        {
                            itmap.execute(last);
                        }
                    }
                    curl++;
                }
                else
                {
                    itmap.execute(cw);
                    curl++;
                }
            }
        }
        public static void Init()
        {
            Error = "";
            MKL.Version("TeddyBear - TeddyDraw_MonoGame.cs", "19.04.06");
            MKL.Lic("TeddyBear - TeddyDraw_MonoGame.cs", "ZLib License");
            // This item will allow MonoGame to draw tiles in the map
            TeddyDraw.DrawTileItem = delegate(TeddyMap map, string layer, int screenstart_x, int screenstart_y, int scroll_x, int scroll_y, int posx, int posy)
            {
                //TeddyMap map, string layer, int screenstart_x, int screenstart_y, int scroll_x, int scroll_y, int posx, int posy
                Error = "";
                if (!map.Layers.ContainsKey(layer))
                {
                    Error = $"Layer '{layer}' does not exist in this map!"; return;
                }
                if (qstr.Prefixed(layer, "Zone_"))
                {
                    TeddyDraw.DrawZoneItem(map, layer, screenstart_x, screenstart_y, scroll_x, scroll_y, posx, posy); return;
                }
                var b = map.Layers[layer].Get(posx, posy);
                if (b == 0)
                {
                    return;         // 0 stands for nothing and should therefore always be ignored!
                }
                if (map.Texture[b] == null || map.Texture[b] == "")
                {
                    Texture[b] = Unknown; Log($"No texture set on {b}");
                }
                if (Texture[b] == null)
                {
#if !donttry
                    try {
#endif
                    Log($"Loading texture for spot {b} => {map.Texture[b]}");
                    var bt = map.OpenTexture(b);
                    if (bt == null)
                    {
                        Texture[b] = Unknown; Log($"JCR6 failed to open the texture file! {UseJCR6.JCR6.JERROR}"); return;
                    }
                    Texture[b] = TQMG.GetImage(bt);

                    if (Texture[b] == null)
                    {
                        Texture[b] = Unknown; Log($"Texture load failed! {map.Texture[b]}");
                    }
                    else
                    {
                        Log("Texture appears to be loaded succesfully!");
                    }

#if !donttry
                }
                catch (System.Exception er) {
                    Log($"An error happened when loading a texture: {er.Message} >> {er.StackTrace}");
                    Texture[b] = Unknown;
                }
#endif
                }

                if (Texture[b] != null)
                {
                    var modix = 0;
                    var modiy = 0;
                    var dtex  = Texture[b];
                    var dlay  = map.Layers[layer];
                    // X
                    switch (dlay.Hot[1])
                    {
                    case 'L':

                        break;

                    case 'C':

                        modix = (map.GridX / 2) - (dtex.Width / 2);

                        break;

                    case 'R':

                        modix = map.GridX - dtex.Width;

                        break;

                    default:

                        return;     // ERROR!
                    }
                    // Y
                    switch (dlay.Hot[0])
                    {
                    case 'T':

                        break;

                    case 'C':

                        modiy = (map.GridY / 2) - (dtex.Height / 2);

                        break;

                    case 'B':

                        modiy = map.GridY - dtex.Height;

                        break;

                    default:

                        return;     // ERROR!
                    }
                    var dx = ((screenstart_x + (posx * map.GridX)) - scroll_x) + modix;
                    var dy = ((screenstart_y + (posy * map.GridY)) - scroll_y) + modiy;
                    dtex.Draw(dx, dy);
                    //TeddyEdit.UI.font32.DrawText(dlay.Hot, dx, dy); // debug!!!
                }
            };



            // This item will allow MonoGame to draw the zone layer.
            // Basically only required for editors, as zones should be invisible in games.
            TeddyDraw.DrawZoneItem = delegate
            {
                Error = "";
            };



            TeddyDraw.TexReset = delegate(byte b)
            {
                if (b == 0)
                {
                    for (byte i = 255; i > 0; i--)
                    {
                        TeddyDraw.TexReset(i);
                    }
                    return;
                }
                Texture[b] = null;
            };
        }
Пример #7
0
 public static void Hello()
 {
     MKL.Version("Wendicka Project - Stack.cs", "20.03.10");
     MKL.Lic("Wendicka Project - Stack.cs", "ZLib License");
 }
Пример #8
0
 public JCR6_lzma()
 {
     JCR6.CompDrivers["lzma"] = this;
     MKL.Lic("JCR6 - lzma2jcr6.cs", "Mozilla Public License 2.0");
     MKL.Version("JCR6 - lzma2jcr6.cs", "18.09.19");
 }
Пример #9
0
 static public void Hello()
 {
     MKL.Version("Development Log - Export.cs", "21.08.28");
     MKL.Lic("Development Log - Export.cs", "GNU General Public License 3");
 }
Пример #10
0
 public F_QU_Help()
 {
     MKL.Lic("NJCR - F_QU_Help.cs", "GNU General Public License 3");
     MKL.Version("NJCR - F_QU_Help.cs", "19.10.04");
     Description = "Provides help about the -qu switch some features use";
 }
Пример #11
0
 static internal void Hello()
 {
     MKL.Lic("Wendicka Project - Source.cs", "GNU General Public License 3");
     MKL.Version("Wendicka Project - Source.cs", "20.03.09");
 }
 static GINI()
 {
     MKL.Version("Tricky Units for C# - GINI Is Not Ini.cs", "20.05.26");
     MKL.Lic("Tricky Units for C# - GINI Is Not Ini.cs", "ZLib License");
     var tb = debug;
 }
Пример #13
0
 static public void Hi()
 {
     MKL.Version("DevLog Compiler - Compile.cs", "18.11.17");
     MKL.Lic("DevLog Compiler - Compile.cs", "GNU General Public License 3");
 }
Пример #14
0
        public QuickGTK()
        {
            MKL.Version("Tricky Units for C# - QuickGTK.cs", "20.04.11");

            MKL.Lic("Tricky Units for C# - QuickGTK.cs", "ZLib License");
        }
Пример #15
0
        public QuickGTK()
        {
            MKL.Version("Tricky Units for C# - QuickGTK.cs", "19.03.09");

            MKL.Lic("Tricky Units for C# - QuickGTK.cs", "ZLib License");
        }
Пример #16
0
 // Statics to get on the move
 static public void MKL_See()
 {
     MKL.Lic("MKL Update - MKL_Run.cs", "GNU General Public License 3");
     MKL.Version("MKL Update - MKL_Run.cs", "20.04.28");
 }
Пример #17
0
        /// <summary>

        /// Does nothing, but can be used to force the MKL values to be properly parsed

        /// </summary>

        static public void Hello()
        {
            MKL.Version("Tricky Units for C# - QuickGTK.cs", "19.03.09");

            MKL.Lic("Tricky Units for C# - QuickGTK.cs", "ZLib License");
        }
Пример #18
0
 static void Init()
 {
     Core.Init();
     MKL.Lic("TeddyBear - TeddySave.cs", "ZLib License");
     MKL.Version("TeddyBear - TeddySave.cs", "19.04.03");
 }