Beispiel #1
0
        public static void loadConfig(StreamLoader streamLoader)
        {
            Stream stream   = new Stream(streamLoader.getDataForName("fragmentsenc.txt"));
            Stream stream_1 = new Stream(streamLoader.getDataForName("badenc.txt"));
            Stream stream_2 = new Stream(streamLoader.getDataForName("domainenc.txt"));
            Stream stream_3 = new Stream(streamLoader.getDataForName("tldlist.txt"));

            readValues(stream, stream_1, stream_2, stream_3);
        }
Beispiel #2
0
        public Sprite(StreamLoader streamLoader, String s, int i)
        {
            Stream stream   = new Stream(streamLoader.getDataForName(s + ".dat"));
            Stream stream_1 = new Stream(streamLoader.getDataForName("index.dat"));

            stream_1.currentOffset = stream.readUnsignedWord();
            anInt1444 = stream_1.readUnsignedWord();
            anInt1445 = stream_1.readUnsignedWord();
            int j = stream_1.readUnsignedByte();

            int[] ai = new int[j];
            for (int k = 0; k < j - 1; k++)
            {
                ai[k + 1] = stream_1.read3Bytes();
                if (ai[k + 1] == 0)
                {
                    ai[k + 1] = 1;
                }
            }

            for (int l = 0; l < i; l++)
            {
                stream_1.currentOffset += 2;
                stream.currentOffset   += stream_1.readUnsignedWord() * stream_1.readUnsignedWord();
                stream_1.currentOffset++;
            }

            anInt1442 = stream_1.readUnsignedByte();
            anInt1443 = stream_1.readUnsignedByte();
            myWidth   = stream_1.readUnsignedWord();
            myHeight  = stream_1.readUnsignedWord();
            int i1 = stream_1.readUnsignedByte();
            int j1 = myWidth * myHeight;

            myPixels = new int[j1];
            if (i1 == 0)
            {
                for (int k1 = 0; k1 < j1; k1++)
                {
                    myPixels[k1] = ai[stream.readUnsignedByte()];
                }

                return;
            }
            if (i1 == 1)
            {
                for (int l1 = 0; l1 < myWidth; l1++)
                {
                    for (int i2 = 0; i2 < myHeight; i2++)
                    {
                        myPixels[l1 + i2 * myWidth] = ai[stream.readUnsignedByte()];
                    }
                }
            }
        }
Beispiel #3
0
        public Background(StreamLoader streamLoader, String s, int i)
        {
            Stream stream   = new Stream(streamLoader.getDataForName(s + ".dat"));
            Stream stream_1 = new Stream(streamLoader.getDataForName("index.dat"));

            stream_1.currentOffset = stream.readUnsignedWord();
            anInt1456 = stream_1.readUnsignedWord();
            anInt1457 = stream_1.readUnsignedWord();
            int j = stream_1.readUnsignedByte();

            anIntArray1451 = new int[j];
            for (int k = 0; k < j - 1; k++)
            {
                anIntArray1451[k + 1] = stream_1.read3Bytes();
            }

            for (int l = 0; l < i; l++)
            {
                stream_1.currentOffset += 2;
                stream.currentOffset   += stream_1.readUnsignedWord() * stream_1.readUnsignedWord();
                stream_1.currentOffset++;
            }

            anInt1454 = stream_1.readUnsignedByte();
            anInt1455 = stream_1.readUnsignedByte();
            anInt1452 = stream_1.readUnsignedWord();
            anInt1453 = stream_1.readUnsignedWord();
            int i1 = stream_1.readUnsignedByte();
            int j1 = anInt1452 * anInt1453;

            aByteArray1450 = new byte[j1];
            if (i1 == 0)
            {
                for (int k1 = 0; k1 < j1; k1++)
                {
                    aByteArray1450[k1] = (byte)stream.readSignedByte();
                }

                return;
            }
            if (i1 == 1)
            {
                for (int l1 = 0; l1 < anInt1452; l1++)
                {
                    for (int i2 = 0; i2 < anInt1453; i2++)
                    {
                        aByteArray1450[l1 + i2 * anInt1452] = (byte)stream.readSignedByte();
                    }
                }
            }
        }
