示例#1
0
        public void method389(bool flag1, int i, int j, String s, int k)
        {
            aBoolean1499 = false;
            int l = i;

            if (s == null)
            {
                return;
            }
            k -= anInt1497;
            for (int i1 = 0; i1 < s.Length; i1++)
            {
                if (s[i1] == '@' && i1 + 4 < s.Length && s[i1 + 4] == '@')
                {
                    int j1 = getColorByName(s.Substring(i1 + 1, 3));
                    if (j1 != -1)
                    {
                        j = j1;
                    }
                    i1 += 4;
                }
                else
                {
                    char c = s[i1];
                    if (c != ' ')
                    {
                        if (flag1)
                        {
                            method392(aByteArrayArray1491[c], i + anIntArray1494[c] + 1, k + anIntArray1495[c] + 1, anIntArray1492[c], anIntArray1493[c], 0);
                        }
                        method392(aByteArrayArray1491[c], i + anIntArray1494[c], k + anIntArray1495[c], anIntArray1492[c], anIntArray1493[c], j);
                    }
                    i += anIntArray1496[c];
                }
            }
            if (aBoolean1499)
            {
                DrawingArea.method339(k + (int)((double)anInt1497 * 0.69999999999999996D), 0x800000, i - l, l);
            }
        }
示例#2
0
 public void initDrawingArea()
 {
     DrawingArea.initDrawingArea(anInt317, anInt316, anIntArray315);
 }
