コード例 #1
0
ファイル: Flo.cs プロジェクト: lackey94/rsunity-1
 private void readValues(Stream stream)
 {
     do
     {
         int  i = stream.readUnsignedByte();
         bool dummy;
         if (i == 0)
         {
             return;
         }
         else if (i == 1)
         {
             rgb = stream.read3Bytes();
             method262(rgb);
         }
         else if (i == 2)
         {
             anInt391 = stream.readUnsignedByte();
         }
         else if (i == 3)
         {
             dummy = true;
         }
         else if (i == 5)
         {
             aBoolean393 = false;
         }
         else if (i == 6)
         {
             stream.readString();
         }
         else if (i == 7)
         {
             int j  = anInt394;
             int k  = anInt395;
             int l  = anInt396;
             int i1 = anInt397;
             int j1 = stream.read3Bytes();
             method262(j1);
             anInt394 = j;
             anInt395 = k;
             anInt396 = l;
             anInt397 = i1;
             anInt398 = i1;
         }
         else
         {
             Debug.Log("Error unrecognised config code: " + i);
         }
     } while (true);
 }
コード例 #2
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);
 }
コード例 #3
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;
        }
コード例 #4
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);
        }
コード例 #5
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);
 }
コード例 #6
0
ファイル: Varp.cs プロジェクト: lackey94/rsunity-1
 private void readValues(Stream stream, int i)
 {
     do
     {
         int j = stream.readUnsignedByte();
         if (j == 0)
         {
             return;
         }
         int dummy;
         if (j == 1)
         {
             stream.readUnsignedByte();
         }
         else
         if (j == 2)
         {
             stream.readUnsignedByte();
         }
         else
         if (j == 3)
         {
             anIntArray703[anInt702++] = i;
         }
         else
         if (j == 4)
         {
             dummy = 2;
         }
         else
         if (j == 5)
         {
             anInt709 = stream.readUnsignedWord();
         }
         else
         if (j == 6)
         {
             dummy = 2;
         }
         else
         if (j == 7)
         {
             stream.readDWord();
         }
         else
         if (j == 8)
         {
             aBoolean713 = true;
         }
         else
         if (j == 10)
         {
             stream.readString();
         }
         else
         if (j == 11)
         {
             aBoolean713 = true;
         }
         else
         if (j == 12)
         {
             stream.readDWord();
         }
         else
         if (j == 13)
         {
             dummy = 2;
         }
         else
         {
             UnityEngine.Debug.Log("Error unrecognised config code: " + j);
         }
     } while (true);
 }