コード例 #1
0
ファイル: OnDemandFetcher.cs プロジェクト: lackey94/rsunity-1
        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);
        }
コード例 #2
0
        public void method169(Stream stream)
        {
            aClass29_98 = new Class29();
            aClass29_98.method325(stream);
            aClass29_99 = new Class29();
            aClass29_99.method325(stream);
            int i = stream.readUnsignedByte();

            if (i != 0)
            {
                stream.currentOffset--;
                aClass29_100 = new Class29();
                aClass29_100.method325(stream);
                aClass29_101 = new Class29();
                aClass29_101.method325(stream);
            }
            i = stream.readUnsignedByte();
            if (i != 0)
            {
                stream.currentOffset--;
                aClass29_102 = new Class29();
                aClass29_102.method325(stream);
                aClass29_103 = new Class29();
                aClass29_103.method325(stream);
            }
            i = stream.readUnsignedByte();
            if (i != 0)
            {
                stream.currentOffset--;
                aClass29_104 = new Class29();
                aClass29_104.method325(stream);
                aClass29_105 = new Class29();
                aClass29_105.method325(stream);
            }
            for (int j = 0; j < 10; j++)
            {
                int k = stream.method422();
                if (k == 0)
                {
                    break;
                }
                anIntArray106[j] = k;
                anIntArray107[j] = stream.method421();
                anIntArray108[j] = stream.method422();
            }

            anInt109     = stream.method422();
            anInt110     = stream.method422();
            anInt113     = stream.readUnsignedWord();
            anInt114     = stream.readUnsignedWord();
            aClass39_111 = new Class39();
            aClass29_112 = new Class29();
            aClass39_111.method545(stream, aClass29_112);
        }
コード例 #3
0
 public void method326(Stream stream)
 {
     anInt535      = stream.readUnsignedByte();
     anIntArray536 = new int[anInt535];
     anIntArray537 = new int[anInt535];
     for (int i = 0; i < anInt535; i++)
     {
         anIntArray536[i] = stream.readUnsignedWord();
         anIntArray537[i] = stream.readUnsignedWord();
     }
 }
コード例 #4
0
 private void method242(Stream stream)
 {
     for (int i = 0; i < 10; i++)
     {
         int j = stream.readUnsignedByte();
         if (j != 0)
         {
             stream.currentOffset--;
             aClass6Array329[i] = new Class6();
             aClass6Array329[i].method169(stream);
         }
     }
     anInt330 = stream.readUnsignedWord();
     anInt331 = stream.readUnsignedWord();
 }
コード例 #5
0
ファイル: VarBit.cs プロジェクト: lackey94/rsunity-1
        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");
            }
        }
コード例 #6
0
ファイル: Animation.cs プロジェクト: lackey94/rsunity-1
        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);
                }
            }
        }
コード例 #7
0
ファイル: Varp.cs プロジェクト: lackey94/rsunity-1
        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");
            }
        }
コード例 #8
0
ファイル: Censor.cs プロジェクト: lackey94/rsunity-1
 private static void readFragmentsEnc(Stream stream)
 {
     anIntArray620 = new int[stream.readDWord()];
     for (int i = 0; i < anIntArray620.Length; i++)
     {
         anIntArray620[i] = stream.readUnsignedWord();
     }
 }
コード例 #9
0
ファイル: IDK.cs プロジェクト: lackey94/rsunity-1
 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
         {
             Debug.Log("Error unrecognised config code: " + i);
         }
     } while (true);
 }
コード例 #10
0
ファイル: Sprite.cs プロジェクト: lackey94/rsunity-1
        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()];
                    }
                }
            }
        }
コード例 #11
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();
            }
        }
コード例 #12
0
ファイル: ObjectDef.cs プロジェクト: lackey94/rsunity-1
        public static void unpackConfig(StreamLoader streamLoader)
        {
            buffer = new Stream(UnityClient.ReadAllBytes(sign.signlink.osHDDir + "loc.dat"));              //streamLoader.getDataForName("loc.dat"));
            Stream buffer2      = new Stream(UnityClient.ReadAllBytes(sign.signlink.osHDDir + "loc.idx")); //streamLoader.getDataForName("loc.idx"));
            int    totalObjects = buffer2.readUnsignedWord();

            Debug.Log("OS Object Amount: " + totalObjects);
            streamIndices = new int[totalObjects + 40000];
            int i = 2;

            for (int j = 0; j < totalObjects; j++)
            {
                streamIndices[j] = i;
                i += buffer2.readUnsignedWord();
            }
            cache = new ObjectDef[20];
            for (int k = 0; k < 20; k++)
            {
                cache[k] = new ObjectDef();
            }
        }