Beispiel #4
0
        public static void unpackConfig(StreamLoader streamLoader)
        {
            Stream stream    = new Stream(streamLoader.getDataForName("varbit.dat"));
            int    cacheSize = stream.readUnsignedWord();

            if (cache == null)
            {
                cache = new VarBit[cacheSize];
            }
            for (int j = 0; j < cacheSize; j++)
            {
                if (cache[j] == null)
                {
                    cache[j] = new VarBit();
                }
                cache[j].readValues(stream);
                if (cache[j].aBoolean651)
                {
                    Varp.cache[cache[j].anInt648].aBoolean713 = true;
                }
            }

            if (stream.currentOffset != stream.buffer.Length)
            {
                UnityEngine.Debug.Log("varbit load mismatch");
            }
        }
Beispiel #5
0
        public static void unpackConfig(StreamLoader streamLoader)
        {
            for (int j = 0; j < FrameStart.Length; j++)
            {
                FrameStart[j] = 0;
            }
            Stream stream = new Stream(streamLoader.getDataForName("seq.dat"));
            int    length = stream.readUnsignedWord() + 3299;

            if (anims == null)
            {
                anims = new Animation[length];
            }
            for (int j = 0; j < length; j++)
            {
                if (anims[j] == null)
                {
                    anims[j] = new Animation();
                }
                if (j < 3997)
                {
                    anims[j].readValues(stream);
                }
                else
                {
                    setAnimBase(j);
                }
            }
        }
Beispiel #6
0
        public void start(StreamLoader streamLoader)
        {
            mapIndexData = UnityClient.ReadAllBytes(signlink.findcachedir() + "map_index.dat");           //streamLoader.getDataForName("map_index");
            byte[] mapIndexDataNew = UnityClient.ReadAllBytes(signlink.findcachedir() + "map_index.dat"); //streamLoader.getDataForName("map_index");
            Stream stream2         = new Stream(mapIndexDataNew);
            int    j1 = stream2.readUnsignedWord();                                                       //mapIndexDataNew.Length / 6;

            mapIndices1 = new int[j1];
            mapIndices2 = new int[j1];
            mapIndices3 = new int[j1];
            for (int i2 = 0; i2 < j1; i2++)
            {
                mapIndices1[i2] = stream2.readUnsignedWord();
                mapIndices2[i2] = stream2.readUnsignedWord();
                mapIndices3[i2] = stream2.readUnsignedWord();
                mapAmount++;
            }
            Debug.Log("Map Amount: " + mapAmount + "");
            mapIndexDataNew = streamLoader.getDataForName("midi_index");
            stream2         = new Stream(mapIndexDataNew);
            j1             = mapIndexDataNew.Length;
            anIntArray1348 = new int[j1];
            for (int k2 = 0; k2 < j1; k2++)
            {
                anIntArray1348[k2] = stream2.readUnsignedByte();
            }

            //clientInstance = client1;
            running = true;
            //clientInstance.startRunnable(this, 2);
            Loom.StartSingleThread(() => {
                run();
            }, System.Threading.ThreadPriority.Normal, true);
        }
Beispiel #7
0
        public static void unpackConfig(StreamLoader streamLoader)
        {
            Stream stream = new Stream(streamLoader.getDataForName("varp.dat"));

            anInt702 = 0;
            int cacheSize = stream.readUnsignedWord();

            if (cache == null)
            {
                cache = new Varp[cacheSize];
            }
            if (anIntArray703 == null)
            {
                anIntArray703 = new int[cacheSize];
            }
            for (int j = 0; j < cacheSize; j++)
            {
                if (cache[j] == null)
                {
                    cache[j] = new Varp();
                }
                cache[j].readValues(stream, j);
            }
            if (stream.currentOffset != stream.buffer.Length)
            {
                UnityEngine.Debug.Log("varptype load mismatch");
            }
        }
