Esempio n. 1
0
        public static String doCensor(String s)
        {
            long l = NetDrawingTools.CurrentTimeMillis();

            char[] ac = s.ToCharArray();
            method495(ac);
            String s1 = (new String(ac)).Trim();

            ac = s1.ToLower().ToCharArray();
            String s2 = s1.ToLower();

            method505(ac);
            method500(ac);
            method501(ac);
            method514(ac);
            for (int j = 0; j < exceptions.Length; j++)
            {
                for (int k = -1; (k = s2.IndexOf(exceptions[j], k + 1)) != -1;)
                {
                    char[] ac1 = exceptions[j].ToCharArray();
                    Array.Copy(ac1, 0, ac, k, ac1.Length);
                }
            }
            method498(s1.ToCharArray(), ac);
            method499(ac);
            long l1 = NetDrawingTools.CurrentTimeMillis();

            return((new String(ac)).Trim()); //xxx chat filter, return s to avoid
        }
Esempio n. 2
0
        public void mousePressed(int mouseX, int mouseY, bool left)
        {
            int i = mouseX;
            int j = mouseY;

            if (gameFrame != null)
            {
                i -= 4;
                j -= 22;
            }
            idleTime  = 0;
            clickX    = i;
            clickY    = j;
            clickTime = NetDrawingTools.CurrentTimeMillis();
            if (!left)
            {
                clickMode1 = 2;
                clickMode2 = 2;
            }
            else
            {
                clickMode1 = 1;
                clickMode2 = 1;
            }
            clickMode3 = clickMode1;
        }
Esempio n. 3
0
 public CollisionMap(int a = 0, int b = 0)
 {
     anInt290           = 0;
     anInt291           = 0;
     anInt292           = a;
     anInt293           = b;
     anIntArrayArray294 = NetDrawingTools.CreateDoubleUIntArray(anInt292, anInt293);            // new int[anInt292][anInt293];
     method210();
 }
Esempio n. 4
0
 public void createClientFrame(int i, int j)
 {
     myWidth        = Screen.width;
     myHeight       = Screen.height;
     fullGameScreen = new RSImageProducer(myWidth, myHeight);
     helvetica      = new UnityEngine.Font("Helvetica");
     drawLoadingText(0, "Loading...");
     signlink.run();
     Loom.StartSingleThread(() => { startUp(); }, System.Threading.ThreadPriority.Normal, true);
     for (int k1 = 0; k1 < 10; k1++)
     {
         aLongArray7[k1] = NetDrawingTools.CurrentTimeMillis();
     }
 }
Esempio n. 5
0
        public Sprite(byte[] abyte0, object component = null)
        {
            //try
            //{
            Texture2D image = null;

            //            Image image = Toolkit.getDefaultToolkit().getImage(signlink.findcachedir()+"mopar.jpg");
            //Image image = Toolkit.getDefaultToolkit().createImage(abyte0);
            Loom.DispatchToMainThread(() => {
                image = new Texture2D(0, 0);       //Image.FromStream(new MemoryStream(abyte0));
                image.LoadImage(abyte0);
                Texture2D newImage = new Texture2D(image.width, image.height);
                int iWidth         = image.width;
                int iHeight        = image.height;


                for (int i = 0; i < iWidth; i++)
                {
                    for (int j = 0; j < iHeight; j++)
                    {
                        newImage.SetPixel(i, iHeight - j - 1, image.GetPixel(i, j));
                    }
                }
                newImage.Apply();

                myWidth   = newImage.width;
                myHeight  = newImage.height;
                anInt1444 = myWidth;
                anInt1445 = myHeight;
                anInt1442 = 0;
                anInt1443 = 0;
                myPixels  = NetDrawingTools.ReadPixels(newImage, myWidth, myHeight);
            }, true, true);
            //MediaTracker mediatracker = new MediaTracker(component);
            //mediatracker.addImage(image, 0);
            //mediatracker.waitForAll();


            //}
            //catch (Exception _ex)
            //{
            //	UnityEngine.Debug.Log("Error converting jpg");
            //}
        }
Esempio n. 6
0
 public static void method528(int i)
 {
     animationlist = NetDrawingTools.CreateDoubleClass36Array(4000, 0);             //new Class36[4000][0];
 }
Esempio n. 7
0
        public void ClientUpdateLoop()
        {
            //startUp();
            int i  = 0;
            int j  = 256;
            int k  = 1;
            int l  = 0;
            int i1 = 0;

            for (int j1 = 0; j1 < 10; j1++)
            {
                aLongArray7[j1] = NetDrawingTools.CurrentTimeMillis();
            }
            while (true)
            {
//              if((NetDrawingTools.CurrentTimeMillis() - lastGameFrame) >= 20)
//              {
//                  clientUpdate();
//                  lastGameFrame = NetDrawingTools.CurrentTimeMillis();
//              }

                if (anInt4 < 0)
                {
                    break;
                }
                if (anInt4 > 0)
                {
                    anInt4--;
                    if (anInt4 == 0)
                    {
                        exit();
                        return;
                    }
                }
                int k1 = j;
                int i2 = k;
                j = 300;
                k = 1;
                long l2 = NetDrawingTools.CurrentTimeMillis();
                if (aLongArray7[i] == 0L)
                {
                    j = k1;
                    k = i2;
                }
                else
                if (l2 > aLongArray7[i])
                {
                    j = (int)((long)(2560 * delayTime) / (l2 - aLongArray7[i]));
                }
                if (j < 25)
                {
                    j = 25;
                }
                if (j > 256)
                {
                    j = 256;
                    k = (int)((long)delayTime - (l2 - aLongArray7[i]) / 10L);
                }
                if (k > delayTime)
                {
                    k = delayTime;
                }
                aLongArray7[i] = l2;
                i = (i + 1) % 10;
                if (k > 1)
                {
                    for (int j2 = 0; j2 < 10; j2++)
                    {
                        if (aLongArray7[j2] != 0L)
                        {
                            aLongArray7[j2] += k;
                        }
                    }
                }
                if (k < minDelay)
                {
                    k = minDelay;
                }
                try
                {
                    Thread.Sleep(k);
                }
                catch (Exception interruptedexception)
                {
                    i1++;
                }
                for (; l < 256; l += j)
                {
                    clickMode3 = clickMode1;
                    saveClickX = clickX;
                    saveClickY = clickY;
                    aLong29    = clickTime;
                    clickMode1 = 0;
                    processGameLoop();
                    readIndex = writeIndex;
                }

                l &= 0xff;
                if (delayTime > 0)
                {
                    fps = (1000 * j) / (delayTime * 256);
                }
                shouldDraw = true;
            }
        }