コード例 #13
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();
            }
        }
コード例 #14
0
ファイル: Background.cs プロジェクト: lackey94/rsunity-1
        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();
                    }
                }
            }
        }
コード例 #15
0
        public Class18(Stream stream, int junk)
        {
//			int anInt341 = stream.readUnsignedByte();
//			opcode = new int[anInt341];
//			skinlist = new int[anInt341][];
//			for (int j = 0; j < anInt341; j++)
//				opcode[j] = stream.readUnsignedByte();
//
//			for (int k = 0; k < anInt341; k++)
//			{
//				int l = stream.readUnsignedByte();
//				skinlist[k] = new int[l];
//				for (int i1 = 0; i1 < l; i1++)
//					skinlist[k][i1] = stream.readUnsignedByte();
//
//			}
            int anInt341 = stream.readUnsignedWord();

            opcode   = new int[anInt341];
            skinlist = new int[anInt341][];
            for (int j = 0; j < anInt341; j++)
            {
                opcode[j] = stream.readUnsignedWord();
            }

            for (int j = 0; j < anInt341; j++)
            {
                skinlist[j] = new int[stream.readUnsignedWord()];
            }

            for (int j = 0; j < anInt341; j++)
            {
                for (int l = 0; l < skinlist[j].Length; l++)
                {
                    skinlist[j][l] = stream.readUnsignedWord();
                }
            }
        }
コード例 #16
0
 public static void unpack(Stream stream)
 {
     aByteArray327 = new byte[0x6baa8];
     aStream_328   = new Stream(aByteArray327);
     Class6.method166();
     do
     {
         int j = stream.readUnsignedWord();
         if (j == 65535)
         {
             return;
         }
         aSoundsArray325s[j] = new Sounds();
         aSoundsArray325s[j].method242(stream);
         anIntArray326[j] = aSoundsArray325s[j].method243();
     } while (true);
 }
コード例 #17
0
ファイル: Flo.cs プロジェクト: lackey94/rsunity-1
        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);
            }
        }
コード例 #18
0
ファイル: IDK.cs プロジェクト: lackey94/rsunity-1
//		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);
            }
        }
コード例 #19
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);
            }
        }
コード例 #20
0
ファイル: VarBit.cs プロジェクト: lackey94/rsunity-1
 private void readValues(Stream stream)
 {
     do
     {
         int j = stream.readUnsignedByte();
         if (j == 0)
         {
             return;
         }
         if (j == 1)
         {
             anInt648 = stream.readUnsignedWord();
             anInt649 = stream.readUnsignedByte();
             anInt650 = stream.readUnsignedByte();
         }
         else
         if (j == 10)
         {
             stream.readString();
         }
         else
         if (j == 2)
         {
             aBoolean651 = true;
         }
         else
         if (j == 3)
         {
             stream.readDWord();
         }
         else
         if (j == 4)
         {
             stream.readDWord();
         }
         else
         {
             UnityEngine.Debug.Log("Error unrecognised config code: " + j);
         }
     } while (true);
 }
コード例 #21
0
ファイル: Class39.cs プロジェクト: lackey94/rsunity-1
        public void method545(Stream stream, Class29 class29)
        {
            int i = stream.readUnsignedByte();

            anIntArray665[0] = i >> 4;
            anIntArray665[1] = i & 0xf;
            if (i != 0)
            {
                anIntArray668[0] = stream.readUnsignedWord();
                anIntArray668[1] = stream.readUnsignedWord();
                int j = stream.readUnsignedByte();
                for (int k = 0; k < 2; k++)
                {
                    for (int l = 0; l < anIntArray665[k]; l++)
                    {
                        anIntArrayArrayArray666[k, 0, l] = stream.readUnsignedWord();
                        anIntArrayArrayArray667[k, 0, l] = stream.readUnsignedWord();
                    }
                }

                for (int i1 = 0; i1 < 2; i1++)
                {
                    for (int j1 = 0; j1 < anIntArray665[i1]; j1++)
                    {
                        if ((j & 1 << i1 * 4 << j1) != 0)
                        {
                            anIntArrayArrayArray666[i1, 1, j1] = stream.readUnsignedWord();
                            anIntArrayArrayArray667[i1, 1, j1] = stream.readUnsignedWord();
                        }
                        else
                        {
                            anIntArrayArrayArray666[i1, 1, j1] = anIntArrayArrayArray666[i1, 0, j1];
                            anIntArrayArrayArray667[i1, 1, j1] = anIntArrayArrayArray667[i1, 0, j1];
                        }
                    }
                }

                if (j != 0 || anIntArray668[1] != anIntArray668[0])
                {
                    class29.method326(stream);
                }
            }
            else
            {
                anIntArray668[0] = anIntArray668[1] = 0;
            }
        }