Beispiel #8
0
        public static void unpackConfig(StreamLoader streamLoader)
        {
            stream = new Stream(streamLoader.getDataForName("obj.dat"));
            Stream stream2 = new Stream(streamLoader.getDataForName("obj.idx"));

            totalItems    = stream2.readUnsignedWord();
            streamIndices = new int[totalItems + 10000];
            Debug.Log("Items Loaded: " + totalItems);
            int i = 2;

            for (int j = 0; j < totalItems; j++)
            {
                streamIndices[j] = i;
                i += stream2.readUnsignedWord();
            }
            cache = new ItemDef[10];
            for (int k = 0; k < 10; k++)
            {
                cache[k] = new ItemDef();
            }
        }
Beispiel #9
0
        public static void unpackConfig(StreamLoader streamLoader)
        {
            stream = new Stream(streamLoader.getDataForName("npc.dat"));
            Stream stream2   = new Stream(streamLoader.getDataForName("npc.idx"));
            int    totalNPCs = stream2.readUnsignedWord();

            streamIndices = new int[totalNPCs];
            Debug.Log("Npcs Loaded: " + totalNPCs);
            int i = 2;

            for (int j = 0; j < totalNPCs; j++)
            {
                streamIndices[j] = i;
                i += stream2.readUnsignedWord();
            }

            cache = new EntityDef[20];
            for (int k = 0; k < 20; k++)
            {
                cache[k] = new EntityDef();
            }
        }
Beispiel #10
0
        public static void unpackConfig(StreamLoader streamLoader)
        {
            Stream stream    = new Stream(streamLoader.getDataForName("flo.dat"));
            int    cacheSize = stream.readUnsignedWord();

            if (cache == null)
            {
                cache = new Flo[cacheSize];
            }
            for (int j = 0; j < cacheSize; j++)
            {
                if (cache[j] == null)
                {
                    cache[j] = new Flo();
                }
                cache[j].readValues(stream);
            }
        }
Beispiel #11
0
//		public static void unpackConfig(StreamLoader streamLoader)
//		{
//			Stream stream = new Stream(streamLoader.getDataForName("idk.dat"));
//			Length = stream.readUnsignedWord();
//			if (cache == null)
//				cache = new IDK[Length];
//			for (int j = 0; j < Length; j++)
//			{
//				if (cache[j] == null)
//					cache[j] = new IDK();
//				cache[j].readValues(stream);
//			}
//		}
//
//		private void readValues(Stream stream)
//		{
//			do
//			{
//				int i = stream.readUnsignedByte();
//				if (i == 0)
//					return;
//				if (i == 1)
//					anInt657 = stream.readUnsignedByte();
//				else
//					if (i == 2)
//					{
//						int j = stream.readUnsignedByte();
//						anIntArray658 = new int[j];
//						for (int k = 0; k < j; k++)
//							anIntArray658[k] = stream.readUnsignedWord();
//
//					}
//					else
//						if (i == 3)
//							aBoolean662 = true;
//						else
//							if (i >= 40 && i < 50)
//								anIntArray659[i - 40] = stream.readUnsignedWord();
//							else
//								if (i >= 50 && i < 60)
//									anIntArray660[i - 50] = stream.readUnsignedWord();
//								else
//									if (i >= 60 && i < 70)
//										anIntArray661[i - 60] = stream.readUnsignedWord();
//									else
//										UnityEngine.Debug.Log("Error unrecognised config code: " + i);
//			} while (true);
//		}
//
//		public bool method537()
//		{
//			if (anIntArray658 == null)
//				return true;
//			bool flag = true;
//			for (int j = 0; j < anIntArray658.Length; j++)
//				if (!Model.method463(anIntArray658[j]))
//					flag = false;
//
//			return flag;
//		}
//
//		public Model method538()
//		{
//			if (anIntArray658 == null)
//				return null;
//			Model[] aclass30_sub2_sub4_sub6s = new Model[anIntArray658.Length];
//			for (int i = 0; i < anIntArray658.Length; i++)
//				aclass30_sub2_sub4_sub6s[i] = Model.method462(anIntArray658[i]);
//
//			Model model;
//			if (aclass30_sub2_sub4_sub6s.Length == 1)
//				model = aclass30_sub2_sub4_sub6s[0];
//			else
//				model = new Model(aclass30_sub2_sub4_sub6s.Length, aclass30_sub2_sub4_sub6s);
//			for (int j = 0; j < 6; j++)
//			{
//				if (anIntArray659[j] == 0)
//					break;
//				model.method476(anIntArray659[j], anIntArray660[j]);
//			}
//
//			return model;
//		}
//
//		public bool method539()
//		{
//			bool flag1 = true;
//			for (int i = 0; i < 5; i++)
//				if (anIntArray661[i] != -1 && !Model.method463(anIntArray661[i]))
//					flag1 = false;
//
//			return flag1;
//		}
//
//		public Model method540()
//		{
//			Model[] aclass30_sub2_sub4_sub6s = new Model[5];
//			int j = 0;
//			for (int k = 0; k < 5; k++)
//				if (anIntArray661[k] != -1)
//					aclass30_sub2_sub4_sub6s[j++] = Model.method462(anIntArray661[k]);
//
//			Model model = new Model(j, aclass30_sub2_sub4_sub6s);
//			for (int l = 0; l < 6; l++)
//			{
//				if (anIntArray659[l] == 0)
//					break;
//				model.method476(anIntArray659[l], anIntArray660[l]);
//			}
//
//			return model;
//		}
//
//		private IDK()
//		{
//			anInt657 = -1;
//			anIntArray659 = new int[6];
//			anIntArray660 = new int[6];
//			aBoolean662 = false;
//		}
//
//		public static int Length;
//		public static IDK[] cache;
//		public int anInt657;
//		private int[] anIntArray658;
//		private int[] anIntArray659;
//		private int[] anIntArray660;
//		private int[] anIntArray661 = {
//        -1, -1, -1, -1, -1
//    };
//		public bool aBoolean662;
//	}

        public static void unpackConfig(StreamLoader streamLoader)
        {
            Stream stream = new Stream(streamLoader.getDataForName("idk.dat"));

            length = stream.readUnsignedWord();
            if (cache == null)
            {
                cache = new IDK[length];
            }
            for (int j = 0; j < length; j++)
            {
                if (cache[j] == null)
                {
                    cache[j] = new IDK();
                }
                cache[j].readValues(stream);
            }
        }