示例#3
0
        public static Sprite getSprite(int i, int j, int k)
        {
            if (k == 0)
            {
                Sprite sprite = (Sprite)mruNodes1.insertFromCache(i);
                if (sprite != null && sprite.anInt1445 != j && sprite.anInt1445 != -1)
                {
                    sprite.unlink();
                    sprite = null;
                }
                if (sprite != null)
                {
                    return(sprite);
                }
            }
            ItemDef itemDef = forID(i);

            if (itemDef.stackIDs == null)
            {
                j = -1;
            }
            if (j > 1)
            {
                int i1 = -1;
                for (int j1 = 0; j1 < 10; j1++)
                {
                    if (j >= itemDef.stackAmounts[j1] && itemDef.stackAmounts[j1] != 0)
                    {
                        i1 = itemDef.stackIDs[j1];
                    }
                }
                if (i1 != -1)
                {
                    itemDef = forID(i1);
                }
            }
            Model model = itemDef.method201(1);

            if (model == null)
            {
                return(null);
            }
            Sprite sprite2 = null;

            if (itemDef.certTemplateID != -1)
            {
                sprite2 = getSprite(itemDef.certID, 10, -1);
                if (sprite2 == null)
                {
                    return(null);
                }
            }
            if (itemDef.lentItemID != -1)
            {
                sprite2 = getSprite(itemDef.lendID, 50, 0);
                if (sprite2 == null)
                {
                    return(null);
                }
            }
            Sprite sprite3 = new Sprite(32, 32);
            int    k1      = Texture.center_x;
            int    l1      = Texture.center_y;

            int[] ai  = Texture.lineOffsets;
            int[] ai1 = DrawingArea.pixels;
            //float[] depthBuffer = DrawingArea.depthBuffer;
            int i2 = DrawingArea.width;
            int j2 = DrawingArea.height;
            int k2 = DrawingArea.topX;
            int l2 = DrawingArea.bottomX;
            int i3 = DrawingArea.topY;
            int j3 = DrawingArea.bottomY;

            Texture.notTextured = false;
            DrawingArea.initDrawingArea(32, 32, sprite3.myPixels);             //, new float[32*32]);
            DrawingArea.drawPixels(32, 0, 0, 0, 32);
            Texture.method364();
            int k3 = itemDef.modelZoom;

            if (k == -1)
            {
                k3 = (int)((double)k3 * 1.5D);
            }
            if (k > 0)
            {
                k3 = (int)((double)k3 * 1.04D);
            }
            int l3 = Texture.SINE[itemDef.modelRotation1] * k3 >> 16;
            int i4 = Texture.COSINE[itemDef.modelRotation1] * k3 >> 16;

            model.method482(itemDef.modelRotation2, itemDef.anInt204, itemDef.modelRotation1, itemDef.modelOffset1, l3 + model.modelHeight / 2 + itemDef.modelOffset2, i4 + itemDef.modelOffset2);
            for (int i5 = 31; i5 >= 0; i5--)
            {
                for (int j4 = 31; j4 >= 0; j4--)
                {
                    if (sprite3.myPixels[i5 + j4 * 32] == 0)
                    {
                        if (i5 > 0 && sprite3.myPixels[(i5 - 1) + j4 * 32] > 1)
                        {
                            sprite3.myPixels[i5 + j4 * 32] = 1;
                        }
                        else if (j4 > 0 && sprite3.myPixels[i5 + (j4 - 1) * 32] > 1)
                        {
                            sprite3.myPixels[i5 + j4 * 32] = 1;
                        }
                        else if (i5 < 31 && sprite3.myPixels[i5 + 1 + j4 * 32] > 1)
                        {
                            sprite3.myPixels[i5 + j4 * 32] = 1;
                        }
                        else if (j4 < 31 && sprite3.myPixels[i5 + (j4 + 1) * 32] > 1)
                        {
                            sprite3.myPixels[i5 + j4 * 32] = 1;
                        }
                    }
                }
            }
            if (k > 0)
            {
                for (int j5 = 31; j5 >= 0; j5--)
                {
                    for (int k4 = 31; k4 >= 0; k4--)
                    {
                        if (sprite3.myPixels[j5 + k4 * 32] == 0)
                        {
                            if (j5 > 0 && sprite3.myPixels[(j5 - 1) + k4 * 32] == 1)
                            {
                                sprite3.myPixels[j5 + k4 * 32] = k;
                            }
                            else if (k4 > 0 && sprite3.myPixels[j5 + (k4 - 1) * 32] == 1)
                            {
                                sprite3.myPixels[j5 + k4 * 32] = k;
                            }
                            else if (j5 < 31 && sprite3.myPixels[j5 + 1 + k4 * 32] == 1)
                            {
                                sprite3.myPixels[j5 + k4 * 32] = k;
                            }
                            else if (k4 < 31 && sprite3.myPixels[j5 + (k4 + 1) * 32] == 1)
                            {
                                sprite3.myPixels[j5 + k4 * 32] = k;
                            }
                        }
                    }
                }
            }
            else if (k == 0)
            {
                for (int k5 = 31; k5 >= 0; k5--)
                {
                    for (int l4 = 31; l4 >= 0; l4--)
                    {
                        if (sprite3.myPixels[k5 + l4 * 32] == 0 && k5 > 0 && l4 > 0 && sprite3.myPixels[(k5 - 1) + (l4 - 1) * 32] > 0)
                        {
                            sprite3.myPixels[k5 + l4 * 32] = 0x302020;
                        }
                    }
                }
            }
            if (itemDef.certTemplateID != -1)
            {
                int l5 = sprite2.anInt1444;
                int j6 = sprite2.anInt1445;
                sprite2.anInt1444 = 32;
                sprite2.anInt1445 = 32;
                sprite2.drawSprite(0, 0);
                sprite2.anInt1444 = l5;
                sprite2.anInt1445 = j6;
            }
            if (itemDef.lentItemID != -1)
            {
                int l5 = sprite2.anInt1444;
                int j6 = sprite2.anInt1445;
                sprite2.anInt1444 = 32;
                sprite2.anInt1445 = 32;
                sprite2.drawSprite(0, 0);
                sprite2.anInt1444 = l5;
                sprite2.anInt1445 = j6;
            }
            if (k == 0)
            {
                mruNodes1.removeFromCache(sprite3, i);
            }
            DrawingArea.initDrawingArea(j2, i2, ai1);             //, depthBuffer);
            DrawingArea.setDrawingArea(j3, k2, l2, i3);
            Texture.center_x    = k1;
            Texture.center_y    = l1;
            Texture.lineOffsets = ai;
            Texture.notTextured = true;
            if (itemDef.stackable)
            {
                sprite3.anInt1444 = 33;
            }
            else
            {
                sprite3.anInt1444 = 32;
            }
            sprite3.anInt1445 = j;
            return(sprite3);
        }
示例#4
0
 public void method343()
 {
     DrawingArea.initDrawingArea(myHeight, myWidth, myPixels);
 }