コード例 #22
0
ファイル: RSInterface.cs プロジェクト: lackey94/rsunity-1
        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;
        }
コード例 #23
0
ファイル: ObjectDef.cs プロジェクト: lackey94/rsunity-1
        private void readValues(Stream buffer)
        {
            int i = -1;

            do
            {
                int opcode;
                //do {
                opcode = buffer.readUnsignedByte();
                if (opcode == 0)
                {
                    goto breaklabel0;
                }
                if (opcode == 1)
                {
                    int k = buffer.readUnsignedByte();
                    if (k > 0)
                    {
                        if (anIntArray773 == null || lowMem)
                        {
                            anIntArray776 = new int[k];
                            anIntArray773 = new int[k];
                            for (int k1 = 0; k1 < k; k1++)
                            {
                                anIntArray773[k1] = buffer.readUnsignedWord();
                                anIntArray776[k1] = buffer.readUnsignedByte();
                            }
                        }
                        else
                        {
                            buffer.currentOffset += k * 3;
                        }
                    }
                }
                else if (opcode == 2)
                {
                    name = buffer.readNewString();
                }
                else if (opcode == 3)
                {
                    description = buffer.readBytes();
                }
                else if (opcode == 5)
                {
                    int l = buffer.readUnsignedByte();
                    if (l > 0)
                    {
                        if (anIntArray773 == null || lowMem)
                        {
                            anIntArray776 = null;
                            anIntArray773 = new int[l];
                            for (int l1 = 0; l1 < l; l1++)
                            {
                                anIntArray773[l1] = buffer.readUnsignedWord();
                            }
                        }
                        else
                        {
                            buffer.currentOffset += l * 2;
                        }
                    }
                }
                else if (opcode == 14)
                {
                    anInt744 = buffer.readUnsignedByte();
                }
                else if (opcode == 15)
                {
                    anInt761 = buffer.readUnsignedByte();
                }
                else if (opcode == 17)
                {
                    aBoolean767 = false;
                }
                else if (opcode == 18)
                {
                    aBoolean757 = false;
                }
                else if (opcode == 19)
                {
                    hasActions = (buffer.readUnsignedByte() == 1);
                    //i = buffer.readUnsignedByte();
                    //if (i == 1)
                    //	hasActions = true;
                }
                else if (opcode == 21)
                {
                    aBoolean762 = true;
                }
                else if (opcode == 22)
                {
                    aBoolean769 = false;                            //
                }
                else if (opcode == 23)
                {
                    aBoolean764 = true;
                }
                else if (opcode == 24)
                {
                    animId = buffer.readUnsignedWord();
                    if (animId == 65535)
                    {
                        animId = -1;
                    }
                }
                else if (opcode == 28)
                {
                    anInt775 = buffer.readUnsignedByte();
                }
                else if (opcode == 29)
                {
                    aByte737 = (byte)buffer.readSignedByte();
                }
                else if (opcode == 39)
                {
                    aByte742 = (byte)buffer.readSignedByte();
                }
                else if (opcode >= 30 && opcode < 39)
                {
                    if (actions == null)
                    {
                        actions = new String[10];
                    }
                    actions[opcode - 30] = buffer.readNewString();
                    if (actions[opcode - 30].ToLower().Equals("hidden"))
                    {
                        actions[opcode - 30] = null;
                    }
                }
                else if (opcode == 40)
                {
                    int i1 = buffer.readUnsignedByte();
                    modifiedModelColors = new int[i1];
                    originalModelColors = new int[i1];
                    for (int i2 = 0; i2 < i1; i2++)
                    {
                        modifiedModelColors[i2] = buffer.readUnsignedWord();
                        originalModelColors[i2] = buffer.readUnsignedWord();
                    }
                }
                else if (opcode == 41)
                {
                    int k = buffer.readUnsignedByte();
                    //retextureSrc = new int[k];
                    //retextureDst = new int[k];
                    for (int k1 = 0; k1 < k; k1++)
                    {
                        /*retextureSrc[k1] = */ buffer.readUnsignedWord();
                        /*retextureDst[k1] = */ buffer.readUnsignedWord();
                    }
                }

                else if (opcode == 60)
                {
                    anInt746 = buffer.readUnsignedWord();
                }
                else if (opcode == 62)
                {
                    aBoolean751 = true;
                }
                else if (opcode == 64)
                {
                    aBoolean779 = false;
                }
                else if (opcode == 65)
                {
                    anInt748 = buffer.readUnsignedWord();
                }
                else if (opcode == 66)
                {
                    anInt772 = buffer.readUnsignedWord();
                }
                else if (opcode == 67)
                {
                    anInt740 = buffer.readUnsignedWord();
                }
                else if (opcode == 68)
                {
                    anInt758 = buffer.readUnsignedWord();
                }
                else if (opcode == 69)
                {
                    anInt768 = buffer.readUnsignedByte();
                }
                else if (opcode == 70)
                {
                    anInt738 = buffer.readSignedWord();
                }
                else if (opcode == 71)
                {
                    anInt745 = buffer.readSignedWord();
                }
                else if (opcode == 72)
                {
                    anInt783 = buffer.readSignedWord();
                }
                else if (opcode == 73)
                {
                    aBoolean736 = true;
                }
                else if (opcode == 74)
                {
                    aBoolean766 = true;
                }
                else if (opcode == 75)
                {
                    anInt760 = buffer.readUnsignedByte();
                }
                else if (opcode == 77)
                {
                    anInt774 = buffer.readUnsignedWord();
                    if (anInt774 == 65535)
                    {
                        anInt774 = -1;
                    }
                    anInt749 = buffer.readUnsignedWord();
                    if (anInt749 == 65535)
                    {
                        anInt749 = -1;
                    }
                    int j1 = buffer.readUnsignedByte();
                    childrenIDs = new int[j1 + 1];
                    for (int j2 = 0; j2 <= j1; j2++)
                    {
                        childrenIDs[j2] = buffer.readUnsignedWord();
                        if (childrenIDs[j2] == 65535)
                        {
                            childrenIDs[j2] = -1;
                        }
                    }
                }
                else if (78 == opcode)
                {
                    /*audioType = */ buffer.readUnsignedWord();
                    /*anInt7406 = */ buffer.readUnsignedByte();
                }
                else if (opcode == 79)
                {
                    /*anInt7409 = */ buffer.readUnsignedWord();
                    /*anInt7410 = */ buffer.readUnsignedWord();
                    /*anInt7406 = */ buffer.readUnsignedByte();
                    int i_36_ = buffer.readUnsignedByte();
                    //audioTracks = new int[i_36_];
                    for (int i_37_ = 0; i_37_ < i_36_; i_37_++)
                    {
                        /*audioTracks[i_37_] = */ buffer.readUnsignedWord();
                    }
                }
                else if (81 == opcode)
                {
                    //aByte7368 = (byte) 2;
                    /*anInt7369 = */ buffer.readUnsignedByte();
                }
//					} else {
//						if (opcode != 75)
//							continue;
//						anInt760 = buffer.readUnsignedByte();
//					}
//					continue;
                //} while (true);
//				anInt774 = buffer.readUnsignedWord();
//				if (anInt774 == 65535)
//					anInt774 = -1;
//				anInt749 = buffer.readUnsignedWord();
//				if (anInt749 == 65535)
//					anInt749 = -1;
//				int j1 = buffer.readUnsignedByte();
//				childrenIDs = new int[j1 + 1];
//				for (int j2 = 0; j2 <= j1; j2++) {
//					childrenIDs[j2] = buffer.readUnsignedWord();
//					if (childrenIDs[j2] == 65535)
//						childrenIDs[j2] = -1;
//				}
            } while (true);
breaklabel0:
            if (i == -1)
            {
                hasActions = anIntArray773 != null && (anIntArray776 == null || anIntArray776[0] == 10);
                if (actions != null)
                {
                    hasActions = true;
                }
            }
            if (aBoolean766)
            {
                aBoolean767 = false;
                aBoolean757 = false;
            }
            if (anInt760 == -1)
            {
                anInt760 = aBoolean767 ? 1 : 0;
            }
        }