Beispiel #12
0
        public static void unpackConfig(StreamLoader streamLoader)
        {
            Stream stream = new Stream(streamLoader.getDataForName("spotanim.dat"));
            int    length = stream.readUnsignedWord();

            UnityEngine.Debug.Log("525 Graphics Amount: " + length);
            if (cache == null)
            {
                cache = new SpotAnim[length];
            }
            for (int j = 0; j < length; j++)
            {
                if (cache[j] == null)
                {
                    cache[j] = new SpotAnim();
                }
                cache[j].anInt404 = j;
                cache[j].readValues(stream);
            }
        }
Beispiel #13
0
        public static void unpack(StreamLoader streamLoader, TextDrawingArea[] textDrawingAreas, StreamLoader streamLoader_1)
        {
            aMRUNodes_238 = new MRUNodes(50000);
            Stream stream = new Stream(streamLoader.getDataForName("data"));
            int    i      = -1;
            int    j      = stream.readUnsignedWord();

            interfaceCache = new RSInterface[j];
            while (stream.currentOffset < stream.buffer.Length)
            {
                int k = stream.readUnsignedWord();
                if (k == 65535)
                {
                    i = stream.readUnsignedWord();
                    k = stream.readUnsignedWord();
                }

                RSInterface rsInterface = interfaceCache[k] = new RSInterface();
                rsInterface.id           = k;
                rsInterface.parentID     = i;
                rsInterface.type         = stream.readUnsignedByte();
                rsInterface.atActionType = stream.readUnsignedByte();
                rsInterface.anInt214     = stream.readUnsignedWord();
                rsInterface.width        = stream.readUnsignedWord();
                rsInterface.height       = stream.readUnsignedWord();
                rsInterface.aByte254     = (byte)stream.readUnsignedByte();
                rsInterface.anInt230     = stream.readUnsignedByte();
                if (rsInterface.anInt230 != 0)
                {
                    rsInterface.anInt230 = (rsInterface.anInt230 - 1 << 8) + stream.readUnsignedByte();
                }
                else
                {
                    rsInterface.anInt230 = -1;
                }
                int i1 = stream.readUnsignedByte();
                if (i1 > 0)
                {
                    rsInterface.anIntArray245 = new int[i1];
                    rsInterface.anIntArray212 = new int[i1];
                    for (int j1 = 0; j1 < i1; j1++)
                    {
                        rsInterface.anIntArray245[j1] = stream.readUnsignedByte();
                        rsInterface.anIntArray212[j1] = stream.readUnsignedWord();
                    }
                }
                int k1 = stream.readUnsignedByte();
                if (k1 > 0)
                {
                    rsInterface.valueIndexArray = new int[k1][];
                    for (int l1 = 0; l1 < k1; l1++)
                    {
                        int i3 = stream.readUnsignedWord();
                        rsInterface.valueIndexArray[l1] = new int[i3];
                        for (int l4 = 0; l4 < i3; l4++)
                        {
                            rsInterface.valueIndexArray[l1][l4] = stream.readUnsignedWord();
                        }
                    }
                }
                if (rsInterface.type == 0)
                {
                    rsInterface.scrollMax   = stream.readUnsignedWord();
                    rsInterface.aBoolean266 = stream.readUnsignedByte() == 1;
                    int i2 = stream.readUnsignedWord();
                    rsInterface.children = new int[i2];
                    rsInterface.childX   = new int[i2];
                    rsInterface.childY   = new int[i2];
                    for (int j3 = 0; j3 < i2; j3++)
                    {
                        rsInterface.children[j3] = stream.readUnsignedWord();
                        rsInterface.childX[j3]   = stream.readSignedWord();
                        rsInterface.childY[j3]   = stream.readSignedWord();
                    }
                }
                if (rsInterface.type == 1)
                {
                    stream.readUnsignedWord();
                    stream.readUnsignedByte();
                }
                if (rsInterface.type == 2)
                {
                    rsInterface.inv                  = new int[rsInterface.width * rsInterface.height];
                    rsInterface.invStackSizes        = new int[rsInterface.width * rsInterface.height];
                    rsInterface.aBoolean259          = stream.readUnsignedByte() == 1;
                    rsInterface.isInventoryInterface = stream.readUnsignedByte() == 1;
                    rsInterface.usableItemInterface  = stream.readUnsignedByte() == 1;
                    rsInterface.aBoolean235          = stream.readUnsignedByte() == 1;
                    rsInterface.invSpritePadX        = stream.readUnsignedByte();
                    rsInterface.invSpritePadY        = stream.readUnsignedByte();
                    rsInterface.spritesX             = new int[20];
                    rsInterface.spritesY             = new int[20];
                    rsInterface.sprites              = new Sprite[20];
                    for (int j2 = 0; j2 < 20; j2++)
                    {
                        int k3 = stream.readUnsignedByte();
                        if (k3 == 1)
                        {
                            rsInterface.spritesX[j2] = stream.readSignedWord();
                            rsInterface.spritesY[j2] = stream.readSignedWord();
                            String s1 = stream.readString();
                            if (streamLoader_1 != null && s1.Length > 0)
                            {
                                int i5 = s1.LastIndexOf(",");
                                rsInterface.sprites[j2] = method207(int.Parse(s1.Substring(i5 + 1)), streamLoader_1, s1.Substring(0, i5));
                            }
                        }
                    }

                    rsInterface.actions = new String[5];
                    for (int l3 = 0; l3 < 5; l3++)
                    {
                        rsInterface.actions[l3] = stream.readString();
                        if (rsInterface.actions[l3].Length == 0)
                        {
                            rsInterface.actions[l3] = null;
                        }
                    }
                }
                if (rsInterface.type == 3)
                {
                    rsInterface.aBoolean227 = stream.readUnsignedByte() == 1;
                }
                if (rsInterface.type == 4 || rsInterface.type == 1)
                {
                    rsInterface.aBoolean223 = stream.readUnsignedByte() == 1;
                    int k2 = stream.readUnsignedByte();
                    if (textDrawingAreas != null)
                    {
                        rsInterface.textDrawingAreas = textDrawingAreas[k2];
                    }
                    rsInterface.aBoolean268 = stream.readUnsignedByte() == 1;
                }
                if (rsInterface.type == 4)
                {
                    rsInterface.message    = stream.readString();
                    rsInterface.aString228 = stream.readString();
                }
                if (rsInterface.type == 1 || rsInterface.type == 3 || rsInterface.type == 4)
                {
                    rsInterface.textColor = stream.readDWord();
                }
                if (rsInterface.type == 3 || rsInterface.type == 4)
                {
                    rsInterface.anInt219 = stream.readDWord();
                    rsInterface.anInt216 = stream.readDWord();
                    rsInterface.anInt239 = stream.readDWord();
                }
                if (rsInterface.type == 5)
                {
                    String s = stream.readString();
                    if (streamLoader_1 != null && s.Length > 0)
                    {
                        int i4 = s.LastIndexOf(",");
                        rsInterface.sprite1 = method207(int.Parse(s.Substring(i4 + 1)), streamLoader_1, s.Substring(0, i4));
                    }
                    s = stream.readString();
                    if (streamLoader_1 != null && s.Length > 0)
                    {
                        int j4 = s.LastIndexOf(",");
                        rsInterface.sprite2 = method207(int.Parse(s.Substring(j4 + 1)), streamLoader_1, s.Substring(0, j4));
                    }
                }
                if (rsInterface.type == 6)
                {
                    int l = stream.readUnsignedByte();
                    if (l != 0)
                    {
                        rsInterface.anInt233 = 1;
                        rsInterface.mediaID  = (l - 1 << 8) + stream.readUnsignedByte();
                    }
                    l = stream.readUnsignedByte();
                    if (l != 0)
                    {
                        rsInterface.anInt255 = 1;
                        rsInterface.anInt256 = (l - 1 << 8) + stream.readUnsignedByte();
                    }
                    l = stream.readUnsignedByte();
                    if (l != 0)
                    {
                        rsInterface.anInt257 = (l - 1 << 8) + stream.readUnsignedByte();
                    }
                    else
                    {
                        rsInterface.anInt257 = -1;
                    }
                    l = stream.readUnsignedByte();
                    if (l != 0)
                    {
                        rsInterface.anInt258 = (l - 1 << 8) + stream.readUnsignedByte();
                    }
                    else
                    {
                        rsInterface.anInt258 = -1;
                    }
                    rsInterface.anInt269 = stream.readUnsignedWord();
                    rsInterface.anInt270 = stream.readUnsignedWord();
                    rsInterface.anInt271 = stream.readUnsignedWord();
                }
                if (rsInterface.type == 7)
                {
                    rsInterface.inv           = new int[rsInterface.width * rsInterface.height];
                    rsInterface.invStackSizes = new int[rsInterface.width * rsInterface.height];
                    rsInterface.aBoolean223   = stream.readUnsignedByte() == 1;
                    int l2 = stream.readUnsignedByte();
                    if (textDrawingAreas != null)
                    {
                        rsInterface.textDrawingAreas = textDrawingAreas[l2];
                    }
                    rsInterface.aBoolean268          = stream.readUnsignedByte() == 1;
                    rsInterface.textColor            = stream.readDWord();
                    rsInterface.invSpritePadX        = stream.readSignedWord();
                    rsInterface.invSpritePadY        = stream.readSignedWord();
                    rsInterface.isInventoryInterface = stream.readUnsignedByte() == 1;
                    rsInterface.actions = new String[5];
                    for (int k4 = 0; k4 < 5; k4++)
                    {
                        rsInterface.actions[k4] = stream.readString();
                        if (rsInterface.actions[k4].Length == 0)
                        {
                            rsInterface.actions[k4] = null;
                        }
                    }
                }
                if (rsInterface.atActionType == 2 || rsInterface.type == 2)
                {
                    rsInterface.selectedActionName = stream.readString();
                    rsInterface.spellName          = stream.readString();
                    rsInterface.spellUsableOn      = stream.readUnsignedWord();
                }

                if (rsInterface.type == 8)
                {
                    rsInterface.message = stream.readString();
                }

                if (rsInterface.atActionType == 1 || rsInterface.atActionType == 4 || rsInterface.atActionType == 5 || rsInterface.atActionType == 6)
                {
                    rsInterface.tooltip = stream.readString();
                    if (rsInterface.tooltip.Length == 0)
                    {
                        if (rsInterface.atActionType == 1)
                        {
                            rsInterface.tooltip = "Ok";
                        }
                        if (rsInterface.atActionType == 4)
                        {
                            rsInterface.tooltip = "Select";
                        }
                        if (rsInterface.atActionType == 5)
                        {
                            rsInterface.tooltip = "Select";
                        }
                        if (rsInterface.atActionType == 6)
                        {
                            rsInterface.tooltip = "Continue";
                        }
                    }
                }

                //aryan	Bot.notifyInterface(rsInterface);
            }
            interfaceCache[11877] = null;
            interfaceCache[426]   = null;
            interfaceCache[370]   = null;
            interfaceCache[481]   = null;
            interfaceCache[482]   = null;
            aMRUNodes_238         = null;
        }