コード例 #24
0
ファイル: Animation.cs プロジェクト: lackey94/rsunity-1
 public void readValues(Stream stream)
 {
     do
     {
         int i = stream.readUnsignedByte();
         if (i == 0)
         {
             break;
         }
         if (i == 1)
         {
             frameCount    = stream.readUnsignedWord();
             anIntArray353 = new int[frameCount];
             anIntArray354 = new int[frameCount];
             anIntArray355 = new int[frameCount];
             for (int i_ = 0; i_ < frameCount; i_++)
             {
                 anIntArray353[i_] = stream.readDWord();
                 anIntArray354[i_] = -1;
             }
             for (int i_ = 0; i_ < frameCount; i_++)
             {
                 anIntArray355[i_] = stream.readUnsignedByte();
             }
         }
         else if (i == 2)
         {
             anInt356 = stream.readUnsignedWord();
         }
         else if (i == 3)
         {
             int k = stream.readUnsignedByte();
             anIntArray357 = new int[k + 1];
             for (int l = 0; l < k; l++)
             {
                 anIntArray357[l] = stream.readUnsignedByte();
             }
             anIntArray357[k] = 0x98967f;
         }
         else if (i == 4)
         {
             aBoolean358 = true;
         }
         else if (i == 5)
         {
             anInt359 = stream.readUnsignedByte();
         }
         else if (i == 6)
         {
             anInt360 = stream.readUnsignedWord();
         }
         else if (i == 7)
         {
             anInt361 = stream.readUnsignedWord();
         }
         else if (i == 8)
         {
             anInt362 = stream.readUnsignedByte();
         }
         else if (i == 9)
         {
             anInt363 = stream.readUnsignedByte();
         }
         else if (i == 10)
         {
             anInt364 = stream.readUnsignedByte();
         }
         else if (i == 11)
         {
             anInt365 = stream.readUnsignedByte();
         }
         else
         {
             Debug.Log("Unrecognized seq.dat config code: " + i);
         }
     } while(true);
     if (frameCount == 0)
     {
         frameCount       = 1;
         anIntArray353    = new int[1];
         anIntArray353[0] = -1;
         anIntArray354    = new int[1];
         anIntArray354[0] = -1;
         anIntArray355    = new int[1];
         anIntArray355[0] = -1;
     }
     if (anInt363 == -1)
     {
         if (anIntArray357 != null)
         {
             anInt363 = 2;
         }
         else
         {
             anInt363 = 0;
         }
     }
     if (anInt364 == -1)
     {
         if (anIntArray357 != null)
         {
             anInt364 = 2;
             return;
         }
         anInt364 = 0;
     }
 }
コード例 #25
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];
            }
        }
コード例 #26
0
        public void readValues(Stream stream)
        {
            do
            {
                int i = stream.readUnsignedByte();
                if (i == 0)
                {
                    return;
                }
                if (i == 1)
                {
                    int j = stream.readUnsignedByte();
                    models = new int[j];
                    for (int j1 = 0; j1 < j; j1++)
                    {
                        models[j1] = stream.readUnsignedWord();
                    }
                }
                else if (i == 2)
                {
                    name = stream.readString().Replace("_", " ");
                }
                else if (i == 3)
                {
                    description = stream.readBytes();
                }
                else if (i == 12)
                {
                    aByte68 = (byte)stream.readSignedByte();
                }
                else if (i == 13)
                {
                    standAnim = stream.readUnsignedWord();
                }
                else if (i == 14)
                {
                    walkAnim = stream.readUnsignedWord();
                }
                else if (i == 17)
                {
                    walkAnim = stream.readUnsignedWord();
                    anInt58  = stream.readUnsignedWord();
                    anInt83  = stream.readUnsignedWord();
                    anInt55  = stream.readUnsignedWord();
                    if (walkAnim == 65535)
                    {
                        walkAnim = -1;
                    }
                    if (anInt58 == 65535)
                    {
                        anInt58 = -1;
                    }
                    if (anInt83 == 65535)
                    {
                        anInt83 = -1;
                    }
                    if (anInt55 == 65535)
                    {
                        anInt55 = -1;
                    }
                }
                else if (i >= 30 && i < 40)
                {
                    if (actions == null)
                    {
                        actions = new String[5];
                    }
                    actions[i - 30] = stream.readString();
                    if (actions[i - 30].ToLower().Equals("hidden"))
                    {
                        actions[i - 30] = null;
                    }
                }
                else if (i == 40)
                {
                    int k = stream.readUnsignedByte();
                    originalModelColors = new int[k];
                    modifiedModelColors = new int[k];

                    for (int k1 = 0; k1 < k; k1++)
                    {
                        originalModelColors[k1] = stream.readUnsignedWord();
                        modifiedModelColors[k1] = stream.readUnsignedWord();
                    }
                }
                else if (i == 60)
                {
                    int l = stream.readUnsignedByte();
                    anIntArray73 = new int[l];
                    for (int l1 = 0; l1 < l; l1++)
                    {
                        anIntArray73[l1] = stream.readUnsignedWord();
                    }
                }
                else if (i == 90)
                {
                    stream.readUnsignedWord();
                }
                else if (i == 91)
                {
                    stream.readUnsignedWord();
                }
                else if (i == 92)
                {
                    stream.readUnsignedWord();
                }
                else if (i == 93)
                {
                    aBoolean87 = false;
                }
                else if (i == 95)
                {
                    combatLevel = stream.readUnsignedWord();
                }
                else if (i == 97)
                {
                    anInt91 = stream.readUnsignedWord();
                }
                else if (i == 98)
                {
                    anInt86 = stream.readUnsignedWord();
                }
                else if (i == 99)
                {
                    aBoolean93 = true;
                }
                else if (i == 100)
                {
                    anInt85 = stream.readSignedByte();
                }
                else if (i == 101)
                {
                    anInt92 = stream.readSignedByte() * 5;
                }
                else if (i == 102)
                {
                    anInt75 = stream.readUnsignedWord();
                }
                else if (i == 103)
                {
                    anInt79 = stream.readUnsignedWord();
                }
                else if (i == 106)
                {
                    anInt57 = stream.readUnsignedWord();
                    if (anInt57 == 65535)
                    {
                        anInt57 = -1;
                    }
                    anInt59 = stream.readUnsignedWord();
                    if (anInt59 == 65535)
                    {
                        anInt59 = -1;
                    }
                    int i1 = stream.readUnsignedByte();
                    childrenIDs = new int[i1 + 1];
                    for (int i2 = 0; i2 <= i1; i2++)
                    {
                        childrenIDs[i2] = stream.readUnsignedWord();
                        if (childrenIDs[i2] == 65535)
                        {
                            childrenIDs[i2] = -1;
                        }
                    }
                }
                else if (i == 107)
                {
                    aBoolean84 = false;
                }
            } while (true);
        }