Beispiel #14
0
        public TextDrawingArea(bool flag, String s, StreamLoader streamLoader)
        {
            aByteArrayArray1491 = new byte[256][];
            anIntArray1492      = new int[256];
            anIntArray1493      = new int[256];
            anIntArray1494      = new int[256];
            anIntArray1495      = new int[256];
            anIntArray1496      = new int[256];
            aRandom1498         = new System.Random();
            aBoolean1499        = false;
            Stream stream   = new Stream(streamLoader.getDataForName(s + ".dat"));
            Stream stream_1 = new Stream(streamLoader.getDataForName("index.dat"));

            stream_1.currentOffset = stream.readUnsignedWord() + 4;
            int k = stream_1.readUnsignedByte();

            if (k > 0)
            {
                stream_1.currentOffset += 3 * (k - 1);
            }
            for (int l = 0; l < 256; l++)
            {
                anIntArray1494[l] = stream_1.readUnsignedByte();
                anIntArray1495[l] = stream_1.readUnsignedByte();
                int i1 = anIntArray1492[l] = stream_1.readUnsignedWord();
                int j1 = anIntArray1493[l] = stream_1.readUnsignedWord();
                int k1 = stream_1.readUnsignedByte();
                int l1 = i1 * j1;
                aByteArrayArray1491[l] = new byte[l1];
                if (k1 == 0)
                {
                    for (int i2 = 0; i2 < l1; i2++)
                    {
                        aByteArrayArray1491[l][i2] = (byte)stream.readSignedByte();
                    }
                }
                else
                if (k1 == 1)
                {
                    for (int j2 = 0; j2 < i1; j2++)
                    {
                        for (int l2 = 0; l2 < j1; l2++)
                        {
                            aByteArrayArray1491[l][j2 + l2 * i1] = (byte)stream.readSignedByte();
                        }
                    }
                }
                if (j1 > anInt1497 && l < 128)
                {
                    anInt1497 = j1;
                }
                anIntArray1494[l] = 1;
                anIntArray1496[l] = i1 + 2;
                int k2 = 0;
                for (int i3 = j1 / 7; i3 < j1; i3++)
                {
                    k2 += aByteArrayArray1491[l][i3 * i1];
                }

                if (k2 <= j1 / 7)
                {
                    anIntArray1496[l]--;
                    anIntArray1494[l] = 0;
                }
                k2 = 0;
                for (int j3 = j1 / 7; j3 < j1; j3++)
                {
                    k2 += aByteArrayArray1491[l][(i1 - 1) + j3 * i1];
                }

                if (k2 <= j1 / 7)
                {
                    anIntArray1496[l]--;
                }
            }

            if (flag)
            {
                anIntArray1496[32] = anIntArray1496[73];
            }
            else
            {
                anIntArray1496[32] = anIntArray1496[105];
            }
        }