コード例 #27
0
 private void readValues(Stream stream)
 {
     do
     {
         int i = stream.readUnsignedByte();
         if (i == 0)
         {
             return;
         }
         if (i == 1)
         {
             modelID = stream.readUnsignedWord();
         }
         else
         if (i == 2)
         {
             name = stream.readString();
         }
         else
         if (i == 3)
         {
             description = stream.readString();
         }
         else
         if (i == 4)
         {
             modelZoom = stream.readUnsignedWord();
         }
         else
         if (i == 5)
         {
             modelRotation1 = stream.readUnsignedWord();
         }
         else
         if (i == 6)
         {
             modelRotation2 = stream.readUnsignedWord();
         }
         else
         if (i == 7)
         {
             modelOffset1 = stream.readUnsignedWord();
             if (modelOffset1 > 32767)
             {
                 modelOffset1 -= 0x10000;
             }
         }
         else
         if (i == 8)
         {
             modelOffset2 = stream.readUnsignedWord();
             if (modelOffset2 > 32767)
             {
                 modelOffset2 -= 0x10000;
             }
         }
         else
         if (i == 10)
         {
             stream.readUnsignedWord();
         }
         else
         if (i == 11)
         {
             stackable = true;
         }
         else
         if (i == 12)
         {
             value = stream.readDWord();
         }
         else
         if (i == 16)
         {
             membersObject = true;
         }
         else if (i == 23)
         {
             maleEquip1 = stream.readUnsignedWord();
             aByte205   = (byte)stream.readSignedByte();
         }
         else if (i == 24)
         {
             maleEquip2 = stream.readUnsignedWord();
         }
         else if (i == 25)
         {
             femaleEquip1 = stream.readUnsignedWord();
             aByte154     = (byte)stream.readSignedByte();
         }
         else if (i == 26)
         {
             femaleEquip2 = stream.readUnsignedWord();
         }
         else
         if (i >= 30 && i < 35)
         {
             if (groundActions == null)
             {
                 groundActions = new String[5];
             }
             groundActions[i - 30] = stream.readString();
             if (groundActions[i - 30].ToLower().Equals("hidden"))
             {
                 groundActions[i - 30] = null;
             }
         }
         else
         if (i >= 35 && i < 40)
         {
             if (actions == null)
             {
                 actions = new String[5];
             }
             actions[i - 35] = stream.readString();
         }
         else if (i == 40)
         {
             int j = stream.readUnsignedByte();
             editedModelColor = new int[j];
             newModelColor    = new int[j];
             for (int k = 0; k < j; k++)
             {
                 editedModelColor[k] = stream.readUnsignedWord();
                 newModelColor[k]    = stream.readUnsignedWord();
             }
         }
         else
         if (i == 78)
         {
             anInt185 = stream.readUnsignedWord();
         }
         else
         if (i == 79)
         {
             anInt162 = stream.readUnsignedWord();
         }
         else
         if (i == 90)
         {
             anInt175 = stream.readUnsignedWord();
         }
         else
         if (i == 91)
         {
             anInt197 = stream.readUnsignedWord();
         }
         else
         if (i == 92)
         {
             anInt166 = stream.readUnsignedWord();
         }
         else
         if (i == 93)
         {
             anInt173 = stream.readUnsignedWord();
         }
         else
         if (i == 95)
         {
             anInt204 = stream.readUnsignedWord();
         }
         else
         if (i == 97)
         {
             certID = stream.readUnsignedWord();
         }
         else
         if (i == 98)
         {
             certTemplateID = stream.readUnsignedWord();
         }
         else
         if (i >= 100 && i < 110)
         {
             if (stackIDs == null)
             {
                 stackIDs     = new int[10];
                 stackAmounts = new int[10];
             }
             stackIDs[i - 100]     = stream.readUnsignedWord();
             stackAmounts[i - 100] = stream.readUnsignedWord();
         }
         else
         if (i == 110)
         {
             anInt167 = stream.readUnsignedWord();
         }
         else
         if (i == 111)
         {
             anInt192 = stream.readUnsignedWord();
         }
         else
         if (i == 112)
         {
             anInt191 = stream.readUnsignedWord();
         }
         else
         if (i == 113)
         {
             anInt196 = stream.readSignedByte();
         }
         else
         if (i == 114)
         {
             anInt184 = stream.readSignedByte() * 5;
         }
         else
         if (i == 115)
         {
             team = stream.readUnsignedByte();
         }
         else
         if (i == 121)
         {
             lendID = stream.readUnsignedWord();
         }
         else
         if (i == 122)
         {
             lendTemplateID = stream.readUnsignedWord();
         }
     } while(true);
 }
コード例 #28
0
ファイル: Class36.cs プロジェクト: lackey94/rsunity-1
 public static void load(int file, byte[] fileData)
 {
     try {
         Stream  stream  = new Stream(fileData);
         Class18 class18 = new Class18(stream, 0);
         int     k1      = stream.readUnsignedWord();
         animationlist[file] = new Class36[(int)(k1 * 3.0)];
         int[] ai  = new int[500];
         int[] ai1 = new int[500];
         int[] ai2 = new int[500];
         int[] ai3 = new int[500];
         for (int l1 = 0; l1 < k1; l1++)
         {
             int     i2      = stream.readUnsignedWord();
             Class36 class36 = animationlist[file][i2] = new Class36();
             class36.aClass18_637 = class18;
             int j2 = stream.readUnsignedByte();
             int l2 = 0;
             int k2 = -1;
             for (int i3 = 0; i3 < j2; i3++)
             {
                 int j3 = stream.readUnsignedByte();
                 if (j3 > 0)
                 {
                     if (class18.opcode[i3] != 0)
                     {
                         for (int l3 = i3 - 1; l3 > k2; l3--)
                         {
                             if (class18.opcode[l3] != 0)
                             {
                                 continue;
                             }
                             ai[l2]  = l3;
                             ai1[l2] = 0;
                             ai2[l2] = 0;
                             ai3[l2] = 0;
                             l2++;
                             break;
                         }
                     }
                     ai[l2] = i3;
                     short c = 0;
                     if (class18.opcode[i3] == 3)
                     {
                         c = (short)128;
                     }
                     if ((j3 & 1) != 0)
                     {
                         ai1[l2] = (short)stream.readShort2();
                     }
                     else
                     {
                         ai1[l2] = c;
                     }
                     if ((j3 & 2) != 0)
                     {
                         ai2[l2] = stream.readShort2();
                     }
                     else
                     {
                         ai2[l2] = c;
                     }
                     if ((j3 & 4) != 0)
                     {
                         ai3[l2] = stream.readShort2();
                     }
                     else
                     {
                         ai3[l2] = c;
                     }
                     k2 = i3;
                     l2++;
                 }
             }
             class36.stepCounter     = l2;
             class36.opcodeLinkTable = new int[l2];
             class36.modifier1       = new int[l2];
             class36.modifier2       = new int[l2];
             class36.modifier3       = new int[l2];
             for (int k3 = 0; k3 < l2; k3++)
             {
                 class36.opcodeLinkTable[k3] = ai[k3];
                 class36.modifier1[k3]       = ai1[k3];
                 class36.modifier2[k3]       = ai2[k3];
                 class36.modifier3[k3]       = ai3[k3];
             }
         }
     }catch (Exception exception) { }
 }
コード例 #29
0
        private void readValues(Stream stream)
        {
            do
            {
                int i = stream.readUnsignedByte();
                if (i == 0)
                {
                    return;
                }
                if (i == 1)
                {
                    anInt405 = stream.readUnsignedWord();
                }
                else
                if (i == 2)
                {
                    anInt406 = stream.readUnsignedWord();
                    if (Animation.anims != null)
                    {
                        aAnimation_407 = Animation.anims[anInt406];
                    }
                }
                else
                if (i == 4)
                {
                    anInt410 = stream.readUnsignedWord();
                }
                else
                if (i == 5)
                {
                    anInt411 = stream.readUnsignedWord();
                }
                else
                if (i == 6)
                {
                    anInt412 = stream.readUnsignedWord();
                }
                else
                if (i == 7)
                {
                    anInt413 = stream.readUnsignedByte();
                }
                else
                if (i == 8)
                {
                    anInt414 = stream.readUnsignedByte();
                }
                else if (i == 40)
                {
                    int j = stream.readUnsignedByte();
                    for (int k = 0; k < j; k++)
                    {
                        anIntArray408[k] = stream.readUnsignedWord();
                        anIntArray409[k] = stream.readUnsignedWord();
                    }
                }
                else
                {
                    UnityEngine.Debug.Log("Error unrecognised spotanim config code: "
                                          + i);
                }
//										else
//											if (i >= 40 && i < 50)
//												anIntArray408[i - 40] = stream.readUnsignedWord();
//											else
//												if (i >= 50 && i < 60)
//													anIntArray409[i - 50] = stream.readUnsignedWord();
//												else
//													UnityEngine.Debug.Log("Error unrecognised spotanim config code: " + i);
            } while (true);
        }
コード例 #30
0
ファイル: Player.cs プロジェクト: lackey94/rsunity-1
        public void updatePlayer(Stream stream)
        {
            stream.currentOffset = 0;
            anInt1702            = stream.readUnsignedByte();
            headIcon             = stream.readUnsignedByte();
            skullIcon            = stream.readUnsignedByte();
            desc = null;
            team = 0;
            for (int j = 0; j < 12; j++)
            {
                int k = stream.readUnsignedByte();
                if (k == 0)
                {
                    equipment[j] = 0;
                    continue;
                }
                int i1 = stream.readUnsignedByte();
                equipment[j] = (k << 8) + i1;
                if (j == 0 && equipment[0] == 65535)
                {
                    desc = EntityDef.forID(stream.readUnsignedWord());
                    break;
                }
                if (equipment[j] >= 512 && equipment[j] - 512 < ItemDef.totalItems)
                {
                    int l1 = ItemDef.forID(equipment[j] - 512).team;
                    if (l1 != 0)
                    {
                        team = l1;
                    }
                }
            }

            for (int l = 0; l < 5; l++)
            {
                int j1 = stream.readUnsignedByte();
                if (j1 < 0 || j1 >= UnityClient.anIntArrayArray1003[l].Length)
                {
                    j1 = 0;
                }
                anIntArray1700[l] = j1;
            }

            base.anInt1511 = stream.readUnsignedWord();
            if (base.anInt1511 == 65535)
            {
                base.anInt1511 = -1;
            }
            base.anInt1512 = stream.readUnsignedWord();
            if (base.anInt1512 == 65535)
            {
                base.anInt1512 = -1;
            }
            base.anInt1554 = stream.readUnsignedWord();
            if (base.anInt1554 == 65535)
            {
                base.anInt1554 = -1;
            }
            base.anInt1555 = stream.readUnsignedWord();
            if (base.anInt1555 == 65535)
            {
                base.anInt1555 = -1;
            }
            base.anInt1556 = stream.readUnsignedWord();
            if (base.anInt1556 == 65535)
            {
                base.anInt1556 = -1;
            }
            base.anInt1557 = stream.readUnsignedWord();
            if (base.anInt1557 == 65535)
            {
                base.anInt1557 = -1;
            }
            base.anInt1505 = stream.readUnsignedWord();
            if (base.anInt1505 == 65535)
            {
                base.anInt1505 = -1;
            }
            name        = TextClass.fixName(TextClass.nameForLong(stream.readQWord()));
            combatLevel = stream.readUnsignedByte();
            skill       = stream.readUnsignedWord();
            visible     = true;
            aLong1718   = 0L;
            for (int k1 = 0; k1 < 12; k1++)
            {
                aLong1718 <<= 4;
                if (equipment[k1] >= 256)
                {
                    aLong1718 += equipment[k1] - 256;
                }
            }

            if (equipment[0] >= 256)
            {
                aLong1718 += equipment[0] - 256 >> 4;
            }
            if (equipment[1] >= 256)
            {
                aLong1718 += equipment[1] - 256 >> 8;
            }
            for (int i2 = 0; i2 < 5; i2++)
            {
                aLong1718 <<= 3;
                aLong1718  += anIntArray1700[i2];
            }

            aLong1718 <<= 1;
            aLong1718  += anInt1702;
        }